Mac icon not sticking

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Mac icon not sticking

Post by Simon » Thu Jun 28, 2007 2:27 am

Hello,
I've done about a dozen cross platform apps and every time I use the same two icons, one for PC and one for Mac. I actually copy a working stack and it's assets folder (where the icons are) to a new folder and begin a new project from there.
This is the second time that the Mac icon won't get written to the app. The PC icon is fine but I get a generic icon when viewing on a Mac. I've checked that the link for the standalone is correct and re saved it a bunch of times.

Anybody have any ideas why this would happen?

Thanks,
Simon

xApple
Posts: 113
Joined: Wed Nov 29, 2006 10:21 pm
Location: Geneva

Post by xApple » Thu Jun 28, 2007 11:40 am

The way I use to get home made icons on my Macintosh applications is the following:
1. Create Icon in Illustrator.
2. Export to a 512x512 PNG format with alpha layer information included.
3. Use "Graphic Converter.app" to create an ICNS file from the PNG.
4. Use the sweet "icns2icon.app" application to get your ICNS showing on the file.
5. Use the Finder to copy-paste this icon (using the info box) to your ".app" folder created by Revolution.
6. Zip the folder (or put it in a DMG).
7. When unzipping on a remote Mactintosh the icon show appear perfectly with 8-bit transparency.

The Revolution options to auto imbed an icon upon building is, in my experience, highly unreliable; I never get the good result either for Windows icons or OS X icons.

Cheers.

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Post by BvG » Thu Jun 28, 2007 12:30 pm

If you have mac os x and the developer tools (xcode), you can also just drag almost any images onto "icon composer":

macintosh hd/developer/applications/utilities/icon composer

It even allows you to overwrite any existing image within existing packages, which is great for testing.

Of course you can make the .icns file with any other program, and put it into the bundle yourself, but you must make sure that it has the correct name, and is in the correct folder (normally there is already an icns file, so just replace that one).
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

xApple
Posts: 113
Joined: Wed Nov 29, 2006 10:21 pm
Location: Geneva

Post by xApple » Thu Jun 28, 2007 12:34 pm

I had been using Icon Composer also in the past, but it would always mess-up the transparency in my icons. I would consider that as equally unreliable.

Replacing the .icns inside the application bundle is a method, but I maintain that the most secure way of having your icon stick is to let the Finder set the custom icon flag (i.e. copy-pasting an icon from the info box).

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5145
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Jun 28, 2007 1:11 pm

xApple,

Don't use the custom icon flag if you're going to distribute your software. The user would lose the original icon if s/he decides to set a custom icon. Besides, to set a document icon, you really have to attach the icons in the correct way to make them appear on your documents in the Finder.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Post by Simon » Thu Jun 28, 2007 6:08 pm

Thanks All,
Since I know my icon is good and didn't think I should have to use any other method to attach it to the app. I just started stripping away cards and then features until I was left with a blank stack. Still no Mac icon.
I found that the problem went away after I changed the apps name, from Baume_&_Mercier to just Baume_Mercier. I suppose I could have used et.
"Bad Revolution, no cookie today."

Thanks again,
Simon

Mark Smith
Posts: 179
Joined: Sat Apr 08, 2006 11:08 pm
Location: London, UK
Contact:

Re: Mac icon not sticking

Post by Mark Smith » Thu Jun 28, 2007 8:18 pm

Simon, this is usually the Mac Finder not updating itself - as you found when renaming the bundle, the finder then updates itself.

There are various ways to force the Finder to refresh - you can zip and then unzip the bundle, or just rename (and then re-rename).

Best,

Mark

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”