Recompiling the engine
by Kyle Pickering · in Torque Game Engine · 10/18/2008 (1:59 pm) · 9 replies
Hey all,
Definately new at this, and i'm not going to lie, this is probably a really obvious question.
How do I recompile the engine? I've added 2 files to the engine\source\T3D directory, and now I've been told to "recompile", but I don't exactly know how.
Thanks for your answers.
Definately new at this, and i'm not going to lie, this is probably a really obvious question.
How do I recompile the engine? I've added 2 files to the engine\source\T3D directory, and now I've been told to "recompile", but I don't exactly know how.
Thanks for your answers.
About the author
#2
oops, i mean my engine file
10/18/2008 (2:16 pm)
Haha, you see, i have visual C++ 2008 and all, i just don't know what to do with it. do i just take my T3D file and compile that? what are the steps into completing this process.oops, i mean my engine file
#3
But I'll keep trying.
Disclaimer: I'm working with TGE1.5.2. I open the solution file (I think) in VC++2005. Then I find the source file (in that solution) that I'm editing, make my changes, save the file, and in the toolbar find Build and Build Project.
Again, I'm no professional, and I'm not even at my Torque computer, but if memory servers me right, that is how I do it...
Tony
10/18/2008 (2:20 pm)
OK, I'm the wrong guy for this...But I'll keep trying.
Disclaimer: I'm working with TGE1.5.2. I open the solution file (I think) in VC++2005. Then I find the source file (in that solution) that I'm editing, make my changes, save the file, and in the toolbar find Build and Build Project.
Again, I'm no professional, and I'm not even at my Torque computer, but if memory servers me right, that is how I do it...
Tony
#4
and after this is built, it will function like the .exe file in Torque\TGEA_1_7_0\GameExamples\TestT3D\game?
thanks for all the help btw, it really does help.
10/18/2008 (2:30 pm)
Yea i know about opening solution files, so you're saying when you make changes to the Torque\TGEA_1_7_0\engine\source\T3D file directory, you still build the solution file from Torque\TGEA_1_7_0\GameExamples\TestT3D\buildFiles\VisualStudio 2008? and after this is built, it will function like the .exe file in Torque\TGEA_1_7_0\GameExamples\TestT3D\game?
thanks for all the help btw, it really does help.
#5
If you haven't ever done a build of Torque with a compiler, where's what I did. Hope it helps!!!
Torque 101 11122006 - Installing the Platform SDK
Using this link for the tutorial:
msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
1. Download and install VC++2005
msdn.microsoft.com/vstudio/express/visualc/download/
2. Download and install Platform SDK for the x86 platform
www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0...
3. Update the Visual C++ directories
Open VC++ and go to Tools>Options
Click the (+) next to Projects and Solutions, then click on VC++ Directories
Platform is "Win32" (it should be that way already) Top right has a drop-down box titled Show directories for: and it should say "Executable files".
Add the paths to the appropriate subsection:
Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
Click the folder icon for a "new line".
Add this line
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
Now change the drop-down from "Executable files" to "Include files" and add this line
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
then change to "Library" and add this line
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
Then click OK. Close VC++.
4. Update the corewin_express.vsprops file.
The corewin_express.vsprops file is located in the C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults)
Open it with Notepad (or any text editor)
Change this line
AdditionalDependencies="kernel32.lib"
to this
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
Save the file and close it.
5. Generate and build a Win32 application to test your paths.
In Visual C++ Express, the Win32 Windows Application type is disabled in the Win32 Application Wizard. To enable that type, you need to edit the file
AppSettings.htm file located in the folder C:\ProgramFiles\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\.
In Notepad (or any text editor) comment out lines 441 - 444 by putting a // in front of them as shown here:
// WIN_APP.disabled = true;
// WIN_APP_LABEL.disabled = true;
// DLL_APP.disabled = true;
// DLL_APP_LABEL.disabled = true;
These lines were found in the if (window.external.FindSymbol("IS_EXPRESS_SKU")) section.
Save and close AppSettings.htm
Open VC++ again. Go to File>New>Project.
In the New Project dialog box, expand the Visual C++ node in the Product Types tree that means click the (+) next to Visual C++ and then click Win32. Click on the Win32 Console Application template and then name your project TESTING and click OK. In the Win32 Application Wizard dialog box click Application Settings.
Make sure that Windows application is selected as the Application type (mine had Console application selected as the default).
Make sure the ATL is not selected. Click the Finish button to generate the project.
As a final step, test your project by clicking the Start button in the IDE or by pressing F5. Your Win32 application should build and run.
When I did this it said "This project is out of date. Would you like to build it?"
I clicked "Yes" and it worked. It took about 10 seconds to build and run. Of course it didn't do anything since it was an empty project, but it did compile and run correctly.
Hooray!!! Something worked :)
Now back to Torque for more...
Tony
10/18/2008 (2:31 pm)
Also, the TDN may have a tutorial for VC++2008.If you haven't ever done a build of Torque with a compiler, where's what I did. Hope it helps!!!
Torque 101 11122006 - Installing the Platform SDK
Using this link for the tutorial:
msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
1. Download and install VC++2005
msdn.microsoft.com/vstudio/express/visualc/download/
2. Download and install Platform SDK for the x86 platform
www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0...
3. Update the Visual C++ directories
Open VC++ and go to Tools>Options
Click the (+) next to Projects and Solutions, then click on VC++ Directories
Platform is "Win32" (it should be that way already) Top right has a drop-down box titled Show directories for: and it should say "Executable files".
Add the paths to the appropriate subsection:
Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
Click the folder icon for a "new line".
Add this line
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
Now change the drop-down from "Executable files" to "Include files" and add this line
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
then change to "Library" and add this line
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
Then click OK. Close VC++.
4. Update the corewin_express.vsprops file.
The corewin_express.vsprops file is located in the C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults)
Open it with Notepad (or any text editor)
Change this line
AdditionalDependencies="kernel32.lib"
to this
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
Save the file and close it.
5. Generate and build a Win32 application to test your paths.
In Visual C++ Express, the Win32 Windows Application type is disabled in the Win32 Application Wizard. To enable that type, you need to edit the file
AppSettings.htm file located in the folder C:\ProgramFiles\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\.
In Notepad (or any text editor) comment out lines 441 - 444 by putting a // in front of them as shown here:
// WIN_APP.disabled = true;
// WIN_APP_LABEL.disabled = true;
// DLL_APP.disabled = true;
// DLL_APP_LABEL.disabled = true;
These lines were found in the if (window.external.FindSymbol("IS_EXPRESS_SKU")) section.
Save and close AppSettings.htm
Open VC++ again. Go to File>New>Project.
In the New Project dialog box, expand the Visual C++ node in the Product Types tree that means click the (+) next to Visual C++ and then click Win32. Click on the Win32 Console Application template and then name your project TESTING and click OK. In the Win32 Application Wizard dialog box click Application Settings.
Make sure that Windows application is selected as the Application type (mine had Console application selected as the default).
Make sure the ATL is not selected. Click the Finish button to generate the project.
As a final step, test your project by clicking the Start button in the IDE or by pressing F5. Your Win32 application should build and run.
When I did this it said "This project is out of date. Would you like to build it?"
I clicked "Yes" and it worked. It took about 10 seconds to build and run. Of course it didn't do anything since it was an empty project, but it did compile and run correctly.
Hooray!!! Something worked :)
Now back to Torque for more...
Tony
#6
Will it make an .exe file? I really don't know. I know I get the TorqueDemo.exe, so maybe that's what you're looking for?
Sorry. There are many others better at answering this than me.
Tony
10/18/2008 (2:33 pm)
Yes, you build the file after any changes (BACKUP EVERYTHING FIRST!)Will it make an .exe file? I really don't know. I know I get the TorqueDemo.exe, so maybe that's what you're looking for?
Sorry. There are many others better at answering this than me.
Tony
#7
First, if you haven't already, read the documentation for TGEA. You can find it along with your install of the engine or right here on the site. Go through the Getting Started section for instructions on how to set up Visual Studio for use with TGEA.
Second, take a look at the video in this link to get an overview of the basics of using Visual Studio.
10/18/2008 (2:45 pm)
@KyleFirst, if you haven't already, read the documentation for TGEA. You can find it along with your install of the engine or right here on the site. Go through the Getting Started section for instructions on how to set up Visual Studio for use with TGEA.
Second, take a look at the video in this link to get an overview of the basics of using Visual Studio.
#9
10/18/2008 (3:01 pm)
Haha thanks both of you for the help!
Torque Owner Infinitum3D
You need to use a compiler, such as Visual C++, or similar to "build" your project with the changes, any time you change the source.
As a side note, if you're just using TorqueScript, then delete your .dso files and start the game, it will recompile those scripts automatically.
~Tony
PS, Mo such thing as an obvious answer. Ask anything you need help with. That's what the forums are for.