• 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: Never upgrade. Always install
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Never upgrade. Always install


  • Subject: Re: Never upgrade. Always install
  • From: Carl Harris <email@hidden>
  • Date: Wed, 02 Sep 2009 15:20:00 -0400

Justin Williams wrote:
I am running into an issue with my Installer where many times it will
determine that the user should be upgrading their package rather than
installing fresh.  When this happens, files that are missing (usually
the application bundle that should go to /Applications) is not
installed.

I have had very good luck with always having things properly installed (apart from the fresh install vs. upgrade install) by doing the following:


1. Use agvtool to manage the CFBundleVersion in the app (including any embedded frameworks, preference panes, etc). Bump the version number in everything that has changed whenever a new package is generated.

2. Bump the package version (if you're using a .pmdoc for a flat package) whenever a new package is generated.

Apart from the sometimes unexpected results of the Allow Relocation flag on the package components, following this practice seems to make the Installer.app behave itself, installing/upgrading/replacing the installed components properly.

One note of caution:
Strangely, the .pmdoc caches the CFBundleVersion when you add content using the PackageMaker GUI. I haven't found any way to convince PackageMaker to refresh the CFBundleVersion in the .pmdoc using freshly-built artifacts with different version numbers, short of either (a) removing the package content from the .pmdoc and re-adding it or (b) passing the XML inside of the .pmdoc through an XSLT transform to "edit" the version attribute on each <component> element. This seriously complicates using the .pmdoc with a command- line build process, but failing to update version attributes on the components in the .pmdoc will virtually guarantee that the install will not be correct in many cases. In Leopard, I used to simply strip the version attribute from the component elements, but that doesn't work under Snow Leopard -- the Installer app isn't happy to find package components with no version number specified.


I, too, find it very frustrating to work with PackageMaker's many faults. I love drag-and-drop install, but there are times when that just isn't feasible. Having to engage in a wrestling match with PackageMaker is a huge waste of time and increases my cost for developing on Mac OS X. Apple would do well to invest a *little* more effort in making it work better.




_______________________________________________ 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
  • Prev by Date: Re: Never upgrade. Always install
  • Next by Date: How to specify name of my receipts?
  • Previous by thread: Re: Never upgrade. Always install
  • Next by thread: How to include a distribution script flat package in another distribution script project?
  • Index(es):
    • Date
    • Thread