1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-01-03 10:15:38 +02:00

Use FSetCurrentDir in CheckCEFLibrary as well so that the resource checking is done from the right place when the working directory is different from the executable location.

This commit is contained in:
mronkain 2018-07-03 15:54:50 +03:00
parent 53b8b53c5a
commit d26e42ba17

View File

@ -762,7 +762,7 @@ end;
function TCefApplication.CheckCEFLibrary : boolean; function TCefApplication.CheckCEFLibrary : boolean;
var var
TempString : string; TempString, TempOldDir : string;
TempMissingFrm, TempMissingRsc, TempMissingLoc : boolean; TempMissingFrm, TempMissingRsc, TempMissingLoc : boolean;
begin begin
Result := False; Result := False;
@ -771,6 +771,12 @@ begin
Result := True Result := True
else else
begin begin
if FSetCurrentDir then
begin
TempOldDir := GetCurrentDir;
chdir(GetModulePath);
end;
TempMissingFrm := not(CheckDLLs(FFrameworkDirPath, FMissingLibFiles)); TempMissingFrm := not(CheckDLLs(FFrameworkDirPath, FMissingLibFiles));
TempMissingRsc := not(CheckResources(FResourcesDirPath, FMissingLibFiles, FCheckDevToolsResources)); TempMissingRsc := not(CheckResources(FResourcesDirPath, FMissingLibFiles, FCheckDevToolsResources));
TempMissingLoc := not(CheckLocales(FLocalesDirPath, FMissingLibFiles, FLocalesRequired)); TempMissingLoc := not(CheckLocales(FLocalesDirPath, FMissingLibFiles, FLocalesRequired));
@ -804,6 +810,9 @@ begin
ShowErrorMessageDlg(TempString); ShowErrorMessageDlg(TempString);
end; end;
if FSetCurrentDir then chdir(TempOldDir);
end; end;
end; end;