• 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: PackageMaker snafu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PackageMaker snafu


  • Subject: Re: PackageMaker snafu
  • From: Andy O'Meara <email@hidden>
  • Date: Tue, 15 Nov 2011 17:58:54 -0600


Like you, we have a non-trivial install that needs to install to global dirs as well as user sub dirs.

The approach that we've been using for a few years that's worked very well from 10.4 and up is the following:

1) Have your preflight do something like:

rm  /tmp/_user_home

ln -s "${HOME}"	/tmp/_user_home

2) Have your installer install everything with absolute paths, and for stuff that's going into the user home sub dir, just use a path like

/tmp/_user_home/Library/foo

3) And have your postflight cleanup:

rm  /tmp/_user_home


Andy


On Nov 14, 2011, at 9:04 PM, Rich Morin wrote:

> I'm using Apple's PackageMaker (3.0.3, on Leopard) to
> create an installer.  Basically, it needs to put some
> files into $HOME/Library/SketchUp and then copy a file
> up into SketchUp's plugins directory.  No problem, eh?
>
> The last time I did this, I spent a couple of weeks in
> research and hack mode: look for documentation, try to
> get things to work as described, rinse, repeat.
>
> Eventually, I had an installer that worked as desired.
> Because of the hassle and pain, I ignored some minor
> issues, such as the location of installed file trees.
>
> Specifically, although I set the Destination to "/" in
> PackageMaker, the files were installed relative to the
> user's home directory.  This seemed odd, but I was happy
> enough to get it working that I shrugged and went on.
>
> Fast forward to the present.  I built another installer
> and tried it out on a Lion system.  Hmmmm; Lion installs
> files relative to "/".  So, I fudged the file tree to go
> into /tmp/SketchUp and did a copy to $HOME/Library from
> there.  But wait; what am I supposed to do about Leopard?
>
>
> One option is to create a (/-relative) installer for Lion
> and another ($HOME-relative) one for Leopard.  Then check
> to see how Snow Leopard behaves and document accordingly.
>
> This seems a bit awkward and error-prone.  If the user
> isn't careful in downloading, things will break.  Yes, I
> can check for this and display a nastygram, but...
>
>
> Another option is to build things for Lion and fudge the
> post-install script for Leopard.  If the installer put
> the file tree in $HOME/tmp/..., I simply copy from there.
> Of course, if the user already had a $HOME/tmp directory,
> things might get a bit wonky...
>
>
> I tried installing Xcode 4 on my Lion system, in the hope
> that it would have a new, improved version of PackageMaker.
> No luck there.  Some Googling indicated that, in 2008, the
> PackageMaker distribution had been moved into the iOS SDK.
>
> Not sure whether I want to spend the money and hassle to
> find out whether this is (still) the case.  Anyone know?
>
> More to the point, what's the best way to proceed at this
> point?  This is beginning to look like a tarpit...
>
> -r
> --
> http://www.cfcl.com/rdm            Rich Morin
> http://www.cfcl.com/rdm/resume     email@hidden
> http://www.cfcl.com/rdm/weblog     +1 650-873-7841
>
> Software system design, development, and documentation
> _______________________________________________
> 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

 _______________________________________________
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

References: 
 >PackageMaker snafu (From: Rich Morin <email@hidden>)

  • Prev by Date: Re: installer scripts launch the wrong browser!?
  • Next by Date: Re: installer scripts launch the wrong browser!?
  • Previous by thread: PackageMaker snafu
  • Next by thread: PackageMaker snafu
  • Index(es):
    • Date
    • Thread