Skip to content

Commit

Permalink
WiX: handle all installed architectures similarly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
compnerd committed Aug 29, 2023
1 parent 677ca69 commit 23c2d4e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
12 changes: 8 additions & 4 deletions platforms/Windows/bundle/installer.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<DefaultCompressionLevel>$(BundleCompressionLevel)</DefaultCompressionLevel>
<DefineConstants>
$(DefineConstants);
INCLUDE_X86_SDK=$(INCLUDE_X86_SDK);
INCLUDE_AMD64_SDK=$(INCLLUDE_AMD64_SDK);
INCLUDE_ARM64_SDK=$(INCLUDE_ARM64_SDK);
INCLUDE_X86_SDK=$(INCLUDE_X86_SDK);
</DefineConstants>
</PropertyGroup>

Expand All @@ -19,14 +20,17 @@
<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 Condition=" '$(INCLUDE_AMD64_SDK)' != '' ">
<ProjectReference Include="..\sdk\sdk.wixproj" Properties="ProductArchitecture=amd64;Platform=x86" BindName="sdk_amd64" />
</ItemGroup>

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

<ItemGroup Condition=" '$(INCLUDE_X86_SDK)' != '' ">
<ProjectReference Include="..\sdk\sdk.wixproj" Properties="ProductArchitecture=x86;Platform=x86" BindName="sdk_x86" />
</ItemGroup>
</Project>
22 changes: 12 additions & 10 deletions platforms/Windows/bundle/installer.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,15 @@
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
</MsiPackage>

<?if $(INCLUDE_X86_SDK) == true?>
<?if $(INCLUDE_AMD64_SDK) == true ?>
<MsiPackage
SourceFile="!(bindpath.sdk_x86)\sdk.x86.msi"
InstallCondition="OptionsInstallSdkX86"
SourceFile="!(bindpath.sdk_amd64)\sdk.amd64.msi"
InstallCondition="OptionsInstallSdkAMD64"
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"
Expand All @@ -113,6 +106,15 @@
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
</MsiPackage>
<?endif?>

<?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?>
</Chain>
</Bundle>
</Wix>

0 comments on commit 23c2d4e

Please sign in to comment.