I have a requirement to create desktop icon after installation, and I can't find out how. I am u开发者_Go百科sing package maker to create a Mac install package (.pkg) I am aware that it is not the best practice to create shortcuts on desktop, but this an important requirement.
This functionality isn't built into PackageMaker and usually isn't seen with any Mac apps. That doesn't mean you can do this manually by writing a bash script that will run on completion of the installation and copy a file to the desktop. Just include a component and install it to \tmp
then in the Postinstall script for that package mv
the file to the $USER
's desktop.
ex. mv /tmp/icon.sh /Users/$USER/Desktop/icon.sh
精彩评论