mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 14:16:22 +02:00
IDE: make path, test dir: check with macros
git-svn-id: trunk@36326 -
This commit is contained in:
parent
0c516a35b0
commit
aaf6c91f65
@ -86,9 +86,10 @@ type
|
||||
fOldShowCompileDialog: boolean;
|
||||
fOldAutoCloseCompileDialog: boolean;
|
||||
function CheckLazarusDir(Buttons: TMsgDlgButtons): boolean;
|
||||
function CheckFPCSourceDir(Buttons: TMsgDlgButtons): boolean;
|
||||
function CheckCompiler(Buttons: TMsgDlgButtons): boolean;
|
||||
function CheckFPCSourceDir(Buttons: TMsgDlgButtons): boolean;
|
||||
function CheckTestDir: boolean;
|
||||
function CheckMake: boolean;
|
||||
public
|
||||
function Check: Boolean; override;
|
||||
function GetTitle: String; override;
|
||||
@ -133,9 +134,7 @@ begin
|
||||
end else if Sender=MakePathButton then begin
|
||||
// check make filename
|
||||
SetComboBoxText(MakePathComboBox,AFilename,cstFilename);
|
||||
CheckExecutable(FOldMakeFilename,MakePathComboBox.Text,
|
||||
lisEnvOptDlgInvalidMakeFilename,
|
||||
lisEnvOptDlgInvalidMakeFilenameMsg);
|
||||
CheckMake;
|
||||
end;
|
||||
end;
|
||||
InputHistories.StoreFileDialogSettings(OpenDialog);
|
||||
@ -280,13 +279,9 @@ begin
|
||||
// check fpc source directory
|
||||
if not CheckFPCSourceDir([mbIgnore,mbCancel]) then exit;
|
||||
// check make filename
|
||||
if not CheckExecutable(FOldMakeFilename,MakePathComboBox.Text,
|
||||
lisEnvOptDlgInvalidMakeFilename,lisEnvOptDlgInvalidMakeFilenameMsg,true)
|
||||
then
|
||||
Exit;
|
||||
if not CheckMake then exit;
|
||||
// check test directory
|
||||
if not CheckTestDir then
|
||||
Exit;
|
||||
if not CheckTestDir then exit;
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
@ -482,12 +477,23 @@ var
|
||||
NewTestDir: string;
|
||||
StopChecking: boolean;
|
||||
begin
|
||||
EnvironmentOptions.TestBuildDirectory:=TestBuildDirComboBox.Text;
|
||||
NewTestDir:=EnvironmentOptions.GetParsedTestBuildDirectory;
|
||||
Result:=SimpleDirectoryCheck(FOldRealTestDir,NewTestDir,
|
||||
lisEnvOptDlgTestDirNotFoundMsg,StopChecking);
|
||||
if (not Result) or StopChecking then exit;
|
||||
end;
|
||||
|
||||
function TFilesOptionsFrame.CheckMake: boolean;
|
||||
var
|
||||
NewMakeFilename: String;
|
||||
begin
|
||||
EnvironmentOptions.MakeFilename:=MakePathComboBox.Text;
|
||||
NewMakeFilename:=EnvironmentOptions.GetParsedMakeFilename;
|
||||
Result:=CheckExecutable(FOldRealMakeFilename,NewMakeFilename,
|
||||
lisCCOWarningCaption, Format(lisThePathOfMakeIsNotCorrect, [NewMakeFilename]));
|
||||
end;
|
||||
|
||||
class function TFilesOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TEnvironmentOptions;
|
||||
|
@ -1254,8 +1254,6 @@ resourcestring
|
||||
lisShowStatusBarInObjectInspector = 'Show status bar';
|
||||
lisShowInfoBoxInObjectInspector = 'Show information box';
|
||||
dlgEnvBackupHelpNote = 'Notes: Project files are all files in the project directory';
|
||||
lisEnvOptDlgInvalidMakeFilename = 'Invalid make filename';
|
||||
lisEnvOptDlgInvalidMakeFilenameMsg = 'The make file "%s" is not an executable.';
|
||||
lisEnvOptDlgInvalidDebuggerFilename = 'Invalid debugger filename';
|
||||
lisEnvOptDlgInvalidDebuggerFilenameMsg = 'The debugger file "%s" is not an executable.';
|
||||
lisEnvOptDlgDirectoryNotFound = 'Directory not found';
|
||||
@ -2082,6 +2080,7 @@ resourcestring
|
||||
+'abstract methods of the current class, because';
|
||||
lisCCOUnableToGetFileDate = 'Unable to get file date of %s.';
|
||||
lisCCOWarningCaption = 'Warning';
|
||||
lisThePathOfMakeIsNotCorrect = 'The path of "make" is not correct: "%s"';
|
||||
lisTheCompilerFileDoesNotLookCorrect = 'The compiler file "%s" does not look'
|
||||
+' correct:%s%s';
|
||||
lisTheFPCSourceDirectoryDoesNotLookCorrect = 'The FPC source directory "%s" '
|
||||
|
Loading…
Reference in New Issue
Block a user