-
Notifications
You must be signed in to change notification settings - Fork 44
Per user bundle and side-by-side upgrade support #224
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
72901be
Rename Runtime to Rtl and hierarchicalize.
barnson b77fbcd
Per-user packages
barnson 39fa868
Implement new per-user bundle:
barnson 0986850
Fix references and arch-specific ids...
barnson c8b4684
Simplify side-by-side support authoring.
barnson a025a71
Move merge modules and remove test authoring.
barnson 5742969
More cleanup and test scripts.
barnson 6327281
WiX: adjust some product description strings (NFC)
compnerd f6e716f
Rename Runtime to Rtl and hierarchicalize.
barnson 0c5cf66
Per-user packages
barnson 088abce
Implement new per-user bundle:
barnson fa7d18b
Fix references and arch-specific ids...
barnson e21f4fd
Simplify side-by-side support authoring.
barnson 886a459
Move merge modules and remove test authoring.
barnson 9cefd5e
More cleanup and test scripts.
barnson c2a0501
Merge branch 'PerUserBundle' of https://github.com/barnson/swift-inst…
barnson 540d909
Requested changes:
barnson 1bcde72
Build three host-architecture SDK packages.
barnson d00ef2b
For consistency, use loc string for Manufacturer.
barnson e4008ae
Use ProductArchitecture to get product names.
barnson 968f96c
Move versioned "root" under the Top Five.
barnson d8dbe7b
Remove old directory tree.
barnson 5e07902
Improve side-by-side versioned directory behavior.
barnson 4052b27
Clean up and add test collateral.
barnson 38aa892
Disable Arm64 for now.
barnson ed7dcf7
Conditionalize x86 and Arm64 SDKs.
barnson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<ItemGroup Condition="'$(MSBuildProjectName)' != 'shared' AND '$(MSBuildProjectName)' != 'runtimelib'"> | ||
<ItemGroup Condition="'$(MSBuildProjectName)' != 'shared' AND '$(MSBuildProjectName)' != 'sdk' AND '$(MSBuildProjectName)' != 'rtllib' AND '$(MSBuildProjectName)' != 'rtlmsm'"> | ||
<ProjectReference Include="$(MSBuildThisFileDirectory)shared\shared.wixproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="WixToolset.Util.wixext" Version="4.0.1" /> | ||
</ItemGroup> | ||
|
||
<Import Project="WiXCodeSigning.targets" /> | ||
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<!-- | ||
Note that these GUIDs are substituted at bind time so they skip the normal | ||
validation and cleanup that the compiler does and therefore must be | ||
"proper" GUIDs: | ||
|
||
- Uppercase | ||
- Surrounded by curly braces | ||
|
||
Packages keep the same upgrade codes "forever" because MSI lets you specify | ||
version ranges for upgrades, which you can find in shared/shared.wxs. | ||
|
||
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 thropugh v5.10.9999). | ||
--> | ||
|
||
<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> | ||
<RtlUpgradeCode>{BEA8C6DC-F73E-445B-9486-2333D1CF2886}</RtlUpgradeCode> | ||
<SdkUpgradeCode Condition=" '$(ProductArchitecture)' == 'x86' ">{443F4D7F-38F3-47C8-9BEE-37FEB01D13C8}</SdkUpgradeCode> | ||
<SdkUpgradeCode Condition=" '$(ProductArchitecture)' == 'amd64' ">{762D10FE-EBE5-4554-BB78-FB13A4A487E3}</SdkUpgradeCode> | ||
<SdkUpgradeCode Condition=" '$(ProductArchitecture)' == 'arm64' ">{9749D9E6-E860-4FF6-9E8A-525270F471A3}</SdkUpgradeCode> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(MajorMinorProductVersion)' == '0.0'"> | ||
<BundleUpgradeCode>{963BE094-A046-47B3-83B2-BEBE92859D39}</BundleUpgradeCode> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(MajorMinorProductVersion)' == '5.9'"> | ||
<BundleUpgradeCode>{710F1827-DA4A-4BF4-BDCE-D5F2D7C0DEF2}</BundleUpgradeCode> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<DefineConstants> | ||
$(DefineConstants); | ||
BundleUpgradeCode=$(BundleUpgradeCode); | ||
BldUpgradeCode=$(BldUpgradeCode); | ||
CliUpgradeCode=$(CliUpgradeCode); | ||
DbgUpgradeCode=$(DbgUpgradeCode); | ||
IdeUpgradeCode=$(IdeUpgradeCode); | ||
RtlUpgradeCode=$(RtlUpgradeCode); | ||
SdkUpgradeCode=$(SdkUpgradeCode); | ||
</DefineConstants> | ||
</PropertyGroup> | ||
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,32 @@ | ||
<Project Sdk="WixToolset.Sdk/4.0.1"> | ||
<PropertyGroup> | ||
<OutputType>Bundle</OutputType> | ||
<DefineConstants>$(DefineConstants);MSI_LOCATION=$(MSI_LOCATION);</DefineConstants> | ||
<DefaultCompressionLevel>$(BundleCompressionLevel)</DefaultCompressionLevel> | ||
<DefineConstants> | ||
$(DefineConstants); | ||
INCLUDE_X86_SDK=$(INCLUDE_X86_SDK); | ||
INCLUDE_ARM64_SDK=$(INCLUDE_ARM64_SDK); | ||
</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="WixToolset.Bal.wixext" Version="4.0.1" /> | ||
</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="..\rtl\msi\rtlmsi.wixproj" BindName="rtl" /> | ||
<ProjectReference Include="..\sdk\sdk.wixproj" Properties="ProductArchitecture=amd64;Platform=x86" BindName="sdk_amd64" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(INCLUDE_X86_SDK)' != '' "> | ||
<ProjectReference Include="..\sdk\sdk.wixproj" Properties="ProductArchitecture=x86;Platform=x86" BindName="sdk_x86" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(INCLUDE_ARM64_SDK)' != '' "> | ||
<ProjectReference Include="..\sdk\sdk.wixproj" Properties="ProductArchitecture=arm64;Platform=x86" BindName="sdk_arm64" /> | ||
</ItemGroup> | ||
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,118 @@ | ||
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
<Bundle | ||
Name="!(loc.BundleName)" | ||
Name="!(loc.BundleName) $(ProductVersion)" | ||
Version="$(ProductVersion)" | ||
Manufacturer="swift.org" | ||
Manufacturer="!(loc.ManufacturerName)" | ||
Compressed="$(IsBundleCompressed)" | ||
UpgradeCode="710F1827-DA4A-4BF4-BDCE-D5F2D7C0DEF2"> | ||
UpgradeCode="$(BundleUpgradeCode)"> | ||
|
||
<!-- This bundle should also upgrade the "old" bundles. --> | ||
<RelatedBundle Id="8c75f32a-7bdf-4c61-abf6-c7e1c4b8fbf6" Action="upgrade" /> | ||
<RelatedBundle Id="151d42d9-8877-4b72-ac62-4695243a35c1" Action="upgrade" /> | ||
<!-- Avoid spaces in log file names, for ease of log spelunking. --> | ||
<Log Prefix="SwiftToolKit_$(ProductVersion)" /> | ||
|
||
<BootstrapperApplication> | ||
<bal:WixStandardBootstrapperApplication | ||
LicenseUrl="https://www.swift.org/LICENSE.txt" | ||
LogoFile="swift.png" | ||
SuppressOptionsUI="yes" | ||
SuppressRepair="no" | ||
Theme="hyperlinkLicense" /> | ||
Theme="hyperlinkSidebarLicense" | ||
LocalizationFile="..\shared\swift.en-us.wxl" | ||
ThemeFile="theme.xml" /> | ||
<Payload SourceFile="swift_side.png" /> | ||
</BootstrapperApplication> | ||
|
||
<!-- | ||
Keep `InstallRoot` in sync with the INSTALLROOT definition in shared.wxs. | ||
The bundle variable here will overwrite the default authored in the MSI | ||
packages, but avoid the confusion if the default directory should change. | ||
--> | ||
<Variable Name="InstallRoot" bal:Overridable="yes" Type="formatted" Persisted="yes" | ||
Value="[LocalAppDataFolder]Programs\Swift" /> | ||
<Variable Name="OptionsInstallBld" bal:Overridable="yes" Persisted="yes" Value="1" /> | ||
<Variable Name="OptionsInstallCli" bal:Overridable="yes" Persisted="yes" Value="1" /> | ||
<Variable Name="OptionsInstallDbg" bal:Overridable="yes" Persisted="yes" Value="1" /> | ||
<Variable Name="OptionsInstallIde" bal:Overridable="yes" Persisted="yes" Value="1" /> | ||
<Variable Name="OptionsInstallRtl" bal:Overridable="yes" Persisted="yes" Value="1" /> | ||
<Variable Name="OptionsInstallSdkX86" bal:Overridable="yes" Persisted="yes" Value="1" /> | ||
<Variable Name="OptionsInstallSdkAMD64" bal:Overridable="yes" Persisted="yes" Value="1" /> | ||
<Variable Name="OptionsInstallSdkArm64" bal:Overridable="yes" Persisted="yes" Value="1" /> | ||
|
||
<!-- | ||
For the online bundle, we need to provide a download URL for each package and its .cabs. | ||
(The SourceFile attribute is also required, both for the offline bundle and for Burn | ||
to get the hash of the packages. Note that the packages and .cabs available for | ||
download must exactly match the ones used when building the bundle. Burn validates | ||
downloads by their hashes.) | ||
|
||
`BaseReleaseDownloadUrl` is a preprocessor variable that provides the URL to the | ||
directory containing the packages for that bundle. So, for example, for the bundle at: | ||
|
||
https://download.swift.org/swift-5.8.1-release/windows10/swift-5.8.1-RELEASE/swift-5.8.1-RELEASE-windows10.exe | ||
|
||
`BaseReleaseDownloadUrl` would be `https://download.swift.org/swift-5.8.1-release/windows10/swift-5.8.1-RELEASE`. | ||
|
||
`{2}` is the file name of the payload. | ||
|
||
Schema doc is at https://wixtoolset.org/docs/schema/wxs/msipackage/. | ||
--> | ||
|
||
<Chain> | ||
<MsiPackage SourceFile="$(MSI_LOCATION)\runtime.msi" /> | ||
<MsiPackage SourceFile="$(MSI_LOCATION)\bld.msi" /> | ||
<MsiPackage SourceFile="$(MSI_LOCATION)\cli.msi" /> | ||
<MsiPackage SourceFile="$(MSI_LOCATION)\dbg.msi" /> | ||
<MsiPackage SourceFile="$(MSI_LOCATION)\ide.msi" /> | ||
<MsiPackage SourceFile="$(MSI_LOCATION)\sdk.msi" /> | ||
</Chain> | ||
<MsiPackage | ||
SourceFile="!(bindpath.rtl)\rtl.msi" | ||
InstallCondition="OptionsInstallRtl" | ||
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}"> | ||
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" /> | ||
</MsiPackage> | ||
|
||
<MsiPackage | ||
SourceFile="!(bindpath.bld)\bld.msi" | ||
InstallCondition="OptionsInstallBld" | ||
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}"> | ||
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" /> | ||
</MsiPackage> | ||
|
||
<MsiPackage | ||
SourceFile="!(bindpath.cli)\cli.msi" | ||
InstallCondition="OptionsInstallCli" | ||
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}"> | ||
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" /> | ||
</MsiPackage> | ||
|
||
<MsiPackage | ||
SourceFile="!(bindpath.dbg)\dbg.msi" | ||
InstallCondition="OptionsInstallDbg" | ||
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}"> | ||
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" /> | ||
</MsiPackage> | ||
|
||
<MsiPackage | ||
SourceFile="!(bindpath.ide)\ide.msi" | ||
InstallCondition="OptionsInstallIde" | ||
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}"> | ||
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" /> | ||
</MsiPackage> | ||
|
||
<?if $(INCLUDE_X86_SDK) == true?> | ||
<MsiPackage | ||
SourceFile="!(bindpath.sdk_x86)\sdk.x86.msi" | ||
InstallCondition="OptionsInstallSdkX86" | ||
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}"> | ||
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" /> | ||
</MsiPackage> | ||
<?endif?> | ||
|
||
<MsiPackage | ||
SourceFile="!(bindpath.sdk_amd64)\sdk.amd64.msi" | ||
InstallCondition="OptionsInstallSdkAMD64" | ||
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}"> | ||
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" /> | ||
</MsiPackage> | ||
|
||
<?if $(INCLUDE_ARM64_SDK) == true ?> | ||
<MsiPackage | ||
SourceFile="!(bindpath.sdk_arm64)\sdk.arm64.msi" | ||
InstallCondition="OptionsInstallSdkArm64" | ||
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}"> | ||
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" /> | ||
</MsiPackage> | ||
<?endif?> | ||
</Chain> | ||
</Bundle> | ||
</Wix> |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.