site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com On dimanche, septembre 25, 2005, at 08:17 PM, Mark Krenek wrote: Possible workarounds: * Ugly: set the default location to be /tmp. This won't prevent the installation from being run but: - the update won't be installed somewhere the user can see it - if it does not find it, it just displays an alert. _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... The short question: Is there any way to prevent an installation from continuing if one of the search methods (BundleIdentifierSearch, CommonAppSearch, etc.) fails to find an applicable target? [...] - you can check in a postflight script for the presence of some of your files in /tmp. Since this is quite an improbable location, you can be quite sure that when the files are installed in /tmp, this means the original application was not there. * Not too bad: Use a metapackage to do something similar but to avoid installing any real files in /tmp. - You would need one package which will just contain the folder of your bundle (let's hope you're using a bundle app) and which installs it by default in /tmp. You would need a search path to locate the location of your previous version. - The second package will have a preinstall and a preupgrade script which will look for the presence of the folder of the first package in /tmp. If it's in /tmp, this means there is no previous version and so you can fail the installation with a return code. Note: Somehow you need to remove the folder in /tmp at one point with the 2 former somutions so that you can later launch the installation with no surprises. * Complex but a bit smart: Create a small Cocoa or Carbon bundle application which looks for the location of your previous application using the LaunchServices API. - if it finds the previous version, it launches the installation by "opening" the package You can cheat by using a package standard icon for this tool and adding the real package in the Resources of this little application. This email sent to site_archiver@lists.apple.com