site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Am 08.02.2007 um 12:06 schrieb sprockets77@mac.com: Greetings. I am a new Apple developer seeking some help about a PackageMaker issue. (Actually I am an ancient Apple developer, but the last time I did any was around 1986!) Things have changed slightly since then, I'm sure you'll find ;-) I have an application for which I am creating an installation. I have successfully made a simple component package that works just fine. 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. [Or would it be postflight? I confess that I am not clear on the intended usage differences between these phases.] [Another side question is whether I should be creating a symbolic link as opposed to an alias. I also do not understand the functional or user difference between the two.] For your case an Alias File would be the better choice. In any case, I am searching for sample shell scripts, or pointers to good sources of examples, for this and other common enhancements to a basic installation procedure. I have read the Software Delivery Guide many times and find it strangely detailed on many issues and simultaneously lacking on basic overview concepts and other than very simple examples. I have also searched on the ADC site and in the archives of this list and not found a good source of samples or other useful docs. Appreciative of all advice, help, pointers, etc. Many thanks, In summary: a) Don't create an installer package unless you have to. b) Don't do non-standard stuff which might annoy your customers. Sorry, that's the best advice I can give you. HTH Mike -- Mike Fischer Softwareentwicklung, EDV-Beratung Schulung, Vertrieb Web: <http://homepage.mac.com/mike_fischer/index.html> Note: I read this list in digest mode! Send me a private copy for faster responses. _______________________________________________ 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... 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. 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. As others have commented, the postflight script is executed after every install while the postinstall and postupgrade scripts are only run when the installer ins in install vs. upgrade mode. You probably want postflight for your case. This is actually documented too: <http://developer.apple.com/documentation/DeveloperTools/Conceptual/ SoftwareDistribution/Install_Operations/chapter_8_section_2.html> BTW: How will you handle the case when a user reinstalls your app and the Alias file is already present? And what if the user renamed the Alias file? A symbolic link is just a pathname stored as a file with a special attribute. This means that when the target is renamed or moved the symbolic link becomes invalid. An Alias file contains a Mac OS X AliasRecord which is much smarter about finding its target after something changes. OTOH most software doesn't even realise it when a symbolic link is used while resolving an Alias file requires code in the app to handle. While you might get lucky and find something to help you out, the Apple Installer is currently not built to install anything into a users home directory. So finding the correct directory is not trivial. (At least when you take into account multiple users, network home directories, and other complications.) One problem is that an installer that installs into /Applications needs root/admin permissions. It will then run its postflight script with these permissions as well. That makes it hard to even figure out the user who launched the installer (let alone other users on the machine). So finding the correct desktop folder is not easy. I'd try to avoid these problems, unless there is an important reason not to. Creating a non-standard Alias file on the users desktop does not count as an important reason in my book. If you persist in wanting to create an Alias on the users Desktop you micght look into sending the Finder an AppleEvent to create the Alias file for you. That would solve the issue of findung the correct desktop as well. Check out $ man osascript in the Terminal. But be aware that this might not work with remote installs. You might also get problems due to the root vs. user permissions in effect when executing the AppleScript. Go and file bug reports, enhancement requests, etc. at <http:// bugreport.apple.com>. I'm sure the documentation could profit from feedback from your perspective. This email sent to site_archiver@lists.apple.com