Missing App Icon in MacOS build

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
kdjanz
Posts: 154
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Missing App Icon in MacOS build

Post by kdjanz » Fri Jan 24, 2020 1:31 am

Newbie here getting back into LiveCode again.

Using both 9.6dp2 and 9.0.5 on Mojave and Catalina, I cannot get my ICNS to appear on my standalone build for MacOS.

I used IconFactory from the MacOS App store, and the ICNS file it made shows 10 icons of various sizes. That file is set in the standalone settings section of the Mac build, and the build is saved successfully and works successfully as well. The app however just has the generic App icon. When I open the package contents, the Standalone.icns is there in the Resources folder and the info.plist also lists the file as being in use.

Any suggestions as to why I can't have an app icon display properly in the Finder?

Thanks

Kelly

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7290
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Missing App Icon in MacOS build

Post by FourthWorld » Fri Jan 24, 2020 2:47 am

Try copying the app to another folder.

I know, crazy, but sometimes that's enough to tickler the Finder so it looks into the bundle and reads the plist.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

kdjanz
Posts: 154
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: Missing App Icon in MacOS build

Post by kdjanz » Fri Jan 24, 2020 3:07 am

I did to that. I even opened the Get Info dialog for the app and tried to paste the icns file on to it manually, but it would not take.

Puzzled.

kdjanz
Posts: 154
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: Missing App Icon in MacOS build

Post by kdjanz » Sat Jan 25, 2020 12:49 am

Anyone have any other ideas?

I can make the stack, PNG and ICNS file accessible if anyone wants to look at that. I could also put up a screenshot of my build settings if any of that would help.

Suggestions?

PaulDaMacMan
Posts: 223
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: Missing App Icon in MacOS build

Post by PaulDaMacMan » Sat Jan 25, 2020 4:59 am

Look up the macOS command line "lsregister", with it you can tell LaunchServices to do things like scan a directory for Bundles
https://github.com/PaulMcClernan/

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5226
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Missing App Icon in MacOS build

Post by jacque » Sat Jan 25, 2020 7:30 pm

I don't really know the answer but I wonder if there is something wrong with the ICNS file itself. It's probably not likely but if you can find a different tool to create the file it would be a good test.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

kdjanz
Posts: 154
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: Missing App Icon in MacOS build

Post by kdjanz » Sat Jan 25, 2020 9:01 pm

Thanks Jacque. I suspect you may be right, because I could not get the command line utility to create my ICNS file in the terminal. I got errors without explanations just indicating that it could not be built. Then I went to the App Store utility which seemed to make an appropriate file, but...

Any suggestions now on how to build or check the quality of the ICNS file?

I will have a look at lsregister, but my success in terminal is pretty iffy.

Thanks

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7290
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Missing App Icon in MacOS build

Post by FourthWorld » Sun Jan 26, 2020 2:18 am

kdjanz wrote:
Sat Jan 25, 2020 9:01 pm
Any suggestions now on how to build or check the quality of the ICNS file?
IIRC double-clicking the ICNS file in the Finder will open it in Preview with each of the sizes selectable. If corrupted, it should be evident quickly there.

May also be good to double-check the plist file to make sure it was written with the correct icon assignments.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

kdjanz
Posts: 154
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: Missing App Icon in MacOS build

Post by kdjanz » Sun Jan 26, 2020 7:01 am

Yes, it did open in preview and I saw 10 icons there of various sizes. Opening another random app, their ICNS only had 5, but appeared to be about the same, so the visual check of the file looks OK.

I also checked the info.plist and that appeared to have the right icon file listed.

Is there another, newer Xcode way of doing icon bundles with specially named files and sizes without bundling them into and ICNS file? I have not installed and fired up Xcode because the app is only for myself at this point, so I haven't done any signing or stapling or whatever else would be required for an app being distributed.

I'll keep tweaking random things and see if I can find a magic formula...

kdjanz
Posts: 154
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: Missing App Icon in MacOS build - SOLVED

Post by kdjanz » Thu Feb 06, 2020 3:13 am

Found a solution to my own problem, but not sure exactly which piece was key...

The externally built ICNS files from IconFactory did NOT work.

What did work was:
1. Using another icon utility to create a folder with the 10 icon sizes as PNG files from my master graphic.
2. Renaming the folder containing these icons to Icon.iconset and moving that file to a place on my drive so that the path did not contain spaces.
3. Starting a terminal from the folder containing the Icon.iconset folder.
4. My command in terminal was: iconutil -c icns /Users/kdjanz/Desktop/Icon.iconset
5. A new Icon.icns file appeared on the desktop.
6. I then used that file to build the standalone... and SUCCESS!

The key elements appear to be firstly correctly setting the name of the folder to '.iconset' and secondly, putting it in an easy path to work with.

Thanks for the suggestions, although it seems that starting from scratch and doing it step by step seems to have done the magic

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”