FROM : Sherm Pendley
DATE : Sun Nov 25 11:37:58 2007
On Nov 25, 2007, at 12:42 AM, Jacob Bandes-Storch wrote:
> I have a background application and I'm creating a preference pane
> for users to change settings. I'm going to be using Sparkle to push
> out updates to the application. I talked to some people on the
> Sparkle list, and they say to put the prefpane in the application
> bundle under the Resources folder. My question is: is that the
> accepted "standard" location for a preference pane for deployment?
> How would I get the preference pane installed when the application
> is first launched?
You could use NSWorkspace's -openFile: to open the .prefpane bundle
as a document. It's a registered document type for System
Preferences.app, which will then give the user the option of
installing it for that user only (in ~/Library/PreferencePanes) or
for all users (/Library/PreferencePanes). The app will also take care
of authorizing as admin if needed.
[[NSWorkspace sharedWorkspace] openFile:[[NSBundle mainBundle]
pathForResource:@"MyApp" ofType:@"prefpane"]];
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
DATE : Sun Nov 25 11:37:58 2007
On Nov 25, 2007, at 12:42 AM, Jacob Bandes-Storch wrote:
> I have a background application and I'm creating a preference pane
> for users to change settings. I'm going to be using Sparkle to push
> out updates to the application. I talked to some people on the
> Sparkle list, and they say to put the prefpane in the application
> bundle under the Resources folder. My question is: is that the
> accepted "standard" location for a preference pane for deployment?
> How would I get the preference pane installed when the application
> is first launched?
You could use NSWorkspace's -openFile: to open the .prefpane bundle
as a document. It's a registered document type for System
Preferences.app, which will then give the user the option of
installing it for that user only (in ~/Library/PreferencePanes) or
for all users (/Library/PreferencePanes). The app will also take care
of authorizing as admin if needed.
[[NSWorkspace sharedWorkspace] openFile:[[NSBundle mainBundle]
pathForResource:@"MyApp" ofType:@"prefpane"]];
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
| Related mails | Author | Date |
|---|---|---|
| Jacob Bandes-Storc… | Nov 25, 06:42 | |
| Sherm Pendley | Nov 25, 11:37 | |
| patrick machielse | Nov 25, 21:22 | |
| Sherm Pendley | Nov 25, 23:55 |






Cocoa mail archive

