mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 08:39:35 +02:00
LCL, LCLTranslator: search for translations in correct place on macOS, issue #41592
This commit is contained in:
parent
3873d997b2
commit
3e84fd961f
@ -137,7 +137,18 @@ begin
|
||||
|
||||
FoundLang := LangID;
|
||||
|
||||
{$IFDEF darwin}
|
||||
// macOS has special location of resources in bundle. See issue #41592.
|
||||
// Resources are located in "project1-directory/project1.app/Contents/Resources/".
|
||||
// Executable is located in either "project1-directory/project1"
|
||||
// or "project1-directory/project1.app/Contents/MacOS/project1".
|
||||
AppDir := ParamStrUTF8(0)+'.app/Contents/Resources/';
|
||||
if not DirectoryExists(AppDir) then
|
||||
AppDir := CleanAndExpandDirectory(ExtractFilePath(ParamStrUTF8(0))+'../Resources/');
|
||||
if not DirectoryExists(AppDir) then
|
||||
{$ENDIF}
|
||||
AppDir := ExtractFilePath(ParamStrUTF8(0));
|
||||
|
||||
LCFileName := ChangeFileExt(GetLCFileName, LCExt);
|
||||
|
||||
if Dir<>'' then
|
||||
|
Loading…
Reference in New Issue
Block a user