diff --git a/src/ce_common.pas b/src/ce_common.pas index 17a3e8c9..ae93b4f4 100644 --- a/src/ce_common.pas +++ b/src/ce_common.pas @@ -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} diff --git a/src/ce_messages.pas b/src/ce_messages.pas index de4f2b03..7e8c9393 100644 --- a/src/ce_messages.pas +++ b/src/ce_messages.pas @@ -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; diff --git a/src/ce_nativeproject.pas b/src/ce_nativeproject.pas index 16cc33d3..009d4247 100644 --- a/src/ce_nativeproject.pas +++ b/src/ce_nativeproject.pas @@ -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])); diff --git a/src/ce_symlist.pas b/src/ce_symlist.pas index ed1fc896..05901a63 100644 --- a/src/ce_symlist.pas +++ b/src/ce_symlist.pas @@ -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; diff --git a/src/ce_tools.pas b/src/ce_tools.pas index 089d02f8..ff03f822 100644 --- a/src/ce_tools.pas +++ b/src/ce_tools.pas @@ -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