Skip to content

Commit d2ba64f

Browse files
authored
Merge pull request #428 from mhegazy/variant-specific-all-msis
Rename toolchain msi and cab files to include name of variant (asserts)
2 parents 86298f6 + 04ebb2b commit d2ba64f

19 files changed

+77
-49
lines changed

platforms/Windows/SideBySideUpgradeStrategy.props

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
-->
1818

1919
<PropertyGroup>
20-
<BldUpgradeCode>{7E95DC06-7F84-4E8E-A038-8304AF0468FB}</BldUpgradeCode>
21-
<CliUpgradeCode>{87019842-3F3E-4227-B5C5-23A8EF72AD89}</CliUpgradeCode>
22-
<DbgUpgradeCode>{91D382AF-1E92-44DC-A4AD-AEE91C1B5160}</DbgUpgradeCode>
23-
<IdeUpgradeCode>{8DD91C86-D13D-490B-B06B-9522A9CF504C}</IdeUpgradeCode>
20+
<BldAssertsUpgradeCode>{7E95DC06-7F84-4E8E-A038-8304AF0468FB}</BldAssertsUpgradeCode>
21+
<CliAssertsUpgradeCode>{87019842-3F3E-4227-B5C5-23A8EF72AD89}</CliAssertsUpgradeCode>
22+
<DbgAssertsUpgradeCode>{91D382AF-1E92-44DC-A4AD-AEE91C1B5160}</DbgAssertsUpgradeCode>
23+
<IdeAssertsUpgradeCode>{8DD91C86-D13D-490B-B06B-9522A9CF504C}</IdeAssertsUpgradeCode>
2424
<RtlUpgradeCode>{BEA8C6DC-F73E-445B-9486-2333D1CF2886}</RtlUpgradeCode>
2525
<AndroidPlatformUpgradeCode>{313B9C1F-D5B5-4FED-B7E0-138F1EE6B26A}</AndroidPlatformUpgradeCode>
2626
<WindowsPlatformUpgradeCode>{01AFF1CF-A025-41B6-BCBC-728D794353FD}</WindowsPlatformUpgradeCode>
@@ -54,10 +54,10 @@
5454
<DefineConstants>
5555
$(DefineConstants);
5656
BundleUpgradeCode=$(BundleUpgradeCode);
57-
BldUpgradeCode=$(BldUpgradeCode);
58-
CliUpgradeCode=$(CliUpgradeCode);
59-
DbgUpgradeCode=$(DbgUpgradeCode);
60-
IdeUpgradeCode=$(IdeUpgradeCode);
57+
BldAssertsUpgradeCode=$(BldAssertsUpgradeCode);
58+
CliAssertsUpgradeCode=$(CliAssertsUpgradeCode);
59+
DbgAssertsUpgradeCode=$(DbgAssertsUpgradeCode);
60+
IdeAssertsUpgradeCode=$(IdeAssertsUpgradeCode);
6161
RtlUpgradeCode=$(RtlUpgradeCode);
6262
AndroidPlatformUpgradeCode=$(AndroidPlatformUpgradeCode);
6363
WindowsPlatformUpgradeCode=$(WindowsPlatformUpgradeCode);

platforms/Windows/bld/bld.wixproj renamed to platforms/Windows/bld/asserts/bld.asserts.wixproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
_USR_LIB_CLANG=$(ImageRoot)\Toolchains\$(ProductVersion)+Asserts\usr\lib\clang;
66
_USR_LIB_SWIFT_CLANG=$(ImageRoot)\Toolchains\$(ProductVersion)+Asserts\usr\lib\swift\clang;
77
</DefineConstants>
8+
<OutputName>bld.asserts</OutputName>
89
</PropertyGroup>
910

1011
<ItemGroup>

platforms/Windows/bld/asserts/bld.wxs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2+
<?include ../bld.wxi ?>
3+
</Wix>

platforms/Windows/bld/bld.wxs renamed to platforms/Windows/bld/bld.wxi

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
23

34
<?define ToolchainRoot = $(ImageRoot)\Toolchains\$(ProductVersion)+Asserts?>
45

