A program we make come in different versions, and I only want people to be able to install the new version if they already have the current version installed. On Windows machines I solve this with a key in the registry, but I have never done a mac installer before, so I have no idea how to solve it there. I’d rather not have an activation system for it, that is how we have solved it before. I guess PackageMaker won’t cut it?
Share
You have several options depending on how flexible your installation is. The easiest is to simply add a requirement in PM based on either a file (if present/absent is all you want) or info from bundle (your app) which allows you to specify exact version. Both work reliably only if you have a fixed location to install (like /Applications or /Library).
Alternatively you have the ultimate flexibility with “result of script” where the script can simply use
pkgutilto check whether your package is installed (e.g. viapkgutil --pkg-info id.of.your.app) as well its version (or location if you care).In general you don’t need any external registry since the Installer takes care of that automatically.