Skip to content

Commit a148eed

Browse files
committed
install - switch from merge modules to bundling vcredist in msi
1 parent d0d3b43 commit a148eed

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed
Binary file not shown.

install/windows/vcredist_x64.exe

24.4 MB
Binary file not shown.

install/windows/wix/sonic-pi.wxs

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,30 @@
1616
<Property Id='ARPURLINFOABOUT'>https://sonic-pi.net</Property>
1717
<Property Id='ARPPRODUCTICON'>StartMenuIcon.exe</Property>
1818

19+
<!-- Visual C++ Redistributable Detection -->
20+
<Property Id="VCREDIST2019_INSTALLED">
21+
<DirectorySearch Id="VCRedistSystem64" Path="[System64Folder]">
22+
<FileSearch Name="vcruntime140.dll" MinVersion="14.20.27508.1"/>
23+
</DirectorySearch>
24+
</Property>
25+
26+
<!-- Bundle the vcredist installer -->
27+
<Binary Id="vcredist_x64" SourceFile="vcredist_x64.exe" />
28+
29+
<!-- Custom action to install vcredist - changed to check return value -->
30+
<CustomAction Id="InstallVCRedist"
31+
BinaryKey="vcredist_x64"
32+
ExeCommand="/quiet /norestart"
33+
Execute="immediate"
34+
Return="check" />
35+
36+
<!-- Message-only custom action for failures -->
37+
<CustomAction Id="VCRedistFailure"
38+
Error="Failed to install Visual C++ Redistributable. Please install it manually from https://aka.ms/vs/17/release/vc_redist.x64.exe and then run this installer again." />
39+
40+
<!-- REMOVED THE LAUNCH CONDITION - this was the problem -->
41+
1942
<Directory Id="TARGETDIR" Name="SourceDir">
20-
<Merge Id="VCRedist" SourceFile="../merge_modules/Microsoft_VC142_CRT_x64.msm" DiskId="1" Language="0"/>
2143
<Directory Id="ProgramFiles64Folder" Name="PFiles">
2244
<Directory Id="SonicPi" Name="Sonic Pi">
2345
<Directory Id="AppDir" Name="app">
@@ -44,6 +66,7 @@
4466
</Directory>
4567
</Directory>
4668
</Directory>
69+
4770
<Feature Id="DefaultFeature" Title="Main Feature" Level="1">
4871
<ComponentGroupRef Id="ETC"/>
4972
<ComponentGroupRef Id="GUI"/>
@@ -53,6 +76,13 @@
5376
<ComponentRef Id="StartMenuShortcuts" />
5477
</Feature>
5578

79+
<!-- Install sequence for vcredist - only run if not already installed -->
80+
<InstallUISequence>
81+
<Custom Action="InstallVCRedist" After="CostFinalize">
82+
<![CDATA[NOT VCREDIST2019_INSTALLED]]>
83+
</Custom>
84+
</InstallUISequence>
85+
5686
<UI Id="UserInterface">
5787
<UIRef Id="WixUI_Minimal" />
5888
<Property Id="WIXUI_INSTALLDIR" Value="TARGETDIR" />
@@ -70,10 +100,6 @@
70100
<Property Id="WixShellExecTarget" Value="[#SONIC_PI.EXE]" />
71101
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
72102

73-
<Feature Id="VCRedist" Title="Visual Studio C++ 2019 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
74-
<MergeRef Id="VCRedist"/>
75-
</Feature>
76-
77103
<Icon Id="StartMenuIcon.exe" SourceFile="../../app/gui/build/Release/sonic-pi.exe" />
78104
</Product>
79-
</Wix>
105+
</Wix>

0 commit comments

Comments
 (0)