mirror of https://gitlab.com/basile.b/dexed.git
fix some case where tools could not be found
This commit is contained in:
parent
0e00028c22
commit
cb4d381e08
|
@ -727,7 +727,12 @@ begin
|
|||
ext := extractFileExt(anExeName);
|
||||
if ext = '' then
|
||||
anExeName += exeExt;
|
||||
//full path already specified
|
||||
if FileExists(anExeName) and (not FileExists(ExtractFileName(anExeName))) then
|
||||
exit(anExeName);
|
||||
//
|
||||
env := sysutils.GetEnvironmentVariable('PATH');
|
||||
// maybe in current dir
|
||||
if FileExists(anExeName) then
|
||||
env += PathSeparator + GetCurrentDir;
|
||||
{$IFNDEF CEBUILD}
|
||||
|
|
|
@ -773,7 +773,7 @@ begin
|
|||
exit;
|
||||
//
|
||||
fDemangler := TCEProcess.Create(nil);
|
||||
fDemangler.Executable := toolname;
|
||||
fDemangler.Executable := exeFullName(toolname);
|
||||
fDemangler.OnTerminate:= @demanglerOutput;
|
||||
fDemangler.Options:= [poUsePipes];
|
||||
fDemangler.ShowWindow:= swoHIDE;
|
||||
|
|
|
@ -653,7 +653,7 @@ begin
|
|||
process := TProcess.Create(nil);
|
||||
try
|
||||
processInfo.setProcess(process);
|
||||
process.Executable := pname;
|
||||
process.Executable := exeFullName(pname);
|
||||
j := process.Parameters.Count-1;
|
||||
for i:= 0 to j do
|
||||
process.Parameters.AddText(symbolExpander.get(process.Parameters.Strings[i]));
|
||||
|
|
|
@ -115,6 +115,7 @@ type
|
|||
procedure TreeKeyPress(Sender: TObject; var Key: char);
|
||||
private
|
||||
fHasToolExe: boolean;
|
||||
fToolExeName: string;
|
||||
fOptions: TCESymbolListOptions;
|
||||
fSyms: TSymbolList;
|
||||
fMsgs: ICEMessagesDisplay;
|
||||
|
@ -648,7 +649,8 @@ end;
|
|||
|
||||
procedure TCESymbolListWidget.checkIfHasToolExe;
|
||||
begin
|
||||
fHasToolExe := exeInSysPath(toolExeName);
|
||||
fToolExeName := exeFullName(toolExeName);
|
||||
fHasToolExe := FileExists(fToolExeName);
|
||||
end;
|
||||
|
||||
procedure TCESymbolListWidget.callToolProc;
|
||||
|
@ -664,7 +666,7 @@ begin
|
|||
fToolProc := TCEProcess.Create(nil);
|
||||
fToolProc.ShowWindow := swoHIDE;
|
||||
fToolProc.Options := [poUsePipes];
|
||||
fToolProc.Executable := toolExeName;
|
||||
fToolProc.Executable := fToolExeName;
|
||||
fToolProc.OnTerminate := @toolTerminated;
|
||||
fToolProc.CurrentDirectory := ExtractFileDir(Application.ExeName);
|
||||
fToolProc.Execute;
|
||||
|
|
|
@ -174,7 +174,7 @@ begin
|
|||
fProcess.OnReadData:= @processOutput;
|
||||
fProcess.OnTerminate:= @processOutput;
|
||||
fProcess.Options := fOpts;
|
||||
fProcess.Executable := symbolExpander.get(fExecutable);
|
||||
fProcess.Executable := exeFullName(symbolExpander.get(fExecutable));
|
||||
fProcess.ShowWindow := fShowWin;
|
||||
fProcess.CurrentDirectory := symbolExpander.get(fWorkingDir);
|
||||
if fQueryParams then
|
||||
|
@ -186,7 +186,9 @@ begin
|
|||
for prm in fParameters do if not isStringDisabled(prm) then
|
||||
fProcess.Parameters.AddText(symbolExpander.get(prm));
|
||||
ensureNoPipeIfWait(fProcess);
|
||||
fProcess.Execute;
|
||||
//
|
||||
if FileExists(fProcess.Executable) then
|
||||
fProcess.Execute;
|
||||
end;
|
||||
|
||||
procedure TCEToolItem.processOutput(sender: TObject);
|
||||
|
@ -360,24 +362,21 @@ var
|
|||
chained: TCollectionItem;
|
||||
begin
|
||||
if aTool = nil then exit;
|
||||
if not exeInSysPath(aTool.executable) then
|
||||
if (aTool.chainAfter.Count = 0) and (aTool.chainBefore.Count = 0) then
|
||||
exit;
|
||||
//
|
||||
for nme in aTool.chainBefore do
|
||||
for chained in fTools do
|
||||
if TCEToolItem(chained).toolAlias = nme then
|
||||
if TCEToolItem(chained).toolAlias <> aTool.toolAlias then
|
||||
TCEToolItem(chained).execute;
|
||||
if exeInSysPath(aTool.executable) then
|
||||
//
|
||||
aTool.execute;
|
||||
if aTool.editorToInput and assigned(fDoc) and (poUsePipes in aTool.options) then
|
||||
begin
|
||||
aTool.execute;
|
||||
if aTool.editorToInput and assigned(fDoc) and (poUsePipes in aTool.options) then
|
||||
begin
|
||||
txt := fDoc.Text;
|
||||
aTool.fProcess.Input.Write(txt[1], length(txt));
|
||||
aTool.fProcess.CloseInput;
|
||||
end;
|
||||
txt := fDoc.Text;
|
||||
aTool.fProcess.Input.Write(txt[1], length(txt));
|
||||
aTool.fProcess.CloseInput;
|
||||
end;
|
||||
//
|
||||
for nme in aTool.chainAfter do
|
||||
for chained in fTools do
|
||||
if TCEToolItem(chained).toolAlias = nme then
|
||||
|
|
Loading…
Reference in New Issue