Game Development Community

Changeing the Build Icon for TGEA

by James Brad Barnette · in Torque Game Engine Advanced · 06/06/2007 (11:53 am) · 15 replies

I have been searching for about 3 hours now for how to chnge the icon of the ex when you build tgea.

right now evedently there isn't one as I'm getting the default windows icon for a exe.

all of the threads I have found are for the TGE and they tell you to go make changes to the resource file or open resource view"wich evedently is not in VC++ Express 2005". Can someone tell me how I set the build icon for my project.

I'm using VC++ Express 2005 and TGEA 1.0.1

Thanks,

James Brad Barnette

PS. If anyone is looking for a good icon creation utility check out Aliaxis Workshop. It is awsome! Ties right into photoshop as well and makes icons that are both Vista and mac OSX compatible.

#1
06/06/2007 (2:04 pm)
Come on you guys none of you know anything about this?
#2
06/07/2007 (9:02 am)
Ok well anyone else wondering this for VC++2005 Express.

short answer: you can't!

long answer: there is no resource system in the express edition this is what allows you to set or add thing like icons and spash screens.

so save you money and get Visual Studio 2005 Standard. It is about $129 online if you look.

Also of note if you are using an icon creation tool like axialis disable the vista and 32bit icons. Visualy you can't tell the difference in XP though I'm sure you can in vista. If you do not do this VS2005 will crash as it cannot handle the icons. This is aknow issue and one they do not plan to fix. Just another reason you will have to use VS2008 to do you Vista ready programming.
#3
06/07/2007 (11:59 am)
Can't you just create a .ico in an external application, replace the one that comes with TGEA, and just recompile?

I did something similar to this for Constructor (which I used VC++ 2005 Express to build).
#4
06/07/2007 (1:19 pm)
Well you have to be able to add a resource file to the project. VC++2005 does not allows for this and there is not a resource file already in the solution for the VC8 project.

There may be a way to hand code one and edit the solution file outside of VC++ to add it but don't know of a way.

once you have added the resource via VS2005 and saved the project back out. you can open the .rc file and change afxres.h to windows.h and resave "you can use wordpad" then you can compile with VC++2005.

yes if GG had rc file alread associated with the project then yeah you could just replace the .ico file and compile and it would work. but for now this is all I can come up with.
#5
06/07/2007 (4:33 pm)
The problem is.. tgea doesnt come with an .ico .. in the vc2005 project .. tge does.. but not tgea

tgea comes with an icon in the vc2003 project folder

and for an icon replacement tool... you need to have the aplication have some kind of icon to be replaced and be the same exact size otherwise it will corrupt the executable as what they do is hex editing of the exe.. so any extra characters breaks the exe code....

so you need to have an icon to replace it with icon replacement tools as far as i know..

even if you copy the Torque Game Engine Advanced.rc and torque.ico from the vc7 project folder to the vc8 project folder it doesnt work


so i have added the icon resource in visual studio 2005 to the TGEA vc8 project solution using the TGE resource.h file to avoid references to mfc...and now it works in vc2005 express edition with no problem ..

so the only thing you need to do to change the tgea icon.. is replace the supplied torque.ico with an ico of your choice an rebuild the project soltution
and that should be all right


here is the solution:

www.fileden.com/files/2007/2/8/747930/TGEAVC2005Solution.rar


includes these files:

TorqueGameEngineAdvanced.sln
Torque Game Engine Advanced.rc
torque.ico
resource.h

just drop them into the tgea vc8 project and replace the old one and now everything should work fine

hope this helps..

Cheers
#6
06/07/2007 (5:09 pm)
So how did you add the .rc file to the solution? and you still have a afxres.h pointer in there which I'm pretty sure needs to point to windows.h
#7
06/07/2007 (6:51 pm)
I added the icon resource to the solution via visual studio 2005 (visual c++ non express)..which created the .rc and then changed the resource.h that vs2005 generated with the one provided with tge ... saved

then ran up vc++ 2005 express opened that solution.. put it to release.. clean , and build solution

everything went ok...

remember to add the platform sdk and directx sdk folders to the options in the express edition..

i added the resource click right in the torque project and add resource.. then chose icon then import..

that function is disabled in the express edition.. but if you do it in visual studio 2005 save it and opened it in the express edition.. it should recognize it.. and compile it succesfully


the resource.h of the tge works with the express edition... it still has i think a reference to afxres.h but i think its a conditional include or something like that...


doesnt work on your side??

cheers
#8
06/07/2007 (8:35 pm)
No I was just asking I had it working since yesturday night I pretty much did the same thing.
only I didn't mess with the resource.h all I did was open in VS2005 and add the resource icon and then save the files back out and then I opend it up in VC++Express and compiled it. I got the error about the Afxres.h and changed them both to windows.h and then it compiled fine. I was just curious if you had found a way to do it without VS2005
#9
06/09/2007 (3:59 pm)
I just copied torque.ico and TorqueDemo.rc from the VS2005 folder in TGE 1.5.2 into the VC8 folder in TGEA and then added the rc to the project and it worked.
#10
06/09/2007 (4:07 pm)
Are you using VS2005? is so then that is fine anyone can fix it on their own if you have VS2005. the problem is people that have VC++Express. there is not resource functionality in VC++Express.

anyway I have talked to GG and they said it was a "bug/oversite" and that it will be fixed in the next release.
#11
06/25/2007 (10:37 pm)
My solution works with VC++ Express. You can't edit the icon, but you can certainly copy an existing TorqueDemo.rc file in and it works.
#12
07/03/2007 (9:12 am)
When I alt-tab, it shows a white empty icon for my program. Does anyone know what needs to be changed to have my icon display here also?
#13
07/25/2007 (10:26 am)
You guys should check out this http://www.angusj.com/resourcehacker/ (ResourceHacker) Will allow you to open the exe and manually replace the icon it uses.
#14
07/25/2007 (11:36 am)
Adding the VC7 .RC file to your VC8 project will work. I'm using VC++ Express exclusively and got a custom icon on my exe that way. The express edition lacks a resource editor, but it can compile resources into projects without problems.
#15
07/25/2007 (9:06 pm)
Hmm it didn't work for me when I tried but I cannot rule out that I did something stupid. LOL
luckily I had VS2005 at home so I was able to fix it and make then resave the solution.

oh well not a real big dealit will be fixed in the next release they said it was just a oversight.

and hacking the EXE is a really bad idea. it can cause stability issues.