mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 07:37:02 +02:00
project groups: call lazbuild for not loaded projects
git-svn-id: trunk@50403 -
This commit is contained in:
parent
8680254642
commit
3487708764
@ -13,10 +13,10 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, contnrs, Laz2_XMLCfg, Controls, Forms, Dialogs, LCLProc,
|
Classes, SysUtils, contnrs, Laz2_XMLCfg, Controls, Forms, Dialogs, LCLProc,
|
||||||
LazFileUtils, LazFileCache, LazConfigStorage, PackageIntf, ProjectIntf,
|
LazFileUtils, LazFileCache, LazConfigStorage, FileUtil, PackageIntf,
|
||||||
MenuIntf, LazIDEIntf, IDEDialogs, CompOptsIntf, BaseIDEIntf, IDECommands,
|
ProjectIntf, MenuIntf, LazIDEIntf, IDEDialogs, CompOptsIntf, BaseIDEIntf,
|
||||||
IDEExternToolIntf, MacroIntf, ProjectGroupIntf, ProjectGroupStrConst,
|
IDECommands, IDEExternToolIntf, MacroIntf, ProjectGroupIntf,
|
||||||
FileProcs, CodeToolManager, CodeCache;
|
ProjectGroupStrConst, FileProcs, CodeToolManager, CodeCache;
|
||||||
|
|
||||||
const
|
const
|
||||||
PGOptionsFileName = 'projectgroupsoptions.xml';
|
PGOptionsFileName = 'projectgroupsoptions.xml';
|
||||||
@ -233,11 +233,13 @@ end;
|
|||||||
|
|
||||||
function GetLazBuildFilename: string;
|
function GetLazBuildFilename: string;
|
||||||
begin
|
begin
|
||||||
|
// first check the lazbuild executable in the lazarus directory
|
||||||
Result:='$(LazarusDir)'+PathDelim+'$MakeExe(lazbuild)';
|
Result:='$(LazarusDir)'+PathDelim+'$MakeExe(lazbuild)';
|
||||||
IDEMacros.SubstituteMacros(Result);
|
IDEMacros.SubstituteMacros(Result);
|
||||||
if FileExistsCached(Result) then
|
if FileExistsCached(Result) then
|
||||||
exit;
|
exit;
|
||||||
Result:=''; // ToDo
|
// then search in PATH
|
||||||
|
Result:=FindDefaultExecutablePath('lazbuild'+ExeExt);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TIDEProjectGroupOptions }
|
{ TIDEProjectGroupOptions }
|
||||||
@ -1065,7 +1067,13 @@ begin
|
|||||||
aTitle:='Compile Project '+ExtractFileNameOnly(Filename);
|
aTitle:='Compile Project '+ExtractFileNameOnly(Filename);
|
||||||
aCompileHint:='Project Group: '+Parent.Filename+LineEnding;
|
aCompileHint:='Project Group: '+Parent.Filename+LineEnding;
|
||||||
|
|
||||||
LazBuildFilename:='';
|
LazBuildFilename:=GetLazBuildFilename;
|
||||||
|
if LazBuildFilename='' then begin
|
||||||
|
IDEMessageDialog('lazbuild not found','The lazbuild'+ExeExt+' was not found.'
|
||||||
|
,mtError,[mbOk]);
|
||||||
|
exit(arFailed);
|
||||||
|
end;
|
||||||
|
|
||||||
WorkingDir:=ExtractFilePath(Filename);
|
WorkingDir:=ExtractFilePath(Filename);
|
||||||
Params:=TStringList.Create;
|
Params:=TStringList.Create;
|
||||||
if AAction=taCompileClean then
|
if AAction=taCompileClean then
|
||||||
|
Loading…
Reference in New Issue
Block a user