Recent

Author Topic: [SOLVED] MAC and Tprocess or TprocessUTF8  (Read 5635 times)

cpalx

  • Hero Member
  • *****
  • Posts: 753
[SOLVED] MAC and Tprocess or TprocessUTF8
« on: July 07, 2010, 05:53:21 pm »
Hello,

i am using Tprocess to execute external application, my code works perfectly in windows and Linux but in Snow leopard fails, does not find the executable, a simple  code (looking just for mac)is :

-------------------------------------------
TheProcess := TProcessUTF8.Create(nil);
   with TheProcess do begin
     CurrentDirectory:='/Volumes/xortix/LazarusProjects/IA/; // The path of the binary
     CommandLine:='IAlogin';  //The binary
     try
       execute;
     except on e:Exception do
        ShowMessage(e.Message+#13+e.ClassName);
     end;
   end;    
-------------------------------------------

i tried too:
CurrentDirectory:='/Volumes/xortix/LazarusProjects/IA/IAlogin.app/Contents/MacOS/;
« Last Edit: July 08, 2010, 11:27:04 pm by cpalx »

Laksen

  • Hero Member
  • *****
  • Posts: 792
    • J-Software
Re: MAC and Tprocess or TprocessUTF8
« Reply #1 on: July 07, 2010, 07:53:01 pm »
Try
ApplicationName:='IAlogin';
or
CommandLine:='./IAlogin';  //The binary

cpalx

  • Hero Member
  • *****
  • Posts: 753
Re: MAC and Tprocess or TprocessUTF8
« Reply #2 on: July 07, 2010, 08:14:40 pm »
ok, i will try, thanks

cpalx

  • Hero Member
  • *****
  • Posts: 753
Re: MAC and Tprocess or TprocessUTF8
« Reply #3 on: July 08, 2010, 11:24:56 pm »
i found the solution,

currentdirectory := /path/*.app/Contents/MacOS
commanline := currentdirectory + AppName

Just bundle MAcos

 

TinyPortal © 2005-2018