Support installing the VC80 DLLs locally.

git-svn-id: http://yate.null.ro/svn/yate/trunk@3266 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2010-05-02 20:21:02 +00:00
parent 06b99b8938
commit a5080659b8
1 changed files with 14 additions and 1 deletions

View File

@ -181,7 +181,12 @@ Source: "..\docs\api\*.png"; DestDir: "{app}\devel\docs\api"; Components: devel\
Source: "..\docs\api\*.css"; DestDir: "{app}\devel\docs\api"; Components: devel\doc; Flags: skipifsourcedoesntexist
Source: "Release\msvcrtest.dll"; Flags: dontcopy
; Global CRT DLLs installer, should not be used together with local installs
Source: "Runtimes\vcredist_x86.exe"; DestDir: "{app}"; Flags: skipifsourcedoesntexist dontcopy nocompression
; Local CRT DLLs install, either all or none of the files must be present
Source: "Runtimes\Microsoft.VC80.CRT.manifest"; DestDir: "{app}"; Flags: skipifsourcedoesntexist; Check: CrtLocalInstall
Source: "Runtimes\msvcr80.dll"; DestDir: "{app}"; Flags: skipifsourcedoesntexist; Check: CrtLocalInstall
Source: "Runtimes\msvcp80.dll"; DestDir: "{app}"; Flags: skipifsourcedoesntexist; Check: CrtLocalInstall
[Icons]
Name: "{group}\Yate Client (Qt)"; Filename: "{app}\yate-qt4.exe"; Parameters: "-n yate-qt4 -w ""{app}"""; Components: client\qt
@ -206,6 +211,7 @@ Filename: "{app}\yate-service.exe"; Parameters: "--remove"; Components: server
[Code]
var
CrtLoadable : Boolean;
CrtLocal : Boolean;
function CrtTrue() : Integer;
external 'crt_true@files:msvcrtest.dll cdecl delayload setuponly';
@ -218,9 +224,16 @@ begin
except
CrtLoadable := False;
end;
CrtLocal := False;
Result := True;
end;
function CrtLocalInstall() : Boolean;
begin
if not CrtLoadable then CrtLocal := True;
Result := CrtLocal;
end;
procedure CurStepChanged(CurStep: TSetupStep);
var
msg : String;
@ -228,7 +241,7 @@ var
err : Integer;
begin
if (CurStep = ssInstall) then begin
if not CrtLoadable then begin
if not (CrtLoadable or CrtLocal) then begin
msg := 'MSVCR80.DLL is not installed or loadable';
msg := msg + #13 #13 'Do you want to install Microsoft Runtime 8.0 now?';
repeat