Integrate new build scripts with signing support
Rob Mensching committed
Apr 22, 2021 at 16:58 UTC
9c2aed97299fb96aeee3f1471ce40225437aaecf
16 files changed
+307
-57
.gitignore
+32
-11
@@ -13,6 +13,9 @@
13
# User-specific files (MonoDevelop/Xamarin Studio)
14
*.userprefs
15
16
+# Mono auto generated files
17
+mono_crash.*
18
+
19
# Build results
20
[Dd]ebug/
21
[Dd]ebugPublic/
@@ -20,12 +23,14 @@
23
[Rr]eleases/
24
x64/
25
x86/
26
+[Ww][Ii][Nn]32/
27
[Aa][Rr][Mm]/
28
[Aa][Rr][Mm]64/
29
bld/
30
[Bb]in/
31
[Oo]bj/
32
[Ll]og/
33
+[Ll]ogs/
34
35
# Visual Studio 2015/2017 cache/options directory
36
.vs/
@@ -39,9 +44,10 @@ Generated\ Files/
44
[Tt]est[Rr]esult*/
45
[Bb]uild[Ll]og.*
46
42
-# NUNIT
47
+# NUnit
48
*.VisualState.xml
49
TestResult.xml
50
+nunit-*.xml
51
52
# Build Results of an ATL Project
53
[Dd]ebugPS/
@@ -56,6 +62,9 @@ project.lock.json
62
project.fragment.lock.json
63
artifacts/
64
65
+# ASP.NET Scaffolding
66
+ScaffoldingReadMe.txt
67
+
68
# StyleCop
69
StyleCopReport.xml
70
@@ -122,9 +131,6 @@ _ReSharper*/
131
*.[Rr]e[Ss]harper
132
*.DotSettings.user
133
125
-# JustCode is a .NET coding add-in
126
-.JustCode
127
-
134
# TeamCity is a build add-in
135
_TeamCity*
136
@@ -135,6 +141,11 @@ _TeamCity*
141
.axoCover/*
142
!.axoCover/settings.json
143
144
+# Coverlet is a free, cross platform Code Coverage Tool
145
+coverage*.json
146
+coverage*.xml
147
+coverage*.info
148
+
149
# Visual Studio code coverage results
150
*.coverage
151
*.coveragexml
@@ -182,6 +193,8 @@ PublishScripts/
193
194
# NuGet Packages
195
*.nupkg
196
+# NuGet Symbol Packages
197
+*.snupkg
198
# The packages folder can be ignored because of Package Restore
199
**/[Pp]ackages/*
200
# except build/, which is used as an MSBuild target.
@@ -206,6 +219,8 @@ BundleArtifacts/
219
Package.StoreAssociation.xml
220
_pkginfo.txt
221
*.appx
222
+*.appxbundle
223
+*.appxupload
224
225
# Visual Studio cache files
226
# files ending in .cache can be ignored
@@ -231,8 +246,6 @@ orleans.codegen.cs
246
# Since there are multiple workflows, uncomment next line to ignore bower_components
247
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
248
#bower_components/
234
-# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true
235
-**/wwwroot/lib/
249
250
# RIA/Silverlight projects
251
Generated_Code/
@@ -257,6 +270,9 @@ ServiceFabricBackup/
270
*.bim.layout
271
*.bim_*.settings
272
*.rptproj.rsuser
273
+*- [Bb]ackup.rdl
274
+*- [Bb]ackup ([0-9]).rdl
275
+*- [Bb]ackup ([0-9][0-9]).rdl
276
277
# Microsoft Fakes
278
FakesAssemblies/
@@ -292,10 +308,6 @@ paket-files/
308
# FAKE - F# Make
309
.fake/
310
295
-# JetBrains Rider
296
-.idea/
297
-*.sln.iml
298
-
311
# CodeRush personal settings
312
.cr/personal
313
@@ -337,5 +349,14 @@ ASALocalRun/
349
# Local History for Visual Studio
350
.localhistory/
351
340
-# BeatPulse healthcheck temp database
352
+# BeatPulse healthcheck temp database
353
healthchecksdb
354
+
355
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
356
+MigrationBackup/
357
+
358
+# Ionide (cross platform F# VS Code tools) working folder
359
+.ionide/
360
+
361
+# Fody - auto-generated XML schema
362
+FodyWeavers.xsd
appveyor.cmd
+7
-5
@@ -1,15 +1,17 @@
1
@setlocal
2
@pushd %~dp0
3
+@set _C=Release
4
+@if /i "%1"=="debug" set _C=Debug
5
6
nuget restore || exit /b
7
6
-msbuild -t:Test -p:Configuration=Release src\test\BurnUnitTest || exit /b
8
+msbuild -t:Test -p:Configuration=%_C% src\test\BurnUnitTest || exit /b
9
8
-msbuild -p:Configuration=Release;Platform=x86 || exit /b
9
-msbuild -p:Configuration=Release;Platform=x64 || exit /b
10
-msbuild -p:Configuration=Release;Platform=arm64 || exit /b
10
+msbuild -p:Configuration=%_C%;Platform=x86 || exit /b
11
+msbuild -p:Configuration=%_C%;Platform=x64 || exit /b
12
+msbuild -p:Configuration=%_C%;Platform=arm64 || exit /b
13
12
-msbuild -p:Configuration=Release -t:Pack src\stub\stub.vcxproj || exit /b
14
+msbuild -p:Configuration=%_C% -t:PackNative src\stub\stub.vcxproj || exit /b
15
16
@popd
17
@endlocal
\ No newline at end of file
appveyor.yml
+2
@@ -35,6 +35,8 @@ skip_tags: true
35
artifacts:
36
- path: build\Release\**\*.nupkg
37
name: nuget
38
+- path: build\Release\**\*.snupkg
39
+ name: snupkg
40
41
notifications:
42
- provider: Slack
nuget.config
+2
-1
@@ -4,6 +4,7 @@
4
<clear />
5
<add key="wixbuildtools" value="https://ci.appveyor.com/nuget/wixbuildtools" />
6
<add key="wixtoolset-dutil" value="https://ci.appveyor.com/nuget/wixtoolset-dutil" />
7
+ <add key="wixtoolset-balutil" value="https://ci.appveyor.com/nuget/wixtoolset-balutil" />
8
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
9
</packageSources>
9
-</configuration>
\ No newline at end of file
10
+</configuration>
signing.json
new
+13
@@ -0,0 +1,13 @@
1
+{
2
+ "SignClient": {
3
+ "AzureAd": {
4
+ "AADInstance": "https://login.microsoftonline.com/",
5
+ "ClientId": "c248d68a-ba6f-4aa9-8a68-71fe872063f8",
6
+ "TenantId": "16076fdc-fcc1-4a15-b1ca-32c9a255900e"
7
+ },
8
+ "Service": {
9
+ "Url": "https://codesign.dotnetfoundation.org/",
10
+ "ResourceId": "https://SignService/3c30251f-36f3-490b-a955-520addb85001"
11
+ }
12
+ }
13
+}
src/Directory.Build.props
+1
-3
@@ -8,7 +8,6 @@
8
<PropertyGroup>
9
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
10
<EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink>
11
- <MSBuildWarningsAsMessages>MSB3246</MSBuildWarningsAsMessages>
11
12
<ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
13
<BaseOutputPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))</BaseOutputPath>
@@ -22,7 +21,6 @@
21
<Product>WiX Toolset</Product>
22
</PropertyGroup>
23
25
- <Import Project="Cpp.Build.props" Condition=" Exists('Cpp.Build.props') And '$(MSBuildProjectExtension)'=='.vcxproj' " />
26
- <Import Project="Wix.Build.props" Condition=" Exists('Wix.Build.props') And '$(MSBuildProjectExtension)'=='.wixproj' " />
24
+ <Import Project="Directory$(MSBuildProjectExtension).props" Condition=" Exists('Directory$(MSBuildProjectExtension).props') " />
25
<Import Project="Custom.Build.props" Condition=" Exists('Custom.Build.props') " />
26
</Project>
src/Directory.Build.targets
+56
-31
@@ -4,45 +4,70 @@
4
Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.targets
5
then update all of the repos.
6
-->
7
-<!--
8
- Replace PackageReferences with ProjectReferences when the projects can be found in .sln.
9
- See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284
10
--->
7
<Project>
8
<PropertyGroup>
13
- <ReplacePackageReferences>true</ReplacePackageReferences>
14
- <TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath>
15
- <TheSolutionPath Condition=" '$(NCrunch)'=='1' ">$(NCrunchOriginalSolutionPath)</TheSolutionPath>
9
+ <SigningToolFolder>$(BaseOutputPath)obj\.tools</SigningToolFolder>
10
+ <SigningToolExe>$(SigningToolFolder)\SignClient.exe</SigningToolExe>
11
+ <SigningFilelist>$(SigningToolFolder)\empty-filelist.txt</SigningFilelist>
12
+ <SigningConfiguration>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), signing.json))\signing.json</SigningConfiguration>
13
+ </PropertyGroup>
14
+
15
+ <PropertyGroup>
16
+ <CreateDocumentation Condition=" '$(CreateDocumentationFile)'!='true' ">false</CreateDocumentation>
17
+ <DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
18
</PropertyGroup>
19
18
- <Choose>
19
- <When Condition="$(ReplacePackageReferences) AND '$(TheSolutionPath)' != '' AND '$(TheSolutionPath)' != '*undefined*' AND Exists('$(TheSolutionPath)')">
20
+ <Target Name="SetNuspecProperties" DependsOnTargets="InitializeSourceControlInformation" AfterTargets="GetBuildVersion"
21
+ Condition=" Exists('$(MSBuildProjectName).nuspec') ">
22
+ <PropertyGroup>
23
+ <ProjectUrl Condition=" '$(ProjectUrl)'=='' and '$(PrivateRepositoryUrl)'!='' ">$(PrivateRepositoryUrl.Replace('.git',''))</ProjectUrl>
24
+
25
+ <NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
26
+ <NuspecBasePath Condition=" '$(NuspecBasePath)'=='' ">$(MSBuildProjectDirectory)</NuspecBasePath>
27
+ <NuspecProperties>$(NuspecProperties);Id=$(PackageId);Authors="$(Authors)";Configuration=$(Configuration);Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)"</NuspecProperties>
28
+ <NuspecProperties>$(NuspecProperties);Version=$(NPMPackageVersion);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl)</NuspecProperties>
29
+ <PublishRepositoryUrl>true</PublishRepositoryUrl>
30
+ <SymbolPackageFormat>snupkg</SymbolPackageFormat>
31
+ </PropertyGroup>
32
+ </Target>
33
+
34
+ <Target Name="PackNative" DependsOnTargets="GetBuildVersion;SetNuspecProperties"
35
+ Condition=" Exists('$(MSBuildProjectName).nuspec') ">
36
+
37
+ <Exec Command='nuget pack $(NuspecFile) -OutputDirectory "$(BaseOutputPath)$(Configuration)" -BasePath "$(NuspecBasePath)" -Properties $(NuspecProperties)'
38
+ WorkingDirectory="$(MSBuildProjectDirectory)" />
39
+
40
+ <ItemGroup>
41
+ <NuGetPackOutput Include="$(BaseOutputPath)$(Configuration)\**\$(PackageId)*.nupkg" />
42
+ </ItemGroup>
43
+ </Target>
44
+
45
+ <Target Name="_GetSignClient"
46
+ Condition=" !Exists('$(SigningToolExe)') ">
47
+
48
+ <WriteLinesToFile File='$(SigningFilelist)' Lines='do-not-sign-files-in-nupkg' Overwrite='true' />
49
21
- <PropertyGroup>
22
- <SolutionFileContent>$([System.IO.File]::ReadAllText($(TheSolutionPath)))</SolutionFileContent>
23
- <SmartSolutionDir>$([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) ))</SmartSolutionDir>
24
- <RegexPattern>(?<="[PackageName]", ")(.*)(?=", ")</RegexPattern>
25
- </PropertyGroup>
50
+ <Exec Command='dotnet.exe tool install --tool-path "$(SigningToolFolder)" SignClient' />
51
+ </Target>
52
27
- <ItemGroup>
28
- <!-- Keep the identity of the PackageReference -->
29
- <SmartPackageReference Include="@(PackageReference)">
30
- <PackageName>%(Identity)</PackageName>
31
- <InSolution>$(SolutionFileContent.Contains('\%(Identity).csproj'))</InSolution>
32
- </SmartPackageReference>
53
+ <Target Name="SignOutput" DependsOnTargets="_GetSignClient" AfterTargets="AfterBuild"
54
+ Condition=" '$(SigningUser)'!='' and '$(SignOutput)'!='false' and
55
+ ('$(MSBuildProjectExtension)'=='.csproj' or ('$(MSBuildProjectExtension)'=='.vcxproj' and '$(ConfigurationType)'!='StaticLibrary'))">
56
34
- <!-- Filter them by mapping them to another ItemGroup using the WithMetadataValue item function -->
35
- <PackageInSolution Include="@(SmartPackageReference->WithMetadataValue('InSolution', True))">
36
- <Pattern>$(RegexPattern.Replace('[PackageName]','%(PackageName)') )</Pattern>
37
- <SmartPath>$([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)'))</SmartPath>
38
- </PackageInSolution>
57
+ <Exec Command='"$(SigningToolExe)" sign -i $(TargetPath) -c "$(SigningConfiguration)" -n "WiX Toolset" -d "WiX Toolset" -u https://wixtoolset.org/ -r "$(SigningUser)" -s "$(SigningSecret)"'
58
+ WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" />
59
+ </Target>
60
40
- <ProjectReference Include="@(PackageInSolution->'$(SmartSolutionDir)\%(SmartPath)' )"/>
61
+ <Target Name="SignNupkg" DependsOnTargets="_GetSignClient" AfterTargets="Pack;PackNative"
62
+ Condition=" '$(SigningUser)'!='' and '@(NuGetPackOutput)'!='' and '$(SignNupkg)'!='false' ">
63
+ <ItemGroup>
64
+ <SigningNupkgs Include="@(NuGetPackOutput)" Condition=" '%(Extension)'=='.nupkg' " />
65
+ </ItemGroup>
66
42
- <!-- Remove the package references that are now referenced as projects -->
43
- <PackageReference Remove="@(PackageInSolution->'%(PackageName)' )"/>
44
- </ItemGroup>
67
+ <Exec Command='"$(SigningToolExe)" sign -i "@(SigningNupkgs->'%(Identity)')" -c "$(SigningConfiguration)" -f "$(SigningFilelist)" -n "WiX Toolset" -d "WiX Toolset" -u https://wixtoolset.org/ -r "$(SigningUser)" -s "$(SigningSecret)"'
68
+ WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" />
69
+ </Target>
70
46
- </When>
47
- </Choose>
71
+ <Import Project="Directory$(MSBuildProjectExtension).targets" Condition=" Exists('Directory$(MSBuildProjectExtension).targets') " />
72
+ <Import Project="Custom.Build.targets" Condition=" Exists('Custom.Build.targets') " />
73
</Project>
src/Directory.Packages.props
new
+20
@@ -0,0 +1,20 @@
1
+<Project>
2
+ <ItemGroup>
3
+ <PackageVersion Include="WixBuildTools.TestSupport" Version="4.0.47" />
4
+ <PackageVersion Include="WixBuildTools.TestSupport.Native" Version="4.0.47" />
5
+ <PackageVersion Include="WixToolset.DUtil" Version="4.0.70" targetFramework="native" />
6
+ <PackageVersion Include="WixToolset.BootstrapperCore.Native" Version="4.0.57" targetFramework="native" />
7
+ <PackageVersion Include="xunit.abstractions" Version="2.0.3" />
8
+ <PackageVersion Include="xunit.assert" Version="2.4.1" />
9
+ <PackageVersion Include="xunit.core" Version="2.4.1" />
10
+ <PackageVersion Include="xunit.extensibility.core" Version="2.4.1" />
11
+ <PackageVersion Include="xunit.extensibility.execution" Version="2.4.1" />
12
+ <PackageVersion Include="xunit.runner.msbuild" Version="2.4.1" />
13
+ <PackageVersion Include="xunit.runner.visualstudio" Version="2.4.1" />
14
+
15
+ <PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
16
+ <PackageVersion Include="Nerdbank.GitVersioning" Version="3.3.37" />
17
+ <PackageVersion Include="WixToolset.Dutil" Version="4.0.70" />
18
+ <PackageVersion Include="WixToolset.BootstrapperCore.Native" Version="4.0.57" />
19
+ </ItemGroup>
20
+</Project>
src/Directory.csproj.props
new
+13
@@ -0,0 +1,13 @@
1
+<!-- 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
+<!--
3
+ Do NOT modify this file. Update the canonical version in Home\repo-template\src\CSharp.Build.props
4
+ then update all of the repos.
5
+-->
6
+<Project>
7
+ <PropertyGroup>
8
+ <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
9
+ <SignAssembly>true</SignAssembly>
10
+ <AssemblyOriginatorKeyFile>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk))</AssemblyOriginatorKeyFile>
11
+ <NBGV_EmitThisAssemblyClass>false</NBGV_EmitThisAssemblyClass>
12
+ </PropertyGroup>
13
+</Project>
src/Directory.vcxproj.props
new
+118
@@ -0,0 +1,118 @@
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. -->
3
+
4
+<Project>
5
+ <PropertyGroup>
6
+ <Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform>
7
+ <IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir>
8
+ <OutDir>$(OutputPath)$(Platform)\</OutDir>
9
+
10
+ <!-- NBGV properties -->
11
+ <AssemblyCompany>$(Company)</AssemblyCompany>
12
+ <AssemblyCopyright>$(Copyright)</AssemblyCopyright>
13
+
14
+ <RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
15
+ <NuGetTargetMoniker>native,Version=v0.0</NuGetTargetMoniker>
16
+ </PropertyGroup>
17
+
18
+ <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'>='15.0'">
19
+ <WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
20
+ </PropertyGroup>
21
+
22
+ <PropertyGroup>
23
+ <CodeAnalysisRuleSet Condition=" Exists('$(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset') ">$(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
24
+ </PropertyGroup>
25
+
26
+ <ItemDefinitionGroup>
27
+ <ClCompile>
28
+ <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
29
+ <WarningLevel>Level4</WarningLevel>
30
+ <AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
31
+ <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0600;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
32
+ <PrecompiledHeader>Use</PrecompiledHeader>
33
+ <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
34
+ <CallingConvention Condition="'$(Platform)'=='Win32'">StdCall</CallingConvention>
35
+ <TreatWarningAsError>true</TreatWarningAsError>
36
+ <ExceptionHandling>false</ExceptionHandling>
37
+ <ControlFlowGuard>Guard</ControlFlowGuard>
38
+ <AdditionalOptions>-YlprecompDefine</AdditionalOptions>
39
+ <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
40
+ <MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) > 4 ">true</MultiProcessorCompilation>
41
+ </ClCompile>
42
+ <ResourceCompile>
43
+ <PreprocessorDefinitions>$(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
44
+ <AdditionalIncludeDirectories>$(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
45
+ </ResourceCompile>
46
+ <Lib>
47
+ <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
48
+ </Lib>
49
+ <Link>
50
+ <SubSystem>$(ProjectSubSystem)</SubSystem>
51
+ <ModuleDefinitionFile>$(ProjectModuleDefinitionFile)</ModuleDefinitionFile>
52
+ <NoEntryPoint>$(ResourceOnlyDll)</NoEntryPoint>
53
+ <GenerateDebugInformation>true</GenerateDebugInformation>
54
+ <AdditionalDependencies>$(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
55
+ <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
56
+ <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/IGNORE:4099 %(AdditionalOptions)</AdditionalOptions>
57
+ </Link>
58
+ </ItemDefinitionGroup>
59
+
60
+ <ItemDefinitionGroup Condition=" '$(Platform)'=='Win32' and '$(PlatformToolset)'!='v100'">
61
+ <ClCompile>
62
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
63
+ </ClCompile>
64
+ </ItemDefinitionGroup>
65
+ <ItemDefinitionGroup Condition=" '$(Platform)'=='arm' ">
66
+ <ClCompile>
67
+ <CallingConvention>CDecl</CallingConvention>
68
+ </ClCompile>
69
+ </ItemDefinitionGroup>
70
+ <ItemDefinitionGroup Condition=" '$(ConfigurationType)'=='StaticLibrary' ">
71
+ <ClCompile>
72
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
73
+ <OmitDefaultLibName>true</OmitDefaultLibName>
74
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
75
+ </ClCompile>
76
+ </ItemDefinitionGroup>
77
+ <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' ">
78
+ <ClCompile>
79
+ <Optimization>Disabled</Optimization>
80
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
81
+ <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
82
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
83
+ </ClCompile>
84
+ </ItemDefinitionGroup>
85
+ <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
86
+ <ClCompile>
87
+ <ControlFlowGuard></ControlFlowGuard>
88
+ <BasicRuntimeChecks></BasicRuntimeChecks>
89
+ <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
90
+ </ClCompile>
91
+ </ItemDefinitionGroup>
92
+ <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' ">
93
+ <ClCompile>
94
+ <Optimization>MinSpace</Optimization>
95
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
96
+ <FunctionLevelLinking>true</FunctionLevelLinking>
97
+ <IntrinsicFunctions>true</IntrinsicFunctions>
98
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
99
+ </ClCompile>
100
+ <Link>
101
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
102
+ <OptimizeReferences>true</OptimizeReferences>
103
+ </Link>
104
+ </ItemDefinitionGroup>
105
+ <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
106
+ <ClCompile>
107
+ <ControlFlowGuard></ControlFlowGuard>
108
+ <BasicRuntimeChecks></BasicRuntimeChecks>
109
+ <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
110
+ </ClCompile>
111
+ </ItemDefinitionGroup>
112
+ <ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' ">
113
+ <Link>
114
+ <KeyFile>$(LinkKeyFile)</KeyFile>
115
+ <DelaySign>$(LinkDelaySign)</DelaySign>
116
+ </Link>
117
+ </ItemDefinitionGroup>
118
+</Project>
src/NativeMultiTargeting.Build.props
new
+10
@@ -0,0 +1,10 @@
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. -->
3
+
4
+<Project>
5
+ <!-- Overrides the standard Cpp.Build.props to include the PlatformToolset in the output path. -->
6
+ <PropertyGroup>
7
+ <IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformToolset)\$(PlatformTarget)\</IntDir>
8
+ <OutDir>$(OutputPath)$(PlatformToolset)\$(PlatformTarget)\</OutDir>
9
+ </PropertyGroup>
10
+</Project>
src/engine/container.cpp
+4
@@ -318,6 +318,10 @@ extern "C" HRESULT ContainerStreamToBuffer(
318
case BURN_CONTAINER_TYPE_CABINET:
319
hr = CabExtractStreamToBuffer(pContext, ppbBuffer, pcbBuffer);
320
break;
321
+
322
+ default:
323
+ *ppbBuffer = NULL;
324
+ *pcbBuffer = 0;
325
}
326
327
//LExit:
src/engine/container.h
+1
-1
@@ -161,7 +161,7 @@ HRESULT ContainerOpen(
161
__in_z LPCWSTR wzFilePath
162
);
163
HRESULT ContainerNextStream(
164
- __inout BURN_CONTAINER_CONTEXT* pContext,
164
+ __in BURN_CONTAINER_CONTEXT* pContext,
165
__inout_z LPWSTR* psczStreamName
166
);
167
HRESULT ContainerStreamToFile(
src/stub/stub.nuspec
new
+25
@@ -0,0 +1,25 @@
1
+<?xml version="1.0"?>
2
+<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3
+ <metadata minClientVersion="4.0">
4
+ <id>$id$</id>
5
+ <version>$version$</version>
6
+ <title>$title$</title>
7
+ <description>$description$</description>
8
+ <authors>$authors$</authors>
9
+ <license type="expression">MS-RL</license>
10
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
11
+ <copyright>$copyright$</copyright>
12
+ <projectUrl>$projectUrl$</projectUrl>
13
+ <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" />
14
+ </metadata>
15
+
16
+ <files>
17
+ <file src="$projectFolder$$id$.props" target="buildTransitive" />
18
+ <file src="..\..\build\$configuration$\Win32\burn.exe" target="tools\x86" />
19
+ <file src="..\..\build\$configuration$\Win32\burn.pdb" target="tools\x86" />
20
+ <file src="..\..\build\$configuration$\x64\burn.exe" target="tools\x64" />
21
+ <file src="..\..\build\$configuration$\x64\burn.pdb" target="tools\x64" />
22
+ <file src="..\..\build\$configuration$\arm64\burn.exe" target="tools\arm64" />
23
+ <file src="..\..\build\$configuration$\arm64\burn.pdb" target="tools\arm64" />
24
+ </files>
25
+</package>
src/stub/stub.vcxproj
+3
-5
@@ -46,6 +46,8 @@
46
<!-- NBGV properties -->
47
<AssemblyLanguage>1033</AssemblyLanguage>
48
<AssemblyProduct>Burn</AssemblyProduct>
49
+ <PackageId>WixToolset.Burn</PackageId>
50
+ <SignOutput>false</SignOutput>
51
</PropertyGroup>
52
53
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -101,10 +103,6 @@
103
<None Include="packages.config" />
104
</ItemGroup>
105
104
- <Target Name="Pack" DependsOnTargets="GetBuildVersion">
105
- <Exec Command='nuget pack WixToolset.Burn.nuspec -Symbols -BasePath "$(BaseOutputPath)$(Configuration)" -OutputDirectory "$(BaseOutputPath)$(Configuration)" -Properties Id=WixToolset.Burn;Version="$(BuildVersionSimple)";ProjectFolder=$(MSBuildThisFileDirectory);Authors="$(Authors)";Copyright="$(Copyright)";Description="$(Description)"' />
106
- </Target>
107
-
106
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
107
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
108
<PropertyGroup>
@@ -119,4 +117,4 @@
117
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" />
118
<Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" />
119
</Target>
122
-</Project>
\ No newline at end of file
120
+</Project>
src/wix.snk
Binary files /dev/null and b/src/wix.snk differ