mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 20:18:18 +00:00
Added packaging directions, removed linkresource flag
This commit is contained in:
parent
8e0eb2ac50
commit
7941074fd1
22
package/Microsoft.Z3.x64.nuspec
Normal file
22
package/Microsoft.Z3.x64.nuspec
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
|
<metadata>
|
||||||
|
<id>Microsoft.Z3.x64</id>
|
||||||
|
<version>$(releaseVersion)</version>
|
||||||
|
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
|
||||||
|
<authors>Microsoft</authors>
|
||||||
|
<owners>Microsoft,Z3Prover</owners>
|
||||||
|
<iconUrl>$(iconUrlFromReleaseCommit)</iconUrl>
|
||||||
|
<projectUrl>https://github.com/Z3Prover/z3</projectUrl>
|
||||||
|
<licenseUrl>$(licenseUrlFromReleaseCommit)</licenseUrl>
|
||||||
|
<repository
|
||||||
|
type="git"
|
||||||
|
url="https://github.com/Z3Prover/z3.git"
|
||||||
|
branch="master"
|
||||||
|
commit="$(releaseCommitHash)"
|
||||||
|
/>
|
||||||
|
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||||
|
<description>Z3 is a constraint/SMT solver and theorem prover from Microsoft Research.</description>
|
||||||
|
<tags>smt constraint solver theorem prover</tags>
|
||||||
|
</metadata>
|
||||||
|
</package>
|
12
package/Microsoft.Z3.x64.targets
Normal file
12
package/Microsoft.Z3.x64.targets
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="$(MSBuildThisFileDirectory)libz3.dll">
|
||||||
|
<Visible>false</Visible>
|
||||||
|
<Link>libz3.dll</Link>
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
36
package/PackageCreationDirections.md
Normal file
36
package/PackageCreationDirections.md
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# Z3 NuGet packaging
|
||||||
|
|
||||||
|
## Creation
|
||||||
|
|
||||||
|
1. After tagging a commit for release, sign Microsoft.Z3.dll and libz3.dll (both x86 and x64 versions) with Microsoft's Authenticode certificate
|
||||||
|
2. Test the signed DLLs with the `Get-AuthenticodeSignature` PowerShell commandlet
|
||||||
|
3. Create the following directory structure for the x64 package (for x86, substitute the "x64" strings for "x86" and use x86 DLLs):
|
||||||
|
```
|
||||||
|
+-- Microsoft.Z3.x64
|
||||||
|
| +-- Microsoft.Z3.x64.nuspec
|
||||||
|
| +-- lib
|
||||||
|
| +-- net40
|
||||||
|
| +-- Microsoft.Z3.dll
|
||||||
|
| +-- build
|
||||||
|
| +-- Microsoft.Z3.x64.targets
|
||||||
|
| +-- libz3.dll
|
||||||
|
```
|
||||||
|
4. Open the nuspec file and fill in the appropriate macro values (note that for all URLs, preserve link integrity by linking to a specific commit):
|
||||||
|
* $(releaseVersion) - the Z3 version being released in this package
|
||||||
|
* $(iconUrlFromReleaseCommit) - URL for the Z3 icon file
|
||||||
|
* $(licenseUrlFromReleaseCommit) - URL for the Z3 repo license
|
||||||
|
* $(releaseCommitHash) - hash of the release commit
|
||||||
|
5. Run `nuget pack Microsoft.Z3.x64\Microsoft.Z3.x64.nuspec`
|
||||||
|
6. Test the resulting nupkg file (described below) then submit the package for signing before uploading to NuGet.org
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
1. Create a directory on your machine at C:\nuget-test-source
|
||||||
|
2. Put the Microsoft.Z3.x64.nupkg file in the directory
|
||||||
|
3. Open Visual Studio 2017, create a new C# project, then right click the project and click "Manage NuGet packages"
|
||||||
|
4. Add a new package source - your C:\nuget-test-source directory
|
||||||
|
5. Find the Microsoft.Z3.x64 package, ensuring in preview window that icon is present and all fields correct
|
||||||
|
6. Install the Microsoft.Z3.x64 package, ensuring you are asked to accept the license
|
||||||
|
7. Build your project. Check the output directory to ensure both Microsoft.Z3.dll and libz3.dll are present
|
||||||
|
8. Import Microsoft.Z3 to your project then add a simple line of code like `using (var ctx = new Context()) { }`; build then run your project to ensure the assemblies load properly
|
||||||
|
|
|
@ -1668,9 +1668,6 @@ class DotNetDLLComponent(Component):
|
||||||
'/noconfig',
|
'/noconfig',
|
||||||
'/nostdlib+',
|
'/nostdlib+',
|
||||||
'/reference:mscorlib.dll',
|
'/reference:mscorlib.dll',
|
||||||
# Under mono this isn't neccessary as mono will search the system
|
|
||||||
# library paths for libz3.so
|
|
||||||
'/linkresource:{}.dll'.format(get_component(Z3_DLL_COMPONENT).dll_name),
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -147,11 +147,6 @@ if (DOTNET_TOOLCHAIN_IS_WINDOWS)
|
||||||
"/nostdlib+"
|
"/nostdlib+"
|
||||||
"/reference:mscorlib.dll"
|
"/reference:mscorlib.dll"
|
||||||
)
|
)
|
||||||
# FIXME: This flag only works when the working directory of csc.exe is
|
|
||||||
# the directory containing the ``libz3`` target. I can't get this to work
|
|
||||||
# correctly with multi-configuration generators (i.e. Visual Studio) so
|
|
||||||
# just don't set the flag for now.
|
|
||||||
#list(APPEND CSC_FLAGS "/linkresource:$<TARGET_FILE_NAME:libz3>")
|
|
||||||
elseif (DOTNET_TOOLCHAIN_IS_MONO)
|
elseif (DOTNET_TOOLCHAIN_IS_MONO)
|
||||||
# We need to give the assembly a strong name so that it can be installed
|
# We need to give the assembly a strong name so that it can be installed
|
||||||
# into the GAC.
|
# into the GAC.
|
||||||
|
|
Loading…
Reference in a new issue