Windows Developer Tools

 

This is a walk-through that Sqeaky, MakoEnergy and HydroWolfy have made for so other people can use the same tools as them. If anyone cares to make Project files for Visual Studio, Eclipse or any other development platform please let us know your steps, and where possible please allow us to use a copy of the files.

The Core Tools

These are the main resources to get this working. You can most likely use different version of these tools and they will most likely work just fine. We recommend that you go to each of these sites and find the installation packages before continuing any further.

  • MinGW and GDB — These are the compiler, debugger and other closely associated tools. We have used mingw-get-inst-20110316 and mingw-get-inst-20120426 (the version is date), but newer versions should work too. If you have the installer download the latest version be ready for a long download.
  • Code::blocks IDE — This is the development environment we use. The version used at the time of this writing was 10.05 (the version is the year and month of the release).  Do not get the Code::Blocks/MinGW download bundle offered on the Code::Blocks webpage.  They have an older version of MinGW which will not compile the engine.
  • Git — We used the newest version of msysgit. This tool will allow you to get the most recent version of the Source Code and Stay in sync with everyone else. Primarily used with github.com but can be to directly sync with other developers.
  • CMake — This is used to construct project or make files to instruct the compiler on how to do it’s job. We used 2.8.3, 2.8.4 and 2.8.6 but any version newer than 2.8.0 should work.

Alternative Development Environments

In theory any development environment can be used. In practice many bring compatibility issues that make using them difficult. Currently we have not tested this the Visual Studio compiler throroughly.

  • QT creator – This can be used with either Mingw or microsoft’s compiler.
  • Visual Studio – This IDE should be usable. Cmake produces an odd project structure, Two extra projects are added “ALL_BUILD” and “ZERO_CHECK”. These can be ignored safely. Be sure to set your startup project from the default. Another oddity is that Visual Studio strongly wants to set whether a build has debug symbols immediately before compilation. To accomodate this “CMAKE_BUILD_TYPE” cannot be set with Visual Studio, this could affect automated build processes.

Installing

Like most windows installers you can get most of the work done by double clicking on it then ‘next’ until it is done. The are some specific option and extra steps you should be aware of.

MinGW Special configuration

During the installation of MinGW be sure to include the C++ compiler, MSYS Basic System and the MinGW Developer toolkit. This will include tool like Make and a Bash shell will be used by other tools later and may be useful if you want to dig into the gritty details. Finally, for some reason on Windows this compilers doesn’t work well with any spaces in its installation path. The default install directory is “c:\mingw” this works well most the time, but you can select any folder without spaces.

For the compiler to work correctly the system needs to made aware of it. The system PATH is a listing of folders that Windows (and most other operating systems) will search for programs when it is told run a program without being told its location. You can add it to just your current user’s PATH if you do not want to interfere with other users or to the system wide PATH if you think there will be other Mezzanine developers using the system. Here is how you add the minGW tools to windows PATH variable:

Window XP

  1. Right-click “My Computer” or “Computer”, click “properties”
  2. Click “Advanced” Tab
  3. Click “Environment Variables” Button
  4. Find the “PATH” variable and add “;C:\MinGW\bin” to the end (do not erase what is already in there, it _will_ screw your computer)
  5. Click “OK” 3 times

Vista and Windows 7

  1. Right-click “My Computer” or “Computer”, click “properties”
  2. Click “Advanced System Settings” Link
  3. If a UAC Prompt requests you permission to continue click “Continue”
  4. Click “Environment Variables” Button
  5. Find the “PATH” variable and add “;C:\MinGW\bin” to the end (do not erase what is already in there, it _will_ screw your computer)
  6. Click “OK” 3 times

IDE Special configuration

Most development environments have some configuration that they require.

Code::Blocks

If you chose to use the version of Code::Blocks that came with the compiler you will still have to follow the instructions for editing the system PATH as listed above.

Also, by default Code::Blocks looks for “make.exe” as it’s primary make program.  MinGW doesn’t call it’s make executable “make.exe” though.  So you will have to tell Code::Blocks to look for MinGW’s make executable.  To do this:

  1. At the menu across the top, click “Settings” and go to “Compiler and debugger…”.
  2. In this window, just below the “Selected Compiler”, there should be a row of tabs.  Click on the “Toolchain Executables” tab.
  3. You should see a list of executables, and at the bottom of the list should have a box labeled “Make Program:”, with “make.exe” listed.  To the right of that click the “…” button.
  4. Navigate to the “mingw32-make.exe” executable.  This should be located in “C:\MinGW\bin”.
  5. Select the “mingw32-make.exe” executable and click “Open”.  Then click “Ok” to close the configuration window.
QT Creator

For the debugger to work with any compiler make sure that the “CMAKE_BUILD_TYPE” option in Cmake is set too “Debug”. Additionally, some version of the microsoft compiler do not come with a debugger. Be sure to install a copy of the windows software development kit if you are using some version of Visual Studio for the compiler.

Visual Studio

In theory this should just work. In practice we have only shown that this can be used to compile the source. There hasn’t been thorough testing of game compilation, bug parity or build configuration options.

Git Special configuration

When installing you will be asked where you will want to use the git tools from. This again, works with the system PATH. Use the default settings. If you select an option that puts the msys git tools into the windows path, it will conflict with cmake. Git can go into your PATH, but its tools cannot.

Git Push

If you plan on making pushes to Github.com you will need to configure an account and an ssh key with them. From the git bash command prompt you can type “ssh-keygen” to make a set of keys. Alternatively if you are using the Git Gui installed with msysgit, with a repo opened you can go to the “Help” pulldown menu at the top of the window, then “Show SSH Key”. This will open a new small window that should have a “Generate Key” button in the top right corner, and a “Copy to Clipboard” button in the bottom left corner.

You will need to copy your public sshkey into your Github profile. When creating your keypair, let it use the default location to save your keys. That way you won’t have to configure git with the locations. It will output the location of the file, and you can open it notepad/wordpad or any text editor and copy/paste into the webpage.

During your first clone/pull of the repository you will want to verify the authenticity of the ssh servers RSA fingerprint, which can be found in Github’s documentation, as well as a more detailed explanation of the key creation process.

CMake Special configuration

During the Installation you will be asked about the system PATH. Even though it is not strictly required, it can be useful to set CMake to be in the path for the current user (or all users if other will develop software). This will simplify the running of command line commands and enable you to copy/paste commands published by others. This is an option you will be presented during the installation.

Other Tools

Currently these tools aren’t required, but they are popular and you might find them useful.

  • Notepad++ — A really good text editor with syntax highlighting.
  • TortioseGIT — Make sure to grab the right version for your platform (32 vs 64 bit). A better user interface to GIT, it makes staying up to data much easier.
  • WinMerge – A tool for comparing to similar files.
  • Visual Studio — More info or even CMake configuration adjustments would be welcome and helpful
  • Eclipse – Any special project files that would allow users of this IDE to work more easily with the engine would be appreciated.

What’s next

If you aren’t comfortable with your codings skills C++ Lessons are a good idea. If you are comfortable with you coding skill and have the tools installed check out the Mezzanine Dependencies, if you already have what you need from that you could take a look at what it takes to build the engine.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>