mirror of
https://github.com/PaperCutSoftware/GhostTrap.git
synced 2025-12-10 13:21:41 -06:00
Merge branch 'main' into feature/PO-2965-update-GhostScript-10.04.0-or-later
This commit is contained in:
commit
704eca53c9
@ -62,7 +62,7 @@ Source: bin\gsc-trapped.exe; DestDir: {app}\bin\; DestName: gswin32c-trapped.exe
|
||||
Source: bin\gs.exe; DestDir: {app}\bin\; DestName: gswin32.exe;
|
||||
Source: bin\gsc.exe; DestDir: {app}\bin\; DestName: gswin32c.exe;
|
||||
; This is the Microsoft's redistributable binaries for VC++ dependency, we should provide the exact same build as it is
|
||||
; is used by GhostScript. As of 25/3/25, the build number is 30153, with a full version number of 14.29.30153. Manually
|
||||
; is used by GhostScript. As of 25/2/25, the build number is 30153, with a full version number of 14.29.30153. Manually
|
||||
; update this file whenever necessary.
|
||||
Source: ..\..\installer\redist\VC_redist.x64.exe; DestDir: {app}; DestName: VC_redist.x64.exe; AfterInstall: InstallVCRedist
|
||||
|
||||
@ -121,6 +121,21 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{ To get the version string of a given file. Needed for logging the VC redistributable file version. }
|
||||
function GetFileVersion(const FileName: String): String;
|
||||
begin
|
||||
Result := '';
|
||||
if FileExists(FileName) then
|
||||
begin
|
||||
if not GetVersionNumbersString(FileName, Result) then
|
||||
begin
|
||||
Result := 'Unspecified Version';
|
||||
end;
|
||||
end
|
||||
else
|
||||
Result := 'File not found';
|
||||
end;
|
||||
|
||||
{ The same version of VC++ dependency that is used by GhostScript will be automatically installed by GhostTrap }
|
||||
{ Requires manual updating if the version used by GhostScript changes in order to mirror the dependency updates }
|
||||
procedure InstallVCRedist();
|
||||
@ -129,9 +144,11 @@ var
|
||||
VC_Redist: String;
|
||||
VC_Redist_Relocated: String;
|
||||
Relocated_Dir: String;
|
||||
VC_Redist_Version: String;
|
||||
begin
|
||||
VC_Redist := ExpandConstant('{app}\VC_redist.x64.exe');
|
||||
Log(Format('The VC++ dependency to install will be: %s', [VC_Redist]));
|
||||
VC_Redist_Version := GetFileVersion(VC_Redist);
|
||||
Log(Format('The VC++ dependency version to be installed is: %s', [VC_Redist_Version]));
|
||||
if Exec(VC_Redist, '/norestart /install /quiet', ExpandConstant('{app}'), SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
|
||||
Log('VC dependencies successfully installed.')
|
||||
else
|
||||
@ -154,5 +171,6 @@ begin
|
||||
end;
|
||||
|
||||
if FileCopy(VC_Redist, VC_Redist_Relocated, True) then
|
||||
Log('Moved VC++ redistributable file to the redist folder under installation.');
|
||||
DeleteFile(VC_Redist);
|
||||
end;
|
||||
Loading…
x
Reference in New Issue
Block a user