aboutsummaryrefslogtreecommitdiff
path: root/src/Directory.vcxproj.targets
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-04-16 23:35:06 -0700
committerRob Mensching <rob@firegiant.com>2021-04-29 16:47:06 -0700
commita2f0de28fc0f1ab71d4685c77f0b21d946f3e702 (patch)
tree585a60388d844515a21b5d8a786e5f91ff227127 /src/Directory.vcxproj.targets
parentae224f38e8349e2d0dfce95918571db4f18b5fba (diff)
downloadwix-a2f0de28fc0f1ab71d4685c77f0b21d946f3e702.tar.gz
wix-a2f0de28fc0f1ab71d4685c77f0b21d946f3e702.tar.bz2
wix-a2f0de28fc0f1ab71d4685c77f0b21d946f3e702.zip
Introduce new versioning system based on GitInfo
Diffstat (limited to 'src/Directory.vcxproj.targets')
-rw-r--r--src/Directory.vcxproj.targets45
1 files changed, 45 insertions, 0 deletions
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>