56
<Package
67
Language="1033"
78
Manufacturer="!(loc.ManufacturerName)"
8-
Name="!(loc.Bld_ProductName)"
9-
UpgradeCode="$(BldUpgradeCode)"
9+
Name="!(loc.BldAsserts_ProductName)"
10+
UpgradeCode="$(BldAssertsUpgradeCode)"
1011
Version="$(NonSemVerProductVersion)"
1112
Scope="$(PackageScope)">
1213

13-
<Media Id="1" Cabinet="bld.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
14+
<Media Id="1" Cabinet="bld.asserts.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
1415

15-
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(BldUpgradeCode)" />
16+
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(BldAssertsUpgradeCode)" />
1617
<FeatureGroupRef Id="SideBySideUpgradeStrategy" />
1718

1819
<DirectoryRef Id="_usr_include">
@@ -549,7 +550,7 @@
549550
</Component>
550551
</ComponentGroup>
551552

552-
<Feature Id="BuildTools" AllowAbsent="no" Title="!(loc.Bld_ProductName)">
553+
<Feature Id="BuildTools" AllowAbsent="no" Title="!(loc.BldAsserts_ProductName)">
553554
<ComponentGroupRef Id="cmark_gfm" />
554555

555556
<ComponentGroupRef Id="binutils" />
@@ -578,4 +579,4 @@
578579
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
579580
</Feature>
580581
</Package>
581-
</Wix>
582+
</Include>

platforms/Windows/bundle/installer.wixproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<ProjectReference Include="..\bld\bld.wixproj" BindName="bld" />
20-
<ProjectReference Include="..\cli\cli.wixproj" BindName="cli" />
21-
<ProjectReference Include="..\dbg\dbg.wixproj" BindName="dbg" />
22-
<ProjectReference Include="..\ide\ide.wixproj" BindName="ide" />
19+
<ProjectReference Include="..\bld\asserts\bld.asserts.wixproj" BindName="bld.asserts" />
20+
<ProjectReference Include="..\cli\asserts\cli.asserts.wixproj" BindName="cli.asserts" />
21+
<ProjectReference Include="..\dbg\asserts\dbg.asserts.wixproj" BindName="dbg.asserts" />
22+
<ProjectReference Include="..\ide\asserts\ide.asserts.wixproj" BindName="ide.asserts" />
2323
<ProjectReference Include="..\rtl\msi\rtlmsi.wixproj" BindName="rtl" />
2424
</ItemGroup>
2525

platforms/Windows/bundle/installer.wxs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,27 +82,27 @@
8282
</MsiPackage>
8383

8484
<MsiPackage
85-
SourceFile="!(bindpath.bld)\bld.msi"
85+
SourceFile="!(bindpath.bld.asserts)\bld.asserts.msi"
8686
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
8787
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
8888
</MsiPackage>
8989

9090
<MsiPackage
91-
SourceFile="!(bindpath.cli)\cli.msi"
91+
SourceFile="!(bindpath.cli.asserts)\cli.asserts.msi"
9292
InstallCondition="OptionsInstallCLI = 1"
9393
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
9494
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
9595
</MsiPackage>
9696

9797
<MsiPackage
98-
SourceFile="!(bindpath.dbg)\dbg.msi"
98+
SourceFile="!(bindpath.dbg.asserts)\dbg.asserts.msi"
9999
InstallCondition="OptionsInstallDBG = 1"
100100
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
101101
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
102102
</MsiPackage>
103103

104104
<MsiPackage
105-
SourceFile="!(bindpath.ide)\ide.msi"
105+
SourceFile="!(bindpath.ide.asserts)\ide.asserts.msi"
106106
InstallCondition="OptionsInstallIDE = 1"
107107
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
108108
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />

platforms/Windows/cli/cli.wixproj renamed to platforms/Windows/cli/asserts/cli.asserts.wixproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
SWIFT_FORMAT_BUILD=$(SWIFT_FORMAT_BUILD);
88
SWIFT_DOCC_RENDER_ARTIFACT_ROOT_DIST=$(SWIFT_DOCC_RENDER_ARTIFACT_ROOT)\dist;
99
</DefineConstants>
10+
<OutputName>cli.asserts</OutputName>
1011
</PropertyGroup>
1112

1213
<ItemGroup>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2+
<?include ../cli.wxi ?>
3+
</Wix>

platforms/Windows/cli/cli.wxs renamed to platforms/Windows/cli/cli.wxi

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
23

