mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 23:50:37 +02:00
fixed fpcmake extension on creating Makefile
git-svn-id: trunk@8438 -
This commit is contained in:
parent
93bcaa38be
commit
dbba7ab026
@ -11,7 +11,7 @@
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=""/>
|
||||
<ActiveEditorIndexAtStart Value="0"/>
|
||||
<ActiveEditorIndexAtStart Value="3"/>
|
||||
</General>
|
||||
<LazDoc Paths=""/>
|
||||
<Units Count="2">
|
||||
@ -24,7 +24,7 @@
|
||||
<UsageCount Value="134"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<CursorPos X="45" Y="109"/>
|
||||
<CursorPos X="9" Y="107"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
|
@ -273,6 +273,7 @@ function TExternalToolList.Run(ExtTool: TExternalToolOptions;
|
||||
var WorkingDir, Filename, Params, CmdLine, Title: string;
|
||||
TheProcess: TProcess;
|
||||
Abort, ErrorOccurred: boolean;
|
||||
NewFilename: String;
|
||||
begin
|
||||
Result:=mrCancel;
|
||||
if ExtTool=nil then exit;
|
||||
@ -284,8 +285,18 @@ begin
|
||||
if (not Macros.SubstituteStr(Filename)) then exit;
|
||||
if (not Macros.SubstituteStr(WorkingDir)) then exit;
|
||||
if (not Macros.SubstituteStr(Params)) then exit;
|
||||
if not FilenameIsAbsolute(Filename) then
|
||||
Filename:=FindProgram(Filename,GetCurrentDir,false);
|
||||
if not FilenameIsAbsolute(Filename) then begin
|
||||
NewFilename:=FindProgram(Filename,GetCurrentDir,false);
|
||||
if NewFilename='' then begin
|
||||
Result:=MessageDlg(lisExtToolFailedToRunTool,
|
||||
Format(lisExtToolUnableToRunTheTool, ['"', Title, '"', #13,
|
||||
'Program '+Filename+' not found']
|
||||
),
|
||||
mtError,[mbCancel,mbAbort],0);
|
||||
exit;
|
||||
end;
|
||||
Filename:=NewFilename;
|
||||
end;
|
||||
WorkingDir:=TrimFilename(WorkingDir);
|
||||
Filename:=TrimFilename(Filename);
|
||||
CmdLine:=Filename;
|
||||
|
@ -1299,7 +1299,7 @@ begin
|
||||
try
|
||||
FPCMakeTool.Title:='Creating Makefile for package '+APackage.IDAsString;
|
||||
FPCMakeTool.WorkingDirectory:=APackage.Directory;
|
||||
FPCMakeTool.Filename:='fpcmake';
|
||||
FPCMakeTool.Filename:='fpcmake'+GetDefaultExecutableExt;
|
||||
FPCMakeTool.CmdLineParams:='-TAll';
|
||||
FPCMakeTool.EnvironmentOverrides.Add(
|
||||
'FPCDIR='+EnvironmentOptions.FPCSourceDirectory);
|
||||
@ -1312,7 +1312,7 @@ begin
|
||||
MainIDE.MacroList,nil,nil);
|
||||
if Result<>mrOk then begin
|
||||
Result:=MessageDlg('fpcmake failed',
|
||||
'Calling fpcmake to create Makefile from '
|
||||
'Calling '+FPCMakeTool.Filename+' to create Makefile from '
|
||||
+MakefileFPCFilename+' failed.',
|
||||
mtError,[mbCancel],0);
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user