Skip to content

Commit d64e7e9

Browse files
committed
WiX: package the VC redist as part of the installation
The compilers and runtime depend on the runtime. Introduce a dependency on the runtime for the VC runtime, which is a dependency for the build tools. This should allow us to be more self-contained (there is a dependency on WinSDK and VS if not cross-compiling to another platform).
1 parent 097a839 commit d64e7e9

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

platforms/Windows/bundle/installer.wixproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
<PropertyGroup>
33
<OutputType>Bundle</OutputType>
44
<DefaultCompressionLevel>$(BundleCompressionLevel)</DefaultCompressionLevel>
5+
<VSMajorVersion Condition=" '$(VSVersion)' != '' ">$(VSVersion.Split('.')[0])</VSMajorVersion>
6+
<VCRedistDownloadUrl Condition=" '$(VCRedistDownloadUrl)' == '' AND '$(VSMajorVersion)' != '' ">https://aka.ms/vs/$(VSMajorVersion)/release/vc_redist.$(ProductArchitecture).exe</VCRedistDownloadUrl>
57
<DefineConstants>
68
$(DefineConstants);
9+
VCRedistInstaller=$(VCRedistInstaller);
10+
VCRedistDownloadUrl=$(VCRedistDownloadUrl);
711
INCLUDE_X86_SDK=$(INCLUDE_X86_SDK);
812
INCLUDE_ARM64_SDK=$(INCLUDE_ARM64_SDK);
913
</DefineConstants>

platforms/Windows/bundle/installer.wxs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@
5959
-->
6060

6161
<Chain>
62+
<?if $(VCRedistInstaller) != ""?>
63+
<BundlePackage
64+
SourceFile="$(VCRedistInstaller)"
65+
InstallCondition="OptionsInstallRtl"
66+
Permanent="yes"
67+
InstallArguments="/install /quiet /norestart"
68+
DownloadUrl="$(VCRedistDownloadUrl)">
69+
</BundlePackage>
70+
<?endif?>
71+
6272
<MsiPackage
6373
SourceFile="!(bindpath.rtl)\rtl.msi"
6474
InstallCondition="OptionsInstallRtl"

0 commit comments

Comments
 (0)