diff options
author | Rob Mensching <rob@firegiant.com> | 2018-08-10 23:32:23 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2018-10-03 23:55:54 -0700 |
commit | 77b1c956e6037717f98ae01c2ff4e989c0252db8 (patch) | |
tree | f3682540cbfbe41780ec123d1d7f7df8674d3270 /src | |
parent | 989686d2fdb3b46ed3c411f03ebdcdeeb9f42e15 (diff) | |
download | wix-77b1c956e6037717f98ae01c2ff4e989c0252db8.tar.gz wix-77b1c956e6037717f98ae01c2ff4e989c0252db8.tar.bz2 wix-77b1c956e6037717f98ae01c2ff4e989c0252db8.zip |
Enable use of NCrunch
Diffstat (limited to 'src')
-rw-r--r-- | src/Cpp.Build.props | 5 | ||||
-rw-r--r-- | src/Directory.Build.props | 15 | ||||
-rw-r--r-- | src/WixToolset.Core.Native/WixToolset.Core.Native.csproj | 27 | ||||
-rw-r--r-- | src/WixToolset.Core.Native/WixToolset.Core.Native.v3.ncrunchproject | 10 | ||||
-rw-r--r-- | src/wixnative/wixnative.vcxproj | 2 |
5 files changed, 50 insertions, 9 deletions
diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 453aa442..296b36ca 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props | |||
@@ -3,9 +3,8 @@ | |||
3 | 3 | ||
4 | <Project> | 4 | <Project> |
5 | <PropertyGroup> | 5 | <PropertyGroup> |
6 | <Platform Condition=" '$(Platform)' == 'AnyCPU' ">Win32</Platform> | 6 | <Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform> |
7 | <BaseOutputPath>$(OutputPath)</BaseOutputPath> | 7 | <IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir> |
8 | <IntDir>$(BaseIntermediateOutputPath)$(Platform)\</IntDir> | ||
9 | <OutDir>$(OutputPath)$(Platform)\</OutDir> | 8 | <OutDir>$(OutputPath)$(Platform)\</OutDir> |
10 | </PropertyGroup> | 9 | </PropertyGroup> |
11 | 10 | ||
diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 63ad5d6e..9eacf3f5 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props | |||
@@ -1,16 +1,23 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | 3 | <!-- | |
4 | Do NOT modify this file. Update the canonical version in Home\src\Directory.Build.props | ||
5 | then update all of the repos. | ||
6 | --> | ||
4 | <Project> | 7 | <Project> |
5 | <PropertyGroup> | 8 | <PropertyGroup> |
6 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | 9 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
7 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | 10 | <EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink> |
8 | <BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)..\build\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath> | 11 | |
9 | <OutputPath>$(MSBuildThisFileDirectory)..\build\$(Configuration)\</OutputPath> | 12 | <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName> |
13 | <BaseOutputPath>$(MSBuildThisFileDirectory)..\build\</BaseOutputPath> | ||
14 | <BaseIntermediateOutputPath>$(BaseOutputPath)obj\$(ProjectName)\</BaseIntermediateOutputPath> | ||
15 | <OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath> | ||
10 | 16 | ||
11 | <Authors>WiX Toolset Team</Authors> | 17 | <Authors>WiX Toolset Team</Authors> |
12 | <Company>WiX Toolset</Company> | 18 | <Company>WiX Toolset</Company> |
13 | <Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright> | 19 | <Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright> |
20 | <Product>WiX Toolset</Product> | ||
14 | </PropertyGroup> | 21 | </PropertyGroup> |
15 | 22 | ||
16 | <PropertyGroup> | 23 | <PropertyGroup> |
diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj index b02c00ad..e2431fef 100644 --- a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj | |||
@@ -13,7 +13,12 @@ | |||
13 | <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" /> | 13 | <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" /> |
14 | </ItemGroup> | 14 | </ItemGroup> |
15 | 15 | ||
16 | <Target Name="BuildWixNative" BeforeTargets="GetCopyToOutputDirectoryItems"> | 16 | <PropertyGroup> |
17 | <NativeFileListPath Condition=" '$(NCrunch)'=='' ">$(MSBuildProjectDir)..\..\build\obj\$(ProjectName)\$(Configuration)\NativeFileList.txt</NativeFileListPath> | ||
18 | <NativeFileListPath Condition=" '$(NCrunch)'=='1' ">$(NCrunchOriginalProjectDir)..\..\build\obj\$(ProjectName)\$(Configuration)\NativeFileList.txt</NativeFileListPath> | ||
19 | </PropertyGroup> | ||
20 | |||
21 | <Target Name="BuildWixNative" BeforeTargets="GetCopyToOutputDirectoryItems" Condition=" '$(NCrunch)'=='' "> | ||
17 | <MSBuild Projects="..\wixnative\wixnative.vcxproj" Properties="Platform=Win32" Targets="Build;BuiltProjectOutputGroup;DebugSymbolsProjectOutputGroup"> | 22 | <MSBuild Projects="..\wixnative\wixnative.vcxproj" Properties="Platform=Win32" Targets="Build;BuiltProjectOutputGroup;DebugSymbolsProjectOutputGroup"> |
18 | <Output TaskParameter="TargetOutputs" ItemName="_NativeProjectOutput" /> | 23 | <Output TaskParameter="TargetOutputs" ItemName="_NativeProjectOutput" /> |
19 | </MSBuild> | 24 | </MSBuild> |
@@ -21,7 +26,11 @@ | |||
21 | <Output TaskParameter="TargetOutputs" ItemName="_NativeProjectOutput" /> | 26 | <Output TaskParameter="TargetOutputs" ItemName="_NativeProjectOutput" /> |
22 | </MSBuild> | 27 | </MSBuild> |
23 | 28 | ||
29 | <WriteLinesToFile File="$(NativeFileListPath)" Lines="@(_NativeProjectOutput)" Overwrite="true" /> | ||
30 | |||
24 | <ItemGroup> | 31 | <ItemGroup> |
32 | <FileWrites Include="$(NativeFileListPath)" /> | ||
33 | |||
25 | <AllItemsFullPathWithTargetPath Include="@(_NativeProjectOutput->'%(FullPath)')"> | 34 | <AllItemsFullPathWithTargetPath Include="@(_NativeProjectOutput->'%(FullPath)')"> |
26 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | 35 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
27 | <TargetPath>%(Filename)%(Extension)</TargetPath> | 36 | <TargetPath>%(Filename)%(Extension)</TargetPath> |
@@ -29,6 +38,22 @@ | |||
29 | </ItemGroup> | 38 | </ItemGroup> |
30 | </Target> | 39 | </Target> |
31 | 40 | ||
41 | <Target Name="NCrunchCopyNative" AfterTargets="AfterBuild" Condition=" '$(NCrunch)'=='1' "> | ||
42 | <ReadLinesFromFile File="$(NativeFileListPath)"> | ||
43 | <Output TaskParameter="Lines" ItemName="_NCrunchNativeProjectOutput" /> | ||
44 | </ReadLinesFromFile> | ||
45 | |||
46 | <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)'=='' " /> | ||
47 | |||
48 | <Copy SourceFiles="@(_NCrunchNativeProjectOutput)" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true"> | ||
49 | <Output TaskParameter="CopiedFiles" ItemName="_NCrunchNativeCopied" /> | ||
50 | </Copy> | ||
51 | |||
52 | <ItemGroup> | ||
53 | <FileWrites Include="@(_NCrunchNativeCopied)" /> | ||
54 | </ItemGroup> | ||
55 | </Target> | ||
56 | |||
32 | <Target Name="SetNuspecProperties" AfterTargets="CoreBuild"> | 57 | <Target Name="SetNuspecProperties" AfterTargets="CoreBuild"> |
33 | <PropertyGroup> | 58 | <PropertyGroup> |
34 | <NuspecBasePath>$(OutputPath)</NuspecBasePath> | 59 | <NuspecBasePath>$(OutputPath)</NuspecBasePath> |
diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.v3.ncrunchproject b/src/WixToolset.Core.Native/WixToolset.Core.Native.v3.ncrunchproject new file mode 100644 index 00000000..0da1f42d --- /dev/null +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.v3.ncrunchproject | |||
@@ -0,0 +1,10 @@ | |||
1 | <ProjectConfiguration> | ||
2 | <Settings> | ||
3 | <AdditionalFilesToIncludeForProject> | ||
4 | <Value>..\..\build\Debug\Win32\wixnative.x86.exe</Value> | ||
5 | <Value>..\..\build\Debug\Win32\wixnative.x86.pdb</Value> | ||
6 | <Value>..\..\build\Debug\x64\wixnative.amd64.exe</Value> | ||
7 | <Value>..\..\build\Debug\x64\wixnative.amd64.pdb</Value> | ||
8 | </AdditionalFilesToIncludeForProject> | ||
9 | </Settings> | ||
10 | </ProjectConfiguration> \ No newline at end of file | ||
diff --git a/src/wixnative/wixnative.vcxproj b/src/wixnative/wixnative.vcxproj index d4b31fd8..420615ed 100644 --- a/src/wixnative/wixnative.vcxproj +++ b/src/wixnative/wixnative.vcxproj | |||
@@ -75,7 +75,7 @@ | |||
75 | </ItemGroup> | 75 | </ItemGroup> |
76 | 76 | ||
77 | <Target Name="Pack" DependsOnTargets="GetBuildVersion"> | 77 | <Target Name="Pack" DependsOnTargets="GetBuildVersion"> |
78 | <Exec Command="nuget pack runtime.win.WixToolset.Core.Native.nuspec -BasePath "$(BaseOutputPath)\" -OutputDirectory "$(BaseOutputPath)\" -NoPackageAnalysis -Properties Configuration=$(Configuration);Id=runtime.win.WixToolset.Core.Native;Version="$(BuildVersionSimple)";Platform=$(PlatformTarget);Authors="$(Authors)";Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)"" /> | 78 | <Exec Command='nuget pack runtime.win.WixToolset.Core.Native.nuspec -BasePath "$(BaseOutputPath)$(Configuration)" -OutputDirectory "$(BaseOutputPath)$(Configuration)" -NoPackageAnalysis -Properties Configuration=$(Configuration);Id=runtime.win.WixToolset.Core.Native;Version="$(BuildVersionSimple)";Platform=$(PlatformTarget);Authors="$(Authors)";Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)"' /> |
79 | </Target> | 79 | </Target> |
80 | 80 | ||
81 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 81 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |