Re: Locating previous versions
Re: Locating previous versions
- Subject: Re: Locating previous versions
- From: Jim Dodd <email@hidden>
- Date: Thu, 12 Oct 2006 13:10:59 -0700 (PDT)
--- Mark Krenek <email@hidden> wrote:
> I've gone round and round on this same issue and there is no easy
> solution. Search installer-dev for my name and you'll see all my posts.
>
> I have not tried the newer "Distribution Packages" because they
> require 10.4 or later. But I doubt they solve this problem.
>
> Here are the main problems with using search methods (such as
> CommonAppSearch) in a package :
>
> - If the search does not find anything, then the install CONTINUES,
> installing everything in the default location that you have to
> specify in the package. Probably not what you want.
>
> - Even if the search method finds your existing software, it does not
> pass that info to scripts. Apple has confirmed this behavior. The
> installer does not provide the path of the found application to the
> script.
>
> After talking with Apple engineers, here is what we do. This is not
> pretty, but it gets the job done.
>
> - We wrote a wrapper app that goes around the package. The wrapper
> app locates the existing application, usually using LaunchServices.
> It writes the path of the found app out to a file in /tmp/
> somehardcodedfoldername. This makes up for the fact that the
> Installer doesn't pass the found location to scripts.
>
> - If the wrapper app does not locate our app, it exits. If it finds
> our app, it launches the actual installer package which is bundled
> inside the wrapper app. This takes care of the case where the
> Installer insists on installing stuff even when your software was not
> located.
>
> - The installer package is designed to dump all it's files into /tmp/
> somehardcodedfoldername.
>
> - We then have a postupgarde/postinstall script that reads the path
> of the found app from the file that the wrapper app left around in
> tmp. The script then moves/copies the stuff in /tmp/
> somehardcodedfoldername to the proper location.
>
> Like I said, not pretty. And there's lots of gnarly details to tend
> to. You could possibly do all this in InstallationChecks or
> Preflights, but those have lots of gotchas. Hope this helps.
>
> Mark Krenek
> Aspry Media
>
>
Thank you, Mark. That does help. A great deal!
Apple is so good about so many things. It is a shock when something likes this
happens. I will not waste my time trying to figure out how the Locator works in
the Installer because it doesn't.
Our installer forces the customer to find where they moved our application (if
they did - we start them in the Applications folder where we install it by
default) and no one has really complained. I just thought this would be an nice
enhancement. It's not worth the trouble.
Regards,
Jim Dodd
Onset Computer Corp.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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