Torque Build Environment -- Read Me First!

The Torque Build Environment (TBE) is a set of free tools and editors assembled by Garage Games to make the process of compiling Torque easier for the newbie. If you are already an accomplished C++ programmer with and editing environment you are comfortable with, you probably do not need the TBE. However, if you are just getting started and have never used C++ before, TBE is a free and easy way to get started compiling Torque.

TBE installs MinGW and Msys, which contain the gcc compiler, gdb debugger, "make" utility, and other useful free unix-based utilities. It then installs Eclipse, which is a free Java-based code editing environment. If you don't know what these things are, don't worry, all will be explained.

Before you install TBE, you MUST do the following:


1) purchase Torque and run the Torque SDK installer, installing it to the DEFAULT DIRECTORY. The TBE installer has to make a couple of changes to some Torque makefiles, and it assumes that Torque has been installed to C:\Torque\SDK. If you must place Torque somewhere else, you can still compile it, but the "no-brainer" one-step process included here will not work for you.


Once the Torque SDK is installed to C:\Torque\SDK, you can go ahead and click on the Torque Build Environment installer. Do not uncheck any of the components on the first page. The first thing the installer will do is check to see if you have a Java Runtime Environment (JRE) v. 1.4 or later, because this is necessary to run Eclipse. If you do not have it, the TBE installer will open up Internet Explorer and take you to www.java.com, where you can find the "download" link and get what you need. It may be referred to as a "Java Virtual Machine" or "Java Runtime Environment", at the time of this writing there is a gold button in the upper right part of the page that takes you there.

Once Java is done installing, it will ask if you want to reboot. You should say "No" at this point, and then reboot after the whole TBE install process is finished.

The TBE installer goes on to create a C:\TBE directory, into which it copies MinGW, Msys, and Eclipse. It creates shortcuts to msys (which opens to a command prompt, more on that later), to torqueDemo (your demo torque application), and finally a shortcut to Eclipse, your code editing environment. When the installer is done, then reboot your machine.


After you reboot, you are ready to compile torque! Simply open Eclipse. There should be a window called "C/C++ Projects" on the left side of the screen, with a single icon labeled "Torque" visible in it. Right click on this icon and click "Rebuild Project". The console window at the bottom of the screen should start scrolling by lots of text real fast. It should start with the line "make -k clean all", and then say "Compiling png/lpng.c" and then a whole lot more stuff.

If all goes well, it will end on a line that says "--> Linking texture2bm8.exe" If you get to that point, that means it worked, you are in business!

If you want to know for sure that you just did what you think you did, go to the example/ directory, and look at the "Date Modified" field on torqueDemo.exe. It should be within the last couple of minutes.

If you haven't read it yet, and you're still confused about this process, check out the Torque Build Environment Manual for more information.