Skip to content

Commit 81a9968

Browse files
committed
build: install vc_redist automatically
1 parent 9f22112 commit 81a9968

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

installer.iss.in

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
3636
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
3737

3838
[Files]
39+
Source: "vc_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
3940
Source: "*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
4041

4142
[Icons]
@@ -60,6 +61,13 @@ Type: filesandordirs; Name: "{pf}\{#AppPublisher}\{#PreviousAppName}"
6061
WelcomeLabel1=Before we start
6162
WelcomeLabel2=To access your existing wallets, please use the new Blockstream app. The installer will replace the old Blockstream Green app, but rest assured, all your wallets are safe and will be fully accessible in the new application.
6263

64+
[Run]
65+
Filename: "{tmp}\vc_redist.x64.exe"; \
66+
Parameters: "/install /quiet /norestart"; \
67+
Flags: waituntilterminated; \
68+
Check: NeedVCRedist64; \
69+
StatusMsg: "Installing Microsoft Visual C++ 2015–2022 Runtime...";
70+
6371
[Code]
6472
const
6573
WM_CLOSE = 16;
@@ -95,3 +103,17 @@ begin
95103
except
96104
end;
97105
end;
106+
107+
function NeedVCRedist64(): Boolean;
108+
var
109+
Installed: Cardinal;
110+
begin
111+
if RegQueryDWordValue(HKLM,
112+
'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64',
113+
'Installed', Installed) then
114+
begin
115+
Result := (Installed <> 1);
116+
end
117+
else
118+
Result := True;
119+
end;

0 commit comments

Comments
 (0)