I’m trying to build a really simple installer and having some odd difficulty in getting this done. The App is going not going to be distributed in the App Store and I want to include a EULA aggrement but struggling to figure out the voodoo required to make that work.
I’ve been reading various pages of documentation and other questions and answers but I can’t seem to get even the simplest examples to work.
I first tried getting a simple package to work with the following command:
pkgbuild --component MyApp.app --version 1.5.1 --sign "Developer ID Installer: Company Name Ltd ([ID])" --install-location /Applications MyApp.pkg
This built the package fine but executing it didn’t install the app in any /Applications directory on the machine. Even the documentation shows this basic example but in my instances it’s simply doesn’t appear to put the MyApp.app
anywhere on the hard drive of the machine. Very confusing.
Since I need to show a licence as part of the installer I figured that I acutally need to be using ‘productbuild’ anyway.
It seems from my reading that I need to use a distribution XML file but I can’t find and documentation on what are correct values for the --ui
flag in the command nor can I find any examples of the XML file. Apple just has this really weird page showing a graphic and and a overly long reference page. Does anyone know of just some basic examples of this XML or how to build it?
I’ve looked at various tools such as Packages
but it no longer works on the latest versions of OSX.
So trying to use productbuild
has been even more confusing. My command is:
productbuild --component MyApp.app /Applications --version 1.5.2 --identifier co.uk.pkg.myapp --sign "Developer ID Installer: Company Name Ltd ([ID])" MyApp.pkg
This also builds OK but when the installation completes it mentions permissions but it also doesn’t install MyApp.app to the /Applications
directory.
I’m clearly getting something really wrong in my approach here and need some pointers but as far as I can tell from reading the docs I’m doing as suggested.