Skip to content

Rename toolchain msi and cab files to include name of variant (asserts) #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions platforms/Windows/SideBySideUpgradeStrategy.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
-->

<PropertyGroup>
<BldUpgradeCode>{7E95DC06-7F84-4E8E-A038-8304AF0468FB}</BldUpgradeCode>
<CliUpgradeCode>{87019842-3F3E-4227-B5C5-23A8EF72AD89}</CliUpgradeCode>
<DbgUpgradeCode>{91D382AF-1E92-44DC-A4AD-AEE91C1B5160}</DbgUpgradeCode>
<IdeUpgradeCode>{8DD91C86-D13D-490B-B06B-9522A9CF504C}</IdeUpgradeCode>
<BldAssertsUpgradeCode>{7E95DC06-7F84-4E8E-A038-8304AF0468FB}</BldAssertsUpgradeCode>
<CliAssertsUpgradeCode>{87019842-3F3E-4227-B5C5-23A8EF72AD89}</CliAssertsUpgradeCode>
<DbgAssertsUpgradeCode>{91D382AF-1E92-44DC-A4AD-AEE91C1B5160}</DbgAssertsUpgradeCode>
<IdeAssertsUpgradeCode>{8DD91C86-D13D-490B-B06B-9522A9CF504C}</IdeAssertsUpgradeCode>
<RtlUpgradeCode>{BEA8C6DC-F73E-445B-9486-2333D1CF2886}</RtlUpgradeCode>
<AndroidPlatformUpgradeCode>{313B9C1F-D5B5-4FED-B7E0-138F1EE6B26A}</AndroidPlatformUpgradeCode>
<WindowsPlatformUpgradeCode>{01AFF1CF-A025-41B6-BCBC-728D794353FD}</WindowsPlatformUpgradeCode>
Expand Down Expand Up @@ -54,10 +54,10 @@
<DefineConstants>
$(DefineConstants);
BundleUpgradeCode=$(BundleUpgradeCode);
BldUpgradeCode=$(BldUpgradeCode);
CliUpgradeCode=$(CliUpgradeCode);
DbgUpgradeCode=$(DbgUpgradeCode);
IdeUpgradeCode=$(IdeUpgradeCode);
BldAssertsUpgradeCode=$(BldAssertsUpgradeCode);
CliAssertsUpgradeCode=$(CliAssertsUpgradeCode);
DbgAssertsUpgradeCode=$(DbgAssertsUpgradeCode);
IdeAssertsUpgradeCode=$(IdeAssertsUpgradeCode);
RtlUpgradeCode=$(RtlUpgradeCode);
AndroidPlatformUpgradeCode=$(AndroidPlatformUpgradeCode);
WindowsPlatformUpgradeCode=$(WindowsPlatformUpgradeCode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
_USR_LIB_CLANG=$(ImageRoot)\Toolchains\$(ProductVersion)+Asserts\usr\lib\clang;
_USR_LIB_SWIFT_CLANG=$(ImageRoot)\Toolchains\$(ProductVersion)+Asserts\usr\lib\swift\clang;
</DefineConstants>
<OutputName>bld.asserts</OutputName>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions platforms/Windows/bld/asserts/bld.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?include ../bld.wxi ?>
</Wix>
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?xml version="1.0" encoding="utf-8"?>
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">

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

<Package
Language="1033"
Manufacturer="!(loc.ManufacturerName)"
Name="!(loc.Bld_ProductName)"
UpgradeCode="$(BldUpgradeCode)"
Name="!(loc.BldAsserts_ProductName)"
UpgradeCode="$(BldAssertsUpgradeCode)"
Version="$(NonSemVerProductVersion)"
Scope="$(PackageScope)">

<Media Id="1" Cabinet="bld.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
<Media Id="1" Cabinet="bld.asserts.cab" EmbedCab="$(ArePackageCabsEmbedded)" />

<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(BldUpgradeCode)" />
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(BldAssertsUpgradeCode)" />
<FeatureGroupRef Id="SideBySideUpgradeStrategy" />

<DirectoryRef Id="_usr_include">
Expand Down Expand Up @@ -549,7 +550,7 @@
</Component>
</ComponentGroup>

<Feature Id="BuildTools" AllowAbsent="no" Title="!(loc.Bld_ProductName)">
<Feature Id="BuildTools" AllowAbsent="no" Title="!(loc.BldAsserts_ProductName)">
<ComponentGroupRef Id="cmark_gfm" />

<ComponentGroupRef Id="binutils" />
Expand Down Expand Up @@ -578,4 +579,4 @@
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
</Feature>
</Package>
</Wix>
</Include>
8 changes: 4 additions & 4 deletions platforms/Windows/bundle/installer.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\bld\bld.wixproj" BindName="bld" />
<ProjectReference Include="..\cli\cli.wixproj" BindName="cli" />
<ProjectReference Include="..\dbg\dbg.wixproj" BindName="dbg" />
<ProjectReference Include="..\ide\ide.wixproj" BindName="ide" />
<ProjectReference Include="..\bld\asserts\bld.asserts.wixproj" BindName="bld.asserts" />
<ProjectReference Include="..\cli\asserts\cli.asserts.wixproj" BindName="cli.asserts" />
<ProjectReference Include="..\dbg\asserts\dbg.asserts.wixproj" BindName="dbg.asserts" />
<ProjectReference Include="..\ide\asserts\ide.asserts.wixproj" BindName="ide.asserts" />
<ProjectReference Include="..\rtl\msi\rtlmsi.wixproj" BindName="rtl" />
</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions platforms/Windows/bundle/installer.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -82,27 +82,27 @@
</MsiPackage>

<MsiPackage
SourceFile="!(bindpath.bld)\bld.msi"
SourceFile="!(bindpath.bld.asserts)\bld.asserts.msi"
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
</MsiPackage>

<MsiPackage
SourceFile="!(bindpath.cli)\cli.msi"
SourceFile="!(bindpath.cli.asserts)\cli.asserts.msi"
InstallCondition="OptionsInstallCLI = 1"
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
</MsiPackage>

<MsiPackage
SourceFile="!(bindpath.dbg)\dbg.msi"
SourceFile="!(bindpath.dbg.asserts)\dbg.asserts.msi"
InstallCondition="OptionsInstallDBG = 1"
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
</MsiPackage>

<MsiPackage
SourceFile="!(bindpath.ide)\ide.msi"
SourceFile="!(bindpath.ide.asserts)\ide.asserts.msi"
InstallCondition="OptionsInstallIDE = 1"
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
SWIFT_FORMAT_BUILD=$(SWIFT_FORMAT_BUILD);
SWIFT_DOCC_RENDER_ARTIFACT_ROOT_DIST=$(SWIFT_DOCC_RENDER_ARTIFACT_ROOT)\dist;
</DefineConstants>
<OutputName>cli.asserts</OutputName>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions platforms/Windows/cli/asserts/cli.asserts.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?include ../cli.wxi ?>
</Wix>
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?xml version="1.0" encoding="utf-8"?>
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">

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

<Package
Language="1033"
Manufacturer="!(loc.ManufacturerName)"
Name="!(loc.Cli_ProductName)"
UpgradeCode="$(CliUpgradeCode)"
Name="!(loc.CliAsserts_ProductName)"
UpgradeCode="$(CliAssertsUpgradeCode)"
Version="$(NonSemVerProductVersion)"
Scope="$(PackageScope)">

<Media Id="1" Cabinet="cli.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
<Media Id="1" Cabinet="cli.asserts.cab" EmbedCab="$(ArePackageCabsEmbedded)" />

<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(CliUpgradeCode)" />
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(CliAssertsUpgradeCode)" />
<FeatureGroupRef Id="SideBySideUpgradeStrategy" />

<DirectoryRef Id="_usr_include">
Expand Down Expand Up @@ -735,7 +736,7 @@
</Component>
</ComponentGroup>

<Feature Id="CLITools" AllowAbsent="no" Title="!(loc.Cli_ProductName)">
<Feature Id="CLITools" AllowAbsent="no" Title="!(loc.CliAsserts_ProductName)">
<ComponentGroupRef Id="clang" />
<ComponentGroupRef Id="libclang" />
<ComponentGroupRef Id="IndexStore" />
Expand All @@ -757,4 +758,4 @@
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
</Feature>
</Package>
</Wix>
</Include>
5 changes: 5 additions & 0 deletions platforms/Windows/dbg/asserts/dbg.asserts.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project Sdk="WixToolset.Sdk/4.0.5">
<PropertyGroup>
<OutputName>dbg.asserts</OutputName>
</PropertyGroup>
</Project>
3 changes: 3 additions & 0 deletions platforms/Windows/dbg/asserts/dbg.asserts.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?include ../dbg.wxi ?>
</Wix>
2 changes: 0 additions & 2 deletions platforms/Windows/dbg/dbg.wixproj

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?xml version="1.0" encoding="utf-8"?>
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">

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

<Package
Language="1033"
Manufacturer="!(loc.ManufacturerName)"
Name="!(loc.Dbg_ProductName)"
UpgradeCode="$(DbgUpgradeCode)"
Name="!(loc.DbgAsserts_ProductName)"
UpgradeCode="$(DbgAssertsUpgradeCode)"
Version="$(NonSemVerProductVersion)"
Scope="$(PackageScope)">

<Media Id="1" Cabinet="dbg.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
<Media Id="1" Cabinet="dbg.asserts.cab" EmbedCab="$(ArePackageCabsEmbedded)" />

<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(DbgUpgradeCode)" />
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(DbgAssertsUpgradeCode)" />
<FeatureGroupRef Id="SideBySideUpgradeStrategy" />

<DirectoryRef Id="_usr_include">
Expand Down Expand Up @@ -140,7 +141,7 @@
</Component>
</ComponentGroup>

<Feature Id="DebuggingTools" AllowAbsent="no" Title="!(loc.Dbg_ProductName)">
<Feature Id="DebuggingTools" AllowAbsent="no" Title="!(loc.DbgAsserts_ProductName)">
<ComponentGroupRef Id="LLDB" />
<ComponentGroupRef Id="LLDBServer" />

Expand All @@ -153,4 +154,4 @@
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
</Feature>
</Package>
</Wix>
</Include>
5 changes: 5 additions & 0 deletions platforms/Windows/ide/asserts/ide.asserts.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project Sdk="WixToolset.Sdk/4.0.5">
<PropertyGroup>
<OutputName>ide.asserts</OutputName>
</PropertyGroup>
</Project>
3 changes: 3 additions & 0 deletions platforms/Windows/ide/asserts/ide.asserts.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?include ../ide.wxi ?>
</Wix>
2 changes: 0 additions & 2 deletions platforms/Windows/ide/ide.wixproj

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?xml version="1.0" encoding="utf-8"?>
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">

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

<Package
Language="1033"
Manufacturer="!(loc.ManufacturerName)"
Name="!(loc.Ide_ProductName)"
UpgradeCode="$(IdeUpgradeCode)"
Name="!(loc.IdeAsserts_ProductName)"
UpgradeCode="$(IdeAssertsUpgradeCode)"
Version="$(NonSemVerProductVersion)"
Scope="$(PackageScope)">

<Media Id="1" Cabinet="ide.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
<Media Id="1" Cabinet="ide.asserts.cab" EmbedCab="$(ArePackageCabsEmbedded)" />

<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(IdeUpgradeCode)" />
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(IdeAssertsUpgradeCode)" />
<FeatureGroupRef Id="SideBySideUpgradeStrategy" />

<DirectoryRef Id="_usr_include">
Expand Down Expand Up @@ -59,7 +60,7 @@
</Component>
</ComponentGroup>

<Feature Id="IDETools" AllowAbsent="no" Title="!(loc.Ide_ProductName)">
<Feature Id="IDETools" AllowAbsent="no" Title="!(loc.IdeAsserts_ProductName)">
<ComponentGroupRef Id="clangd" />
<ComponentGroupRef Id="lldb" />
<ComponentGroupRef Id="sourcekitd" />
Expand All @@ -68,4 +69,4 @@
<ComponentGroupRef Id="VersionedDirectoryCleanup" />
</Feature>
</Package>
</Wix>
</Include>
2 changes: 1 addition & 1 deletion platforms/Windows/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Note that these GUIDs are substituted at bind time so they skip the normal valid

| Property | Description |
| -------- | ----------- |
| 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`. |
| 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`. |
| 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. |


Expand Down
4 changes: 4 additions & 0 deletions platforms/Windows/shared/swift.en-us.wxl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
<String Id="DowngradeError" Value="A newer version of [ProductName] is already installed." />
<String Id="Bld_ProductName" Value="Swift Build Tools" />
<String Id="BldAsserts_ProductName" Value="Swift Build Tools (Asserts)" />
<String Id="Cli_ProductName" Value="Swift Command Line Tools" />
<String Id="CliAsserts_ProductName" Value="Swift Command Line Tools (Asserts)" />
<String Id="Dbg_ProductName" Value="Swift Debugging Tools" />
<String Id="DbgAsserts_ProductName" Value="Swift Debugging Tools (Asserts)" />
<String Id="Ide_ProductName" Value="Swift IDE Integration Tools" />
<String Id="IdeAsserts_ProductName" Value="Swift IDE Integration Tools (Asserts)" />
<String Id="Rtl_ProductName" Value="Swift Windows Runtime" />
<String Id="VCRuntime_ProductName_arm64" Value="Visual C++ Runtime (ARM64)" />
<String Id="VCRuntime_ProductName_amd64" Value="Visual C++ Runtime (AMD64)" />
Expand Down