Skip to content

Commit f7c3685

Browse files
authored
WiX: Fix MSI custom properties (#468)
* WiX: Fix MSI custom properties * MSI properties must be in CAPS_LOCK or they do not work properly. * They must be introduced with a default value. * Features should default to being installable (`Level=1`) and the override should set `Level` to 0 to skip installation of features. This is to prevent issues with uninstallation. * Default MSIs to installing all archs This also tweaks the installer to also install the corresponding Experimental SDK on Windows.
1 parent 98c2d78 commit f7c3685

File tree

4 files changed

+47
-28
lines changed

4 files changed

+47
-28
lines changed

platforms/Windows/bundle/installer.wxs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,14 @@
155155
SourceFile="!(bindpath.rtl)\rtl.msi"
156156
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
157157
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
158-
<MsiProperty Name="InstallUtilities" Value="[OptionsInstallUtilities]" />
158+
<MsiProperty Name="INSTALLUTILITIES" Value="[OptionsInstallUtilities]" />
159159
</MsiPackage>
160160
<?else?>
161161
<MsiPackage
162162
SourceFile="!(bindpath.rtl.shared)\rtl.$(ProductArchitecture).msi"
163163
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
164164
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
165-
<MsiProperty Name="InstallUtilities" Value="[OptionsInstallUtilities]" />
165+
<MsiProperty Name="INSTALLUTILITIES" Value="[OptionsInstallUtilities]" />
166166
</MsiPackage>
167167
<?endif?>
168168

@@ -173,10 +173,10 @@
173173
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
174174
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
175175

176-
<MsiProperty Name="InstallARM64SDK" Value="[OptionsInstallAndroidSDKARM64]" />
177-
<MsiProperty Name="InstallAMD64SDK" Value="[OptionsInstallAndroidSDKAMD64]" />
178-
<MsiProperty Name="InstallARMSDK" Value="[OptionsInstallAndroidSDKARM]" />
179-
<MsiProperty Name="InstallX86SDK" Value="[OptionsInstallAndroidSDKX86]" />
176+
<MsiProperty Name="INSTALLARM64SDK" Value="[OptionsInstallAndroidSDKARM64]" />
177+
<MsiProperty Name="INSTALLAMD64SDK" Value="[OptionsInstallAndroidSDKAMD64]" />
178+
<MsiProperty Name="INSTALLARMSDK" Value="[OptionsInstallAndroidSDKARM]" />
179+
<MsiProperty Name="INSTALLX86SDK" Value="[OptionsInstallAndroidSDKX86]" />
180180
</MsiPackage>
181181
<?endif?>
182182

@@ -187,14 +187,17 @@
187187
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
188188
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
189189

190-
<MsiProperty Name="InstallARM64SDK" Value="[OptionsInstallWindowsSDKARM64]" />
191-
<MsiProperty Name="InstallARM64REDIST" Value="[OptionsInstallWindowsRedistARM64]" />
190+
<MsiProperty Name="INSTALLARM64SDK" Value="[OptionsInstallWindowsSDKARM64]" />
191+
<MsiProperty Name="INSTALLARM64EXPERIMENTALSDK" Value="[OptionsInstallWindowsSDKARM64]" />
192+
<MsiProperty Name="INSTALLARM64REDIST" Value="[OptionsInstallWindowsRedistARM64]" />
192193

193-
<MsiProperty Name="InstallAMD64SDK" Value="[OptionsInstallWindowsSDKAMD64]" />
194-
<MsiProperty Name="InstallAMD64REDIST" Value="[OptionsInstallWindowsRedistAMD64]" />
194+
<MsiProperty Name="INSTALLAMD64SDK" Value="[OptionsInstallWindowsSDKAMD64]" />
195+
<MsiProperty Name="INSTALLAMD64EXPERIMENTALSDK" Value="[OptionsInstallWindowsSDKAMD64]" />
196+
<MsiProperty Name="INSTALLAMD64REDIST" Value="[OptionsInstallWindowsRedistAMD64]" />
195197

196-
<MsiProperty Name="InstallX86SDK" Value="[OptionsInstallWindowsSDKX86]" />
197-
<MsiProperty Name="InstallX86REDIST" Value="[OptionsInstallWindowsRedistX86]" />
198+
<MsiProperty Name="INSTALLX86SDK" Value="[OptionsInstallWindowsSDKX86]" />
199+
<MsiProperty Name="INSTALLX86EXPERIMENTALSDK" Value="[OptionsInstallWindowsSDKX86]" />
200+
<MsiProperty Name="INSTALLX86REDIST" Value="[OptionsInstallWindowsRedistX86]" />
198201
</MsiPackage>
199202
<?endif?>
200203
</Chain>

platforms/Windows/platforms/android/android.wxs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
Version="$(NonSemVerProductVersion)"
99
Scope="$(PackageScope)">
1010

11+
<Property Id="INSTALLARM64SDK" Value="1" />
12+
<Property Id="INSTALLARMSDK" Value="1" />
13+
<Property Id="INSTALLAMD64SDK" Value="1" />
14+
<Property Id="INSTALLX86SDK" Value="1" />
15+
1116
<?define PlatformRoot = "$(ImageRoot)\Platforms\Android.platform"?>
1217
<?define SDKRoot = "$(PlatformRoot)\Developer\SDKs\Android.sdk"?>
1318

@@ -2125,7 +2130,7 @@
21252130

21262131
<?if $(IncludeARM64) = True?>
21272132
<Feature Id="arm64" AllowAbsent="yes" Title="!(loc.Sdk_ProductName_Android_arm64)">
2128-
<Level Condition="InstallARM64SDK = 0" Value="0" />
2133+
<Level Condition="INSTALLARM64SDK = 0" Value="0" />
21292134

21302135
<ComponentGroupRef Id="XCTest.arm64" />
21312136
<ComponentGroupRef Id="Testing.arm64" />
@@ -2170,7 +2175,7 @@
21702175

21712176
<?if $(IncludeARM) = True?>
21722177
<Feature Id="armv7" AllowAbsent="yes" Title="!(loc.Sdk_ProductName_Android_armv7)">
2173-
<Level Condition="InstallARMSDK = 0" Value="0" />
2178+
<Level Condition="INSTALLARMSDK = 0" Value="0" />
21742179

21752180
<ComponentGroupRef Id="XCTest.arm" />
21762181
<ComponentGroupRef Id="Testing.arm" />
@@ -2215,7 +2220,7 @@
22152220

22162221
<?if $(IncludeX64) = True?>
22172222
<Feature Id="amd64" AllowAbsent="yes" Title="!(loc.Sdk_ProductName_Android_amd64)">
2218-
<Level Condition="InstallAMD64SDK = 0" Value="0" />
2223+
<Level Condition="INSTALLAMD64SDK = 0" Value="0" />
22192224

22202225
<ComponentGroupRef Id="XCTest.x64" />
22212226
<ComponentGroupRef Id="Testing.x64" />
@@ -2260,7 +2265,7 @@
22602265

22612266
<?if $(IncludeX86) = True?>
22622267
<Feature Id="x86" AllowAbsent="yes" Title="!(loc.Sdk_ProductName_Android_x86)">
2263-
<Level Condition="InstallX86SDK = 0" Value="0" />
2268+
<Level Condition="INSTALLX86SDK = 0" Value="0" />
22642269

22652270
<ComponentGroupRef Id="XCTest.x86" />
22662271
<ComponentGroupRef Id="Testing.x86" />

platforms/Windows/platforms/windows/windows.wxs

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
Version="$(NonSemVerProductVersion)"
99
Scope="$(PackageScope)">
1010

11+
<Property Id="INSTALLARM64SDK" Value="1" />
12+
<Property Id="INSTALLARM64EXPERIMENTALSDK" Value="1" />
13+
<Property Id="INSTALLARM64REDIST" Value="1" />
14+
<Property Id="INSTALLAMD64SDK" Value="1" />
15+
<Property Id="INSTALLAMD64EXPERIMENTALSDK" Value="1" />
16+
<Property Id="INSTALLAMD64REDIST" Value="1" />
17+
<Property Id="INSTALLX86SDK" Value="1" />
18+
<Property Id="INSTALLX86EXPERIMENTALSDK" Value="1" />
19+
<Property Id="INSTALLX86REDIST" Value="1" />
20+
1121
<?define PlatformRoot = "$(ImageRoot)\Platforms\Windows.platform"?>
1222

1323
<?define ExperimentalSDKRoot = "$(PlatformRoot)\Developer\SDKs\WindowsExperimental.sdk"?>
@@ -4154,26 +4164,26 @@
41544164
</Feature>
41554165

41564166
<?if $(IncludeARM64) = True?>
4157-
<Feature Display="hidden" Id="arm64.platform" Level="0" Title="!(loc.Plt_ProductName_Windows_arm64)">
4158-
<Level Condition="InstallARM64SDK = 1 OR InstallARM64ExperimentalSDK = 1" Value="1" />
4167+
<Feature Id="arm64.platform" AllowAbsent="yes" Title="!(loc.Plt_ProductName_Windows_arm64)">
4168+
<Level Condition="INSTALLARM64SDK = 0 AND INSTALLARM64EXPERIMENTALSDK = 0" Value="0" />
41594169

41604170
<ComponentGroupRef Id="XCTest.arm64" />
41614171
<ComponentGroupRef Id="Testing.arm64" />
41624172
</Feature>
41634173
<?endif?>
41644174

41654175
<?if $(IncludeX64) = True?>
4166-
<Feature Display="hidden" Id="x64.platform" Level="0" Title="!(loc.Plt_ProductName_Windows_amd64)">
4167-
<Level Condition="InstallAMD64SDK = 1 OR InstallAMD64ExperimentalSDK = 1" Value="1" />
4176+
<Feature Id="x64.platform" AllowAbsent="yes" Title="!(loc.Plt_ProductName_Windows_amd64)">
4177+
<Level Condition="INSTALLAMD64SDK = 0 AND INSTALLAMD64EXPERIMENTALSDK = 0" Value="0" />
41684178

41694179
<ComponentGroupRef Id="XCTest.x64" />
41704180
<ComponentGroupRef Id="Testing.x64" />
41714181
</Feature>
41724182
<?endif?>
41734183

41744184
<?if $(IncludeX86) = True?>
4175-
<Feature Display="hidden" Id="x86.platform" Level="0" Title="!(loc.Plt_ProductName_Windows_x86)">
4176-
<Level Condition="InstallX86SDK = 1 OR InstallX86ExperimentalSDK = 1" Value="1" />
4185+
<Feature Id="x86.platform" AllowAbsent="yes" Title="!(loc.Plt_ProductName_Windows_x86)">
4186+
<Level Condition="INSTALLX86SDK = 0 AND INSTALLX86EXPERIMENTALSDK = 0" Value="0" />
41774187

41784188
<ComponentGroupRef Id="XCTest.x86" />
41794189
<ComponentGroupRef Id="Testing.x86" />
@@ -4197,7 +4207,7 @@
41974207

41984208
<?if $(IncludeARM64) = True?>
41994209
<Feature Id="arm64" AllowAbsent="yes" Title="!(loc.Sdk_ProductName_Windows_arm64)">
4200-
<Level Condition="InstallARM64SDK = 0" Value="0" />
4210+
<Level Condition="INSTALLARM64SDK = 0" Value="0" />
42014211

42024212
<ComponentGroupRef Id="LegacySwiftRemoteMirror.arm64" />
42034213

@@ -4238,7 +4248,7 @@
42384248

42394249
<?if $(IncludeX64) = True?>
42404250
<Feature Id="x64" AllowAbsent="yes" Title="!(loc.Sdk_ProductName_Windows_amd64)">
4241-
<Level Condition="InstallAMD64SDK = 0" Value="0" />
4251+
<Level Condition="INSTALLAMD64SDK = 0" Value="0" />
42424252

42434253
<ComponentGroupRef Id="LegacySwiftRemoteMirror.x64" />
42444254

@@ -4279,7 +4289,7 @@
42794289

42804290
<?if $(IncludeX86) = True?>
42814291
<Feature Id="x86" AllowAbsent="yes" Title="!(loc.Sdk_ProductName_Windows_x86)">
4282-
<Level Condition="InstallX86SDK = 0" Value="0" />
4292+
<Level Condition="INSTALLX86SDK = 0" Value="0" />
42834293

42844294
<ComponentGroupRef Id="LegacySwiftRemoteMirror.x86" />
42854295

@@ -4334,7 +4344,7 @@
43344344

43354345
<?if $(IncludeARM64) = True?>
43364346
<Feature Id="ExperimentalARM64" AllowAbsent="yes" Title="!(loc.Plt_ProductName_Windows_Experimental_arm64)">
4337-
<Level Condition="InstallARM64ExperimentalSDK = 1" Value="1" />
4347+
<Level Condition="INSTALLARM64EXPERIMENTALSDK = 0" Value="0" />
43384348

43394349
<ComponentGroupRef Id="BlocksRuntime.arm64" />
43404350
<ComponentGroupRef Id="CRT.arm64" />
@@ -4405,7 +4415,7 @@
44054415

44064416
<?if $(IncludeX64) = True?>
44074417
<Feature Id="ExperimentalX64" AllowAbsent="yes" Title="!(loc.Plt_ProductName_Windows_Experimental_amd64)">
4408-
<Level Condition="InstallX64ExperimentalSDK = 1" Value="1" />
4418+
<Level Condition="INSTALLAMD64EXPERIMENTALSDK = 0" Value="0" />
44094419

44104420
<ComponentGroupRef Id="BlocksRuntime.x64" />
44114421
<ComponentGroupRef Id="CRT.x64" />
@@ -4476,7 +4486,7 @@
44764486

44774487
<?if $(IncludeX86) = True?>
44784488
<Feature Id="ExperimentalX86" AllowAbsent="yes" Title="!(loc.Plt_ProductName_Windows_Experimental_x86)">
4479-
<Level Condition="InstallX86ExperimentalSDK = 1" Value="1" />
4489+
<Level Condition="INSTALLX86EXPERIMENTALSDK = 0" Value="0" />
44804490

44814491
<ComponentGroupRef Id="BlocksRuntime.x86" />
44824492
<ComponentGroupRef Id="CRT.x86" />

platforms/Windows/rtl/legacy/msi/rtlmsi.wxs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
Version="$(NonSemVerProductVersion)"
88
Scope="$(PackageScope)">
99

10+
<Property Id="INSTALLUTILITIES" Value="0" />
1011
<Media Id="1" Cabinet="rtl.cab" EmbedCab="$(ArePackageCabsEmbedded)" />
1112

1213
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(RtlUpgradeCode)" />

0 commit comments

Comments
 (0)