Cocoa - How to copy files to /usr/share?

Posted by cyaconi on Stack Overflow See other posts from Stack Overflow or by cyaconi
Published on 2010-03-27T12:29:22Z Indexed on 2010/03/27 12:33 UTC
Read the original article Hit count: 385

Filed under:
|
|

Hi all. I'm developing an "installation" like cocoa application wich needs to take care of some http request, some file system reading, copying files to /usr/share, set up cron (not launchd) and ask some information to user. I discarded PackageMaker since I need more flexibility.

Currently everything is going well, but on my last installation step, I need to:

  • Delete my previously installed application folder (if exists). It's always the same path: /usr/share/MY_APP
  • Create again the application folder at: /usr/share/MY_APP
  • Copy application files to /usr/share/MY_APP
  • Update a cron job

It's very important that /usr/share/MY_APP keeps protected with administrative privileges, so a regular shouldn't delete it.

What would be the best approach to implement those steps?

BTW, I'm using Xcode 3.2.

Thanks a lot! Carlos.

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about objective-c