34
<?define ToolchainRoot = $(ImageRoot)\Toolchains\$(ProductVersion)+Asserts?>
45

56
<Package
67
Language="1033"
78
Manufacturer="!(loc.ManufacturerName)"
8-
Name="!(loc.Cli_ProductName)"
9-
UpgradeCode="$(CliUpgradeCode)"
9+
Name="!(loc.CliAsserts_ProductName)"
10+
UpgradeCode="$(CliAssertsUpgradeCode)"
1011
Version="$(NonSemVerProductVersion)"
1112
Scope="$(PackageScope)">
1213

13-
<Media Id="1" Cabinet="cli.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
14+
<Media Id="1" Cabinet="cli.asserts.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
1415

15-
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(CliUpgradeCode)" />
16+
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(CliAssertsUpgradeCode)" />
1617
<FeatureGroupRef Id="SideBySideUpgradeStrategy" />
1718

1819
<DirectoryRef Id="_usr_include">
@@ -735,7 +736,7 @@
735736
</Component>
736737
</ComponentGroup>
737738

738-
<Feature Id="CLITools" AllowAbsent="no" Title="!(loc.Cli_ProductName)">
739+
<Feature Id="CLITools" AllowAbsent="no" Title="!(loc.CliAsserts_ProductName)">
739740
<ComponentGroupRef Id="clang" />
740741
<ComponentGroupRef Id="libclang" />
741742
<ComponentGroupRef Id="IndexStore" />
@@ -757,4 +758,4 @@
757758
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
758759
</Feature>
759760
</Package>
760-
</Wix>
761+
</Include>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project Sdk="WixToolset.Sdk/4.0.5">
2+
<PropertyGroup>
3+
<OutputName>dbg.asserts</OutputName>
4+
</PropertyGroup>
5+
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2+
<?include ../dbg.wxi ?>
3+
</Wix>

platforms/Windows/dbg/dbg.wixproj

Lines changed: 0 additions & 2 deletions
This file was deleted.

platforms/Windows/dbg/dbg.wxs renamed to platforms/Windows/dbg/dbg.wxi

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
23

34
<?define ToolchainRoot = $(ImageRoot)\Toolchains\$(ProductVersion)+Asserts?>
45

56
<Package
67
Language="1033"
78
Manufacturer="!(loc.ManufacturerName)"
8-
Name="!(loc.Dbg_ProductName)"
9-
UpgradeCode="$(DbgUpgradeCode)"
9+
Name="!(loc.DbgAsserts_ProductName)"
10+
UpgradeCode="$(DbgAssertsUpgradeCode)"
1011
Version="$(NonSemVerProductVersion)"
1112
Scope="$(PackageScope)">
1213

13-
<Media Id="1" Cabinet="dbg.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
14+
<Media Id="1" Cabinet="dbg.asserts.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
1415

15-
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(DbgUpgradeCode)" />
16+
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(DbgAssertsUpgradeCode)" />
1617
<FeatureGroupRef Id="SideBySideUpgradeStrategy" />
1718

1819
<DirectoryRef Id="_usr_include">
@@ -140,7 +141,7 @@
140141
</Component>
141142
</ComponentGroup>
142143

143-
<Feature Id="DebuggingTools" AllowAbsent="no" Title="!(loc.Dbg_ProductName)">
144+
<Feature Id="DebuggingTools" AllowAbsent="no" Title="!(loc.DbgAsserts_ProductName)">
144145
<ComponentGroupRef Id="LLDB" />
145146
<ComponentGroupRef Id="LLDBServer" />
146147

@@ -153,4 +154,4 @@
153154
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
154155
</Feature>
155156
</Package>
156-
</Wix>
157+
</Include>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project Sdk="WixToolset.Sdk/4.0.5">
2+
<PropertyGroup>
3+
<OutputName>ide.asserts</OutputName>
4+
</PropertyGroup>
5+
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2+
<?include ../ide.wxi ?>
3+
</Wix>

platforms/Windows/ide/ide.wixproj

Lines changed: 0 additions & 2 deletions
This file was deleted.

platforms/Windows/ide/ide.wxs renamed to platforms/Windows/ide/ide.wxi

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
23

