These slides explain how you can add a custom icon to you application you create with XCode. It also shows you how to create a custom executable from an openFrameworks project.
2. Add icon to app
First download img2icns from
http://www.img2icnsapp.com/
3. Add icon to app
1. Design your icon in i.e. Photoshop
2. Export it to png
3. Drag and drop it onto img2icns
4. Then click on the “Icns” button, select OF application directory and
save the icon into i.e. the project directory.
4. Add icon to app
1. Open XCode 4.0x
2. From the menu select: View > Navigators > Project
3. Click on the project icon with the name “emptyExample”
5. Add icon to app
4. Click on the ”emptyExample” target and select the “Summary” pane.
6. Add icon to app
5. Drag and drop the icon you exported with img2icns from finder, into
your project. When you drop the icon, this window pops up. I used these
settings.
The dropped icon will
show up in your project
panel.
7. Add icon to app
6. Now, drag and drop the icon from your project panel
into the “App icon” area of the “Summary pane”
8. Add icon to app
When you dropped the icon, a question mark appears. I think, you see
this question mark because you still need to add a build phase, so lets
continue...
9. Add icon to app
7. Click on the “Build Phases” pane and “Add Build Phase”. Select “Copy
Bundle Resources”
10. Add icon to app
8. Now, finally, drag and drop the .icns file from your project panel onto
the “Copy files” group which just showed up in your “Build Phases” pane.
This will copy the icon to your application bundle.
11. Add icon to app
When you click on “Summary” again, you’ll see the icon
showing up where you previously saw the question mark.
12. Add icon to app
You only need to recompile your application and the icon will be copied
into the application bundle. You’ll see
a nice icon for the application now.
13. What’s in a name
I’m using a “Run script” to copy the compiled application to a custom
application bundle so I can use my own application names. There must
be an easier way, but this is a simple and quick solution which works.
Note: make sure you first add your icon!
14. What’s in a name
1. Select the “Build Phases” pane, click on “Add Build Phase” and select
“Add Run script”
15. What’s in a name
2. Copy and paste this script into the contents
of the “Run script” group you just added. Here we create an application
with the name “PhotoUnit.app”. Rename this to you whatever you want.
appname=PhotoUnit.app
if [ ! -d ] ; then
mkdir -p $TARGET_BUILD_DIR/${appname}
fi
cp -r $TARGET_BUILD_DIR/$PRODUCT_NAME.app
$TARGET_BUILD_DIR/${appname}
16. What’s in a name
2. The “Run Script” will look like this:
17. What’s in a name
3. Recompile and that’s it! Note that this will make a copy of your
application.