02-14-2006, 02:01 AM
|
Thinker
Join Date: Jun 2003
Posts: 349
|
|
Dealing with Icons and Large Executables
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. The problem lies with the way Windows Mobile obtains the icon on its first run; 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.
The problem gets worse when the program's executable is relatively large (over 1.5MB). Take Skype, 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!
By applying an old trick used for embedded Visual Basic programs, I created a launcher application called RunSkype.exe, which is hardcoded to run the Skype executable. I also used an icon editor, such as Microangelo, to embed a full-color VGA-friendly icon in the tiny 26KB executable.
Place the RunSkype.exe file in the same folder where Skype is installed on your device, then create a shortcut for RunSkype.exe in your \Windows\Start Menu\Programs 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. In fact, many programs could use a "facelift," what do you think?
|
|
|
|
|
02-14-2006, 03:07 AM
|
Pupil
Join Date: Oct 2005
Posts: 16
|
|
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
|
|
|
|
|
02-14-2006, 03:20 AM
|
Mystic
Join Date: Aug 2006
Posts: 1,734
|
|
Is a general purpose solution possible, that can be used for any file?
Surur
|
|
|
|
|
02-14-2006, 03:27 AM
|
Thinker
Join Date: Jul 2003
Posts: 381
|
|
Quote:
Originally Posted by Surur
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.
|
|
|
|
|
02-14-2006, 03:28 AM
|
Thinker
Join Date: Jun 2003
Posts: 349
|
|
I actually had this program created a while back when I developed "Pocket Tricorder" using NSBasic. 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.
|
|
|
|
|
02-14-2006, 03:29 AM
|
Pupil
Join Date: Oct 2005
Posts: 16
|
|
Quote:
Originally Posted by Surur
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
|
|
|
|
|
02-14-2006, 08:35 AM
|
Neophyte
Join Date: Oct 2004
Posts: 2
|
|
[quote="heov"]
Quote:
Originally Posted by 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?
|
|
|
|
|
02-14-2006, 09:49 AM
|
5000+ Posts? I Should OWN This Site!
Join Date: Jun 2007
Posts: 5,067
|
|
Quote:
Originally Posted by Surur
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.
|
|
|
|
|
02-14-2006, 11:09 AM
|
Thinker
Join Date: Aug 2006
Posts: 459
|
|
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
|
|
|
|
|
02-14-2006, 04:14 PM
|
|
|
|