From e833a7fb2ed0f81ee7513b770ef50feddaf99f04 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 29 Aug 2023 07:20:08 -0700 Subject: [PATCH 1/8] WiX: handle all installed architectures similarly Treat all architectures equally and provide an option for all of them. This allows us to programmatically invoke the build target with the correct set of flags. --- platforms/Windows/bundle/installer.wixproj | 12 ++++++---- platforms/Windows/bundle/installer.wxs | 26 ++++++++++++---------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/platforms/Windows/bundle/installer.wixproj b/platforms/Windows/bundle/installer.wixproj index 4ab56054..aaafdc7c 100644 --- a/platforms/Windows/bundle/installer.wixproj +++ b/platforms/Windows/bundle/installer.wixproj @@ -6,8 +6,9 @@ https://aka.ms/vs/$(VSMajorVersion)/release/vc_redist.$(ProductArchitecture).exe $(DefineConstants); - INCLUDE_X86_SDK=$(INCLUDE_X86_SDK); + INCLUDE_AMD64_SDK=$(INCLUDE_AMD64_SDK); INCLUDE_ARM64_SDK=$(INCLUDE_ARM64_SDK); + INCLUDE_X86_SDK=$(INCLUDE_X86_SDK); ANDROID_INCLUDE_ARM64_SDK=$(ANDROID_INCLUDE_ARM64_SDK); ANDROID_INCLUDE_x86_64_SDK=$(ANDROID_INCLUDE_x86_64_SDK); ANDROID_INCLUDE_ARM_SDK=$(ANDROID_INCLUDE_ARM_SDK); @@ -25,17 +26,20 @@ - - - + + + + + + diff --git a/platforms/Windows/bundle/installer.wxs b/platforms/Windows/bundle/installer.wxs index 1137736c..b29fbe8c 100644 --- a/platforms/Windows/bundle/installer.wxs +++ b/platforms/Windows/bundle/installer.wxs @@ -98,24 +98,16 @@ - + - + - - - - - + + + + + + + Date: Mon, 18 Nov 2024 15:00:45 -0800 Subject: [PATCH 2/8] WiX: remove references to `DEVTOOLS_ROOT` As the Windows build has evolved, we have built up a complete toolchain image and removed the need for the separate `DEVTOOLS_ROOT`. This simplifies the packaging manifest and associated MSBuild files. --- platforms/Windows/bld/bld.wixproj | 1 - platforms/Windows/bld/bld.wxs | 18 ++++---- platforms/Windows/cli/cli.wixproj | 1 - platforms/Windows/cli/cli.wxs | 68 +++++++++++++++---------------- platforms/Windows/dbg/dbg.wixproj | 1 - platforms/Windows/ide/ide.wixproj | 1 - platforms/Windows/ide/ide.wxs | 2 +- platforms/Windows/readme.md | 1 - 8 files changed, 44 insertions(+), 49 deletions(-) diff --git a/platforms/Windows/bld/bld.wixproj b/platforms/Windows/bld/bld.wixproj index bbebd1a2..d75069e2 100644 --- a/platforms/Windows/bld/bld.wixproj +++ b/platforms/Windows/bld/bld.wixproj @@ -2,7 +2,6 @@ $(DefineConstants); - DEVTOOLS_ROOT=$(DEVTOOLS_ROOT); TOOLCHAIN_ROOT=$(TOOLCHAIN_ROOT); TOOLCHAIN_ROOT_USR_LIB_CLANG=$(TOOLCHAIN_ROOT)\usr\lib\clang; TOOLCHAIN_ROOT_USR_LIB_SWIFT_CLANG=$(TOOLCHAIN_ROOT)\usr\lib\swift\clang; diff --git a/platforms/Windows/bld/bld.wxs b/platforms/Windows/bld/bld.wxs index 294a8df5..127b6738 100644 --- a/platforms/Windows/bld/bld.wxs +++ b/platforms/Windows/bld/bld.wxs @@ -352,40 +352,40 @@ - + - + - + - + - + - + - + - + - + diff --git a/platforms/Windows/cli/cli.wixproj b/platforms/Windows/cli/cli.wixproj index c4366751..88f83903 100644 --- a/platforms/Windows/cli/cli.wixproj +++ b/platforms/Windows/cli/cli.wixproj @@ -2,7 +2,6 @@ $(DefineConstants); - DEVTOOLS_ROOT=$(DEVTOOLS_ROOT); TOOLCHAIN_ROOT=$(TOOLCHAIN_ROOT); SWIFT_DOCC_BUILD=$(SWIFT_DOCC_BUILD); INCLUDE_SWIFT_DOCC=$(INCLUDE_SWIFT_DOCC); diff --git a/platforms/Windows/cli/cli.wxs b/platforms/Windows/cli/cli.wxs index e7921306..e7f64c2c 100644 --- a/platforms/Windows/cli/cli.wxs +++ b/platforms/Windows/cli/cli.wxs @@ -112,73 +112,73 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -188,53 +188,53 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/platforms/Windows/dbg/dbg.wixproj b/platforms/Windows/dbg/dbg.wixproj index ed9bd07a..64c97ad8 100644 --- a/platforms/Windows/dbg/dbg.wixproj +++ b/platforms/Windows/dbg/dbg.wixproj @@ -2,7 +2,6 @@ $(DefineConstants); - DEVTOOLS_ROOT=$(DEVTOOLS_ROOT); TOOLCHAIN_ROOT=$(TOOLCHAIN_ROOT); SWIFT_INSPECT_BUILD=$(SWIFT_INSPECT_BUILD); INCLUDE_SWIFT_INSPECT=$(INCLUDE_SWIFT_INSPECT); diff --git a/platforms/Windows/ide/ide.wixproj b/platforms/Windows/ide/ide.wixproj index 1aaf7911..84df0a38 100644 --- a/platforms/Windows/ide/ide.wixproj +++ b/platforms/Windows/ide/ide.wixproj @@ -2,7 +2,6 @@ $(DefineConstants); - DEVTOOLS_ROOT=$(DEVTOOLS_ROOT); TOOLCHAIN_ROOT=$(TOOLCHAIN_ROOT) diff --git a/platforms/Windows/ide/ide.wxs b/platforms/Windows/ide/ide.wxs index 0295ebee..94c952c7 100644 --- a/platforms/Windows/ide/ide.wxs +++ b/platforms/Windows/ide/ide.wxs @@ -44,7 +44,7 @@ - + diff --git a/platforms/Windows/readme.md b/platforms/Windows/readme.md index 664206f7..ad1fa401 100644 --- a/platforms/Windows/readme.md +++ b/platforms/Windows/readme.md @@ -165,7 +165,6 @@ msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\bundle\installer. -p:BaseReleaseDownloadUrl=todo://base/release/download/url ^ -p:Configuration=Release ^ -p:BaseOutputPath=%PackageRoot%\online\ ^ - -p:DEVTOOLS_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^ -p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^ -p:PLATFORM_ROOT_X86=path\to\x86\platform ^ -p:PLATFORM_ROOT_AMD64=path\to\amd64\platform ^ From 37a88af9f980f44f3e568daec270f1d12e2ab635 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 19 Nov 2024 12:01:26 -0800 Subject: [PATCH 3/8] WiX: update documentation to include DocC properties We cannot build DocC everywhere yet (primarily Windows ARM64 cannot be built due to the use of SPM). Document the properties that we use to control the packaging with regards to DocC. --- platforms/Windows/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/platforms/Windows/readme.md b/platforms/Windows/readme.md index ad1fa401..bec58c8f 100644 --- a/platforms/Windows/readme.md +++ b/platforms/Windows/readme.md @@ -106,6 +106,7 @@ MSBuild automatically imports Directory.Build.props files in your tree. We use D | ArePackageCabsEmbedded | Always set to false to keep the .cab files external to the .msi files. This save user disk space: Burn caches packages so it can always uninstall and repair. MSI also caches packages for uninstall. If the cab is embedded, you have two copies and MSI doesn't always use its cached copy as a source for repair. With an external .cab, MSI caches only the tiny .msi file and not the (relatively huge) .cab. | | BundleFlavor, IsBundleCompressed | BundleFlavor defaults to `online` to build an online bundle. Set by the invocation of MSBuild to build an online or offline bundle. Controls IsBundleCompressed. | | DefineConstants | Passes a subset of MSBuild properties into the WiX build as preprocessor variables. | +| INCLUDE_SWIFT_DOCC | swift-docc is currently conditionalized out. Set it to `true` to include it. The property `SWIFT_DOCC_BUILD` defines the directory to find the artifacts. | | INCLUDE_SWIFT_INSPECT | swift-inspect is currently conditionalized out. Set it to `true` to include it. The property `SWIFT_INSPECT_BUILD` defines the directory to find the artifacts. | | INCLUDE_X86_SDK, INCLUDE_ARM64_SDK | The x86 and Arm64 SDKs are currently conditionalized out, pending build changes. Set these to `true` to include them in the bundles. Note that bundle\theme.xml currently has commented-out checkboxes that need to be restored when the x86 and Arm64 SDKs are brought back. | From 4bd52afb77d1835a36ae938f95aa0cb4b4b5e26e Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 20 Nov 2024 21:22:30 -0800 Subject: [PATCH 4/8] dbg: make swift-inspect required for Windows We now can always build swift-inspect, remove the option to exclude swift-inspect. Shuffle the tool into the main toolchain installation and remove the additional support that the fragmented swift-inspect handling required. --- platforms/Windows/dbg/dbg.wixproj | 2 -- platforms/Windows/dbg/dbg.wxs | 12 ++++-------- platforms/Windows/readme.md | 1 - platforms/Windows/shared/shared.wxs | 23 ----------------------- 4 files changed, 4 insertions(+), 34 deletions(-) diff --git a/platforms/Windows/dbg/dbg.wixproj b/platforms/Windows/dbg/dbg.wixproj index 64c97ad8..70298d5b 100644 --- a/platforms/Windows/dbg/dbg.wixproj +++ b/platforms/Windows/dbg/dbg.wixproj @@ -3,8 +3,6 @@ $(DefineConstants); TOOLCHAIN_ROOT=$(TOOLCHAIN_ROOT); - SWIFT_INSPECT_BUILD=$(SWIFT_INSPECT_BUILD); - INCLUDE_SWIFT_INSPECT=$(INCLUDE_SWIFT_INSPECT); diff --git a/platforms/Windows/dbg/dbg.wxs b/platforms/Windows/dbg/dbg.wxs index 23c18d61..50092278 100644 --- a/platforms/Windows/dbg/dbg.wxs +++ b/platforms/Windows/dbg/dbg.wxs @@ -105,14 +105,10 @@ - - - - - - - - + + + + diff --git a/platforms/Windows/readme.md b/platforms/Windows/readme.md index bec58c8f..627b9610 100644 --- a/platforms/Windows/readme.md +++ b/platforms/Windows/readme.md @@ -107,7 +107,6 @@ MSBuild automatically imports Directory.Build.props files in your tree. We use D | BundleFlavor, IsBundleCompressed | BundleFlavor defaults to `online` to build an online bundle. Set by the invocation of MSBuild to build an online or offline bundle. Controls IsBundleCompressed. | | DefineConstants | Passes a subset of MSBuild properties into the WiX build as preprocessor variables. | | INCLUDE_SWIFT_DOCC | swift-docc is currently conditionalized out. Set it to `true` to include it. The property `SWIFT_DOCC_BUILD` defines the directory to find the artifacts. | -| INCLUDE_SWIFT_INSPECT | swift-inspect is currently conditionalized out. Set it to `true` to include it. The property `SWIFT_INSPECT_BUILD` defines the directory to find the artifacts. | | INCLUDE_X86_SDK, INCLUDE_ARM64_SDK | The x86 and Arm64 SDKs are currently conditionalized out, pending build changes. Set these to `true` to include them in the bundles. Note that bundle\theme.xml currently has commented-out checkboxes that need to be restored when the x86 and Arm64 SDKs are brought back. | diff --git a/platforms/Windows/shared/shared.wxs b/platforms/Windows/shared/shared.wxs index b983040e..b1dd1330 100644 --- a/platforms/Windows/shared/shared.wxs +++ b/platforms/Windows/shared/shared.wxs @@ -59,20 +59,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + diff --git a/platforms/Windows/sdk/sdk.wxs b/platforms/Windows/sdk/win/sdk.wxs similarity index 100% rename from platforms/Windows/sdk/sdk.wxs rename to platforms/Windows/sdk/win/sdk.wxs From 8db8df4e5224089e416f59673e9b90b8b0c48085 Mon Sep 17 00:00:00 2001 From: Fabrice de Gans Date: Tue, 17 Dec 2024 17:50:48 -0800 Subject: [PATCH 8/8] WiX: add missing reference to `shared.wixproj` Properties defined in `shared.wixproj` are used in the Android SDK packaging project. --- platforms/Windows/sdk/drd/sdk.wixproj | 1 + 1 file changed, 1 insertion(+) diff --git a/platforms/Windows/sdk/drd/sdk.wixproj b/platforms/Windows/sdk/drd/sdk.wixproj index 3e1d0a91..064f0d69 100644 --- a/platforms/Windows/sdk/drd/sdk.wixproj +++ b/platforms/Windows/sdk/drd/sdk.wixproj @@ -13,6 +13,7 @@ +