mirror of https://gitlab.com/basile.b/dexed.git
fix, config & buildType passed to DUB, "plain" was never passed
This commit is contained in:
parent
87d07d42a2
commit
7800c0d821
|
|
@ -85,13 +85,15 @@ type
|
||||||
// returns true if filename is a valid dub project. Only json format is supported.
|
// returns true if filename is a valid dub project. Only json format is supported.
|
||||||
function isValidDubProject(const filename: string): boolean;
|
function isValidDubProject(const filename: string): boolean;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
const
|
const
|
||||||
|
|
||||||
DubBuiltTypeName: array[TDubBuildType] of string = ('plain', 'debug', 'release',
|
DubBuiltTypeName: array[TDubBuildType] of string = ('plain', 'debug', 'release',
|
||||||
'unittest', 'docs', 'ddox', 'profile', 'cov', 'unittest-cov'
|
'unittest', 'docs', 'ddox', 'profile', 'cov', 'unittest-cov'
|
||||||
);
|
);
|
||||||
|
|
||||||
implementation
|
DubDefaultConfigName = '(default config)';
|
||||||
|
|
||||||
{$REGION Standard Comp/Obj -----------------------------------------------------}
|
{$REGION Standard Comp/Obj -----------------------------------------------------}
|
||||||
constructor TCEDubProject.create(aOwner: TComponent);
|
constructor TCEDubProject.create(aOwner: TComponent);
|
||||||
|
|
@ -232,9 +234,8 @@ begin
|
||||||
try
|
try
|
||||||
str.Add('dub' + exeExt);
|
str.Add('dub' + exeExt);
|
||||||
str.Add('build');
|
str.Add('build');
|
||||||
if fBuiltTypeIx <> 0 then
|
str.Add('--build=' + fBuildTypes.Strings[fBuiltTypeIx]);
|
||||||
str.Add('--build=' + fBuildTypes.Strings[fBuiltTypeIx]);
|
if (fConfigs.Count <> 1) and (fConfigs.Strings[0] <> DubDefaultConfigName) then
|
||||||
if fConfigIx <> 0 then
|
|
||||||
str.Add('--config=' + fConfigs.Strings[fConfigIx]);
|
str.Add('--config=' + fConfigs.Strings[fConfigIx]);
|
||||||
result := str.Text;
|
result := str.Text;
|
||||||
finally
|
finally
|
||||||
|
|
@ -369,9 +370,8 @@ begin
|
||||||
dubproc.Parameters.Add('build')
|
dubproc.Parameters.Add('build')
|
||||||
else
|
else
|
||||||
dubproc.Parameters.Add('run');
|
dubproc.Parameters.Add('run');
|
||||||
if fBuiltTypeIx <> 0 then
|
dubproc.Parameters.Add('--build=' + fBuildTypes.Strings[fBuiltTypeIx]);
|
||||||
dubproc.Parameters.Add('--build=' + fBuildTypes.Strings[fBuiltTypeIx]);
|
if (fConfigs.Count <> 1) and (fConfigs.Strings[0] <> DubDefaultConfigName) then
|
||||||
if fConfigIx <> 0 then
|
|
||||||
dubproc.Parameters.Add('--config=' + fConfigs.Strings[fConfigIx]);
|
dubproc.Parameters.Add('--config=' + fConfigs.Strings[fConfigIx]);
|
||||||
if run and (runArgs <> '') then
|
if run and (runArgs <> '') then
|
||||||
dubproc.Parameters.Add('--' + runArgs);
|
dubproc.Parameters.Add('--' + runArgs);
|
||||||
|
|
@ -465,7 +465,7 @@ begin
|
||||||
end;
|
end;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
fConfigs.Add('(dub default)');
|
fConfigs.Add(DubDefaultConfigName);
|
||||||
// default = what dub set as 'application' or 'library'
|
// default = what dub set as 'application' or 'library'
|
||||||
// in this case Coedit will pass only the type to DUB: 'DUB --build=release'
|
// in this case Coedit will pass only the type to DUB: 'DUB --build=release'
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue