Regarding my original query:
I would now like to have the installer create an alias for the application on the desktop after the basic installation has completed. I understand that this is accomplished by a postinstall application.
I wanted to thank everyone for their through and considered knowledge, opinions, and code. Much appreciated, all of it.
Curiously (or perhaps not so) there were some differences of opinions about alises vs symlinks, which helped me understand the problem much better.
Some questions asked of me in return were...
This not something I (as a user) would expect an application installer to do. Indeed I would probably annoyed by it. Are you sure you really want do have an installer with non-standard behaviour?
Users of Mac OS X should be quite used to looking in the /Applications folder for apps. No need to clutter their desktop with Alias files.
Our target users are probably very naive Apple users and I thought it would simply be handy. It can easily be deleted. I have experienced installers that do this and didn't find it annoying, but I imagine your opinion is probably the dominant one since most installers do not do this, as you pointed out.
BTW: Why does your app need an installer at all? Why not deliver on a disk image and have the user drag&drop install it.
I thought about this a lot and experimented first with a disc image. There were a few reasons why I chose the PackageMaker solution:
1. Our legal folks have some very strict requirements about the user acknowledging a license agreement before the installation proceeds. I did find a way to attach a EULA file to a disc image, mentioned in the Software Delivery Guide, by adding resources to a UDIF disc image. This was incredibly arcane and involved running ResEdit in Classic mode, much too byzantine a process to use regularly. I could not find any information about doing this in a more modern way. (If one exists, I'd be interested.) Otherwise I liked the simplicity of the disc image delivery mechanism.
2. But the larger reason I chose PackageMaker was simply because it provided an Apple-standard, fairly well-recognized user experience for installing an application. I also liked the fact that the packaging parameters were all contained in the PM project file, and it supported very nicely our legal requirements for license agreements.
The one-line shell script that someone posted here to create a symlink worked nicely in a simple case. As many subsequent posters pointed out, however, there are many complications lurking with this (for creating either aliases or symlinks) in multiple users [not so big a problem for my application], reinstalling, etc. The more robust solutions that a few people provided seemed not worth the trouble, in my case, but were very educational.
In the end, and after some testing, I decided to not create anything and just go with the default of installing in the applications directory and letting the user create his own alias, if s/he so desires.
Many thanks to everyone; what a fine developer community!
|