• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [OT] Installation into home directory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] Installation into home directory


  • Subject: Re: [OT] Installation into home directory
  • From: Thomas Harrington <email@hidden>
  • Date: Mon, 18 Aug 2003 10:36:30 -0600

On Monday, August 18, 2003, at 09:49 AM, Clark S. Cox III wrote:
On Monday, August 18, 2003, at 09:31, Robert Borsuk wrote:
Hi,
Sorry for the off-topic post. I'm lost as to were to find this info out. I've just finished a preference pane (written in cocoa - does that qualify for the post) that I want to package up for installation. I want it to install into
~/Library/PreferencePanes
but when I go use PackageMaker it says that you can't install into a home directory. According to Apple's documentation concerning installation, this should be fine if you want your "thing" only available in the "local" domain. Exactly what I want, only available for that user.
Anyone have any suggestions? This installation is geared for the beginner, so I didn't want them dragging and creating folders in ~/Library.

Any help or pointing in the right direction is appreciated.

IMHO, installers should be avoided if at all possible. If your product is a single entity, that gets installed in a single place, just put it on a disk image, and let the user drag it to it's final destination (and put something in the readme about the possible install locations).

In general I agree, however in the specific case of a preference pane I think an installer is warranted. It's not like an application, which can be dragged most anywhere and work. It needs to go in a very specific location, one that almost certainly doesn't even exist yet. Telling the user to create ~/Library/PreferencePanes and then drag the package to it is a recipe for a whole lot of confused users complaining. As simple as the process sounds, my own experience has been that something like that is too complex to require.

My suggestions in this case are:
1. First consider whether this is the best location; you might be better off aiming for /Library/PreferencePanes rather than a user-specific location.
2. If that's not possible for some reason, you can't do what you want directly with PackageMaker. However a post-install script may provide a solution. Use a scheme something like, the installer puts the software in /private/tmp/, and then your postinstall script (which runs as the user, and therefore evaluates ~ correctly) creates ~/Library/PreferencePanes and then moves the software into it. Note that for this to work you must not be requiring authentication in the installer, since in that case the effective user will be root.

You *might* be able to trick PackageMaker by creating the installer to target /Library/PreferencePanes, and then manually modifying the .info file to point to ~. But that seems pretty iffy to me.

--
Tom Harrington
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: [OT] Installation into home directory
      • From: Greg Robbins <email@hidden>
    • Re: [OT] Installation into home directory
      • From: Robert Borsuk <email@hidden>
References: 
 >Re: [OT] Installation into home directory (From: "Clark S. Cox III" <email@hidden>)

  • Prev by Date: Re: [OT] Installation into home directory
  • Next by Date: Can't set directory for runModalSavePanelForSaveOperation
  • Previous by thread: Re: [OT] Installation into home directory
  • Next by thread: Re: [OT] Installation into home directory
  • Index(es):
    • Date
    • Thread