Skip to content

Commit 9ce847f

Browse files
committed
fixed using killall if fileexists.
1 parent 1147f9a commit 9ce847f

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

src/plugmanager.pas

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,13 +418,19 @@ procedure CleanfpgDesigner();
418418
var
419419
dataf: string;
420420
begin
421-
{$ifdef unix}
421+
{$ifdef windows}
422+
if fileexists('C:\Windows\System32\taskkill.exe') then
423+
begin
424+
dataf := 'C:\Windows\System32\taskkill.exe';
425+
RunWithoutDebug(dataf, ' /F /IM designer_ext.exe');
426+
end;
427+
{$else}
428+
if fileexists('/usr/bin/killall') then
429+
begin
422430
dataf := '/usr/bin/killall';
423431
RunWithoutDebug(dataf, ' designer_ext');
424-
{$else}
425-
dataf := 'C:\Windows\System32\taskkill.exe';
426-
RunWithoutDebug(dataf, ' /F /IM designer_ext.exe');
427-
{$endif}
432+
end;
433+
{$endif}
428434
end;
429435

430436
end.

0 commit comments

Comments
 (0)