Copying Mac .app to Applications folder

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm

Copying Mac .app to Applications folder

Post by raugert » Tue Jun 02, 2020 6:23 pm

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
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Copying Mac .app to Applications folder

Post by Klaus » Tue Jun 02, 2020 6:33 pm

Hi Richard,

try with parens:

Code: Select all

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

Klaus

raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm

Re: Copying Mac .app to Applications folder

Post by raugert » Wed Jun 03, 2020 12:54 am

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")
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

kdjanz
Posts: 300
Joined: Fri Dec 09, 2011 12:12 pm

Re: Copying Mac .app to Applications folder

Post by kdjanz » Wed Jun 03, 2020 3:05 am

It could be a permissions thing - the Mac protects the Applications folder and requires sudo type access to copy or delete from that folder.

raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm

Re: Copying Mac .app to Applications folder

Post by raugert » Fri Jun 05, 2020 3:35 am

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
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

Post Reply