mirror of
https://github.com/PaperCutSoftware/GhostTrap.git
synced 2025-12-11 08:43:42 -06:00
adding experimental method for testing
This commit is contained in:
parent
8384a17b8c
commit
af21c97863
@ -61,8 +61,8 @@ 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; Flags: deleteafterinstall; AfterInstall: InstallVCRedist
|
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; Flags: deleteafterinstall; AfterInstall: InstallVCRedist
|
Source: vc_redist.x86.exe; DestDir: {app}; DestName: vc_redist.x86.exe; AfterInstall: InstallVCRedist
|
||||||
|
|
||||||
|
|
||||||
[Registry]
|
[Registry]
|
||||||
@ -158,18 +158,30 @@ procedure InstallVCRedist();
|
|||||||
var
|
var
|
||||||
ErrorCode: Integer;
|
ErrorCode: Integer;
|
||||||
VC_Redist: String;
|
VC_Redist: String;
|
||||||
|
VC_Redist_Unused: String;
|
||||||
begin
|
begin
|
||||||
|
if isDeviceWin64() then
|
||||||
|
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('Deleted unused VC++ deps installer')
|
||||||
|
else
|
||||||
|
Log(Format('Failed to delete unused VC deps installer, %s', [VC_Redist_Unused]));
|
||||||
|
|
||||||
if VC_Redist_Installed then
|
if VC_Redist_Installed then
|
||||||
begin
|
begin
|
||||||
Log('Already installed. Skipping.');
|
Log('Already installed. Skipping.');
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if IsWin64 then
|
|
||||||
VC_Redist := ExpandConstant('{app}\vc_redist.x64.exe')
|
|
||||||
else
|
|
||||||
VC_Redist := ExpandConstant('{app}\vc_redist.x86.exe');
|
|
||||||
|
|
||||||
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]));
|
||||||
@ -177,7 +189,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Log('VC dependencies successfully installed.');
|
Log('VC dependencies successfully installed.');
|
||||||
VC_Redist_Installed := True;
|
VC_Redist_Installed := True;
|
||||||
end;
|
end
|
||||||
else
|
else
|
||||||
begin
|
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]));
|
||||||
@ -187,5 +199,15 @@ begin
|
|||||||
begin
|
begin
|
||||||
Log(Format('VC++ Redistributable installation failed with exit code: ', [ErrorCode]));
|
Log(Format('VC++ Redistributable installation failed with exit code: ', [ErrorCode]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if DeleteFile(VC_Redist) then
|
||||||
|
Log(Format('Successfully deleted used VC++ installer %s', [VC_Redist]))
|
||||||
|
else
|
||||||
|
Log(Format('Failed to delete used VC++ installer %s!', [VC_Redist]));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function isDeviceWin64(): Boolean;
|
||||||
|
begin
|
||||||
|
Result := IsWin64;
|
||||||
|
end;
|
||||||
Loading…
x
Reference in New Issue
Block a user