Page 1 of 1

Copying Mac .app to Applications folder

Posted: Tue Jun 02, 2020 6:23 pm
by raugert
I am trying to make a simple Installer for my app, but I can't seem to copy the Mac .app file (vmpb.app) to the Applications folder. I've tried different syntaxes, but just can't seem to get it to work..

Code: Select all

revCopyFile specialFolderPath("desktop") & "/vmpb.app" , "/Applications"
It's probably something simple that I'm missing. :?

thanks,
Richard

Re: Copying Mac .app to Applications folder

Posted: Tue Jun 02, 2020 6:33 pm
by Klaus
Hi Richard,

try with parens:

Code: Select all

...
revCopyFile (specialFolderPath("desktop") & "/vmpb.app"), "/Applications"
...
Best

Klaus

Re: Copying Mac .app to Applications folder

Posted: Wed Jun 03, 2020 12:54 am
by raugert
thanks Klaus,

I tried that but it doesn't seem to to work either. Although, If I copy it to another folder (as in code below), it works OK. I think it has something to do with the syntax for the location of the "Applications" folder ?

Code: Select all

 revCopyFile (specialFolderPath("desktop") & "/vmpb.app"), specialFolderPath("documents")

Re: Copying Mac .app to Applications folder

Posted: Wed Jun 03, 2020 3:05 am
by kdjanz
It could be a permissions thing - the Mac protects the Applications folder and requires sudo type access to copy or delete from that folder.

Re: Copying Mac .app to Applications folder

Posted: Fri Jun 05, 2020 3:35 am
by raugert
thanks kdjanz,

Yes, it appears to be a permission issue. I can copy files (.txt or most other files), but in order to copy an application (.app) I need to use the sudo commands as you suggested. I can do it using a shell command in Livecode. Seems to work ok. Thanks for the suggestion :)

Richard