Icon not showing when compiled on cpp?

406 views
Skip to first unread message

AG-w

unread,
May 12, 2014, 3:53:54 AM5/12/14
to
http://imgur.com/4dY70O0
http://imgur.com/UIVxSck

As you can see, the icon only shows on explorer and toolbar
It won't show on window top left, no matter haxe default icon or custom icon, It just show the default Windows icon
I have tried different icon, but still not working

anyone know how to fix?

Gama11

unread,
Apr 24, 2014, 6:02:55 AM4/24/14
to haxef...@googlegroups.com
If your flixel version is up to date, you should at least see the HaxeFlixel icon, even if your custom one isn't working... This is compiling to Windows, not Neko, right?


On Thursday, April 24, 2014 11:27:14 AM UTC+2, AG-w wrote:
http://imgur.com/4dY70O0
http://imgur.com/UIVxSck

As you can see, the icon only shows on explorer and toolbar
I have tried different icon, but still not working

anyone know how to fix?op

AG-w

unread,
Apr 24, 2014, 6:48:52 AM4/24/14
to haxef...@googlegroups.com
Yes, I compiled it to Windows by using Flash Develop.
All the haxelib are up to date

James Grimwood

unread,
Apr 24, 2014, 6:05:43 PM4/24/14
to haxef...@googlegroups.com
I found that if I go into c:\HaxeToolkit\haxe\lib\flixel\<version> and edit the include.xml and comment out the following line

<icon path="assets/images/logo/HaxeFlixel.svg" />

previous versions of the dev version of Flixel would use the icons I specified in my project.xml. This trick doesn't seem to work any more, the icon file gets copied into the export folder where the .exe file is, but isn't incorporated into the .exe file any more.

For the cpp target, do icons need to be a specific size and file type?

Gama11

unread,
Apr 25, 2014, 2:04:00 AM4/25/14
to haxef...@googlegroups.com
Editing the include.xml should no longer be necesary, as OpenFL does now prioritize icon nodes after the include.xml (after the flixel include).

I don't think this is the issue here, otherwise the HaxeFlixel icon would be used.

AG-w

unread,
Apr 25, 2014, 4:01:01 AM4/25/14
to
I found this topic says It only support bmp file
https://groups.google.com/d/msg/haxelang/qjnE1stPlSE/gN67pWxc1jMJ
so I changed it to a bmp icon, it's still not working

I suspected it's cause by project's path contain Chinese word
so I copied entire folder to C:\ ,compile it again, not working, the icon shows in application window is still a small white window icon
and the icon in the application properties still missing

Since I cant find people complaining the icon didn't show up in windows application, maybe there's something wrong with my computer?

Gold_Ninja

unread,
Jun 5, 2014, 2:34:50 AM6/5/14
to haxef...@googlegroups.com
Hi.

I am having the same problem.  The icon for my compiled project doesn't show.  I can't get it to show the HaxeFlixel icon or any custom icon.  When compiled icon.ico in the export folder is always blank.  I have tried commenting out the line in include.xml and all the other suggestions in this thread with no success. I'm targeting cpp on Windows and everything is up-to-date.

Any suggestions?

Joel



On Thursday, April 24, 2014 10:27:14 AM UTC+1, AG-w wrote:
http://imgur.com/4dY70O0
http://imgur.com/UIVxSck

As you can see, the icon only shows on explorer and toolbar
It won't show on window top left, no matter haxe default icon or custom icon, It just show the default Windows icon

SruloArt

unread,
Jun 5, 2014, 5:02:49 AM6/5/14
to haxef...@googlegroups.com
http://haxe3.blogspot.com/2013/08/create-svg-icon-for-openfl-appusing.html (some of it is now deprecated I think): If everything fails, just edit your Openfl icon.
Possible causes: your icon is a svg that wasn't fully converted into paths or  your icon is not the proper size. What is the proper size? I have no idea, but width=height and you could try a 144px for instance.

Gold_Ninja

unread,
Jun 5, 2014, 8:53:37 AM6/5/14
to haxef...@googlegroups.com
Hi SruloArt,

Thanks for the reply.  I had a read through the page you linked.  My custom icon that I am trying to use is a square PNG not an SVG but as I can't even get the HaxeFlixel.svg icon to show I don't think this is the problem.  The same goes for your suggestion to just edit the OpenFL icon.
I have checked with an app on my phone that HaxeFlixel.svg is a valid SVG file, so that isn't the problem.

OK, mid-way through writing this I noticed something.  The icon which I thought was blank actually has a tiny dot in the top-left corner.  When I opened the .ico file in Photoshop it tells me "Icon.ico contains 8 icons:" and lets me choose which resolution to open.  If I choose the largest, 256x256, I can see the tiny dot is in fact the HaxeFlixel logo at a tiny resolution, 16x16.  This is what is being embedded into my complied .exe file too.

Gama11

unread,
Jun 5, 2014, 8:54:44 AM6/5/14
to haxef...@googlegroups.com
I can confirm that icons seem to be broken on both Windows and Android. Maybe something with the latest OpenFL updates.

Gold_Ninja

unread,
Jun 5, 2014, 9:02:20 AM6/5/14
to haxef...@googlegroups.com
Hi Gama11, thanks for the reply.  Do you get the same thing where the icon is blank but with the dot in the top-left?

Gama11

unread,
Jun 5, 2014, 9:03:59 AM6/5/14
to haxef...@googlegroups.com
Yes. Seems like it's being resized incorrectly.

Gold_Ninja

unread,
Jun 5, 2014, 9:46:20 AM6/5/14
to haxef...@googlegroups.com
OK, after a bit of faffing about I can get my custom icon to appear.
I added the following to my project.xml:
    <icon path="assets/sprites/Icon.png" size="16" />
   
<icon path="assets/sprites/Icon.png" size="24" />
   
<icon path="assets/sprites/Icon.png" size="32" />
   
<icon path="assets/sprites/Icon.png" size="40" />
   
<icon path="assets/sprites/Icon.png" size="48" />
   
<icon path="assets/sprites/Icon.png" size="64" />
   
<icon path="assets/sprites/Icon.png" size="96" />
   
<icon path="assets/sprites/Icon.png" size="128" />
   
<icon path="assets/sprites/Icon.png" size="256" />

Now every resolution in icon.ico (when opened in Photoshop) has my custom icon and the compiled .exe has the correct icon too.  The only problem is the icon in the top-left corner of the programme when running still looks like this: http://imgur.com/4dY70O0

Any way I hope this work-around helps a few people out until a proper fix is made by OpenFL.

Joel
Reply all
Reply to author
Forward
0 new messages