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