Compiling In MacOS

This article will walk you through compiling Torque3D on the MacOS operating system.

This article is still WIP.

Install prerequisites

In order to compile T3D, you'll need to install Xcode, which you can find in the app store.

Generate a project with CMake

The CMake gui

Once you've installed CMake, run it and you'll see a screen something like the image below. You'll learn to be pretty familiar with this screen!

The two boxes at the top let you specify the location of your source code and the location to put build files. You need to fill them in - the source location is just your regular T3D directory, and the binaries location is where you want your Xcode project to go. This should probably be something like the image below.

Configuration

Once you've set your paths, you're ready to configure your project! Hit the 'configure' button in the bottom left, and you'll be asked to choose the generator for this project. CMake lets you create project files for many different compilers. Most Windows users will be using some form of Visual Studio, so go ahead and select the version appropriate to you, like in the image below.

Once you've filled the fields in and hit the configure button, you'll be presented with an error message! This is CMake prompting you to enter a name for your project.

Don't panic - just hit OK, edit the value of TORQUE_APP_NAME to match the project name you're working on.

Once you've filled in the app name, hit 'configure' again, and you'll see a bunch of additional options. You shouldn't need to touch most of these unless you have special needs - for example, utilizing Bullet or PhysX physics libraries.

Once you're happy with your choices, click 'generate' and CMake will output project files to the directory you chose.

The generated files

If you browse to the location you asked CMake to put your binaries, you'll see something like the image below - a few files and directories and an xcode project.

Compiling

To compile your project, open up the project, set the target project, and then build the project. The first time you build, you should use the install project, which will run scripts to copy the game template files into your game's directory for you, but after that you can just build the project with your app's name.

The engine executable will be generated in the project's game folder (i.e. My Projects/<project name>/game/<project name>.exe).

And you're done! You can launch the game, begin debugging and editing whatever you need.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License