Changing exe icon - TGB stops working
by Shaz · in Torque Game Builder · 09/18/2008 (11:20 pm) · 8 replies
I've been trying to change the icon on my exe for a few days now. Using Resource Hacker, replacing the exe icon with another the same resolution, file size and colours (72x72 32 Bit).
Each time, the resulting exe is one byte shorter than the original, and when I run the program I get a "TGB has stopped working" error and it crashes.
I haven't yet been able to successfully recompile my source in VC Express, so changing the TGB icon and recompiling is not an option.
Can anyone suggest what might be causing the problem, and what my next step should be?
Each time, the resulting exe is one byte shorter than the original, and when I run the program I get a "TGB has stopped working" error and it crashes.
I haven't yet been able to successfully recompile my source in VC Express, so changing the TGB icon and recompiling is not an option.
Can anyone suggest what might be causing the problem, and what my next step should be?
About the author
#2
09/19/2008 (4:14 am)
If u want to change the name of ur game. Go to main.cs and put "SetCanvasTitle("My game name");" this line in initializeProject() function. Then u can change name
#3
I got the game name sorted out - through the XML settings actually, where you can set the game and company name. I'm pretty sure that changes the window title as well.
09/19/2008 (5:15 am)
Thanks - I'll google Resource Tuner tomorrow and see if it works.I got the game name sorted out - through the XML settings actually, where you can set the game and company name. I'm pretty sure that changes the window title as well.
#4
09/19/2008 (2:46 pm)
Wow - Resource Tuner worked, but it drove my exe from 888k to 2.2MB! That's a bit of a worry! Any way around it?
#5
I'm not familiar with packing and compression - is there a way for me to repack the file manually? If so, could someone please give me a step-by-step?
Thanks :)
09/19/2008 (2:52 pm)
Ok - found this:Quote:
Resource Tuner provides two functions that are automatically performed when opening a file: unpacking files compressed with UPX using the Plug-In subsystem, and error checking.
If your target file was packed with UPX, it was unpacked automatically and saved unpacked. That is why the original file size is increased.
I'm not familiar with packing and compression - is there a way for me to repack the file manually? If so, could someone please give me a step-by-step?
Thanks :)
#6
09/19/2008 (3:26 pm)
@Shaz - I'm not exactly sure about either of the programs, but may I ask about this:Quote:I haven't yet been able to successfully recompile my source in VC Express, so changing the TGB icon and recompiling is not an option.What problem did you encounter?
#7
I followed the "walkthrough" on setting up VC Express for TGB but it may be that I just didn't do one of the steps properly.
I do plan to uninstall everything from my laptop and try it all over again there to see if I can make it work. I'd also consider using a different compiler if there's another recommended one.
If I DO get that working, do I have to recompile EVERYTHING after I change the icon, or is there just one or two things I'd need to recompile? It takes a while...
I'd actually prefer to change the exe icon after the event - much less trouble - or an even better option - have something worked into either the scripts or the TGB editor so the developer could specify an icon there to use for the build. No mucking around afterwards, no editing of source. IMO that would be the very best option, and available to those who don't have the Pro version. Maybe you could add that to the wish list, if it's not there already :)
09/19/2008 (7:03 pm)
It tells me it can't find certain header files. windows.h was one in particular.I followed the "walkthrough" on setting up VC Express for TGB but it may be that I just didn't do one of the steps properly.
I do plan to uninstall everything from my laptop and try it all over again there to see if I can make it work. I'd also consider using a different compiler if there's another recommended one.
If I DO get that working, do I have to recompile EVERYTHING after I change the icon, or is there just one or two things I'd need to recompile? It takes a while...
I'd actually prefer to change the exe icon after the event - much less trouble - or an even better option - have something worked into either the scripts or the TGB editor so the developer could specify an icon there to use for the build. No mucking around afterwards, no editing of source. IMO that would be the very best option, and available to those who don't have the Pro version. Maybe you could add that to the wish list, if it's not there already :)
#8
09/19/2008 (7:54 pm)
The windows.h issue is most likely you either did not install the windows SDK or it is not hooked in properly with VS Express (the include/header/etc directories).
S. Arul Prakash