• 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: Dynamic Install Location?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic Install Location?


  • Subject: Re: Dynamic Install Location?
  • From: Bill Coderre <email@hidden>
  • Date: Thu, 6 Sep 2007 00:54:23 -0700


On Sep 4, 2007, at 10:24 AM, Nigel Kersten wrote:
So currently I'm using the method of a preflight script that:

* retrieves the ruby sitelibdir parameter
* removes /tmp/my-symlink
* symlinks sitelibdir at /tmp/my-symlink
* package destination is set to /tmp/my-symlink with follow symlinks on.

Is this really the best option for doing this? 

This is a perfectly acceptable way to do it. ("Best" is such a contentious word.)

(ALSO: REMEMBER!!!! when the use clicks "Install", your installer is probably running as ROOT, so preflight and postflight need to be very security-conscious!!! SO DON'T ACCIDENTALLY SCRIBBLE ON THE KERNEL FILE, EH?)

It annoys me that I then don't get to observe the full paths with lsbom once the package is installed.

Your life will be MUCH MORE PLEASANT (and robust, hint hint) if you pretend that lsbom and package receipts DO NOT EXIST. 

Here's three good reasons:
1) BOM files change format from time to time, and contain LOTS of stuff you don't want to care about. 

2) Installation package receipts change format from time to time, and sometimes include destination paths that are supposed to be pre-pended onto the output of lsbom. Thus, lsbom does not always give you the whole story anyway.

3) It is not that much work to write your own preference file containing a list of files installed and a destination path.

Here's a sketch:
a) during your installer build makfile, pipe ls $MYINSTALLATIONROOTDIRECTORY into FOO.PKG/Contents/Resources/MySpecialBomFile,  then 

b) during your installer's postflight, mv this into /Library/Preferences/com.myCompany.myGreatApp.BOM and prepend the custom location as line 1. (Or you can be all FANCY and use a plist file or something.)

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Dynamic Install Location?
      • From: Nigel Kersten <email@hidden>
References: 
 >Dynamic Install Location? (From: Nigel Kersten <email@hidden>)
 >Re: Dynamic Install Location? (From: Nigel Kersten <email@hidden>)
 >Re: Dynamic Install Location? (From: Fritz Anderson <email@hidden>)
 >Re: Dynamic Install Location? (From: Nigel Kersten <email@hidden>)

  • Prev by Date: Re: Distribution script format second (stupid) question
  • Next by Date: Re: Dynamic Install Location?
  • Previous by thread: Re: Dynamic Install Location?
  • Next by thread: Re: Dynamic Install Location?
  • Index(es):
    • Date
    • Thread