开发者

How to set up PackageMaker to create an icon on desktop after installation?

开发者 https://www.devze.com 2023-02-21 09:56 出处:网络
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 be

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

0

精彩评论

暂无评论...
验证码 换一张
取 消