mirror of https://gitlab.com/basile.b/dexed.git
static dub options, add setting
This commit is contained in:
parent
87fe011b4b
commit
4bd3e09d78
|
@ -14,6 +14,8 @@ type
|
||||||
|
|
||||||
TDubLinkMode = (dlmSeparate, dlmAllAtOnce, dlmSingleFile);
|
TDubLinkMode = (dlmSeparate, dlmAllAtOnce, dlmSingleFile);
|
||||||
|
|
||||||
|
TDubDependencyCheck = (dcStandard, dcOffline, dcNo);
|
||||||
|
|
||||||
(**
|
(**
|
||||||
* Stores the build options, always applied when a project is build
|
* Stores the build options, always applied when a project is build
|
||||||
*)
|
*)
|
||||||
|
@ -23,6 +25,7 @@ type
|
||||||
fForceRebuild: boolean;
|
fForceRebuild: boolean;
|
||||||
fLinkMode: TDubLinkMode;
|
fLinkMode: TDubLinkMode;
|
||||||
fCombined: boolean;
|
fCombined: boolean;
|
||||||
|
fDepCheck: TDubDependencyCheck;
|
||||||
fOther: string;
|
fOther: string;
|
||||||
procedure setLinkMode(value: TDubLinkMode);
|
procedure setLinkMode(value: TDubLinkMode);
|
||||||
published
|
published
|
||||||
|
@ -31,6 +34,7 @@ type
|
||||||
property linkMode: TDubLinkMode read fLinkMode write setLinkMode;
|
property linkMode: TDubLinkMode read fLinkMode write setLinkMode;
|
||||||
property combined: boolean read fCombined write fCombined;
|
property combined: boolean read fCombined write fCombined;
|
||||||
property other: string read fOther write fOther;
|
property other: string read fOther write fOther;
|
||||||
|
property dependenciesCheck: TDubDependencyCheck read fDepCheck write fDepCheck;
|
||||||
public
|
public
|
||||||
procedure assign(source: TPersistent); override;
|
procedure assign(source: TPersistent); override;
|
||||||
procedure getOpts(options: TStrings);
|
procedure getOpts(options: TStrings);
|
||||||
|
@ -39,18 +43,18 @@ type
|
||||||
(**
|
(**
|
||||||
* Make the build options editable
|
* Make the build options editable
|
||||||
*)
|
*)
|
||||||
TCEDubBuildOptions = class(TCEDubBuildOptionsBase, ICEEditableOptions)
|
TCEDubBuildOptions = class(TCEDubBuildOptionsBase, ICEEditableOptions)
|
||||||
strict private
|
strict private
|
||||||
fBackup: TCEDubBuildOptionsBase;
|
fBackup: TCEDubBuildOptionsBase;
|
||||||
function optionedWantCategory(): string;
|
function optionedWantCategory(): string;
|
||||||
function optionedWantEditorKind: TOptionEditorKind;
|
function optionedWantEditorKind: TOptionEditorKind;
|
||||||
function optionedWantContainer: TPersistent;
|
function optionedWantContainer: TPersistent;
|
||||||
procedure optionedEvent(event: TOptionEditorEvent);
|
procedure optionedEvent(event: TOptionEditorEvent);
|
||||||
function optionedOptionsModified: boolean;
|
function optionedOptionsModified: boolean;
|
||||||
public
|
public
|
||||||
constructor create(aOwner: TComponent); override;
|
constructor create(aOwner: TComponent); override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TCEDubProject = class(TComponent, ICECommonProject)
|
TCEDubProject = class(TComponent, ICECommonProject)
|
||||||
private
|
private
|
||||||
|
@ -152,7 +156,7 @@ var
|
||||||
DubCompilerFilename: string = 'dmd';
|
DubCompilerFilename: string = 'dmd';
|
||||||
|
|
||||||
const
|
const
|
||||||
DubSdlWarning = 'this feature is not available for a DUB project with the SDL format';
|
DubSdlWarning = 'this feature is deactivated in DUB projects with the SDL format';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -191,6 +195,7 @@ begin
|
||||||
combined:=opts.combined;
|
combined:=opts.combined;
|
||||||
linkMode:=opts.linkMode;
|
linkMode:=opts.linkMode;
|
||||||
other:=opts.other;
|
other:=opts.other;
|
||||||
|
dependenciesCheck:=opts.dependenciesCheck;
|
||||||
end
|
end
|
||||||
else inherited;
|
else inherited;
|
||||||
end;
|
end;
|
||||||
|
@ -207,6 +212,10 @@ begin
|
||||||
dlmAllAtOnce: options.Add('--build-mode=allAtOnce');
|
dlmAllAtOnce: options.Add('--build-mode=allAtOnce');
|
||||||
dlmSingleFile: options.Add('--build-mode=singleFile');
|
dlmSingleFile: options.Add('--build-mode=singleFile');
|
||||||
end;
|
end;
|
||||||
|
case dependenciesCheck of
|
||||||
|
dcNo: options.Add('--skip-registry=all');
|
||||||
|
dcOffline: options.Add('--skip-registry=standard');
|
||||||
|
end;
|
||||||
if other.isNotEmpty then
|
if other.isNotEmpty then
|
||||||
CommandToList(other, options);
|
CommandToList(other, options);
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue