Log in

View Full Version : Dealing with Icons and Large Executables


Raphael Salgado
02-14-2006, 02:01 AM
Every Pocket PC user I know has quietly suffered the agonizing wait of having icons show up after a soft reset. Avid users who frequently soft-reset their device particularly bear this burden. <b>The problem lies with the way Windows Mobile obtains the icon on its first run;</b> unlike Windows on your desktop that can use .ICO files, the icon data is embedded at the end of the executable. One would think it would have been addressed by now in 5.0, but the issue still remains - and with Persistent Storage, accessing the file can be even slower.<br /><br /><img src="http://www.pocketpcthoughts.com/images/web/2003/skype.png" /><br /><br />The problem gets worse when the program's executable is relatively large (over 1.5MB). Take <a href="http://www.skype.com/products/skype/pocketpc">Skype</a>, for example. Their latest version is nearly 6MB (for a VoIP/chat program? 8O), and trying to access the icon data at the end of the file in your device's FlashROM or memory card can stall your device up to a full minute!<br /><br />By applying an old trick used for <i>embedded Visual Basic</i> programs, I created a launcher application called <a href="http://www.beyondthetech.com/downloads/phone/hacks/RunSkype.exe">RunSkype.exe</a>, which is hardcoded to run the Skype executable. I also used an icon editor, such as <a href="http://www.microangelo.us">Microangelo</a>, to embed a full-color VGA-friendly icon in the tiny 26KB executable.<br /><br />Place the <b>RunSkype.exe</b> file in the same folder where Skype is installed on your device, then create a shortcut for <b>RunSkype.exe</b> in your <b>\Windows\Start Menu\Programs</b> folder, replacing your old shortcut for Skype. The next time you soft reset, you'll appreciate how fast the icon shows up, and if you have a VGA Pocket PC, such as an HTC Universal or Dell Axim x50v, the icon will look a lot nicer, too. :D In fact, many programs could use a "facelift," what do you think?

ramjet73
02-14-2006, 03:07 AM
I was wondering why my PPC-6700 freezes the first time I scroll the "Programs" folder past the Skype icon after a soft reset. Thanks for solving that mystery and providing a workaround! :)

ramjet73

surur
02-14-2006, 03:20 AM
Is a general purpose solution possible, that can be used for any file?

Surur

heov
02-14-2006, 03:27 AM
Is a general purpose solution possible, that can be used for any file?

Surur

maybe raphael can use his coding skills to simply create a program that allows us to pick which EXE we want to use and which ICO to use (and by default just grab the one from the exe).

And then it could compile it. Maybe like a user-friendly res-hacker. Who knows :)

that way we can create our own for our own custom ico's and exe's.

or an easier solution maybe is for raphael make a EXE that directs to a general name like "program.exe", that way we cna rename the EXE in that folder to program.exe and we can use a resource hacker to change the icons.

Raphael Salgado
02-14-2006, 03:28 AM
I actually had this program created a while back when I developed "Pocket Tricorder" using NSBasic (http://www.nsbasic.com/ce). I used a hex editor to modify the string to read "Skype.exe," then used Microangelo to change the icon. If you need it for a specific program, let me know and I can make one for you.

ramjet73
02-14-2006, 03:29 AM
Is a general purpose solution possible, that can be used for any file?

Surur
Good idea! We should be able to pass the actual executable name in the shortcut, but that would mean one icon for all applications, or a reference to an external icon file in the shortcut.

BTW, RunSkype works well and the icon looks good on QVGA, even in green. :)

ramjet73

slogsdon
02-14-2006, 08:35 AM
[quote=Surur]
maybe raphael can use his coding skills to simply create a program that allows us to pick which EXE we want to use and which ICO to use (and by default just grab the one from the exe).

And then it could compile it.

Yes!!!!! This would be perfect and should be quite easy to do, right? The user would simply select the EXE and the save location. Any programmers out there that want to tackle this?

Menneisyys
02-14-2006, 09:49 AM
Is a general purpose solution possible, that can be used for any file?

Surur

You can - if you just create an .EXE stub for all these "misbehaving" apps, just like in this case.

BTW, to clean up the "Start" menu/make it render much faster after the first reset, you may also want to check out the mini-tutorial here (http://www.pocketpcthoughts.com/forums/viewtopic.php?p=388758).

martin_ayton
02-14-2006, 11:09 AM
Thanks Raphael - I had missed the earlier thread explaining the delay and now you explain it again and solve it - cool. If I may make a small suggestion: I've used the new icon in place of the old in my pocket plus launcher plug-in, but the background for the new icon is not transparent. This is not obvious in the programs menu because (I presume) the background there is white, but it is immediately visible in the launcher because my theme background is not white, so I now have a little green icon in a white square. As I said, it is a very minor point, massively outweighed by the fact that my soft resets have just got a bunch faster. Thank you :)

Raphael Salgado
02-14-2006, 04:14 PM
Try this transparent version of the icon: http://www.beyondthetech.com/downloads/phone/hacks/RunSkype_transp.exe

Make sure you rename it to RunSkype.exe before running it.

martin_ayton
02-15-2006, 11:56 AM
That's just great :) . Thanks, Raphael.

raulberit
02-25-2006, 05:35 PM
Hi, Maybe can you help me. I own a PPC-6700 from sprint and I'm happy with it but I'm unable to access my bank account from the internet explorer, it seems it canot manage differeft frames in a web page... can you help?... I'll appreciate it a lot. Thanks

jickbahtech
05-19-2006, 07:21 AM
Hey all.
Just tried this out and it is fantastic.
Anyone able to point me in the direction to doing this for other programs (I'm not the savviest programmer).
TextMaker and Planmaker slow me down too.

Thanks!

Xriderbc
06-21-2006, 01:40 AM
I would like to use this workaround for the Skype Icon, but it appears the links to the files are dead. Anyone still have the files they could email me, or the originator could repost some good links? Thanks!