mirror of https://gitlab.com/basile.b/dexed.git
projects group, a group can be either compiled sequentially or in parallel
This commit is contained in:
parent
5f0bba91d4
commit
ca043ee78c
|
@ -3830,6 +3830,9 @@ object CEMainForm: TCEMainForm
|
||||||
CEFFD8D1D2FFB37A06FFB78116FFB9851CC5BB871F00BB871F00
|
CEFFD8D1D2FFB37A06FFB78116FFB9851CC5BB871F00BB871F00
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
object MenuItem98: TMenuItem
|
||||||
|
Action = actProjGroupCompileSync
|
||||||
|
end
|
||||||
object MenuItem88: TMenuItem
|
object MenuItem88: TMenuItem
|
||||||
Action = actProjGroupCompile
|
Action = actProjGroupCompile
|
||||||
Bitmap.Data = {
|
Bitmap.Data = {
|
||||||
|
@ -4388,6 +4391,9 @@ object CEMainForm: TCEMainForm
|
||||||
object MenuItem44: TMenuItem
|
object MenuItem44: TMenuItem
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
|
object MenuItem99: TMenuItem
|
||||||
|
Action = actProjGroupCompileSync
|
||||||
|
end
|
||||||
object MenuItem89: TMenuItem
|
object MenuItem89: TMenuItem
|
||||||
Action = actProjGroupCompile
|
Action = actProjGroupCompile
|
||||||
Bitmap.Data = {
|
Bitmap.Data = {
|
||||||
|
@ -4942,7 +4948,7 @@ object CEMainForm: TCEMainForm
|
||||||
end
|
end
|
||||||
object actProjGroupCompile: TAction
|
object actProjGroupCompile: TAction
|
||||||
Category = 'Project'
|
Category = 'Project'
|
||||||
Caption = 'Compile project group'
|
Caption = 'Compile project group (parallel)'
|
||||||
ImageIndex = 21
|
ImageIndex = 21
|
||||||
OnExecute = actProjGroupCompileExecute
|
OnExecute = actProjGroupCompileExecute
|
||||||
end
|
end
|
||||||
|
@ -4966,6 +4972,12 @@ object CEMainForm: TCEMainForm
|
||||||
ImageIndex = 36
|
ImageIndex = 36
|
||||||
OnExecute = actFileNewDubScriptExecute
|
OnExecute = actFileNewDubScriptExecute
|
||||||
end
|
end
|
||||||
|
object actProjGroupCompileSync: TAction
|
||||||
|
Category = 'Project'
|
||||||
|
Caption = 'Compile project group (sequential)'
|
||||||
|
ImageIndex = 21
|
||||||
|
OnExecute = actProjGroupCompileSyncExecute
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object imgList: TImageList
|
object imgList: TImageList
|
||||||
left = 64
|
left = 64
|
||||||
|
|
|
@ -51,6 +51,7 @@ type
|
||||||
actFileRunDub: TAction;
|
actFileRunDub: TAction;
|
||||||
actFileRunDubOut: TAction;
|
actFileRunDubOut: TAction;
|
||||||
actFileNewDubScript: TAction;
|
actFileNewDubScript: TAction;
|
||||||
|
actProjGroupCompileSync: TAction;
|
||||||
actProjGroupCompile: TAction;
|
actProjGroupCompile: TAction;
|
||||||
actProjSelUngrouped: TAction;
|
actProjSelUngrouped: TAction;
|
||||||
actProjAddToGroup: TAction;
|
actProjAddToGroup: TAction;
|
||||||
|
@ -179,6 +180,8 @@ type
|
||||||
MenuItem95: TMenuItem;
|
MenuItem95: TMenuItem;
|
||||||
MenuItem96: TMenuItem;
|
MenuItem96: TMenuItem;
|
||||||
MenuItem97: TMenuItem;
|
MenuItem97: TMenuItem;
|
||||||
|
MenuItem98: TMenuItem;
|
||||||
|
MenuItem99: TMenuItem;
|
||||||
mnuLayout: TMenuItem;
|
mnuLayout: TMenuItem;
|
||||||
mnuItemMruFile: TMenuItem;
|
mnuItemMruFile: TMenuItem;
|
||||||
mnuItemMruProj: TMenuItem;
|
mnuItemMruProj: TMenuItem;
|
||||||
|
@ -200,6 +203,7 @@ type
|
||||||
procedure actNewGroupExecute(Sender: TObject);
|
procedure actNewGroupExecute(Sender: TObject);
|
||||||
procedure actProjAddToGroupExecute(Sender: TObject);
|
procedure actProjAddToGroupExecute(Sender: TObject);
|
||||||
procedure actProjGroupCompileExecute(Sender: TObject);
|
procedure actProjGroupCompileExecute(Sender: TObject);
|
||||||
|
procedure actProjGroupCompileSyncExecute(Sender: TObject);
|
||||||
procedure actProjNewDubJsonExecute(Sender: TObject);
|
procedure actProjNewDubJsonExecute(Sender: TObject);
|
||||||
procedure actProjNewGroupExecute(Sender: TObject);
|
procedure actProjNewGroupExecute(Sender: TObject);
|
||||||
procedure actProjNewNativeExecute(Sender: TObject);
|
procedure actProjNewNativeExecute(Sender: TObject);
|
||||||
|
@ -385,6 +389,7 @@ type
|
||||||
function closeProj: boolean;
|
function closeProj: boolean;
|
||||||
procedure showProjTitle;
|
procedure showProjTitle;
|
||||||
function checkProjectLock(message: boolean = true): boolean;
|
function checkProjectLock(message: boolean = true): boolean;
|
||||||
|
procedure compileGroup(async: boolean);
|
||||||
|
|
||||||
// mru
|
// mru
|
||||||
procedure mruChange(Sender: TObject);
|
procedure mruChange(Sender: TObject);
|
||||||
|
@ -3183,7 +3188,7 @@ end;
|
||||||
// TODO-cFileOpenDialog: allow multi selection when possible
|
// TODO-cFileOpenDialog: allow multi selection when possible
|
||||||
//(open file, add file to project, ...)
|
//(open file, add file to project, ...)
|
||||||
|
|
||||||
procedure TCEMainForm.actProjGroupCompileExecute(Sender: TObject);
|
procedure TCEMainForm.compileGroup(async: boolean);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
|
@ -3196,10 +3201,29 @@ begin
|
||||||
fMsgs.message('start compiling a project group...', nil, amcAll, amkInf);
|
fMsgs.message('start compiling a project group...', nil, amcAll, amkInf);
|
||||||
for i:= 0 to fProjectGroup.projectCount-1 do
|
for i:= 0 to fProjectGroup.projectCount-1 do
|
||||||
begin
|
begin
|
||||||
//TODO-cprojectgroup: verify that compilation is not parallel since the projects use an async proc.
|
|
||||||
fProjectGroup.getProject(i).activate;
|
fProjectGroup.getProject(i).activate;
|
||||||
fProject.compile;
|
fProject.compile;
|
||||||
|
if not async then
|
||||||
|
begin
|
||||||
|
while fProjActionsLock do
|
||||||
|
Application.ProcessMessages;
|
||||||
|
if not fProject.compiled then
|
||||||
|
begin
|
||||||
|
fMsgs.message('asynchronous group compilatio stoped because of a failure', nil, amcAll, amkErr);
|
||||||
|
break;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCEMainForm.actProjGroupCompileExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
compileGroup(true);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCEMainForm.actProjGroupCompileSyncExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
compileGroup(false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.actProjNewGroupExecute(Sender: TObject);
|
procedure TCEMainForm.actProjNewGroupExecute(Sender: TObject);
|
||||||
|
|
Loading…
Reference in New Issue