mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 16:39:26 +02:00
IDE: environment options, fixed checking FPCSrcDir with macros
git-svn-id: trunk@21751 -
This commit is contained in:
parent
eaf9985829
commit
ede3c52deb
@ -593,7 +593,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
SubResult:=CheckDirPathExists(NewDir,lisEnvOptDlgDirectoryNotFound,
|
||||
NotFoundErrMsg);
|
||||
NotFoundErrMsg);
|
||||
if SubResult=mrIgnore then begin
|
||||
Result:=true;
|
||||
exit;
|
||||
@ -1384,10 +1384,8 @@ begin
|
||||
lisTestDirectory,@MacroFuncTestDir,[]));
|
||||
AMacroList.Add(TTransferMacro.Create('ConfDir','',
|
||||
lisProjectSrcPath,@MacroFuncConfDir,[]));
|
||||
{$IFNDEF Ver2_2_0}
|
||||
AMacroList.Add(TTransferMacro.Create('Home',GetUserDir,
|
||||
lisUserSHomeDirectory, nil, []));
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TEnvironmentOptions.MacroFuncCompPath(const s: string;
|
||||
|
@ -26,7 +26,8 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, StdCtrls, Dialogs, Controls,
|
||||
EnvironmentOpts, LazarusIDEStrConsts, InputHistory, LazConf, IDEProcs, IDEOptionsIntf;
|
||||
EnvironmentOpts, MacroIntf, LazarusIDEStrConsts, InputHistory, LazConf,
|
||||
IDEProcs, IDEOptionsIntf;
|
||||
|
||||
type
|
||||
|
||||
@ -321,6 +322,12 @@ var
|
||||
StopChecking: boolean;
|
||||
begin
|
||||
NewFPCSrcDir:=FPCSourceDirComboBox.Text;
|
||||
Result:=IDEMacros.SubstituteMacros(NewFPCSrcDir);
|
||||
if not Result then begin
|
||||
Result:=(MessageDlg(Format(lisEnvOptDlgInvalidFPCSrcDir,[NewFPCSrcDir]),
|
||||
mtWarning,[mbIgnore,mbCancel],0)=mrIgnore);
|
||||
exit;
|
||||
end;
|
||||
Result:=SimpleDirectoryCheck(FOldFPCSourceDir,NewFPCSrcDir,
|
||||
lisEnvOptDlgFPCSrcDirNotFoundMsg,StopChecking);
|
||||
if (not Result) or StopChecking then exit;
|
||||
|
Loading…
Reference in New Issue
Block a user