CoreTypes.bundle & icons for dialogs, scripts, slides, Self Service & Munki Managed Software Center

Standard
Screenshot 2015-10-17 15.36.00

For a number of years now I have used the icons found within the CoreTypes.bundle for dialogs, scripts, slides & Self Service.

I thought it was common practice to use them, but after a few conversations at JNUC2015 it appears I was wrong.

So the below is a quick write up on them.

Location

The CoreTypes bundle is located at: “/System/Library/CoreServices/CoreTypes.bundle”

Once found right click the CoreTypes bundle & select “Show Package Contents”, then expand the “Contents” folder & then the “Resources” folder.

Screenshot 2015-10-17 16.09.15

You should then find a plethora of .icns files, many of which you’ll recognise… Some you may not. Below are some more examples of the items you can find (on 10.10 at least):

Screenshot 2015-10-17 15.37.20
Screenshot 2015-10-17 15.36.57
Screenshot 2015-10-17 15.36.23
Screenshot 2015-10-17 15.36.00

I hope you’re already getting some inspiration from the above.

AppleScript Dialogs

AppleScript dialogs have 3 inbuilt icons, these are in the image above, & the images below show how to call them (this also applies to AppleScript calls from Bash via osascript):

Screenshot 2015-10-17 15.42.23
Screenshot 2015-10-17 15.40.18
Screenshot 2015-10-17 15.40.43


However, you can also specify a particular apps icon (as shown below).

What’s cool about this is if an app icon is being called by it’s path & that path hasn’t changed across OS’s but the icon has, you’ll then get the correct icon for the OS it’s running on.

Screenshot 2015-10-17 16.20.30

Incidentally, there is a great AppleScript in the second post of the thread here showing this.

Application Icons

As aluded to above, an apps icon can normally be found by right clicking the app bundle then clicking “Show Package Contents”, then expand the “Contents” folder & then the “Resources” folder.

Screenshot 2015-10-17 16.29.05

You’ll notice that icons used by the app can often be found there.

Screenshot 2015-10-17 18.10.31

If you’re unsure what is the apps icon, you can look at the value of the CFBundleIconFile key found within the Info.plist which is in turn found within the apps “Contents” folder.

Another method, as I was reminded by @peineke on the #jamfnation channel on the MacAdmins.org Slack, you can get the app icon by selecting the app you wish to grab the icon from then pressing cmd+i or in Finder selecting File > Get Info.

With the “Get Info” window open select the icon then press cmd+c.

Screenshot 2015-10-17 17.58.43

Next open Preview & click File > New from Clipboard.

Screenshot 2015-10-17 18.06.15

Preview should now open a new file with the copied icon.

Screenshot 2015-10-17 17.59.24

Preference Panes

Preference Panes icons can often be found in the same way that an app’s icon can be found.

So navigate to the Preference Panes location, right click, choose “Show Package Contents”, navigate through “/Contents/Resources/”

Screenshot 2015-10-17 16.36.29

Slides, Self Service & Munki Managed Software Center

Both Keynote & PowerPoint for Mac will accept the icons as is. However, be mindful when using with PowerPoint as your PC colleagues will not be able to see the file & so it may need to be converted to another format.

The JSS & Self Service will not accept the file as an icns file, so it will need to be converted to a 128 x 128 PNG as per:

Screenshot 2015-10-17 16.26.03

Munki Managed Software Centre, like Self Service, also needs the files to be converted. This time into 300 x 300 PNG as per this wiki entry.

Opening the icons files & exporting via Preview is what I do, when needed. I’m sure that there are other means to do that.

Legality

I am not a lawyer, but would like to add a note of caution when using these icons as they are Apples.

Me personally? I’m comfortable with using the icons in the ways shown above.

5 thoughts on “CoreTypes.bundle & icons for dialogs, scripts, slides, Self Service & Munki Managed Software Center

  1. Brad

    I had the same kid-in-a-candy-shop moment in Windows a long time ago, when I first opened shell32.dll and found hundreds of icons lying within. Since Windows 8, however, I have no idea where Microsoft hides the bulk of its newer graphical resources.

  2. Serge

    For those that want to use osascript one liners in bash, use: osascript -e ‘tell application “SystemUIServer” to display dialog “Your text here” with icon file “:Macintosh HD:path:to:icon:file:here” as alias’

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.