diff options
author | Rob Mensching <rob@firegiant.com> | 2021-04-16 23:35:06 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-04-29 16:47:06 -0700 |
commit | a2f0de28fc0f1ab71d4685c77f0b21d946f3e702 (patch) | |
tree | 585a60388d844515a21b5d8a786e5f91ff227127 | |
parent | ae224f38e8349e2d0dfce95918571db4f18b5fba (diff) | |
download | wix-a2f0de28fc0f1ab71d4685c77f0b21d946f3e702.tar.gz wix-a2f0de28fc0f1ab71d4685c77f0b21d946f3e702.tar.bz2 wix-a2f0de28fc0f1ab71d4685c77f0b21d946f3e702.zip |
Introduce new versioning system based on GitInfo
-rw-r--r-- | appveyor.yml | 4 | ||||
-rw-r--r-- | signing.json | 13 | ||||
-rw-r--r-- | src/Directory.Build.props | 5 | ||||
-rw-r--r-- | src/Directory.Build.targets | 120 | ||||
-rw-r--r-- | src/Directory.csproj.targets | 15 | ||||
-rw-r--r-- | src/Directory.vcxproj.props | 9 | ||||
-rw-r--r-- | src/Directory.vcxproj.targets | 45 | ||||
-rw-r--r-- | src/WixToolset.Core.Native/WixToolset.Core.Native.csproj | 3 | ||||
-rw-r--r-- | src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj | 2 | ||||
-rw-r--r-- | src/test/version.txt | 1 | ||||
-rw-r--r-- | src/ver.rc | 55 | ||||
-rw-r--r-- | src/wixnative/wixnative.vcxproj | 2 | ||||
-rw-r--r-- | version.json | 11 | ||||
-rw-r--r-- | version.txt | 1 |
14 files changed, 223 insertions, 63 deletions
diff --git a/appveyor.yml b/appveyor.yml index dccc2071..364569cf 100644 --- a/appveyor.yml +++ b/appveyor.yml | |||
@@ -21,6 +21,8 @@ environment: | |||
21 | build_script: | 21 | build_script: |
22 | - appveyor.cmd | 22 | - appveyor.cmd |
23 | 23 | ||
24 | test: off | ||
25 | |||
24 | pull_requests: | 26 | pull_requests: |
25 | do_not_increment_build_number: true | 27 | do_not_increment_build_number: true |
26 | 28 | ||
@@ -30,8 +32,6 @@ nuget: | |||
30 | skip_branch_with_pr: true | 32 | skip_branch_with_pr: true |
31 | skip_tags: true | 33 | skip_tags: true |
32 | 34 | ||
33 | test: off | ||
34 | |||
35 | artifacts: | 35 | artifacts: |
36 | - path: build\Release\**\*.nupkg | 36 | - path: build\Release\**\*.nupkg |
37 | name: nuget | 37 | name: nuget |
diff --git a/signing.json b/signing.json new file mode 100644 index 00000000..fe1c8c9b --- /dev/null +++ b/signing.json | |||
@@ -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 | } | ||
diff --git a/src/Directory.Build.props b/src/Directory.Build.props index b3c6287c..dc78f888 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props | |||
@@ -8,7 +8,6 @@ | |||
8 | <PropertyGroup> | 8 | <PropertyGroup> |
9 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | 9 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
10 | <EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink> | 10 | <EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink> |
11 | <MSBuildWarningsAsMessages>MSB3246</MSBuildWarningsAsMessages> | ||
12 | 11 | ||
13 | <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName> | 12 | <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName> |
14 | <BaseOutputPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))</BaseOutputPath> | 13 | <BaseOutputPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))</BaseOutputPath> |
@@ -20,6 +19,10 @@ | |||
20 | <Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright> | 19 | <Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright> |
21 | <PackageLicenseExpression>MS-RL</PackageLicenseExpression> | 20 | <PackageLicenseExpression>MS-RL</PackageLicenseExpression> |
22 | <Product>WiX Toolset</Product> | 21 | <Product>WiX Toolset</Product> |
22 | |||
23 | <GitThisAssembly>false</GitThisAssembly> | ||
24 | <GitVersionFile>version.txt</GitVersionFile> | ||
25 | <GitBaseVersionRegex Condition="'$(GitBaseVersionRegex)' == ''">v?(?<MAJOR>\d+|{[\dA-za-z\-\.]+})\.(?<MINOR>(\d+|{[\dA-za-z\-\.]+}))(?:\-(?<LABEL>[\dA-Za-z\-\.{}]+))?$|^v?(?<MAJOR>\d+|{[\dA-za-z\-\.]+})\.(?<MINOR>(\d+|{[\dA-za-z\-\.]+}))\.(?<PATCH>\d+|{[\dA-za-z\-\.]+})(?:\-(?<LABEL>[\dA-Za-z\-\.{}]+))?$|^(?<LABEL>[\dA-Za-z\-\.{}]+)\-v?(?<MAJOR>\d+|{[\dA-za-z\-\.]+})\.(?<MINOR>\d+|{[\dA-za-z\-\.]+})\.(?<PATCH>\d+|{[\dA-za-z\-\.]+})$</GitBaseVersionRegex> | ||
23 | </PropertyGroup> | 26 | </PropertyGroup> |
24 | 27 | ||
25 | <Import Project="Directory$(MSBuildProjectExtension).props" Condition=" Exists('Directory$(MSBuildProjectExtension).props') " /> | 28 | <Import Project="Directory$(MSBuildProjectExtension).props" Condition=" Exists('Directory$(MSBuildProjectExtension).props') " /> |
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 2fcc765a..c426f25e 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets | |||
@@ -4,47 +4,105 @@ | |||
4 | Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.targets | 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. | 5 | then update all of the repos. |
6 | --> | 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 | --> | ||
11 | <Project> | 7 | <Project> |
12 | <PropertyGroup> | 8 | <PropertyGroup> |
13 | <ReplacePackageReferences>true</ReplacePackageReferences> | 9 | <SigningToolFolder>$(BaseOutputPath)obj\.tools</SigningToolFolder> |
14 | <TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath> | 10 | <SigningToolExe>$(SigningToolFolder)\SignClient.exe</SigningToolExe> |
15 | <TheSolutionPath Condition=" '$(NCrunch)'=='1' ">$(NCrunchOriginalSolutionPath)</TheSolutionPath> | 11 | <SigningFilelist>$(SigningToolFolder)\empty-filelist.txt</SigningFilelist> |
12 | <SigningConfiguration>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), signing.json))\signing.json</SigningConfiguration> | ||
13 | </PropertyGroup> | ||
14 | |||
15 | <Target Name="__FixupGitBaseVersion" BeforeTargets="_GitPopulateVersionInfo"> | ||
16 | <PropertyGroup> | ||
17 | <GitBaseVersion>$(GitBaseVersion.Replace('{apiversion}', '$(ApiVersion)'))</GitBaseVersion> | ||
18 | <GitBaseVersion>$(GitBaseVersion.Replace('{height}', '$(GitCommits)'))</GitBaseVersion> | ||
19 | <GitBaseVersion>$(GitBaseVersion.Replace('{commits}', '$(GitCommits)'))</GitBaseVersion> | ||
20 | </PropertyGroup> | ||
21 | </Target> | ||
22 | |||
23 | <Target Name="__SetPropertiesFromGit" DependsOnTargets="GitVersion"> | ||
24 | <PropertyGroup> | ||
25 | <AssemblyVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).0.0</AssemblyVersion> | ||
26 | <FileVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch).$(GitCommits)</FileVersion> | ||
27 | <PackageVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch)$(GitSemVerDashLabel)</PackageVersion> | ||
28 | <InformationalVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch)$(GitSemVerDashLabel)+$(GitSha)</InformationalVersion> | ||
29 | <!-- We already included the $(GitSha) in the informational version so do not include it again. --> | ||
30 | <IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> | ||
31 | </PropertyGroup> | ||
32 | |||
33 | <Message Importance="$(GitInfoReportImportance)" Text="Properties from Git: | ||
34 | GitCommits: $(GitCommits) | ||
35 | AssemblyVersion: $(AssemblyVersion) | ||
36 | FileVersion: $(FileVersion) | ||
37 | InformationalVersion: $(InformationalVersion) | ||
38 | PackageVersion: $(PackageVersion) | ||
39 | " /> | ||
40 | </Target> | ||
41 | |||
42 | <PropertyGroup> | ||
43 | <GenerateNuspecDependsOn> | ||
44 | $(GenerateNuspecDependsOn); | ||
45 | __SetNuspecProperties | ||
46 | </GenerateNuspecDependsOn> | ||
16 | </PropertyGroup> | 47 | </PropertyGroup> |
17 | 48 | ||
18 | <Choose> | 49 | <Target Name="__SetNuspecProperties" DependsOnTargets="__SetPropertiesFromGit" |
19 | <When Condition="$(ReplacePackageReferences) AND '$(TheSolutionPath)' != '' AND '$(TheSolutionPath)' != '*undefined*' AND Exists('$(TheSolutionPath)')"> | 50 | Condition=" Exists('$(MSBuildProjectName).nuspec') "> |
51 | <PropertyGroup> | ||
52 | <ProjectUrl Condition=" '$(ProjectUrl)'=='' and '$(GitRepositoryUrl)'!='' ">$(GitRepositoryUrl.Replace('.git',''))</ProjectUrl> | ||
53 | |||
54 | <NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile> | ||
55 | <NuspecBasePath Condition=" '$(NuspecBasePath)'=='' ">$([System.IO.Path]::GetFullPath($(OutputPath)..))\</NuspecBasePath> | ||
56 | <NuspecProperties>$(NuspecProperties);Id=$(PackageId);Authors="$(Authors)";Configuration=$(Configuration);Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)"</NuspecProperties> | ||
57 | <NuspecProperties>$(NuspecProperties);Version=$(PackageVersion);RepositoryCommit=$(GitSha);RepositoryType=git;RepositoryUrl=$(GitRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl)</NuspecProperties> | ||
58 | <PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
59 | <SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
60 | </PropertyGroup> | ||
61 | |||
62 | <Message Importance="$(GitInfoReportImportance)" Text="NuSpec info: | ||
63 | NuspecFile: $(NuspecFile) | ||
64 | NuspecBasePath: $(NuspecBasePath) | ||
65 | NuspecProperties: $(NuspecProperties) | ||
66 | " /> | ||
67 | |||
68 | </Target> | ||
69 | |||
70 | <Target Name="PackNative" DependsOnTargets="__SetNuspecProperties" | ||
71 | Condition=" Exists('$(MSBuildProjectName).nuspec') "> | ||
72 | |||
73 | <Exec Command='nuget pack $(NuspecFile) -OutputDirectory "$(BaseOutputPath)$(Configuration)" -BasePath "$(NuspecBasePath)" -Properties $(NuspecProperties)' | ||
74 | WorkingDirectory="$(MSBuildProjectDirectory)" /> | ||
75 | |||
76 | <ItemGroup> | ||
77 | <NuGetPackOutput Include="$(BaseOutputPath)$(Configuration)\**\$(PackageId)*.nupkg" /> | ||
78 | </ItemGroup> | ||
79 | </Target> | ||
80 | |||
81 | <Target Name="_GetSignClient" | ||
82 | Condition=" !Exists('$(SigningToolExe)') "> | ||
20 | 83 | ||
21 | <PropertyGroup> | 84 | <WriteLinesToFile File='$(SigningFilelist)' Lines='do-not-sign-files-in-nupkg' Overwrite='true' /> |
22 | <SolutionFileContent>$([System.IO.File]::ReadAllText($(TheSolutionPath)))</SolutionFileContent> | ||
23 | <SmartSolutionDir>$([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) ))</SmartSolutionDir> | ||
24 | <RegexPattern>(?<="[PackageName]", ")(.*)(?=", ")</RegexPattern> | ||
25 | </PropertyGroup> | ||
26 | 85 | ||
27 | <ItemGroup> | 86 | <Exec Command='dotnet.exe tool install --tool-path "$(SigningToolFolder)" SignClient' /> |
28 | <!-- Keep the identity of the PackageReference --> | 87 | </Target> |
29 | <SmartPackageReference Include="@(PackageReference)"> | ||
30 | <PackageName>%(Identity)</PackageName> | ||
31 | <InSolution>$(SolutionFileContent.Contains('\%(Identity).csproj'))</InSolution> | ||
32 | </SmartPackageReference> | ||
33 | 88 | ||
34 | <!-- Filter them by mapping them to another ItemGroup using the WithMetadataValue item function --> | 89 | <Target Name="SignOutput" DependsOnTargets="_GetSignClient" AfterTargets="AfterBuild" |
35 | <PackageInSolution Include="@(SmartPackageReference->WithMetadataValue('InSolution', True))"> | 90 | Condition=" '$(SigningUser)'!='' and '$(SignOutput)'!='false' and |
36 | <Pattern>$(RegexPattern.Replace('[PackageName]','%(PackageName)') )</Pattern> | 91 | ('$(MSBuildProjectExtension)'=='.csproj' or ('$(MSBuildProjectExtension)'=='.vcxproj' and '$(ConfigurationType)'!='StaticLibrary'))"> |
37 | <SmartPath>$([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)'))</SmartPath> | ||
38 | </PackageInSolution> | ||
39 | 92 | ||
40 | <ProjectReference Include="@(PackageInSolution->'$(SmartSolutionDir)\%(SmartPath)' )"/> | 93 | <Exec Command='"$(SigningToolExe)" sign -i $(TargetPath) -c "$(SigningConfiguration)" -n "WiX Toolset" -d "WiX Toolset" -u https://wixtoolset.org/ -r "$(SigningUser)" -s "$(SigningSecret)"' |
94 | WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" /> | ||
95 | </Target> | ||
41 | 96 | ||
42 | <!-- Remove the package references that are now referenced as projects --> | 97 | <Target Name="SignNupkg" DependsOnTargets="_GetSignClient" AfterTargets="Pack;PackNative" |
43 | <PackageReference Remove="@(PackageInSolution->'%(PackageName)')"/> | 98 | Condition=" '$(SigningUser)'!='' and '@(NuGetPackOutput)'!='' and '$(SignNupkg)'!='false' "> |
44 | </ItemGroup> | 99 | <ItemGroup> |
100 | <SigningNupkgs Include="@(NuGetPackOutput)" Condition=" '%(Extension)'=='.nupkg' " /> | ||
101 | </ItemGroup> | ||
45 | 102 | ||
46 | </When> | 103 | <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)"' |
47 | </Choose> | 104 | WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" /> |
105 | </Target> | ||
48 | 106 | ||
49 | <Import Project="Directory$(MSBuildProjectExtension).targets" Condition=" Exists('Directory$(MSBuildProjectExtension).targets') " /> | 107 | <Import Project="Directory$(MSBuildProjectExtension).targets" Condition=" Exists('Directory$(MSBuildProjectExtension).targets') " /> |
50 | <Import Project="Custom.Build.targets" Condition=" Exists('Custom.Build.targets') " /> | 108 | <Import Project="Custom.Build.targets" Condition=" Exists('Custom.Build.targets') " /> |
diff --git a/src/Directory.csproj.targets b/src/Directory.csproj.targets index c3270426..49303a1d 100644 --- a/src/Directory.csproj.targets +++ b/src/Directory.csproj.targets | |||
@@ -9,18 +9,5 @@ | |||
9 | <DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile> | 9 | <DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile> |
10 | </PropertyGroup> | 10 | </PropertyGroup> |
11 | 11 | ||
12 | <Target Name="SetNuspecProperties" DependsOnTargets="InitializeSourceControlInformation" AfterTargets="GetBuildVersion" | 12 | <Target Name="__SetAssemblyInfoFromGit" DependsOnTargets="__SetPropertiesFromGit" BeforeTargets="GetAssemblyVersion" /> |
13 | Condition=" Exists('$(MSBuildProjectName).nuspec') "> | ||
14 | <PropertyGroup> | ||
15 | <ProjectUrl Condition=" '$(ProjectUrl)'=='' and '$(PrivateRepositoryUrl)'!='' ">$(PrivateRepositoryUrl.Replace('.git',''))</ProjectUrl> | ||
16 | |||
17 | <NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile> | ||
18 | <NuspecBasePath Condition=" '$(NuspecBasePath)'=='' ">$(OutputPath)..\</NuspecBasePath> | ||
19 | <NuspecProperties>$(NuspecProperties);Id=$(PackageId);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);Title=$(Title)</NuspecProperties> | ||
20 | <NuspecProperties>$(NuspecProperties);Version=$(PackageVersion);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl)</NuspecProperties> | ||
21 | <PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
22 | <SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
23 | </PropertyGroup> | ||
24 | </Target> | ||
25 | |||
26 | </Project> | 13 | </Project> |
diff --git a/src/Directory.vcxproj.props b/src/Directory.vcxproj.props index bcf26c57..63d73b36 100644 --- a/src/Directory.vcxproj.props +++ b/src/Directory.vcxproj.props | |||
@@ -19,17 +19,22 @@ | |||
19 | <WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion> | 19 | <WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion> |
20 | </PropertyGroup> | 20 | </PropertyGroup> |
21 | 21 | ||
22 | <PropertyGroup> | ||
23 | <CodeAnalysisRuleSet Condition=" Exists('$(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset') ">$(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset</CodeAnalysisRuleSet> | ||
24 | </PropertyGroup> | ||
25 | |||
22 | <ItemDefinitionGroup> | 26 | <ItemDefinitionGroup> |
23 | <ClCompile> | 27 | <ClCompile> |
24 | <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings> | 28 | <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings> |
25 | <WarningLevel>Level4</WarningLevel> | 29 | <WarningLevel>Level4</WarningLevel> |
26 | <AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 30 | <AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
27 | <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 31 | <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0600;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
28 | <PrecompiledHeader>Use</PrecompiledHeader> | 32 | <PrecompiledHeader>Use</PrecompiledHeader> |
29 | <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile> | 33 | <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile> |
30 | <CallingConvention Condition="'$(Platform)'=='Win32'">StdCall</CallingConvention> | 34 | <CallingConvention Condition="'$(Platform)'=='Win32'">StdCall</CallingConvention> |
31 | <TreatWarningAsError>true</TreatWarningAsError> | 35 | <TreatWarningAsError>true</TreatWarningAsError> |
32 | <ExceptionHandling>false</ExceptionHandling> | 36 | <ExceptionHandling>false</ExceptionHandling> |
37 | <ControlFlowGuard>Guard</ControlFlowGuard> | ||
33 | <AdditionalOptions>-YlprecompDefine</AdditionalOptions> | 38 | <AdditionalOptions>-YlprecompDefine</AdditionalOptions> |
34 | <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions> | 39 | <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions> |
35 | <MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) > 4 ">true</MultiProcessorCompilation> | 40 | <MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) > 4 ">true</MultiProcessorCompilation> |
@@ -79,6 +84,7 @@ | |||
79 | </ItemDefinitionGroup> | 84 | </ItemDefinitionGroup> |
80 | <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' "> | 85 | <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' "> |
81 | <ClCompile> | 86 | <ClCompile> |
87 | <ControlFlowGuard></ControlFlowGuard> | ||
82 | <BasicRuntimeChecks></BasicRuntimeChecks> | 88 | <BasicRuntimeChecks></BasicRuntimeChecks> |
83 | <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary> | 89 | <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary> |
84 | </ClCompile> | 90 | </ClCompile> |
@@ -98,6 +104,7 @@ | |||
98 | </ItemDefinitionGroup> | 104 | </ItemDefinitionGroup> |
99 | <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' "> | 105 | <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' "> |
100 | <ClCompile> | 106 | <ClCompile> |
107 | <ControlFlowGuard></ControlFlowGuard> | ||
101 | <BasicRuntimeChecks></BasicRuntimeChecks> | 108 | <BasicRuntimeChecks></BasicRuntimeChecks> |
102 | <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary> | 109 | <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary> |
103 | </ClCompile> | 110 | </ClCompile> |
diff --git a/src/Directory.vcxproj.targets b/src/Directory.vcxproj.targets new file mode 100644 index 00000000..9f0689d5 --- /dev/null +++ b/src/Directory.vcxproj.targets | |||
@@ -0,0 +1,45 @@ | |||
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\Directory.csproj.targets | ||
4 | then update all of the repos. | ||
5 | --> | ||
6 | <Project> | ||
7 | <PropertyGroup> | ||
8 | <PrepareForBuildDependsOn> | ||
9 | $(PrepareForBuildDependsOn); | ||
10 | __SetVersionResource | ||
11 | </PrepareForBuildDependsOn> | ||
12 | </PropertyGroup> | ||
13 | |||
14 | <Target Name="__SetVersionResource" DependsOnTargets="__SetPropertiesFromGit"> | ||
15 | <PropertyGroup> | ||
16 | <_ResourceFileType Condition=" '$(ConfigurationType)'=='Application' ">VFT_APP</_ResourceFileType> | ||
17 | <_ResourceFileType Condition=" '$(ConfigurationType)'=='DynamicLibrary' ">VFT_DLL</_ResourceFileType> | ||
18 | <Description Condition=" '$(Description)'=='' ">$(TargetName)</Description> | ||
19 | <Title Condition=" '$(Title)'=='' ">$(Description)</Title> | ||
20 | </PropertyGroup> | ||
21 | |||
22 | <ItemGroup> | ||
23 | <ResourceCompile Include="$(MSBuildThisFileDirectory)ver.rc"> | ||
24 | <PreprocessorDefinitions> | ||
25 | %(PreprocessorDefinitions); | ||
26 | GITVER_FILEVER=$(FileVersion.Replace('.', ',')); | ||
27 | GITVER_PRODUCTVER=$(AssemblyVersion.Replace('.', ',')); | ||
28 | GITVER_FILE_VERSION=$(FileVersion); | ||
29 | GITVER_PRODUCT_VERSION=$(AssemblyVersion); | ||
30 | GITVER_FILE_TYPE=$(_ResourceFileType); | ||
31 | GITVER_CODEPAGE=0; | ||
32 | GITVER_LCID=$([System.Convert]::ToInt32('%(Culture)', 16)); | ||
33 | GITVER_VERSION_BLOCK=$([System.Convert]::ToString($([MSBuild]::Multiply($([System.Convert]::ToUint64('%(Culture)', 16)), 65536)), 16).PadLeft(8, '0')); | ||
34 | GITVER_COMPANY=$(Company); | ||
35 | GITVER_COPYRIGHT=$(Copyright); | ||
36 | GITVER_TITLE=$(Title); | ||
37 | GITVER_PRODUCT=$(Product); | ||
38 | GITVER_INFORMATIONAL_VERSION=$(InformationalVersion); | ||
39 | GITVER_INTERNAL_NAME=$(TargetName); | ||
40 | GITVER_FILE_NAME=$(TargetFileName); | ||
41 | </PreprocessorDefinitions> | ||
42 | </ResourceCompile> | ||
43 | </ItemGroup> | ||
44 | </Target> | ||
45 | </Project> | ||
diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj index d53a155b..fea15922 100644 --- a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj | |||
@@ -7,7 +7,6 @@ | |||
7 | <TargetFramework>netstandard2.0</TargetFramework> | 7 | <TargetFramework>netstandard2.0</TargetFramework> |
8 | <DebugType>embedded</DebugType> | 8 | <DebugType>embedded</DebugType> |
9 | <Description>WiX Toolset Native Processing</Description> | 9 | <Description>WiX Toolset Native Processing</Description> |
10 | <IncludeSymbols>true</IncludeSymbols> | ||
11 | <CreateDocumentationFile>true</CreateDocumentationFile> | 10 | <CreateDocumentationFile>true</CreateDocumentationFile> |
12 | <!-- https://github.com/NuGet/Home/issues/10665 --> | 11 | <!-- https://github.com/NuGet/Home/issues/10665 --> |
13 | <NoWarn>NU5128</NoWarn> | 12 | <NoWarn>NU5128</NoWarn> |
@@ -45,6 +44,6 @@ | |||
45 | 44 | ||
46 | <ItemGroup> | 45 | <ItemGroup> |
47 | <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" /> | 46 | <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" /> |
48 | <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" /> | 47 | <PackageReference Include="GitInfo" Version="2.1.2" PrivateAssets="all" /> |
49 | </ItemGroup> | 48 | </ItemGroup> |
50 | </Project> | 49 | </Project> |
diff --git a/src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj b/src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj index 77a53c29..6068dbea 100644 --- a/src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj +++ b/src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj | |||
@@ -17,6 +17,8 @@ | |||
17 | </ItemGroup> | 17 | </ItemGroup> |
18 | 18 | ||
19 | <ItemGroup> | 19 | <ItemGroup> |
20 | <PackageReference Include="GitInfo" Version="2.1.2" /> | ||
21 | |||
20 | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" /> | 22 | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" /> |
21 | <PackageReference Include="xunit" Version="2.4.1" /> | 23 | <PackageReference Include="xunit" Version="2.4.1" /> |
22 | <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" /> | 24 | <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" /> |
diff --git a/src/test/version.txt b/src/test/version.txt new file mode 100644 index 00000000..cf138743 --- /dev/null +++ b/src/test/version.txt | |||
@@ -0,0 +1 @@ | |||
v42.42.{height}-preview.0 \ No newline at end of file | |||
diff --git a/src/ver.rc b/src/ver.rc new file mode 100644 index 00000000..4dc64d37 --- /dev/null +++ b/src/ver.rc | |||
@@ -0,0 +1,55 @@ | |||
1 | #pragma once | ||
2 | // ------------------------------------------------------------------------------ | ||
3 | // <auto-generated> | ||
4 | // This code was generated by a tool. | ||
5 | // Runtime Version:4.0.30319.42000 | ||
6 | // Changes to this file may cause incorrect behavior and will be lost if | ||
7 | // the code is regenerated. | ||
8 | // </auto-generated> | ||
9 | // ------------------------------------------------------------------------------ | ||
10 | |||
11 | #if defined(_UNICODE) | ||
12 | #define GITVER_VERSION_STRING(x) L ## #x | ||
13 | #else | ||
14 | #define GITVER_VERSION_STRING(x) #x | ||
15 | #endif | ||
16 | |||
17 | #define GVS(x) GITVER_VERSION_STRING(x) | ||
18 | |||
19 | #ifdef RC_INVOKED | ||
20 | |||
21 | #include <winres.h> | ||
22 | |||
23 | VS_VERSION_INFO VERSIONINFO | ||
24 | FILEVERSION GITVER_FILEVER | ||
25 | PRODUCTVERSION GITVER_PRODUCTVER | ||
26 | FILEFLAGSMASK 0x3FL | ||
27 | #ifdef _DEBUG | ||
28 | FILEFLAGS 0x1L | ||
29 | #else | ||
30 | FILEFLAGS 0x0L | ||
31 | #endif | ||
32 | FILEOS 0x4L | ||
33 | FILETYPE GITVER_FILE_TYPE | ||
34 | FILESUBTYPE 0x0L | ||
35 | BEGIN | ||
36 | BLOCK "StringFileInfo" | ||
37 | BEGIN | ||
38 | BLOCK GVS(GITVER_VERSION_BLOCK) | ||
39 | BEGIN | ||
40 | VALUE "CompanyName", GVS(GITVER_COMPANY) | ||
41 | VALUE "FileDescription", GVS(GITVER_TITLE) | ||
42 | VALUE "FileVersion", GVS(GITVER_FILE_VERSION) | ||
43 | VALUE "InternalName", GVS(GITVER_INTERNAL_NAME) | ||
44 | VALUE "OriginalFilename", GVS(GITVER_FILE_NAME) | ||
45 | VALUE "ProductName", GVS(GITVER_PRODUCT) | ||
46 | VALUE "ProductVersion", GVS(GITVER_INFORMATIONAL_VERSION) | ||
47 | VALUE "LegalCopyright", GVS(GITVER_COPYRIGHT) | ||
48 | END | ||
49 | END | ||
50 | BLOCK "VarFileInfo" | ||
51 | BEGIN | ||
52 | VALUE "Translation", GITVER_LCID, GITVER_CODEPAGE | ||
53 | END | ||
54 | END | ||
55 | #endif | ||
diff --git a/src/wixnative/wixnative.vcxproj b/src/wixnative/wixnative.vcxproj index 09dc97fa..20959827 100644 --- a/src/wixnative/wixnative.vcxproj +++ b/src/wixnative/wixnative.vcxproj | |||
@@ -69,7 +69,7 @@ | |||
69 | <ItemGroup> | 69 | <ItemGroup> |
70 | <PackageReference Include="WixToolset.Dutil" Version="4.0.72" /> | 70 | <PackageReference Include="WixToolset.Dutil" Version="4.0.72" /> |
71 | <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" /> | 71 | <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" /> |
72 | <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" /> | 72 | <PackageReference Include="GitInfo" Version="2.1.2" /> |
73 | </ItemGroup> | 73 | </ItemGroup> |
74 | 74 | ||
75 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 75 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
diff --git a/version.json b/version.json deleted file mode 100644 index 5f857771..00000000 --- a/version.json +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | { | ||
2 | "version": "4.0", | ||
3 | "publicReleaseRefSpec": [ | ||
4 | "^refs/heads/master$" | ||
5 | ], | ||
6 | "cloudBuild": { | ||
7 | "buildNumber": { | ||
8 | "enabled": true | ||
9 | } | ||
10 | } | ||
11 | } | ||
diff --git a/version.txt b/version.txt new file mode 100644 index 00000000..dc60d914 --- /dev/null +++ b/version.txt | |||
@@ -0,0 +1 @@ | |||
v4.{apiversion}-preview.0-build.{height} | |||