[Adium-devl] Growl-WithInstaller 1.1.2 problems
evan.s at dreskin.net
Wed Nov 7 23:11:46 UTC 2007
On Nov 6, 2007, at 4:38 PM, David Smith wrote:
> So, we've gotten numerous reports of Growl-with-installer 1.1.2
> breaking people's growl installations.
O..M..G... The 0.7.x to 1.1.2 upgrade path is complicated because if
System Preferences is loaded, replacement of the bundle causes it to
fail to load (since the 0.7.x bundle doesn't unload first). Quitting &
restarting system prefs is therefore required.
We ran into this problem in Growl 1.1 initially; I took ownership of
it and worked out a solution. Initially, we just quit System Prefs and
then proceeded with the installation. However, this turned out to be
incomplete, as System Prefs may not quit immediately, so I changed it
to wait for the NSWorkspaceDidTerminateApplicationNotification
notification if system prefs is running and an upgrade is being
performed before deleting the old copy of Growl and continuing with
the actual installation of the new one.
I was so focused on the "does System Prefs quit properly and allow an
upgrade?" that I apparently never tested a much, much more common
case: Updating from 0.7.x without System Prefs running.
The deletion of the old bundle is not done until System Prefs quits..
in fact, it is done in the notification observer's method for the
notification. In other words, it doesn't happen at all if System
Prefs wasn't running so no quit was necessary.
The installation, then, simply opens the new growl.prefPane,
triggering System Prefs to launch and ask what to do. System Prefs
loads all its bundles before displaying the prompt... so the 0.7.x
bundle is loaded... so we're back to square one which the whole quit
process was supposed to fix!
The solution, then, is obvious: an old Growl must be deleted
regardless of the running state of System Prefs. I've made this
change in Growl .
I apologize for all the churn Growl-WithInstaller has seen in the
Growl 1.x series; there are a lot of update permutations which have
been difficult to predict, though this particular one was insufficient
testing pure and simple.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Adium-devl