Re: open package installer in bundle resources directory not working
Re: open package installer in bundle resources directory not working
- Subject: Re: open package installer in bundle resources directory not working
- From: "Kyle Sluder" <email@hidden>
- Date: Sat, 13 Dec 2008 06:46:37 -0500
Mark, there are a few things wrong with your advice.
1) Don't invoke a shell unless you need to. Doing so introduces far
too many variables to be useful for the simple purpose of launching
another executable.
2) The first argument to a program needs to be the name of the
program. For example, when you run `ls` from a shell, the shell sets
argv[0] to "ls". If you were to run `/bin/ls`, argv[0] would instead
be "/bin/ls".
3) Why all this trouble of launching executables? There's a reason
Launch Services is a public framework; use that. Don't use
-[NSWorkspace openFile:], because that's not guaranteed to open the
package in Installer.app. Instead, use LSOpenURLsWithRole:
http://developer.apple.com/DOCUMENTATION/Carbon/Reference/LaunchServicesReference/Reference/reference.html#//apple_ref/doc/uid/TP30000998-CH1g-TPXREF104
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden