mirror of https://gitlab.com/basile.b/dexed.git
libman editor, dub, allow to re-fetch without explicit removal of an item
This commit is contained in:
parent
521d1e920f
commit
d9bb30f2f5
|
@ -294,15 +294,16 @@ var
|
||||||
idx: integer;
|
idx: integer;
|
||||||
prj: TCEDubProject;
|
prj: TCEDubProject;
|
||||||
upd: boolean = false;
|
upd: boolean = false;
|
||||||
row: TListItem;
|
ovw: boolean = false;
|
||||||
|
row: TListItem = nil;
|
||||||
begin
|
begin
|
||||||
if TDubPackageQueryForm.showAndWait(nme) <> mrOk then
|
if TDubPackageQueryForm.showAndWait(nme) <> mrOk then
|
||||||
exit;
|
exit;
|
||||||
if List.Items.FindCaption(0, nme, false, false, false).isNotNil then
|
if List.Items.FindCaption(0, nme, false, false, false).isNotNil then
|
||||||
begin
|
begin
|
||||||
dlgOkInfo(format('a library item with the alias "%s" already exists, delete it before trying again.',
|
if dlgYesNo(format('a library item with the alias "%s" already exists, do you wish to update it ?',
|
||||||
[nme]));
|
[nme])) <> mrYes then exit
|
||||||
exit;
|
else ovw := true;
|
||||||
end;
|
end;
|
||||||
{$IFDEF WINDOWS}
|
{$IFDEF WINDOWS}
|
||||||
pth := GetEnvironmentVariable('APPDATA') + '\dub\packages\' + nme + '-master';
|
pth := GetEnvironmentVariable('APPDATA') + '\dub\packages\' + nme + '-master';
|
||||||
|
@ -362,6 +363,7 @@ begin
|
||||||
dub.Options:= [poUsePipes, poStderrToOutPut];
|
dub.Options:= [poUsePipes, poStderrToOutPut];
|
||||||
dub.Parameters.Add('build');
|
dub.Parameters.Add('build');
|
||||||
dub.Parameters.Add('--build=release');
|
dub.Parameters.Add('--build=release');
|
||||||
|
dub.Parameters.Add('--force');
|
||||||
dub.CurrentDirectory:= pth;
|
dub.CurrentDirectory:= pth;
|
||||||
dub.Execute;
|
dub.Execute;
|
||||||
while dub.Running do sleep(10);
|
while dub.Running do sleep(10);
|
||||||
|
@ -397,7 +399,10 @@ begin
|
||||||
try
|
try
|
||||||
for idx := 0 to prj.sourcesCount-1 do
|
for idx := 0 to prj.sourcesCount-1 do
|
||||||
str.Add(prj.sourceAbsolute(idx));
|
str.Add(prj.sourceAbsolute(idx));
|
||||||
row := List.Items.Add;
|
if ovw then
|
||||||
|
row := List.FindCaption(0, nme, true, true, true);
|
||||||
|
if row.isNil then
|
||||||
|
row := List.Items.Add;
|
||||||
row.Data := LibMan.libraries.Add;
|
row.Data := LibMan.libraries.Add;
|
||||||
row.Caption := nme;
|
row.Caption := nme;
|
||||||
row.SubItems.Add(prj.outputFilename);
|
row.SubItems.Add(prj.outputFilename);
|
||||||
|
|
Loading…
Reference in New Issue