質問

I would like to create a package using package maker that when installed adds the .app to the dock.I have tried the below code which works fine when executed from the terminal:-

Apples-MacBook-Pro-2:~ apple$ defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/MyApp.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>"
Apples-MacBook-Pro-2:~ apple$ killall Dock

I want to add the above script on the package maker.Can anybody please tell me how to do so? Thanks a lot!

役に立ちましたか?

解決

You can use a tool known as "packages" it comes with pre installed script with an option of adding the software to dock.

use the following link for packages

他のヒント

You can perform any additional actions from the postinstall script of your package. All you need to do is to include a postinstall script (shell script in your case) and add the command you mentioned in your question. This will be executed after all the files are installed in the system and your dock icon will get added after that.

You can check below link for any additional info regarding packagemaker. http://macinstallers.blogspot.in/

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top