Hey guys, I've always been one to tinker around in Photoshop, creating icons/themes etc. for personal use. And it occurred to me that maybe some other people may enjoy them too - so I decided to put together an installer.
PackageMaker makes putting a .mpkg together incredibly simple. It's pretty much a drag & drop process all the way.
However - I've hit a little issue. I've made the installer require a restart (instead of making the user jump in to terminal & 'killall' everything manually), but for whatever reason this doesn't refresh the icons in the dock. The remain in the same state as they were in prior to the install. You can get around this by simply dragging the app out of the dock & re-adding it again. But that defeats the whole point of the 'automated' installer. I figured out this happens because the icon cache isn't updated.
After installing the theme, typing these commands 'refreshes' the dock & changes the icons, eliminating the need to drag the icons out of the dock & re-add them;
My question is - how do I add this script into the installer itself?
Thanks.
PS. The same issue applies when uninstalling the theme & returning to the original OS X icons.
PackageMaker makes putting a .mpkg together incredibly simple. It's pretty much a drag & drop process all the way.
However - I've hit a little issue. I've made the installer require a restart (instead of making the user jump in to terminal & 'killall' everything manually), but for whatever reason this doesn't refresh the icons in the dock. The remain in the same state as they were in prior to the install. You can get around this by simply dragging the app out of the dock & re-adding it again. But that defeats the whole point of the 'automated' installer. I figured out this happens because the icon cache isn't updated.
After installing the theme, typing these commands 'refreshes' the dock & changes the icons, eliminating the need to drag the icons out of the dock & re-add them;
Code:
sudo find /private/var/folders/ -name com.apple.dock.iconcache
*Enter admin password*
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; 2>/dev/null
killall Dock
My question is - how do I add this script into the installer itself?
Thanks.
PS. The same issue applies when uninstalling the theme & returning to the original OS X icons.