diff --git a/ide/frames/files_options.pas b/ide/frames/files_options.pas index 477fb4e3ea..0ed1a9ca62 100644 --- a/ide/frames/files_options.pas +++ b/ide/frames/files_options.pas @@ -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; diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index dfa5035d86..a68b4e05ae 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -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" '