-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed compatibility with Windows XP.
- Loading branch information
Showing
7 changed files
with
45 additions
and
8 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#ifndef Platform | ||
#error "Platform" predefined variable must be defined (x64/Win32) | ||
#endif | ||
|
||
#if Platform == "x64" | ||
#define vcredist_exe "VC_redist.x64.exe" | ||
#define vcredist_url "https://aka.ms/vs/15/release/VC_redist.x64.exe" | ||
#else | ||
#define vcredist_exe "VC_redist.x86.exe" | ||
#define vcredist_url "https://aka.ms/vs/15/release/VC_redist.x86.exe" | ||
#endif | ||
|
||
#define vcredist_path ExtractFilePath(__PATHFILENAME__) + '\' + vcredist_exe | ||
|
||
; Download file if not exists | ||
#expr Exec( 'powershell', '-NoProfile -Command if (!(Test-Path \"' + vcredist_path + '\")){(New-Object System.Net.WebClient).DownloadFile(\"' + vcredist_url + '\",\"' + vcredist_path + '\")}' ) | ||
|
||
[Files] | ||
#if Platform == "x64" | ||
Source: "{#vcredist_path}"; DestDir: "{tmp}"; Flags: deleteafterinstall 64bit; Check: IsWin64; AfterInstall: ExecTemp( '{#vcredist_exe}', '/passive /norestart' ); | ||
#else | ||
Source: "{#vcredist_path}"; DestDir: "{tmp}"; Flags: deleteafterinstall 32bit; AfterInstall: ExecTemp( '{#vcredist_exe}', '/passive /norestart' ); | ||
#endif | ||
|
||
[Code] | ||
procedure ExecTemp(File, Params : String); | ||
var | ||
nCode: Integer; | ||
begin | ||
Exec( ExpandConstant( '{tmp}' ) + '\' + File, Params, ExpandConstant( '{tmp}' ), SW_SHOW, ewWaitUntilTerminated, nCode ); | ||
end; |