How do I add an Icon to an App in Mac OS-X?
I've created the .icns file, but not having any luck getting things to work.
Can't add icon to Application
-
- User
- Posts: 24
- Joined: Mon May 30, 2011 12:17 pm
Can't add icon to Application
Andrew Lindsay
-----------------------------------------
-----------------------------------------
Re: Can't add icon to Application
You must save the Icon in to the App Contens/Resources/ folder.
Than you must add/edit these line of the Info.plist file.
Than you must add/edit these line of the Info.plist file.
Code: Select all
<key>CFBundleIconFile</key>
<string>myIcon.icns</string>
macOS Catalina 10.15.7
-
- User
- Posts: 24
- Joined: Mon May 30, 2011 12:17 pm
Re: Can't add icon to Application
Where do I add the resource file? Why can't I just add the path to the file in the COMPILE OPTIONS form where it has a checkbox and link to the icon file?
Regards
Andrew
Regards
Andrew
Andrew Lindsay
-----------------------------------------
-----------------------------------------
Re: Can't add icon to Application
You can. It should work fine and is the easiest way.Andrew Lindsay wrote:Why can't I just add the path to the file in the COMPILE OPTIONS form where it has a checkbox and link to the icon file?
The PB manual does mention that you might need to restart Finder when the application is just created for it to show the right icon.
So restarting Finder might help or maybe something is wrong with your .icns file.
Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)
-
- User
- Posts: 24
- Joined: Mon May 30, 2011 12:17 pm
Re: Can't add icon to Application
Hmm,
Not having any success with that.
Here is my project directory zipped up.
https://login.filesanywhere.com/fs/v.as ... 676d769d9f
Not having any success with that.
Here is my project directory zipped up.
https://login.filesanywhere.com/fs/v.as ... 676d769d9f
Andrew Lindsay
-----------------------------------------
-----------------------------------------
Re: Can't add icon to Application
Hello,
the key is the Info.plist file inside of your .app file (folder Contents/). The values inside are XML and here you can find all values and their meaning:
https://developer.apple.com/library/con ... -TPXREF110
Please note that this is for both iOS and MacOS. It is always mentioned if it is only for one of the two platforms.
In general, for a program icon, you set the value of CFBundleIconFile to the filename of your icon. The icns file itself must be located in Contents/Resources path inside of your .app. You can easily create .icns icon file from PNG using the free tool "Image2Icon" from iTunes app store.
I suggest to take a look into existing .app files (Applications -> right click -> Show Package Contents). You may also Google for some Info.plist example to get some more help.
<update>Your ZIP looks good, but I'm not sure about the "&" character in filename and XML. I personally would avoid any special characters in any file or path names. If there is an issue with that, it is really hard to track and find...</update>
Best,
Kukulkan
the key is the Info.plist file inside of your .app file (folder Contents/). The values inside are XML and here you can find all values and their meaning:
https://developer.apple.com/library/con ... -TPXREF110
Please note that this is for both iOS and MacOS. It is always mentioned if it is only for one of the two platforms.
In general, for a program icon, you set the value of CFBundleIconFile to the filename of your icon. The icns file itself must be located in Contents/Resources path inside of your .app. You can easily create .icns icon file from PNG using the free tool "Image2Icon" from iTunes app store.
I suggest to take a look into existing .app files (Applications -> right click -> Show Package Contents). You may also Google for some Info.plist example to get some more help.
<update>Your ZIP looks good, but I'm not sure about the "&" character in filename and XML. I personally would avoid any special characters in any file or path names. If there is an issue with that, it is really hard to track and find...</update>
Best,
Kukulkan
Re: Can't add icon to Application
Just change the name of the Output Executable in Compiler Options and everything will be fine.Andrew Lindsay wrote:Hmm,
Not having any success with that.
Here is my project directory zipped up.
https://login.filesanywhere.com/fs/v.as ... 676d769d9f
e.g. Factor&Root.app -> Factor_Root.app