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:
parent
53b8b53c5a
commit
d26e42ba17
@ -762,7 +762,7 @@ end;
|
||||
|
||||
function TCefApplication.CheckCEFLibrary : boolean;
|
||||
var
|
||||
TempString : string;
|
||||
TempString, TempOldDir : string;
|
||||
TempMissingFrm, TempMissingRsc, TempMissingLoc : boolean;
|
||||
begin
|
||||
Result := False;
|
||||
@ -771,6 +771,12 @@ begin
|
||||
Result := True
|
||||
else
|
||||
begin
|
||||
if FSetCurrentDir then
|
||||
begin
|
||||
TempOldDir := GetCurrentDir;
|
||||
chdir(GetModulePath);
|
||||
end;
|
||||
|
||||
TempMissingFrm := not(CheckDLLs(FFrameworkDirPath, FMissingLibFiles));
|
||||
TempMissingRsc := not(CheckResources(FResourcesDirPath, FMissingLibFiles, FCheckDevToolsResources));
|
||||
TempMissingLoc := not(CheckLocales(FLocalesDirPath, FMissingLibFiles, FLocalesRequired));
|
||||
@ -804,6 +810,9 @@ begin
|
||||
|
||||
ShowErrorMessageDlg(TempString);
|
||||
end;
|
||||
|
||||
if FSetCurrentDir then chdir(TempOldDir);
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user