mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 18:49:30 +02:00
IDE: default lazarus directory: remove bundle path
git-svn-id: trunk@21940 -
This commit is contained in:
parent
df02734dc8
commit
97a9d2384e
@ -792,7 +792,7 @@ begin
|
||||
|
||||
FileTitles[0]:=lisCodeToolsDefsLazarusDirectory;
|
||||
FileDescs[0]:=lisCodeToolsDefsTheLazarusMainDirectory;
|
||||
FileNames[0]:=IDEProcs.ProgramDirectory;
|
||||
FileNames[0]:=IDEProcs.ProgramDirectory(true);
|
||||
FileFlags[0]:=[iftDirectory,iftNotEmpty,iftMustExist];
|
||||
|
||||
EndUpdate;
|
||||
|
@ -673,7 +673,7 @@ begin
|
||||
FShowMenuGlyphs := sbgSystem;
|
||||
|
||||
// files
|
||||
LazarusDirectory:=IDEProcs.ProgramDirectory;
|
||||
LazarusDirectory:=IDEProcs.ProgramDirectory(true);
|
||||
FLazarusDirsHistory:=TStringList.Create;
|
||||
CompilerFilename:='';
|
||||
FCompilerFileHistory:=TStringList.Create;
|
||||
@ -918,7 +918,7 @@ begin
|
||||
LoadRecentList(XMLConfig,FLazarusDirsHistory,
|
||||
Path+'LazarusDirectory/History/');
|
||||
if FLazarusDirsHistory.Count=0 then begin
|
||||
FLazarusDirsHistory.Add(ProgramDirectory);
|
||||
FLazarusDirsHistory.Add(ProgramDirectory(true));
|
||||
end;
|
||||
CompilerFilename:=TrimFilename(XMLConfig.GetValue(
|
||||
Path+'CompilerFilename/Value',FCompilerFilename));
|
||||
|
@ -174,7 +174,7 @@ begin
|
||||
with LazarusDirComboBox.Items do
|
||||
begin
|
||||
BeginUpdate;
|
||||
Add(ProgramDirectory);
|
||||
Add(ProgramDirectory(true));
|
||||
EndUpdate;
|
||||
end;
|
||||
|
||||
|
@ -225,7 +225,7 @@ procedure StringToStringList(const s: string; List: TStrings);
|
||||
function GetCurrentUserName: string;
|
||||
function GetCurrentMailAddress: string;
|
||||
function GetProgramSearchPath: string;
|
||||
function ProgramDirectory: string;
|
||||
function ProgramDirectory(BundleRoot: boolean): string;
|
||||
|
||||
// debugging
|
||||
procedure RaiseException(const Msg: string);
|
||||
@ -2315,9 +2315,14 @@ begin
|
||||
CopyDir(SrcDir,DestDirectory);
|
||||
end;
|
||||
|
||||
function ProgramDirectory: string;
|
||||
function ProgramDirectory(BundleRoot: boolean): string;
|
||||
const
|
||||
BundlePostFix='.app/Contents/MacOS';
|
||||
begin
|
||||
Result:=FileUtil.ProgramDirectory;
|
||||
if BundleRoot
|
||||
and (RightStr(ChompPathDelim(Result),length(BundlePostFix))=BundlePostFix) then
|
||||
Result:=ExtractFilePath(LeftStr(Result,length(Result)-length(BundlePostFix)));
|
||||
end;
|
||||
|
||||
function CreateEmptyFile(const Filename: string): boolean;
|
||||
|
@ -141,7 +141,7 @@ var
|
||||
begin
|
||||
CurLazDir:=EnvironmentOptions.LazarusDirectory;
|
||||
if CurLazDir='' then begin
|
||||
CurLazDir:=ProgramDirectory;
|
||||
CurLazDir:=ProgramDirectory(true);
|
||||
if not CheckLazarusDirectory(CurLazDir) then
|
||||
CurLazDir:=FindDefaultLazarusSrcDirectory;
|
||||
end;
|
||||
@ -153,7 +153,7 @@ begin
|
||||
),
|
||||
mtWarning,[mbIgnore],0);
|
||||
end else begin
|
||||
DefaultLazDir:=ProgramDirectory;
|
||||
DefaultLazDir:=ProgramDirectory(true);
|
||||
if CompareFilenames(DefaultLazDir,CurLazDir)<>0 then begin
|
||||
r:=MessageDlg(lisLazarusDirectoryNotFound,
|
||||
Format(lisTheCurrentLazarusDirectoryDoesNotLookCorrectWithou, ['"',
|
||||
|
@ -1027,7 +1027,7 @@ begin
|
||||
EnableRemoteControl:=false;
|
||||
if IsHelpRequested then
|
||||
begin
|
||||
TranslateResourceStrings(ProgramDirectory,'');
|
||||
TranslateResourceStrings(ProgramDirectory(true),'');
|
||||
|
||||
AHelp := TStringList.Create;
|
||||
AddHelp([lislazarusOptionsProjectFilename]);
|
||||
|
Loading…
Reference in New Issue
Block a user