mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 04:36:42 +02:00
implemented compiling project dependencies and auto add dependency
git-svn-id: trunk@2951 -
This commit is contained in:
parent
8db02705df
commit
c669d3de48
21
ide/main.pp
21
ide/main.pp
@ -334,6 +334,7 @@ type
|
||||
var RealDir: string);
|
||||
procedure CodeToolBossGetVirtualDirectoryDefines(DefTree: TDefineTree;
|
||||
DirDef: TDirectoryDefines);
|
||||
procedure OnCompilerGraphStampIncreased;
|
||||
|
||||
// MessagesView events
|
||||
procedure MessagesViewSelectionChanged(sender : TObject);
|
||||
@ -5454,6 +5455,12 @@ begin
|
||||
Result:=DoSaveForBuild;
|
||||
if Result<>mrOk then exit;
|
||||
|
||||
// compile required packages
|
||||
{$IFDEF EnablePkgs}
|
||||
Result:=PkgBoss.DoCompileProjectDependencies(Project1,[pcfAutomatic]);
|
||||
if Result<>mrOk then exit;
|
||||
{$ENDIF}
|
||||
|
||||
// get main source filename
|
||||
if not Project1.IsVirtual then
|
||||
DefaultFilename:=''
|
||||
@ -6671,6 +6678,10 @@ begin
|
||||
BeginCodeTool(TDesigner(Sender),ActiveSrcEdit,ActiveUnitInfo,
|
||||
[ctfSwitchToFormSource]);
|
||||
|
||||
// add needed package to required packages
|
||||
{$IFDEF EnablePkgs}
|
||||
PkgBoss.AddProjectRegCompDependency(Project1,AComponentClass);
|
||||
{$ENDIF}
|
||||
// add needed unit to source
|
||||
CodeToolBoss.AddUnitToMainUsesSection(ActiveUnitInfo.Source,
|
||||
AComponentClass.{$IFDEF EnablePkgs}GetUnitName{$ELSE}UnitName{$ENDIF},'');
|
||||
@ -6920,6 +6931,8 @@ begin
|
||||
OnSearchUsedUnit:=@OnCodeToolBossSearchUsedUnit;
|
||||
end;
|
||||
|
||||
CompilerGraphStampIncreased:=@OnCompilerGraphStampIncreased;
|
||||
|
||||
// codetools consistency check
|
||||
c:=CodeToolBoss.ConsistencyCheck;
|
||||
if c<>0 then begin
|
||||
@ -7010,6 +7023,11 @@ begin
|
||||
Project1.GetVirtualDefines(DefTree,DirDef);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.OnCompilerGraphStampIncreased;
|
||||
begin
|
||||
CodeToolBoss.DefineTree.ClearCache;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.SaveSourceEditorChangesToCodeCache(PageIndex: integer);
|
||||
// save all open sources to code tools cache
|
||||
var i: integer;
|
||||
@ -8508,6 +8526,9 @@ end.
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.535 2003/04/22 18:53:12 mattias
|
||||
implemented compiling project dependencies and auto add dependency
|
||||
|
||||
Revision 1.534 2003/04/22 13:27:09 mattias
|
||||
implemented installing components in component palette
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user