Skip to content

Commit 8d28c08

Browse files
committed
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.
1 parent df3572f commit 8d28c08

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

platforms/Windows/bundle/installer.wixproj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
<VCRedistDownloadUrl Condition=" '$(VCRedistDownloadUrl)' == '' AND '$(VSMajorVersion)' != '' ">https://aka.ms/vs/$(VSMajorVersion)/release/vc_redist.$(ProductArchitecture).exe</VCRedistDownloadUrl>
77
<DefineConstants>
88
$(DefineConstants);
9-
INCLUDE_X86_SDK=$(INCLUDE_X86_SDK);
9+
INCLUDE_AMD64_SDK=$(INCLUDE_AMD64_SDK);
1010
INCLUDE_ARM64_SDK=$(INCLUDE_ARM64_SDK);
11+
INCLUDE_X86_SDK=$(INCLUDE_X86_SDK);
1112
ANDROID_INCLUDE_ARM64_SDK=$(ANDROID_INCLUDE_ARM64_SDK);
1213
ANDROID_INCLUDE_x86_64_SDK=$(ANDROID_INCLUDE_x86_64_SDK);
1314
ANDROID_INCLUDE_ARM_SDK=$(ANDROID_INCLUDE_ARM_SDK);
@@ -25,17 +26,20 @@
2526
<ProjectReference Include="..\dbg\dbg.wixproj" BindName="dbg" />
2627
<ProjectReference Include="..\ide\ide.wixproj" BindName="ide" />
2728
<ProjectReference Include="..\rtl\msi\rtlmsi.wixproj" BindName="rtl" />
28-
<ProjectReference Include="..\sdk\sdk.wixproj" Properties="ProductArchitecture=amd64;Platform=x86" BindName="sdk_amd64" />
2929
</ItemGroup>
3030

31-
<ItemGroup Condition=" '$(INCLUDE_X86_SDK)' != '' ">
32-
<ProjectReference Include="..\sdk\sdk.wixproj" Properties="ProductArchitecture=x86;Platform=x86" BindName="sdk_x86" />
31+
<ItemGroup Condition=" '$(INCLUDE_AMD64_SDK)' != '' ">
32+
<ProjectReference Include="..\sdk\sdk.wixproj" Properties="ProductArchitecture=amd64;Platform=x86" BindName="sdk_amd64" />
3333
</ItemGroup>
3434

3535
<ItemGroup Condition=" '$(INCLUDE_ARM64_SDK)' != '' ">
3636
<ProjectReference Include="..\sdk\sdk.wixproj" Properties="ProductArchitecture=arm64;Platform=x86" BindName="sdk_arm64" />
3737
</ItemGroup>
3838

39+
<ItemGroup Condition=" '$(INCLUDE_X86_SDK)' != '' ">
40+
<ProjectReference Include="..\sdk\sdk.wixproj" Properties="ProductArchitecture=x86;Platform=x86" BindName="sdk_x86" />
41+
</ItemGroup>
42+
3943
<ItemGroup Condition=" '$(ANDROID_INCLUDE_ARM64_SDK)' != '' ">
4044
<ProjectReference Include="..\android_sdk\android_sdk.wixproj" Properties="ProductArchitecture=aarch64;Platform=x86" BindName="android_sdk_aarch64" />
4145
</ItemGroup>

platforms/Windows/bundle/installer.wxs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,24 +98,16 @@
9898
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
9999
</MsiPackage>
100100

101-
<?if $(INCLUDE_X86_SDK) == true?>
101+
<?if $(INCLUDE_AMD64_SDK) == true ?>
102102
<MsiPackage
103-
SourceFile="!(bindpath.sdk_x86)\sdk.x86.msi"
104-
InstallCondition="OptionsInstallSdkX86 = 1"
103+
SourceFile="!(bindpath.sdk_amd64)\sdk.amd64.msi"
104+
InstallCondition="OptionsInstallSdkAMD64 = 1"
105105
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
106106
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
107-
<MsiProperty Name="INSTALLREDIST" Value="[OptionsInstallRedistX86]" />
107+
<MsiProperty Name="INSTALLREDIST" Value="[OptionsInstallRedistAMD64]" />
108108
</MsiPackage>
109109
<?endif?>
110110

111-
<MsiPackage
112-
SourceFile="!(bindpath.sdk_amd64)\sdk.amd64.msi"
113-
InstallCondition="OptionsInstallSdkAMD64 = 1"
114-
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
115-
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
116-
<MsiProperty Name="INSTALLREDIST" Value="[OptionsInstallRedistAMD64]" />
117-
</MsiPackage>
118-
119111
<?if $(INCLUDE_ARM64_SDK) == true ?>
120112
<MsiPackage
121113
SourceFile="!(bindpath.sdk_arm64)\sdk.arm64.msi"
@@ -126,6 +118,16 @@
126118
</MsiPackage>
127119
<?endif?>
128120

121+
<?if $(INCLUDE_X86_SDK) == true?>
122+
<MsiPackage
123+
SourceFile="!(bindpath.sdk_x86)\sdk.x86.msi"
124+
InstallCondition="OptionsInstallSdkX86 = 1"
125+
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
126+
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
127+
<MsiProperty Name="INSTALLREDIST" Value="[OptionsInstallRedistx86]" />
128+
</MsiPackage>
129+
<?endif?>
130+
129131
<?if $(ANDROID_INCLUDE_ARM64_SDK) == true ?>
130132
<MsiPackage
131133
SourceFile="!(bindpath.android_sdk_aarch64)\android_sdk.aarch64.msi"

0 commit comments

Comments
 (0)