Preference pane deployment

  • 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? How
    would I update the preference pane after an application update?
  • 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
  • Op 25 nov 2007, om 18:41 heeft Sherm Pendley het volgende geschreven:

    > 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.

    If you choose this method, you will want to make sure that the System
    Preferences application is closed before you try to install your new
    pane (or restart it after you've installed). If the user has used /
    loaded the preference pane during an upgrade, the behavior of the pane
    after install is unpredictable, presumably because it is not possible
    to unload Objective-C code.

    patrick
  • On Nov 25, 2007, at 3:22 PM, patrick machielse wrote:

    > Op 25 nov 2007, om 18:41 heeft Sherm Pendley het volgende geschreven:
    >
    >> 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.
    >
    > If you choose this method, you will want to make sure that the
    > System Preferences application is closed before you try to install
    > your new pane (or restart it after you've installed). If the user
    > has used / loaded the preference pane during an upgrade, the
    > behavior of the pane after install is unpredictable, presumably
    > because it is not possible to unload Objective-C code.

    Good point. Kind of annoying though. With all the "smart" behavior
    that System Preferences does have with respect to installing new
    panes. It seems a strange omission that it can't restart itself when
    needed.

    sherm--

    Web Hosting by West Virginians, for West Virginians: http://wv-www.net
    Cocoa programming in Perl: http://camelbones.sourceforge.net
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today