FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveMac / FivePhone (iPhone, iPad) MacExec not working?
Posts: 166
Joined: Wed Nov 25, 2015 07:13 PM
MacExec not working?
Posted: Fri Nov 02, 2018 03:54 PM
Hello group,

I am finally ready with a new update for my program but looking at the next problem:
I my app I have the next line:
Code (fw): Select all Collapse
MacExec( "/bin/sh", ResPath()+"/MoveFiles.sh", )
, but on that line the program hangs.
I f I put the next code in terminal it works correct:
Code (fw): Select all Collapse
/bin/sh MoveFiles.sh


The respath() is correct. Where should I look at?
Kind regards,



René Koot
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: MacExec not working?
Posted: Sat Nov 03, 2018 09:48 AM

René,

Please try it this way:

MacExec( "/bin/sh " + ResPath() + "/MoveFiles.sh" ) // only one parameter

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 166
Joined: Wed Nov 25, 2015 07:13 PM
Re: MacExec not working?
Posted: Sun Nov 04, 2018 09:31 AM

Hello Antonio,

With only 1 parameter it does not work. However I will take another approach:
I used the MacExec to copy files> With the package I distribute I can put new files in folder /Users/shared/. With the 'MoveFiles.sh I move the files from Shared to ˜USER/plantenkennis.

Now I will put the new files in the .app package (Contents/Resourses/Update/) and on start of the program I check if there are files in that folder. Then I copy these files to ˜USER/plantenkennis and delete them from the .app. This way it works perfect and I have a bit more control over the files.

Thanks for all the help.

Kind regards,



René Koot
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: MacExec not working?
Posted: Mon Nov 05, 2018 08:05 PM
See this ...
TaskExec parameter 1 -> comandline executable, parameter 2 ->array arguments return-> string result.

Code (fw): Select all Collapse
msginfo( TASKEXEC( "/bin/sh",  { ResPath() + "/MoveFiles.sh" } )   )


NEW ...
For open file with app -> OPENFILEWITHAPP( Path()+"/testbtn.prg", "Textedit.app")

Continue the discussion