I thought I’d save all you fellow jucers some of my pain and fill-you in on the installation solutions we ended-up using for noatikl and liptikl (both of which are commercial apps built with Juce).
FWIW, I’ve had the pain in the past of having to write a generic windows-compatible scriptable installer in the past, and am so happy that those days are now behind me.
Windows: Inno Setup - free from http://www.jrsoftware.org/isinfo.php
A marvellous tool, really easy to auto-build “standard looking” setup .exe files using scripts. I use cygwin bash shell to grab latest files, build the setup .exe files and zip them up - dead easy. Spread the word!
Mac: PackageBuilder - free from Apple
Builds great looking “Mac Standard” installs, but can’t see how to drive it automatically. I use one bash shell script to copy all the bits I need under a build folder, then I run the PackageBuilder manually using pre-prepared configuration file (can’t figure-out how to run it from the command line!) (making sure I save the .pkg files into the right folder… that’ll catch you out if you’re not careful!) and then a second script to build the pkg file into a .dmg file, then zip it up.
Both these tools allow you to embed licenses that the user has to agree to in order to complete the install, which was important to us; in both cases, those text files can come from .rtf files so they’re nicely formated!
[quote=“peteatjuce”]Mac: PackageBuilder - free from Apple
Builds great looking “Mac Standard” installs, but can’t see how to drive it automatically. I use one bash shell script to copy all the bits I need under a build folder, then I run the PackageBuilder manually using pre-prepared configuration file (can’t figure-out how to run it from the command line!) [/quote]
Try
or
in terminal to see what you need. It runs smoothly from the command line with proper arguments.
I guess I should have clarified that … … I tried using the command-line version, but simply couldn’t figure out what the magic set of arguments was! There was also something in the manual page (not on my Mac right now so can’t remember the exact wording…) about the command line version requiring us to have to have first created the file to drive the command-line builder in advance with package builder (which is no problem, as of course I’ve already done that!).
If you could possibly provide some example “working” shell code to show what arguments to provide, I’m sure that many of us Mac developers would really appreciate it!
No problem… Here is the line from my script which makes the installer package file:
In my case the variable $PACKAGE_FILE is set to pkg/productname-x.x.x.pkg. Of course constant value of the -p switch can be used instead of variable but I run this script in several runs with different values.
The -f switch defines package contents directory (content in my case). And it is the same directory I used earlier when I was working with the GUI version of Package Maker.
The resources directory passed to -r switch contains files to be included to generated installer package. There are three files in this directory: background.jpg, License.txt and Welcome.txt
Info.plist and Description.plist are included to the generated package file too. I have them in different source locations because Description.plist is the same across all versions of the installers while the tmp/Info.plist is generated dynamically based on Info.plist template (I just modify it a bit in few steps earlier in the script to change the bundle version in the template but it’s not very important).
And that’s all - after this line I get the destination package file (.pkg) which is further processed with the hdiutil tool to make a disk image file (.dmg) and uploaded to ftp server
In any case I paste also the both .plist files. I’m almost sure that I got them from the package made earlier with the GUI version and modified them a little to actual needs.
Here is the bash script I ended-up using. Note that I added a -proj argument to point to my command line; and I also ran with sudo to get around some file permission problems.
And for anybody reading this in a few months :), the .pmproj file is prepared by you, prior to repeated running of this script, by the PackageMaker GUI tool that is in /Developer/Applications/Utilities
Oh, and under myprod_install_root, I’ve created separate Applications, Library etc. folders containing copies of my App, Libraries etc. that I want installed, in a folder structure mirroring how they should get installed on the target Mac.
Thought I should add to this, that if you’re using XCode 3.0, and have tried to build an installer package and encountered all sorts of annoying problems that prevent it from working; don’t despair.
Instead, do what I did, and copy/use intead the PackageBuilder.app from from an XCode 2.x distribution; this works, and means you can totally avoid the buggy version in XCode 3.0 …
The sort of problem this deals with includes this one:
your application gets installed, but instead of appearing in ~/Applications, it appears in /Library/Applications …!!!
As I’ve had to look at getting this all working for XCode 4 (where the old copy of PackageMaker doesn’t work any more having upgraded to XCode 4!), I’d like to suggest those who are interested look here:
Another usefull link for all things related to Package Maker and Installer is this one.
I recently switched from Package Maker to Packages and it works far better than Package Maker.
However, there is one feature that I can not find. It is to allow the user to choose where to install one particular package inside a meta package, for instance if you have a huge sample library and want to give the possibility to install it in another disk.
Have any of you ever gotten so fed up with the lameness of PackageMaker and Inno to where you wrote your own installer with Juce? Considering doing so for my next major release. Mind you, PackageMaker and Inno work fine for my end users, but the process of setting up the installers every time, and the scripting involved, creates a lot of added work and wasted time for no good reason, simply trying to outsmart these stupid installers. PackageMaker can’t even overwrite files without the help of a shell script! :evil: