From 5744030fe64e929374299fc121e80438346392ed Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 27 Mar 2025 15:55:41 -0700 Subject: [PATCH] WiX: restructure the Windows installer This restructures the Windows installer components to the following: - bld - cli - dbg - ide - rtl The SDKs for the various platforms have now been removed and replaced with the new platforms packages. There are currently two of them: - android - windows Each one of these platform support packages support a set of architectures relevant to the OS. The platform MSI installs the shared view of the platform support, and each architecture slice adds the support for the specified architecture. The parameters to the installer build have now been replaced with the single root path to the toolchain image and a set of paths for the Windows runtime installations to package. This is critical to resolving the previous issue with the unified installer build: we would clobber the paths as there was no android and windows platform differentiation. The changes removed the need for the variants of the shared library as all the architectures are now included into a single MSI, simply split up amongst the CABs. --- platforms/Windows/Directory.Build.props | 26 +- platforms/Windows/Directory.Build.targets | 2 +- .../Windows/SideBySideUpgradeStrategy.props | 13 +- platforms/Windows/bld/bld.wixproj | 13 +- platforms/Windows/bld/bld.wxs | 268 +- platforms/Windows/bundle/installer.wixproj | 37 +- platforms/Windows/bundle/installer.wxs | 70 +- platforms/Windows/bundle/theme.xml | 42 +- platforms/Windows/cli/cli.wixproj | 3 +- platforms/Windows/cli/cli.wxs | 123 +- platforms/Windows/dbg/dbg.wixproj | 6 - platforms/Windows/dbg/dbg.wxs | 59 +- platforms/Windows/ide/ide.wixproj | 6 - platforms/Windows/ide/ide.wxs | 19 +- platforms/Windows/platforms/CDispatch.wxi | 45 + .../Windows/platforms/_FoundationCShims.wxi | 42 + .../Windows/platforms/_FoundationUnicode.wxi | 618 +++++ .../android/android.wixproj} | 10 +- .../Windows/platforms/android/android.wxs | 2283 +++++++++++++++++ .../Windows/platforms/windows/windows.wixproj | 42 + .../Windows/platforms/windows/windows.wxs | 1812 +++++++++++++ platforms/Windows/readme.md | 47 +- platforms/Windows/rtl/lib/rtllib.wxs | 56 +- platforms/Windows/sdk/CDispatch.wxi | 45 - platforms/Windows/sdk/_FoundationCShims.wxi | 42 - platforms/Windows/sdk/_FoundationUnicode.wxi | 618 ----- platforms/Windows/sdk/drd/sdk.wxs | 618 ----- platforms/Windows/sdk/win/sdk.wixproj | 49 - platforms/Windows/sdk/win/sdk.wxs | 620 ----- platforms/Windows/shared/swift.en-us.wxl | 16 +- 30 files changed, 5210 insertions(+), 2440 deletions(-) create mode 100644 platforms/Windows/platforms/CDispatch.wxi create mode 100644 platforms/Windows/platforms/_FoundationCShims.wxi create mode 100644 platforms/Windows/platforms/_FoundationUnicode.wxi rename platforms/Windows/{sdk/drd/sdk.wixproj => platforms/android/android.wixproj} (66%) create mode 100644 platforms/Windows/platforms/android/android.wxs create mode 100644 platforms/Windows/platforms/windows/windows.wixproj create mode 100644 platforms/Windows/platforms/windows/windows.wxs delete mode 100644 platforms/Windows/sdk/CDispatch.wxi delete mode 100644 platforms/Windows/sdk/_FoundationCShims.wxi delete mode 100644 platforms/Windows/sdk/_FoundationUnicode.wxi delete mode 100644 platforms/Windows/sdk/drd/sdk.wxs delete mode 100644 platforms/Windows/sdk/win/sdk.wixproj delete mode 100644 platforms/Windows/sdk/win/sdk.wxs diff --git a/platforms/Windows/Directory.Build.props b/platforms/Windows/Directory.Build.props index e051bb0f..a59bce70 100644 --- a/platforms/Windows/Directory.Build.props +++ b/platforms/Windows/Directory.Build.props @@ -67,26 +67,6 @@ - - $(PLATFORM_ROOT_X86) - $(SDK_ROOT_X86) - - - - $(PLATFORM_ROOT_AMD64) - $(SDK_ROOT_AMD64) - - - - $(PLATFORM_ROOT_ARM) - $(SDK_ROOT_ARM) - - - - $(PLATFORM_ROOT_ARM64) - $(SDK_ROOT_ARM64) - - $(PackageCompressionLevel) @@ -100,8 +80,10 @@ IsBundleCompressed=$(IsBundleCompressed); ArePackageCabsEmbedded=$(ArePackageCabsEmbedded); BaseReleaseDownloadUrl=$(BaseReleaseDownloadUrl); - SDK_ROOT=$(SDK_ROOT); - PLATFORM_ROOT=$(PLATFORM_ROOT); + ImageRoot=$(ImageRoot); + WindowsRuntimeARM64=$(WindowsRuntimeARM64); + WindowsRuntimeX64=$(WindowsRuntimeX64); + WindowsRuntimeX86=$(WindowsRuntimeX86); diff --git a/platforms/Windows/Directory.Build.targets b/platforms/Windows/Directory.Build.targets index 595fb773..3dfeedc8 100644 --- a/platforms/Windows/Directory.Build.targets +++ b/platforms/Windows/Directory.Build.targets @@ -1,6 +1,6 @@ - + diff --git a/platforms/Windows/SideBySideUpgradeStrategy.props b/platforms/Windows/SideBySideUpgradeStrategy.props index 195168ba..ae79f273 100644 --- a/platforms/Windows/SideBySideUpgradeStrategy.props +++ b/platforms/Windows/SideBySideUpgradeStrategy.props @@ -22,13 +22,8 @@ {91D382AF-1E92-44DC-A4AD-AEE91C1B5160} {8DD91C86-D13D-490B-B06B-9522A9CF504C} {BEA8C6DC-F73E-445B-9486-2333D1CF2886} - {443F4D7F-38F3-47C8-9BEE-37FEB01D13C8} - {762D10FE-EBE5-4554-BB78-FB13A4A487E3} - {9749D9E6-E860-4FF6-9E8A-525270F471A3} - {485f88f4-9342-48cb-853a-12da885a5818} - {0838ee60-5d4a-4832-b844-73dad6eb1cc1} - {1269a926-3528-4ab7-b4d6-386d5c3f903a} - {d889349b-0000-4600-a04a-93602525d5db} + {313B9C1F-D5B5-4FED-B7E0-138F1EE6B26A} + {01AFF1CF-A025-41B6-BCBC-728D794353FD} @@ -64,8 +59,8 @@ DbgUpgradeCode=$(DbgUpgradeCode); IdeUpgradeCode=$(IdeUpgradeCode); RtlUpgradeCode=$(RtlUpgradeCode); - WindowsSDKUpgradeCode=$(WindowsSDKUpgradeCode); - AndroidSDKUpgradeCode=$(AndroidSDKUpgradeCode); + AndroidPlatformUpgradeCode=$(AndroidPlatformUpgradeCode); + WindowsPlatformUpgradeCode=$(WindowsPlatformUpgradeCode); diff --git a/platforms/Windows/bld/bld.wixproj b/platforms/Windows/bld/bld.wixproj index 35017fbc..77f56c10 100644 --- a/platforms/Windows/bld/bld.wixproj +++ b/platforms/Windows/bld/bld.wixproj @@ -2,9 +2,8 @@ $(DefineConstants); - 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; + _USR_LIB_CLANG=$(ImageRoot)\Toolchains\$(ProductVersion)+Asserts\usr\lib\clang; + _USR_LIB_SWIFT_CLANG=$(ImageRoot)\Toolchains\$(ProductVersion)+Asserts\usr\lib\swift\clang; WORKAROUND_MIMALLOC_ISSUE_997=$(WORKAROUND_MIMALLOC_ISSUE_997); @@ -14,10 +13,10 @@ - + ClangResources _usr_lib_clang - var.TOOLCHAIN_ROOT_USR_LIB_CLANG + var._USR_LIB_CLANG true true true @@ -25,10 +24,10 @@ - + SwiftClangResources _usr_lib_swift_clang - var.TOOLCHAIN_ROOT_USR_LIB_SWIFT_CLANG + var._USR_LIB_SWIFT_CLANG true true true diff --git a/platforms/Windows/bld/bld.wxs b/platforms/Windows/bld/bld.wxs index fcc62f5e..8e908085 100644 --- a/platforms/Windows/bld/bld.wxs +++ b/platforms/Windows/bld/bld.wxs @@ -1,10 +1,6 @@  - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -172,22 +168,22 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -231,11 +227,11 @@ - + - + @@ -243,110 +239,110 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -359,192 +355,192 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -552,7 +548,7 @@ - + diff --git a/platforms/Windows/bundle/installer.wixproj b/platforms/Windows/bundle/installer.wixproj index 70f8d952..b62f1e58 100644 --- a/platforms/Windows/bundle/installer.wixproj +++ b/platforms/Windows/bundle/installer.wixproj @@ -6,13 +6,8 @@ https://aka.ms/vs/$(VSMajorVersion)/release/vc_redist.$(ProductArchitecture).exe $(DefineConstants); - INCLUDE_ANDROID_ARM_SDK=$(INCLUDE_ANDROID_ARM_SDK); - INCLUDE_ANDROID_ARM64_SDK=$(INCLUDE_ANDROID_ARM64_SDK); - INCLUDE_ANDROID_X86_SDK=$(INCLUDE_ANDROID_X86_SDK); - INCLUDE_ANDROID_X86_64_SDK=$(INCLUDE_ANDROID_X86_64_SDK); - INCLUDE_WINDOWS_AMD64_SDK=$(INCLUDE_WINDOWS_AMD64_SDK); - INCLUDE_WINDOWS_ARM64_SDK=$(INCLUDE_WINDOWS_ARM64_SDK); - INCLUDE_WINDOWS_X86_SDK=$(INCLUDE_WINDOWS_X86_SDK); + IncludeAndroid=$(Platforms.Contains("android")); + IncludeWindows=$(Platforms.Contains("windows")); @@ -28,31 +23,11 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/platforms/Windows/bundle/installer.wxs b/platforms/Windows/bundle/installer.wxs index d22389ba..aa10c953 100644 --- a/platforms/Windows/bundle/installer.wxs +++ b/platforms/Windows/bundle/installer.wxs @@ -36,6 +36,8 @@ + + @@ -45,6 +47,8 @@ + + @@ -104,69 +108,35 @@ - - - - - - - + - - - - - + + + + - + - - - - - - - - + + - - - - - - + + - - - - + + diff --git a/platforms/Windows/bundle/theme.xml b/platforms/Windows/bundle/theme.xml index 1144b068..22100e47 100644 --- a/platforms/Windows/bundle/theme.xml +++ b/platforms/Windows/bundle/theme.xml @@ -6,7 +6,7 @@ Segoe UI Segoe UI - Segoe UI + Segoe UI Segoe UI @@ -48,29 +48,31 @@ - - - - - #(loc.Bld_ProductName) - #(loc.Cli_ProductName) - #(loc.Dbg_ProductName) - #(loc.Ide_ProductName) - #(loc.Rtl_ProductName) - #(loc.Sdk_ProductName_amd64) - #(loc.Redist_amd64) - #(loc.Sdk_ProductName_arm64) - #(loc.Redist_arm64) - #(loc.Sdk_ProductName_x86) - #(loc.Redist_x86) - #(loc.Android_Sdk_arm64) - #(loc.Android_Sdk_amd64) - #(loc.Android_Sdk_arm) - #(loc.Android_Sdk_x86) + + #(loc.Bld_ProductName) + #(loc.Cli_ProductName) + #(loc.Dbg_ProductName) + #(loc.Ide_ProductName) + #(loc.Rtl_ProductName) + #(loc.Plt_ProductName_Windows) + #(loc.Sdk_ProductName_Windows_amd64) + #(loc.Redist_amd64) + #(loc.Sdk_ProductName_Windows_arm64) + #(loc.Redist_arm64) + #(loc.Sdk_ProductName_Windows_x86) + #(loc.Redist_x86) + #(loc.Plt_ProductName_Android) + #(loc.Sdk_ProductName_Android_arm64) + #(loc.Sdk_ProductName_Android_amd64) + #(loc.Sdk_ProductName_Android_armv7) + #(loc.Sdk_ProductName_Android_x86)