Browse Source

[PATCH 79/83] patch by mvc to search for executable in PATH

From 35f8ee101b1e92dec6522c4c782e250b9478adff Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <[email protected]>
Date: Sat, 23 Nov 2019 18:17:39 -0500

git-svn-id: branches/wasm@45956 -
nickysn 5 years ago
parent
commit
827ab0751d
1 changed files with 7 additions and 2 deletions
  1. 7 2
      compiler/wasm/agwat.pas

+ 7 - 2
compiler/wasm/agwat.pas

@@ -675,12 +675,17 @@ implementation
       end;
 
     function TWabtTextAssembler.DoAssemble: boolean;
+    var
+      t : tcmdstr;
       begin
         Result:=inherited DoAssemble;
         // the tool updates the symbol flags, so the linker
         // is capable of producing an executable
-        if Result then 
-          RequotedExecuteProcess('wasmtool',' --symbolauto '+ObjFileName);
+        if Result then
+          if FindExe('wasmtool',true,t) then 
+            RequotedExecuteProcess(t,' --symbolauto '+ObjFileName)
+          else
+            Message1(exec_e_util_not_found,'wasmtool');
       end;
 
     constructor TWabtTextAssembler.CreateWithWriter(info: pasminfo;