File tree Expand file tree Collapse file tree 4 files changed +24
-5
lines changed Expand file tree Collapse file tree 4 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 26
26
<OutputName >usbipd-win</OutputName >
27
27
<DefineSolutionProperties >false</DefineSolutionProperties >
28
28
<PublishDir >..\UsbIpServer\bin\publish</PublishDir >
29
+ <!--
30
+ This ensures that each x.y.z version has a different product, so every upgrade is a MajorUpgrade.
31
+ It also ensures that 2 builds of the same x.y.z version will never be installed simultaneously.
32
+ The alternative (WiX AllowSameVersionUpgrades) causes ICE61.
33
+
34
+ The chance of a hash-collision is much smaller than the chance of forgetting to update ProductId manually.
35
+ -->
36
+ <ProductId >EA1D5623-E6A7-4E4A-9259-E397$(GitVersion_MajorMinorPatch.GetHashCode().ToString(X8))</ProductId >
29
37
</PropertyGroup >
30
38
<PropertyGroup Condition =" '$(Configuration)|$(Platform)' == 'Debug|x64' " >
31
39
<OutputPath >bin\$(Configuration)\</OutputPath >
32
40
<IntermediateOutputPath >obj\$(Configuration)\</IntermediateOutputPath >
33
- <DefineConstants >Debug;PublishDir=$(PublishDir);DriversDir=$(ProjectDir)..\Drivers</DefineConstants >
41
+ <DefineConstants >Debug;PublishDir=$(PublishDir);DriversDir=$(ProjectDir)..\Drivers;ProductId=$(ProductId) </DefineConstants >
34
42
<Cultures >en-US</Cultures >
35
43
</PropertyGroup >
36
44
<PropertyGroup Condition =" '$(Configuration)|$(Platform)' == 'Release|x64' " >
37
45
<OutputPath >bin\$(Configuration)\</OutputPath >
38
46
<IntermediateOutputPath >obj\$(Configuration)\</IntermediateOutputPath >
39
- <DefineConstants >PublishDir=$(PublishDir);DriversDir=$(ProjectDir)..\Drivers</DefineConstants >
47
+ <DefineConstants >PublishDir=$(PublishDir);DriversDir=$(ProjectDir)..\Drivers;ProductId=$(ProductId) </DefineConstants >
40
48
<Cultures >en-US</Cultures >
41
49
</PropertyGroup >
42
50
<ItemGroup >
Original file line number Diff line number Diff line change 18
18
-->
19
19
<Wix xmlns =" http://schemas.microsoft.com/wix/2006/wi" >
20
20
<Product
21
- Id =" * "
21
+ Id =" $(var.ProductId) "
22
22
Name =" usbipd-win"
23
23
Language =" 1033"
24
24
Version =" $(var.GitVersion_MajorMinorPatch)"
33
33
<MediaTemplate EmbedCab =" yes" CompressionLevel =" high" />
34
34
<?endif ?>
35
35
36
+ <!--
37
+ We guarantee that two different x.y.z versions will have a different ProductId, so
38
+ everything is always a MajorUpgrade. MinorUpdates and Patches have many requirements
39
+ for Feature and Component changes, which we will no doubt forget about in the future.
40
+ This being a small product, a MajorUpgrade is a small price to pay to prevent any mishaps.
41
+ Since we strictly follow component rules, we use afterInstallExecute to speed things up a bit.
42
+ -->
36
43
<MajorUpgrade
37
44
Schedule =" afterInstallExecute"
38
- AllowSameVersionUpgrades =" yes"
39
45
DowngradeErrorMessage =" A newer version of [ProductName] is already installed."
40
46
/>
41
47
Original file line number Diff line number Diff line change 41
41
<Copyright >Copyright (C) $([System.DateTime]::UtcNow.ToString("yyyy")) $(Company)</Copyright >
42
42
43
43
<PublishProfile >Properties\PublishProfiles\InputForInstaller.pubxml</PublishProfile >
44
- </PropertyGroup >
44
+ </PropertyGroup >
45
45
46
46
<ItemGroup >
47
47
<Content Include =" ..\COPYING.md" Link =" COPYING.md" CopyToOutputDirectory =" PreserveNewest" />
Original file line number Diff line number Diff line change @@ -8,8 +8,13 @@ EndProject
8
8
Project ("{2150E333-8FDC-42A3-9474-1A3956D46DE8}" ) = "Solution Items" , "Solution Items" , "{4DF1A44E-CAFC-4543-AB76-76239FBEDF03}"
9
9
Project Section (SolutionItems ) = preProject
10
10
.editorconfig = .editorconfig
11
+ .gitattributes = .gitattributes
12
+ .gitignore = .gitignore
11
13
CODE _OF _CONDUCT .md = CODE _OF _CONDUCT .md
14
+ COPYING .md = COPYING .md
12
15
GitVersion .yml = GitVersion .yml
16
+ README .md = README .md
17
+ SECURITY .md = SECURITY .md
13
18
EndProject Section
14
19
EndProject
15
20
Project ("{930C7802-8A8C-48F9-8165-68863BCCD9DD}" ) = "Installer" , "Installer\Installer.wixproj" , "{080EF94C-A8EC-4975-A697-BBF8C1A56055}"
You can’t perform that action at this time.
0 commit comments