34
<?define ToolchainRoot = $(ImageRoot)\Toolchains\$(ProductVersion)+Asserts?>
45

56
<Package
67
Language="1033"
78
Manufacturer="!(loc.ManufacturerName)"
8-
Name="!(loc.Ide_ProductName)"
9-
UpgradeCode="$(IdeUpgradeCode)"
9+
Name="!(loc.IdeAsserts_ProductName)"
10+
UpgradeCode="$(IdeAssertsUpgradeCode)"
1011
Version="$(NonSemVerProductVersion)"
1112
Scope="$(PackageScope)">
1213

13-
<Media Id="1" Cabinet="ide.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
14+
<Media Id="1" Cabinet="ide.asserts.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
1415

15-
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(IdeUpgradeCode)" />
16+
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(IdeAssertsUpgradeCode)" />
1617
<FeatureGroupRef Id="SideBySideUpgradeStrategy" />
1718

1819
<DirectoryRef Id="_usr_include">
@@ -59,7 +60,7 @@
5960
</Component>
6061
</ComponentGroup>
6162

62-
<Feature Id="IDETools" AllowAbsent="no" Title="!(loc.Ide_ProductName)">
63+
<Feature Id="IDETools" AllowAbsent="no" Title="!(loc.IdeAsserts_ProductName)">
6364
<ComponentGroupRef Id="clangd" />
6465
<ComponentGroupRef Id="lldb" />
6566
<ComponentGroupRef Id="sourcekitd" />
@@ -68,4 +69,4 @@
6869
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
6970
</Feature>
7071
</Package>
71-
</Wix>
72+
</Include>

platforms/Windows/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ Note that these GUIDs are substituted at bind time so they skip the normal valid
216216

217217
| Property | Description |
218218
| -------- | ----------- |
219-
| BldUpgradeCode, CliUpgradeCode, DbgUpgradeCode, IdeUpgradeCode, RtlUpgradeCode, WindowsSDKUpgradeCode, AndroidSDKUpgradeCode | Upgrade codes for individual packages. Packages keep the same upgrade codes "forever" because MSI lets you specify version ranges for upgrades, which you can find in `shared/shared.wxs`. |
219+
| BldAssertsUpgradeCode, CliAssertsUpgradeCode, DbgAssertsUpgradeCode, IdeUpgradeCode, RtlUpgradeCode, WindowsSDKUpgradeCode, AndroidSDKUpgradeCode | Upgrade codes for individual packages. Packages keep the same upgrade codes "forever" because MSI lets you specify version ranges for upgrades, which you can find in `shared/shared.wxs`. |
220220
| BundleUpgradeCode | Upgrade codes for the bundle. Bundles don't support upgrade version ranges, so the bundle upgrade code must change for every minor version _and_ stay the same for the entire lifetime of that minor version (e.g., v5.10.0 through v5.10.9999). You can keep the history of upgrade codes using a condition like `Condition="'$(MajorMinorProductVersion)' == '5.10'` or just replace BundleUpgradeCode when forking to a new minor version. |
221221

222222

platforms/Windows/shared/swift.en-us.wxl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
44
<String Id="DowngradeError" Value="A newer version of [ProductName] is already installed." />
55
<String Id="Bld_ProductName" Value="Swift Build Tools" />
6+
<String Id="BldAsserts_ProductName" Value="Swift Build Tools (Asserts)" />
67
<String Id="Cli_ProductName" Value="Swift Command Line Tools" />
8+
<String Id="CliAsserts_ProductName" Value="Swift Command Line Tools (Asserts)" />
79
<String Id="Dbg_ProductName" Value="Swift Debugging Tools" />
10+
<String Id="DbgAsserts_ProductName" Value="Swift Debugging Tools (Asserts)" />
811
<String Id="Ide_ProductName" Value="Swift IDE Integration Tools" />
12+
<String Id="IdeAsserts_ProductName" Value="Swift IDE Integration Tools (Asserts)" />
913
<String Id="Rtl_ProductName" Value="Swift Windows Runtime" />
1014
<String Id="VCRuntime_ProductName_arm64" Value="Visual C++ Runtime (ARM64)" />
1115
<String Id="VCRuntime_ProductName_amd64" Value="Visual C++ Runtime (AMD64)" />

0 commit comments

Comments
 (0)