[[OutdatedPage]] = Windows = [[TOC(heading=Platforms, depth=1, Windows, LinuxGentoo, LinuxDebian, LinuxUbuntu, LinuxTardis)]] === MinGW C++ Toolbox === Download the '''MinGW C++ Toolbox''' provided on the [http://prdownloads.sourceforge.net/ogre/MinGW_Toolbox_Setup_wr1.exe?download Ogre SF files site]. MinGW must be setup before running Code::Blocks for the first time to make detection of MinGW go smoothly. Download the [http://prdownloads.sourceforge.net/ogre/MinGW_Toolbox_Setup_wr1.exe?download installer package] which will install the following in your mingw directory ie c:\mingw. * gcc-core-3.4.5-20060117-1 * gcc-g++-3.4.5-20060117-1 with modified libstdc++ with dynamic string and wide string support ([http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/ online Manual]) * w32api-3.8 * binutils-2.17.50-20070129-1 ([http://sourceware.org/binutils/docs-2.17/binutils/index.html online Manual]) * mingw-runtime-3.11 * gdb-6.3-2.exe ([http://sources.redhat.com/gdb/current/onlinedocs/gdb_toc.html online Manual]) * !DrMingw ([http://jrfonseca.planetaclix.pt/projects/gnu-win32/software/drmingw/index.html online manual]) == MinGW == Download the '''MinGW''' package provided by sourceforge: [[br]] [http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=240780 Download [[br]] Install it to {{{c:\mingw\}}} This will include: * gcc-core * gcc-g++ with modified libstdc++ with dynamic string and wide string support ([http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/ online Manual]) * w32api * binutils ([http://sourceware.org/binutils/docs-2.17/binutils/index.html online Manual]) * mingw-runtime-3.11 * gdb ([http://sources.redhat.com/gdb/current/onlinedocs/gdb_toc.html online Manual]) * !DrMingw ([http://jrfonseca.planetaclix.pt/projects/gnu-win32/software/drmingw/index.html online manual]) [[br]] === MSYS === Download the MSYS Installer from sourceforge: [[br]] [http://svn.orxonox.net/webdev/develop/win32/dev/MSYS-1.0.10.exe Download] [[br]] MSYS (Minimal SYStem) is a software port of the Unix-Shell to Windows. It's used by MinGW-Developers as a minimal system which can, for example, execute configure-scripts. 1. Install MSYS into another path than MinGW 1. During the installation process answer yes (y) twice 1. Type in the exact path of MinGW directory, so MSYS can configure the important links (most probably this will bee C:\mingw\). [[br]] === SVN === Now you need to get subversion from [http://subversion.tigris.org]. There is also a very useful GUI-version at [http://tortoisesvn.tigris.org] (The command line version is good if you are experienced with the shell, otherwise download the GUI-version). [[br]] === Get the Ogre source === Check out the Ogre-repository from https://svn.orxonox.net/ogre into a folder named 'ogre', for example 'c:\orxonox\ogre'. * svn co !https://svn.orxonox.net/ogre ogre (Or do it with [http://tortoisesvn.tigris.org TortoiseSVN], the GUI-version of SVN) [[br]] === Dependencies for Code::Blocks + MingW === For building Ogre 1.4.x source, you will need the [http://downloads.sourceforge.net/ogre/OgreDependencies_CBMinGW_Eihort_20070325.zip?use_mirror=internap Ogre 1.4.x Dependencies]. It has all the dependencies built for use with Ogre 1.4.x including the debug and release import libs built from the August 2006 DirectX SDK. Don't use the ones that come with MingW. Unzip the dependencies into your ogre directory, in our example: 'c:\orxonox\ogre'. [[br]] === DirectX 9.0c August 2006 edition === [http://www.microsoft.com/downloads/details.aspx?FamilyId=C72D9F1E-53F3-4747-8490-6801D8E8B4EF&displaylang=en Download the SDK]. You will need the DirectX SDK if you plan to build and run in '''debug mode''' when using '''Direct3D9''' Rendering mode. If you plan on building Ogre from source at a later date then you will need the DirectX SDK also. Note that this SDK doesnt work on Windows 2000 or less. [[br]] === Code::Blocks === The easiest way to compile Ogre is using the [http://www.codeblocks.org/ Code::Blocks] project files. [http://forums.codeblocks.org/index.php?board=20.0 Use latest Nightly Build]. The Ogre sample project files will not work with Code::Blocks nightly builds prior to Jan 29 2007. * '''DO NOT USE Code::Blocks 1.0 RC2 or earlier, you must use a recent Nightly build or build from svn HEAD.''' * Do not install the Nightly build over 1.0 RC2 or you will experience crashes. Unzip the build into a clean directory. You can unzip Nightly builds into a previous nightly build with no problems. There are two downloads you must get from the Nightly build post: * wxmsw26u_gcc_cb.7z * CB_2006xxxx_revxxxx_win32.7z Unzip wxmsw26u_gcc_cb.7z witz [http://www.7-zip.org/ 7zip] into the directory you will unzip CB into. You may have to '''copy''' mingwm10.dll from the MinGW bin directory to the Code::Blocks bin directory if you didn't download it from the Nightly Build page. There are some more detailed install instructions that can be found on the [http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Windows Code::Blocks wiki site]. Make sure that Code::Blocks found your MinGW C++ Toolbox installation by following these instructions here: [http://www.ogre3d.org/wiki/index.php/Code_Blocks_Compiler_Setup Code Blocks Compiler Setup]. [[br]] === Directory setup in Code::Blocks === [[Image(CB_SetC_D.jpg, nolink, border=0)]][[br]] In the settings menu select Compiler and Debugger to setup the directories. [[br]] [[Image(CB_CompilerDir.jpg, nolink, border=0)]][[br]] Setup the include directories for the compiler. [[br]] [[Image(CB_LinkerDir.jpg, nolink, border=0)]][[br]] Setup the lib directories for the linker. Note that DirectX SDK lib is not used. The import libs in the Ogre dependencies will be used instead since MingW cannot link directly to the libs provided in the DirectX SDK. [[br]] [[Image(CB_ResDir.jpg, nolink, border=0)]][[br]] Include directory for windows resource compiler. [[br]] === Building Ogre === To build Ogre, open Ogre_stlp.workspace in Code::Blocks. Make sure you use '''Ogre.workspace''' and not Ogre_stlp.workspace. Ogre_stlp.workspace is for Code::Blocks + MinGW + STLPort. [[Image(CB_BuildWorkspace.jpg, nolink, border=0)]] In the build menu select '''Build Workspace'''. This will build the debug and release targets of all projects listed in the workspace manager window. This will take some time, so have a break. If everything worked, you'll have several binaries and libraries in your ogre\Samples\Common\bin\Release folder. [[br]] === Get the Orxonox source === Check out the Orxonox-repository from https://svn.orxonox.net/orxonox/trunk/ into a folder named 'trunk', for example 'c:\orxonox\trunk'. It has to be in the same root-folder as your Ogre directory. * svn co !https://svn.orxonox.net/orxonox/trunk trunk (Or do it with [http://tortoisesvn.tigris.org TortoiseSVN], the GUI-version of SVN) [[br]] === CMake === Now we can build Orxonox. To do so, we need CMake. CMake is a cross-platform system for build automation. Download the latest binary release from [http://cmake.org/HTML/Download.html here] and install it (you can check "Do not add CMake to the system PATH"). Create a file with a short name (in this example, we use 'c:\orxonox\trunk\cm') in your trunk-folder with following content: * [path to your CMake-installation]/bin/cmake . -G "MSYS Makefiles" [[br]] === Building Orxonox === Open the MSYS console, change into your trunk folder and type: 1. ./cm ''(the file we created just before)'' 2. make Now run Orxonox with the 'run-script.bat' file in the 'bin' folder. If you used another directory hierarchy than this tutorial, you'll have to adjust the paths in the .bat file.