diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-03-15 15:46:44 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-03-16 11:01:46 -0700 |
| commit | 533fb3c24290f5c9684a661e2576d857fbee9fb6 (patch) | |
| tree | 2d8780846bd044f92ab481d6409c6865baf6bac0 /src/WixToolset.Core.Native | |
| parent | 8296f237c69743d3e6cbdc58fc07e8470562b92e (diff) | |
| download | wix-533fb3c24290f5c9684a661e2576d857fbee9fb6.tar.gz wix-533fb3c24290f5c9684a661e2576d857fbee9fb6.tar.bz2 wix-533fb3c24290f5c9684a661e2576d857fbee9fb6.zip | |
Modernize build system
Diffstat (limited to 'src/WixToolset.Core.Native')
| -rw-r--r-- | src/WixToolset.Core.Native/WixToolset.Core.Native.csproj | 83 | ||||
| -rw-r--r-- | src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec | 14 |
2 files changed, 25 insertions, 72 deletions
diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj index 2c118d51..41e75f99 100644 --- a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj | |||
| @@ -5,82 +5,35 @@ | |||
| 5 | 5 | ||
| 6 | <PropertyGroup> | 6 | <PropertyGroup> |
| 7 | <TargetFramework>netstandard2.0</TargetFramework> | 7 | <TargetFramework>netstandard2.0</TargetFramework> |
| 8 | <NuspecFile>$(MSBuildThisFileName).nuspec</NuspecFile> | ||
| 9 | <Description>Core Native</Description> | ||
| 10 | <DebugType>embedded</DebugType> | 8 | <DebugType>embedded</DebugType> |
| 9 | <Description>WiX Toolset Native Processing</Description> | ||
| 11 | <IncludeSymbols>true</IncludeSymbols> | 10 | <IncludeSymbols>true</IncludeSymbols> |
| 12 | <CreateDocumentationFile>true</CreateDocumentationFile> | 11 | <CreateDocumentationFile>true</CreateDocumentationFile> |
| 13 | </PropertyGroup> | 12 | </PropertyGroup> |
| 14 | 13 | ||
| 15 | <ItemGroup> | 14 | <ItemGroup Condition=" '$(NCrunch)'=='' "> |
| 16 | <ProjectReference Include="..\wixnative\wixnative.vcxproj"> | 15 | <ProjectReference Include="..\wixnative\wixnative.vcxproj" ReferenceOutputAssembly="false" PrivateAssets="All" Properties="Platform=ARM64" /> |
| 17 | <PrivateAssets>All</PrivateAssets> | 16 | <ProjectReference Include="..\wixnative\wixnative.vcxproj" ReferenceOutputAssembly="false" PrivateAssets="All" Properties="Platform=Win32" /> |
| 18 | <Properties>Platform=ARM64</Properties> | 17 | <ProjectReference Include="..\wixnative\wixnative.vcxproj" ReferenceOutputAssembly="false" PrivateAssets="All" Properties="Platform=x64" /> |
| 19 | </ProjectReference> | 18 | </ItemGroup> |
| 20 | <ProjectReference Include="..\wixnative\wixnative.vcxproj"> | 19 | |
| 21 | <PrivateAssets>All</PrivateAssets> | 20 | <ItemGroup Condition=" '$(NCrunch)'=='' "> |
| 22 | <Properties>Platform=Win32</Properties> | 21 | <None Include="$(BaseOutputPath)$(Configuration)\x64\mergemod.dll" CopyToOutputDirectory="PreserveNewest" /> |
| 23 | </ProjectReference> | 22 | <None Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.exe" CopyToOutputDirectory="PreserveNewest" /> |
| 24 | <ProjectReference Include="..\wixnative\wixnative.vcxproj"> | 23 | <None Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.pdb" CopyToOutputDirectory="PreserveNewest" /> |
| 25 | <PrivateAssets>All</PrivateAssets> | 24 | </ItemGroup> |
| 26 | <Properties>Platform=x64</Properties> | 25 | <ItemGroup Condition=" '$(NCrunch)'=='1' "> |
| 27 | </ProjectReference> | 26 | <None Include="$(NCrunchOriginalProjectDir)..\..\build\$(Configuration)\x64\mergemod.dll" CopyToOutputDirectory="PreserveNewest" /> |
| 27 | <None Include="$(NCrunchOriginalProjectDir)..\..\build\$(Configuration)\x64\wixnative.exe" CopyToOutputDirectory="PreserveNewest" /> | ||
| 28 | <None Include="$(NCrunchOriginalProjectDir)..\..\build\$(Configuration)\x64\wixnative.pdb" CopyToOutputDirectory="PreserveNewest" /> | ||
| 28 | </ItemGroup> | 29 | </ItemGroup> |
| 29 | 30 | ||
| 30 | <ItemGroup> | 31 | <ItemGroup> |
| 31 | <PackageReference Include="WixToolset.Data" Version="4.0.*" PrivateAssets="All" /> | 32 | <PackageReference Include="WixToolset.Data" Version="4.0.*" PrivateAssets="all" /> |
| 32 | </ItemGroup> | 33 | </ItemGroup> |
| 33 | 34 | ||
| 34 | <ItemGroup> | 35 | <ItemGroup> |
| 35 | <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" /> | 36 | <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" /> |
| 36 | <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" /> | 37 | <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" /> |
| 37 | </ItemGroup> | 38 | </ItemGroup> |
| 38 | |||
| 39 | <PropertyGroup> | ||
| 40 | <NativeFileListPath Condition=" '$(NCrunch)'=='' ">$(MSBuildProjectDir)..\..\build\obj\$(ProjectName)\$(Configuration)\NativeFileList.txt</NativeFileListPath> | ||
| 41 | <NativeFileListPath Condition=" '$(NCrunch)'=='1' ">$(NCrunchOriginalProjectDir)..\..\build\obj\$(ProjectName)\$(Configuration)\NativeFileList.txt</NativeFileListPath> | ||
| 42 | <MergeModDirectory>$(MSBuildThisFileDirectory)..\wixnative\</MergeModDirectory> | ||
| 43 | </PropertyGroup> | ||
| 44 | |||
| 45 | <Target Name="BuildWixNative" BeforeTargets="GetCopyToOutputDirectoryItems" Condition=" '$(NCrunch)'=='' "> | ||
| 46 | <ItemGroup> | ||
| 47 | <_NativeProjectOutput Include="$(MergeModDirectory)x64\mergemod.dll" /> | ||
| 48 | <_NativeProjectOutput Include="$(OutputPath)..\x64\wixnative.exe" /> | ||
| 49 | <_NativeProjectOutput Include="$(OutputPath)..\x64\wixnative.pdb" /> | ||
| 50 | </ItemGroup> | ||
| 51 | |||
| 52 | <WriteLinesToFile File="$(NativeFileListPath)" Lines="@(_NativeProjectOutput)" Overwrite="true" /> | ||
| 53 | |||
| 54 | <ItemGroup> | ||
| 55 | <FileWrites Include="$(NativeFileListPath)" /> | ||
| 56 | |||
| 57 | <AllItemsFullPathWithTargetPath Include="@(_NativeProjectOutput->'%(FullPath)')"> | ||
| 58 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
| 59 | <TargetPath>%(Filename)%(Extension)</TargetPath> | ||
| 60 | </AllItemsFullPathWithTargetPath> | ||
| 61 | </ItemGroup> | ||
| 62 | </Target> | ||
| 63 | |||
| 64 | <Target Name="NCrunchCopyNative" AfterTargets="AfterBuild" Condition=" '$(NCrunch)'=='1' "> | ||
| 65 | <ReadLinesFromFile File="$(NativeFileListPath)"> | ||
| 66 | <Output TaskParameter="Lines" ItemName="_NCrunchNativeProjectOutput" /> | ||
| 67 | </ReadLinesFromFile> | ||
| 68 | |||
| 69 | <Error Text="You must build $(MSBuildProjectName) to create the referenced native projects. Once built, 'Reload and rebuild' the project in the NCrunch Tests. The $(NativeFileListPath) file must not be empty." Condition=" '@(_NCrunchNativeProjectOutput)'=='' " /> | ||
| 70 | |||
| 71 | <Copy SourceFiles="@(_NCrunchNativeProjectOutput)" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true"> | ||
| 72 | <Output TaskParameter="CopiedFiles" ItemName="_NCrunchNativeCopied" /> | ||
| 73 | </Copy> | ||
| 74 | |||
| 75 | <ItemGroup> | ||
| 76 | <FileWrites Include="@(_NCrunchNativeCopied)" /> | ||
| 77 | </ItemGroup> | ||
| 78 | </Target> | ||
| 79 | |||
| 80 | <Target Name="SetNuspecProperties" AfterTargets="CoreBuild"> | ||
| 81 | <PropertyGroup> | ||
| 82 | <NuspecBasePath>$(OutputPath)..\</NuspecBasePath> | ||
| 83 | <NuspecProperties>Id=$(MSBuildThisFileName);Version=$(BuildVersionSimple);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);MergeModDir=$(MergeModDirectory)</NuspecProperties> | ||
| 84 | </PropertyGroup> | ||
| 85 | </Target> | ||
| 86 | </Project> | 39 | </Project> |
diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec index 33b19bc1..b6fd9790 100644 --- a/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec | |||
| @@ -3,16 +3,16 @@ | |||
| 3 | <metadata minClientVersion="4.0"> | 3 | <metadata minClientVersion="4.0"> |
| 4 | <id>$id$</id> | 4 | <id>$id$</id> |
| 5 | <version>$version$</version> | 5 | <version>$version$</version> |
| 6 | <title>$title$</title> | ||
| 7 | <description>$description$</description> | ||
| 6 | <authors>$authors$</authors> | 8 | <authors>$authors$</authors> |
| 7 | <owners>$authors$</owners> | ||
| 8 | <license type="expression">MS-RL</license> | 9 | <license type="expression">MS-RL</license> |
| 9 | <projectUrl>https://github.com/wixtoolset/Core.Native</projectUrl> | ||
| 10 | <requireLicenseAcceptance>false</requireLicenseAcceptance> | 10 | <requireLicenseAcceptance>false</requireLicenseAcceptance> |
| 11 | <description>$description$</description> | ||
| 12 | <copyright>$copyright$</copyright> | 11 | <copyright>$copyright$</copyright> |
| 12 | <projectUrl>$projectUrl$</projectUrl> | ||
| 13 | <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" /> | 13 | <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" /> |
| 14 | <dependencies> | 14 | <dependencies> |
| 15 | <group targetFramework=".NETStandard2.0" /> | 15 | <group targetFramework="netstandard2.0" /> |
| 16 | </dependencies> | 16 | </dependencies> |
| 17 | </metadata> | 17 | </metadata> |
| 18 | 18 | ||
| @@ -20,13 +20,13 @@ | |||
| 20 | <file src="netstandard2.0\$id$.dll" target="lib\netstandard2.0" /> | 20 | <file src="netstandard2.0\$id$.dll" target="lib\netstandard2.0" /> |
| 21 | <file src="netstandard2.0\$id$.xml" target="lib\netstandard2.0" /> | 21 | <file src="netstandard2.0\$id$.xml" target="lib\netstandard2.0" /> |
| 22 | 22 | ||
| 23 | <file src="$mergemoddir$ARM64\mergemod.dll" target="runtimes\win-arm64\native" /> | 23 | <file src="ARM64\mergemod.dll" target="runtimes\win-arm64\native" /> |
| 24 | <file src="ARM64\wixnative.exe" target="runtimes\win-arm64\native" /> | 24 | <file src="ARM64\wixnative.exe" target="runtimes\win-arm64\native" /> |
| 25 | <file src="ARM64\wixnative.pdb" target="runtimes\win-arm64\native" /> | 25 | <file src="ARM64\wixnative.pdb" target="runtimes\win-arm64\native" /> |
| 26 | <file src="$mergemoddir$Win32\mergemod.dll" target="runtimes\win-x86\native" /> | 26 | <file src="Win32\mergemod.dll" target="runtimes\win-x86\native" /> |
| 27 | <file src="Win32\wixnative.exe" target="runtimes\win-x86\native" /> | 27 | <file src="Win32\wixnative.exe" target="runtimes\win-x86\native" /> |
| 28 | <file src="Win32\wixnative.pdb" target="runtimes\win-x86\native" /> | 28 | <file src="Win32\wixnative.pdb" target="runtimes\win-x86\native" /> |
| 29 | <file src="$mergemoddir$x64\mergemod.dll" target="runtimes\win-x64\native" /> | 29 | <file src="x64\mergemod.dll" target="runtimes\win-x64\native" /> |
| 30 | <file src="x64\wixnative.exe" target="runtimes\win-x64\native" /> | 30 | <file src="x64\wixnative.exe" target="runtimes\win-x64\native" /> |
| 31 | <file src="x64\wixnative.pdb" target="runtimes\win-x64\native" /> | 31 | <file src="x64\wixnative.pdb" target="runtimes\win-x64\native" /> |
| 32 | </files> | 32 | </files> |
