mirror of https://gitlab.com/basile.b/dexed.git
ce projects, add option to generate the linker opt for gui apps, close #132
This commit is contained in:
parent
0483b40ca9
commit
4a0827ddf7
|
@ -99,6 +99,7 @@ These options are defined per-configuration.
|
||||||
- **dmdOtherOptions**: Custom options, only for DMD.
|
- **dmdOtherOptions**: Custom options, only for DMD.
|
||||||
- **gdcOtherOptions**: Custom options, only for GDC.
|
- **gdcOtherOptions**: Custom options, only for GDC.
|
||||||
- **ldcOtherOptions**: Custom options, only for LDC.
|
- **ldcOtherOptions**: Custom options, only for LDC.
|
||||||
|
- **guiApplication**: Under windows, use this option to hide the console if the target is a GUI application. Under Linux this option has no effect.
|
||||||
|
|
||||||
Syntax for the custom / other options:
|
Syntax for the custom / other options:
|
||||||
|
|
||||||
|
|
|
@ -239,16 +239,19 @@ type
|
||||||
TOtherOpts = class(TOptsGroup)
|
TOtherOpts = class(TOptsGroup)
|
||||||
private
|
private
|
||||||
fCov: boolean;
|
fCov: boolean;
|
||||||
|
fGui: boolean;
|
||||||
fCustom: TStringList;
|
fCustom: TStringList;
|
||||||
fDmdOthers: TstringList;
|
fDmdOthers: TstringList;
|
||||||
fLdcOthers: TStringList;
|
fLdcOthers: TStringList;
|
||||||
fGdcOthers: TStringList;
|
fGdcOthers: TStringList;
|
||||||
procedure setCov(const value: boolean);
|
procedure setCov(value: boolean);
|
||||||
|
procedure setGui(value: boolean);
|
||||||
procedure setCustom(value: TStringList);
|
procedure setCustom(value: TStringList);
|
||||||
procedure setDmdOtherOptions(value: TStringList);
|
procedure setDmdOtherOptions(value: TStringList);
|
||||||
procedure setLdcOtherOptions(value: TStringList);
|
procedure setLdcOtherOptions(value: TStringList);
|
||||||
procedure setGdcOtherOptions(value: TStringList);
|
procedure setGdcOtherOptions(value: TStringList);
|
||||||
published
|
published
|
||||||
|
property guiApplication: boolean read fGui write setGui;
|
||||||
property coverage: boolean read fCov write setCov default false;
|
property coverage: boolean read fCov write setCov default false;
|
||||||
property customOptions: TStringList read fCustom write setCustom;
|
property customOptions: TStringList read fCustom write setCustom;
|
||||||
property dmdOtherOptions: TStringList read fDmdOthers write setDmdOtherOptions;
|
property dmdOtherOptions: TStringList read fDmdOthers write setDmdOtherOptions;
|
||||||
|
@ -1169,6 +1172,7 @@ begin
|
||||||
begin
|
begin
|
||||||
src := TOtherOpts(source);
|
src := TOtherOpts(source);
|
||||||
fCov := src.fCov;
|
fCov := src.fCov;
|
||||||
|
fGUi := src.fGui;
|
||||||
fCustom.Assign(src.fCustom);
|
fCustom.Assign(src.fCustom);
|
||||||
fDmdOthers.Assign(src.fDmdOthers);
|
fDmdOthers.Assign(src.fDmdOthers);
|
||||||
fLdcOthers.Assign(src.fLdcOthers);
|
fLdcOthers.Assign(src.fLdcOthers);
|
||||||
|
@ -1186,13 +1190,22 @@ begin
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOtherOpts.setCov(const value: boolean);
|
procedure TOtherOpts.setCov(value: boolean);
|
||||||
begin
|
begin
|
||||||
if fCov = value then exit;
|
if fCov = value then
|
||||||
|
exit;
|
||||||
fCov := value;
|
fCov := value;
|
||||||
doChanged;
|
doChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TOtherOpts.setGui(value: boolean);
|
||||||
|
begin
|
||||||
|
if fGui = value then
|
||||||
|
exit;
|
||||||
|
fGui := value;
|
||||||
|
doChanged;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TOtherOpts.getOpts(list: TStrings; base: TOptsGroup = nil);
|
procedure TOtherOpts.getOpts(list: TStrings; base: TOptsGroup = nil);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
|
@ -1211,7 +1224,10 @@ begin
|
||||||
str := '-' + str;
|
str := '-' + str;
|
||||||
list.AddText(fSymStringExpander.expand(str));
|
list.AddText(fSymStringExpander.expand(str));
|
||||||
end;
|
end;
|
||||||
if fCov then list.Add('-cov');
|
if fCov then
|
||||||
|
list.Add('-cov');
|
||||||
|
if fGui then
|
||||||
|
list.Add('-L/SUBSYSTEM:WINDOWS:5.0');
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
baseopt := TOtherOpts(base);
|
baseopt := TOtherOpts(base);
|
||||||
|
@ -1228,7 +1244,10 @@ begin
|
||||||
str := '-' + str;
|
str := '-' + str;
|
||||||
list.AddText(fSymStringExpander.expand(str));
|
list.AddText(fSymStringExpander.expand(str));
|
||||||
end;
|
end;
|
||||||
if baseopt.fCov or fCov then list.Add('-cov');
|
if baseopt.fCov or fCov then
|
||||||
|
list.Add('-cov');
|
||||||
|
if baseopt.fGui or fGui then
|
||||||
|
list.Add('-L/SUBSYSTEM:WINDOWS:5.0');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue