Changing the icon
by Dino Srdoc · in Torque 3D Beginner · 08/12/2013 (10:59 am) · 17 replies
How do I change the icon in a generated project?
#2
You could also replace this file with another one and keep the same name.
08/12/2013 (3:27 pm)
Under "<torque_path>\My Projects\<your project>\buildFiles\VisualStudio 2010\projects" you'll find the torque.ico file.You could also replace this file with another one and keep the same name.
#3
@Joshua Tried that, doesn't quite work.
08/12/2013 (3:47 pm)
@Simon Could you elaborate that by a bit? I haven't really touched much code in the past, so this is kind of hard.@Joshua Tried that, doesn't quite work.
#4
MyGeneratedProject/buildFiles/VisualStudio 2010/projects/
The icon which appears is associated with your executable is 'embedded' in your .exe when you compile it. You will have to recompile your .exe for the new icon to be taken into account.
So you need to modify the Torque.rc file with a text editor to specify the name of your new icon OR replace the .ico file with another with the same exact name. Then, you must compile the project.
Replacing the .ico file with another one named the same won't work until you recompile the project.
To compile, I am sure there are plenty of documentation on the wiki and in the docs but the basics are pretty simple.
You will need to open the .sln file with Visual Studio 2010 (or whatever supported C++ compiler / IDE you like) and then compile the engine.
08/12/2013 (4:19 pm)
@Dino : The files we are talking about should be located in MyGeneratedProject/buildFiles/VisualStudio 2010/projects/
The icon which appears is associated with your executable is 'embedded' in your .exe when you compile it. You will have to recompile your .exe for the new icon to be taken into account.
So you need to modify the Torque.rc file with a text editor to specify the name of your new icon OR replace the .ico file with another with the same exact name. Then, you must compile the project.
Replacing the .ico file with another one named the same won't work until you recompile the project.
To compile, I am sure there are plenty of documentation on the wiki and in the docs but the basics are pretty simple.
You will need to open the .sln file with Visual Studio 2010 (or whatever supported C++ compiler / IDE you like) and then compile the engine.
#5
from solution explorer select the project that named as your project name.
double click on it:
your project name->Source Files-->Torque.rc
double clik on Torque.rc.
resource view will open.
from properties,change filename field to the path of your custom icon
08/12/2013 (9:47 pm)
open up vs.from solution explorer select the project that named as your project name.
double click on it:
your project name->Source Files-->Torque.rc
double clik on Torque.rc.
resource view will open.
from properties,change filename field to the path of your custom icon
#6
Visual Studio Express doesn't allow the edition of the resource file.
08/12/2013 (9:50 pm)
@ahsan : It should be noted that this only works with the professional versions of Visual Studio.Visual Studio Express doesn't allow the edition of the resource file.
#7
Right Click on the rc file, select "View Code". Edit! Save. Recompile. Don't let VSE tell you what to do! ;)
Add your own code.
It might take a bit of time/restart for the cache to clear and it actually start using your custom.ico file for the icons.
Note, that depending on what program you use may depend on the quality of your icon. I've used a free program ages ago that gave a really jaggy icon.
08/13/2013 (6:39 am)
Attacks Simon with many wet fishRight Click on the rc file, select "View Code". Edit! Save. Recompile. Don't let VSE tell you what to do! ;)
Add your own code.
// Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. //yorks customized! IDI_ICON1 ICON DISCARDABLE "yorkshireRifles_air_drag.ico" IDI_ICON2 ICON DISCARDABLE "yorkshireRifles_air_drag.ico"
It might take a bit of time/restart for the cache to clear and it actually start using your custom.ico file for the icons.
Note, that depending on what program you use may depend on the quality of your icon. I've used a free program ages ago that gave a really jaggy icon.
#8
08/13/2013 (8:10 am)
I use PSE7 with an icon plugin, and that works great for making icons that look nice.
#9
s22.postimg.org/6fdeq2apt/image.png
So, after I edited that thingy, I opened up the solution in VSE and clicked build, but it didn't change the icon. I also restarted my computer, but to no avail.
Is the problem in the icon itself? I just created a quick .png in PS CS2 (the free thingy) and used a .png to .ico, and I noticed that the default torque.ico has 9 "pages" while my icon has 5. Could that be the problem?
08/13/2013 (8:25 am)
Steve, I tried your approach.s22.postimg.org/6fdeq2apt/image.png
So, after I edited that thingy, I opened up the solution in VSE and clicked build, but it didn't change the icon. I also restarted my computer, but to no avail.
Is the problem in the icon itself? I just created a quick .png in PS CS2 (the free thingy) and used a .png to .ico, and I noticed that the default torque.ico has 9 "pages" while my icon has 5. Could that be the problem?
#10
08/13/2013 (9:33 am)
Right click on your shortcut, properties, change icon. Eventually it'll get it. It's your computer's cache which is the problem.
#11
08/13/2013 (11:22 am)
Oh there's absolutely no problem with changing the icon of a shortcut. But I want the main .exe to have that icon as well. Also, when I change the icon of a shortcut, and look into the .exe for the icons, there are only the default Torque icons. This really is confusing, haha
#12
08/13/2013 (11:57 am)
Clean and build the VS solution.
#13
Also, I'm sorry that I'm being such a pain in the ass, but this really is important to me :)
08/13/2013 (12:14 pm)
What do you mean by clean?Also, I'm sorry that I'm being such a pain in the ass, but this really is important to me :)
#14
@Dino : Don't feel bad for asking questions!
In Visual Studio, under the Build drop-down menu, you have Build Solution, Rebuild Solution and Clean Solution.
Clean will basically delete all output files and allow you to cleanly build a new solution.
08/13/2013 (1:55 pm)
@Steve : It's super effective! Can't believe I've never tried that before.@Dino : Don't feel bad for asking questions!
In Visual Studio, under the Build drop-down menu, you have Build Solution, Rebuild Solution and Clean Solution.
Clean will basically delete all output files and allow you to cleanly build a new solution.
#15
I'm using the stock T3D code (obviously).
08/13/2013 (5:49 pm)
Well, I replaced the icon in the torque.rc, cleaned the solution and tried to build it, but this pops up. s18.postimg.org/b0hdhoj95/Capture.pngI'm using the stock T3D code (obviously).
#16
I tried this method
www.wikihow.com/Change-the-Icon-for-an-Exe-File
and failed miserably.
08/14/2013 (6:31 am)
Any help guys?I tried this method
www.wikihow.com/Change-the-Icon-for-an-Exe-File
and failed miserably.

Associate Simon Love
Visual Studio Express won't let you access the file with a visual editor so you will have to manually edit the file using a text editor.