Application icon for Windows


#1

I downloaded version 1.1 and noticed that the main application file has only standard “window” icon embedded, instead of a Frogatto-flavored one.

To have a nice looking shortcut to the game I converted “images/window-icon.png” to ICO format (using XnView) and set it as the icon for the windows .lnk shortcut. Unfortunately dragging this icon to Game Center in Windows 7 left me with the default “window” icon.

Is there a possibility to embed a better looking icon in the future?

Attached is the icon embedded in frogatto.exe.



#2

Well what it comes down to is, I don’t know how to embed an icon in VC++. I’m really (a lot) more of a Mac person, but I’m doing the Windows builds as well as Mac, because no one else who’s more competent at it seems to have taken it over yet. Maybe I’ll learn how to do it sometime though.


#3

I never succeeded to properly add an icon to an executable in VC++, but that might be because I was also using wxWidgets and it had an icon of its own…

What version of Cisual Studio are you using?


#4

I’m using 2008 Express Edition. And we’re only using SDL and OpenGL, so nothing that would do anything with icons (except while running, the taskbar icon).


#5

My guess is that the current Frogatto build has already an icon embedded, as it is shown by XN Resource Editor (application used to browse and edit resources embedded in windows apps).

On a side note: is visual studio project part of the code repository? If so, someone else could try and patch it to provide the icon…

Also: Is “images/window-icon.png” the official application icon used on all platforms?


#6

Thanks! I’ll try that probably next time I build it on Windows.

The project isn’t in the repository, and neither are the XCode projects. Perhaps that should be remedied, but with VC++ at least, I just don’t think my project is very well made, and I don’t know how I would package it up properly for other people to use.

images/windows-icon.png is the icon for the taskbar, it wouldn’t work well for the file.


#7

People can select icon for the exe file on windows. I do it all the time when there no icon is showing on my exe files.


#8

Um (emphasis added)…

As I said earlier, there’s no icon provided with Frogatto in the first place. ::slight_smile:

Then there’s this problem:

Unfortunately dragging this icon to Game Center in Windows 7 left me with the default "window" icon.

If the game center specific fields are not added to the executable (and it is a complicated thing) then the application icon is used. Not the shortcut icon, but application icon.


#9

For programs I have made in the past I’ve used Resource Hacker http://www.angusj.com/resourcehacker/ to change the ICO for that program before distribution.

There is a guide on how to use it http://www.askvg.com/tutorial-all-about-resource-hacker-in-a-brief-tutorial/

Alex


#10

Well, this is a valid alternative, I guess. A bit of a hack ;), but works.

An alternative is open source XN Resource Editor. It is linked from Resource Hacker web page. Both programs haven’t been updated for some time, but essentially do their thing.


#11

Well I’ll keep those in mind in case the other doesn’t work. Thanks.

On a side note, I really like how Mac OS X does it now. The Finder treats folders with .app at the end as “bundles”, which behave as single files in most cases. But you can easily get inside them by right-clicking and going Show Package Contents. And then inside you’ve got your executable, icon file, libraries it requires, and other resources all as separate/plain files. This means you have to zip/tar it if you want to treat it as one file for other purposes (like sharing on the Web), but I think that’s a fine trade-off for how convenient it is.


#12

Let you know sometimes Windows XP and up doesn’t keep track on the icons.

I use this bat to fix the icons showing issue on Windows Vista and Windows 7.

TASKKILL /f /im explorer.exe

CD /d %userprofile%\AppData\Local

DEL IconCache.db /a

START explorer.exe

Pause

Reboot the computer. I use pause at the end to see it works or not.


#13

The above process needed to fix icon cache on windows Vista and 7. Because Windows caches application icons and usually does not refresh it correctly.

I don’t think that a reboot is needed. Restarting explorer after removing icon cache (with explorer killed, yes) usually does the trick for me. :slight_smile:

This is usually needed when you change an icon embedded in an application.