mirror of
https://github.com/PaperCutSoftware/GhostTrap.git
synced 2025-12-10 13:21:41 -06:00
simplifying deps logic as only installing x64 version of the vc++ deps, mirroring what GhostScript installer does
This commit is contained in:
parent
1441d20fe6
commit
4887c5b1d5
@ -61,8 +61,7 @@ Source: *; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
|
|||||||
Source: bin\gsc-trapped.exe; DestDir: {app}\bin\; DestName: gswin32c-trapped.exe;
|
Source: bin\gsc-trapped.exe; DestDir: {app}\bin\; DestName: gswin32c-trapped.exe;
|
||||||
Source: bin\gs.exe; DestDir: {app}\bin\; DestName: gswin32.exe;
|
Source: bin\gs.exe; DestDir: {app}\bin\; DestName: gswin32.exe;
|
||||||
Source: bin\gsc.exe; DestDir: {app}\bin\; DestName: gswin32c.exe;
|
Source: bin\gsc.exe; DestDir: {app}\bin\; DestName: gswin32c.exe;
|
||||||
Source: vc_redist.x64.exe; DestDir: {app}; DestName: vc_redist.x64.exe;
|
Source: vc_redist.x64.exe; DestDir: {app}; DestName: vc_redist.x64.exe; AfterInstall: InstallVCRedist
|
||||||
Source: vc_redist.x86.exe; DestDir: {app}; DestName: vc_redist.x86.exe; AfterInstall: InstallVCRedist
|
|
||||||
|
|
||||||
|
|
||||||
[Registry]
|
[Registry]
|
||||||
@ -154,35 +153,16 @@ procedure InstallVCRedist();
|
|||||||
var
|
var
|
||||||
ErrorCode: Integer;
|
ErrorCode: Integer;
|
||||||
VC_Redist: String;
|
VC_Redist: String;
|
||||||
VC_Redist_Unused: String;
|
|
||||||
begin
|
begin
|
||||||
if isWin64 then
|
VC_Redist := ExpandConstant('{app}\vc_redist.x64.exe');
|
||||||
begin
|
|
||||||
VC_Redist := ExpandConstant('{app}\vc_redist.x64.exe');
|
|
||||||
VC_Redist_Unused := ExpandConstant('{app}\vc_redist.x86.exe');
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
VC_Redist := ExpandConstant('{app}\vc_redist.x86.exe');
|
|
||||||
VC_Redist_Unused := ExpandConstant('{app}\vc_redist.x64.exe');
|
|
||||||
end;
|
|
||||||
|
|
||||||
if DeleteFile(VC_Redist_Unused) then
|
|
||||||
Log(Format('Deleted unused VC++ deps installer, %s', [VC_Redist_Unused]))
|
|
||||||
else
|
|
||||||
Log(Format('Failed to delete unused VC deps installer, %s', [VC_Redist_Unused]));
|
|
||||||
|
|
||||||
if not IsDependencyInstallationAlreadyRunning('VC_redist') then
|
if not IsDependencyInstallationAlreadyRunning('VC_redist') then
|
||||||
begin
|
begin
|
||||||
Log(Format('The VC++ dependency to install will be: %s', [VC_Redist]));
|
Log(Format('The VC++ dependency to install will be: %s', [VC_Redist]));
|
||||||
if Exec(VC_Redist, '/norestart /install /quiet', ExpandConstant('{app}'), SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
|
if Exec(VC_Redist, '/norestart /install /quiet', ExpandConstant('{app}'), SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
|
||||||
begin
|
Log('VC dependencies successfully installed.')
|
||||||
Log('VC dependencies successfully installed.');
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
begin
|
|
||||||
Log(Format('Failed to launch VC++ Redistributable installer. Error Code: %d', [ErrorCode]));
|
Log(Format('Failed to launch VC++ Redistributable installer. Error Code: %d', [ErrorCode]));
|
||||||
end;
|
|
||||||
|
|
||||||
if ErrorCode <> 0 then
|
if ErrorCode <> 0 then
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user