1

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!

mmmmmm
  • 32,227
  • 27
  • 88
  • 117
Sumodh Nair
  • 1,656
  • 1
  • 11
  • 34

2 Answers2

2

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

Nicholas Riley
  • 43,532
  • 6
  • 101
  • 124
Rvg.2ky
  • 280
  • 1
  • 3
  • 12
0

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/

Vikram Singh
  • 1,726
  • 1
  • 13
  • 25
  • Hi,Thanks for the response. I actually used a third party free tool called "packages" which did the necessary job I was looking for. – Sumodh Nair Dec 07 '12 at 12:56