#############################################
## MINGW
# Under windows, Ogre 1.9 is not downloadable as a library at the time I'm writing. It has to be compiled. Finding Boost libraries (required to compile Ogre) is also not that easy.
# That's why we will download all the sources and compile everything.
# Tools required :
# CMake gui
#
http://www.cmake.org/cmake/resources/software.html# Tortoise HG (for Ogre)
#
http://tortoisehg.bitbucket.org/# Tortoise SVN (for OD medias)
# GIT Gui (for OD sources)
# MinGW (I used the actual version 4.8.1)
#
http://sourceforge.net/projects/mingw/files/Installer/# Make sure to include the C++ compiler
# You should check the "MSYS Basic System"
# For CMake, I recommand to Check the "Advanced" and "Grouped" checkboxes
# DirectX SDK (needed to compile Ogre)
#
http://www.microsoft.com/en-us/download ... px?id=6812# In this howto, we will create environment variables. To do it, right clic "My computer" then properties, clic "advanced", then "environment variables". There, you can add the needed variables.
# In this howto, I will create a path C:\devMinGW where I will compile everything. If you use something else, you need to replace it.
# Open a dos command (clic start -> Execute, write "cmd" and press enter)
mkdir C:\devMinGW
## Boost
# I downloaded the actual version 1.55
#
http://www.boost.org/users/download/# unzip it in c:/devMinGW
cd boost_1_55_0
bootstrap.bat gcc
b2 --build-dir=C:\devMinGW\boost_1_55_0\build toolset=gcc --build-type=complete stage
# Compiling Boost takes more that 1 hour so be patient
# To help CMake find easily boost, create an environment variable
# BOOST_ROOT=c:/devMinGW/boost_1_55_0
## Ogre deps
# go to
#
https://bitbucket.org/cabalistic/ogredeps# Clic the download button on the right
# Once it is downloaded, unzip it in C:\devMinGW\ogredeps
# Open CMake GUI and change (first, we compile in release mode)
Where the source code is = C:/devMinGW/ogredeps
Where the source code is = C:/devMinGW/ogredeps/build/rel
Click Configure and choose MinGW Makefile
CMAKE_BUILD_TYPE = Release
CMAKE_INSTALL_PREFIX = C:/devMinGW/ogredeps/build/inst
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/ogredeps/build/rel
mingw32-make install
# Then, we compile in Debug mode
Where the source code is = C:/devMinGW/ogredeps
Where the source code is = C:/devMinGW/ogredeps/build/dbg
Click Configure and choose MinGW Makefile
CMAKE_BUILD_TYPE = Debug
CMAKE_INSTALL_PREFIX = C:/devMinGW/ogredeps/build/inst
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/ogredeps/build/dbg
mingw32-make install
## Ogre :
# Open tortoise hg and clic on File->clone a repository
Source :
https://bitbucket.org/sinbad/ogre/ -u v1-9
Destination : C:/devMinGW/ogre
# Then, clic clone button
# Once ogre sources have been downloaded, open CMake GUI and change (first, we compile in release mode)
Where the source code is = C:/devMinGW/ogre
Where the source code is = C:/devMinGW/ogre/build/rel
Click Configure and choose MinGW Makefile
CMAKE_BUILD_TYPE = Release
CMAKE_INSTALL_PREFIX = C:/devMinGW/ogre/build/sdk
OGRE_DEPENDENCIES_DIR = C:/devMinGW/ogredeps/build/inst
uncheck OGRE_BUILD_RENDERSYSTEM_D3D11 (there are header problems with MinGW)
uncheck OGRE_BUILD_RENDERSYSTEM_D3D9
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/ogre/build/rel
mingw32-make install
# Then, we compile in Debug mode
Where the source code is = C:/devMinGW/ogre
Where the source code is = C:/devMinGW/ogre/build/dbg
Click Configure and choose MinGW Makefile
CMAKE_BUILD_TYPE = Debug
CMAKE_INSTALL_PREFIX = C:/devMinGW/ogre/build/sdk
OGRE_DEPENDENCIES_DIR = C:/devMinGW/ogredeps/build/inst
uncheck OGRE_BUILD_RENDERSYSTEM_D3D11 (there are header problems with MinGW)
uncheck OGRE_BUILD_RENDERSYSTEM_D3D9
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/ogre/build/dbg
mingw32-make install
# To help CMake find easily ogre, create an environment variable
# OGRE_SDK=C:/devMinGW/ogre/build/sdk
## CEGUI deps
# go to
#
http://cegui.org.uk/download# Download cegui-deps-0.8.x-src.zip
# Unzip it in C:/devMinGW/cegui-deps-0.8.x-src
# The sources doesn't compile with MinGW as I write this howto. To fix it, open pngwin.def
C:/devMinGW/cegui-deps-0.8.x-src/src/libpng-1.4.7/scripts/pngwin.def
=> FIX : remove line 3 which contains
LIBRARY
# There is another similar problem with libexpat.def
C:/devMinGW/cegui-deps-0.8.x-src/src/expat-2.0.1/lib/libexpat.def
=> FIX : remove line 3
LIBRARY
# Then, you can open CMake gui and change (first, we compile in release mode)
Where the source code is = C:/devMinGW/cegui-deps-0.8.x-src
Where the source code is = C:/devMinGW/cegui-deps-0.8.x-src/build/rel
Click Configure and choose MinGW Makefile
CMAKE_BUILD_TYPE = Release
CMAKE_INSTALL_PREFIX = C:/devMinGW/cegui-deps-0.8.x-src/build/inst
uncheck CEGUI_BUILD_EFFECTS11 (DirectX11)
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/ogre/build/rel
mingw32-make
# Then, we compile in Debug mode
Where the source code is = C:/devMinGW/cegui-deps-0.8.x-src
Where the source code is = C:/devMinGW/cegui-deps-0.8.x-src/build/dbg
Click Configure and choose MinGW Makefile
CMAKE_BUILD_TYPE = Debug
CMAKE_INSTALL_PREFIX = C:/devMinGW/cegui-deps-0.8.x-src/build/inst
uncheck CEGUI_BUILD_EFFECTS11 (DirectX11)
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/ogre/build/dbg
mingw32-make
# Unfortunately, make install doesnt exists with CEGUI deps. Then, you have to copy manually the dependencies (and merge debug and release) :
# copy C:\devMinGW\cegui-deps-0.8.x-src\build\rel\dependencies -> C:\devMinGW\cegui-deps-0.8.x-src\build\dependencies
# copy C:\devMinGW\cegui-deps-0.8.x-src\build\dbg\dependencies -> C:\devMinGW\cegui-deps-0.8.x-src\build\dependencies
## CEGUI
# go to
#
http://cegui.org.uk/download# Download CEGUI 0.8.3 (zip or tgz as you prefer)
# Unzip it in C:/devMinGW/cegui-0.8.3
# The sources doesn't compile with MinGW as I write this howto. To fix it, open CMakeLists.txt
C:\devMinGW\cegui-0.8.3\cegui\src\CMakeLists.txt
# First Problem (Windows Specific): ld.exe cannot find -lDbgHelp
# Fix: Open file CMakeLists.txt in cegui-0.8.2/cegui/src/ and on line(78) change:
# cegui_target_link_libraries(${CEGUI_TARGET_NAME} winmm debug DbgHelp)
# To:
# cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CMAKE_DL_LIBS})
# Second Problem (Windows Specific): undefined reference to 'timeGetTime'
# Fix: Edit file C:\devMinGW\cegui-0.8.3\cegui\src\SimpleTimer.cpp by changing:
# line 30 : #if defined(__WIN32__) || defined(_WIN32)
# TO :
# #if (defined(__WIN32__) || defined(_WIN32)) && (not defined __MINGW32__)
# and line 37 :
# #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__HAIKU__) || defined(__CYGWIN__)
# TO:
# #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__HAIKU__) || defined(__CYGWIN__) || defined(__MINGW32__)
#
# Then, you can open CMake gui and change (first, we compile in release mode)
Where the source code is = C:/devMinGW/cegui-0.8.3
Where the source code is = C:/devMinGW/cegui-0.8.3/build/rel
Click Configure and choose MinGW Makefile
CMAKE_BUILD_TYPE = Release
CMAKE_INSTALL_PREFIX = C:/devMinGW/cegui-0.8.3/build/inst
CMAKE_PREFIX_PATH = C:/devMinGW/cegui-deps-0.8.x-src/build/dependencies
uncheck CEGUI_BUILD_PYTHON_MODULES
uncheck CEGUI_BUILD_RENDERER_DIRECT3D11
uncheck CEGUI_BUILD_RENDERER_DIRECT3D10
uncheck CEGUI_BUILD_RENDERER_DIRECT3D9
uncheck CEGUI_SAMPLES_USE_DIRECT3D10
uncheck CEGUI_SAMPLES_USE_DIRECT3D11
uncheck CEGUI_SAMPLES_USE_DIRECT3D10
uncheck CEGUI_SAMPLES_USE_DIRECT3D9
uncheck CEGUI_SAMPLES_ENABLED
check CEGUI_BUILD_RENDERER_OPENGL
check CEGUI_BUILD_XMLPARSER_EXPAT
check CEGUI_HAS_FREETYPE
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/ogre/build/dbg
mingw32-make install
# Then, we compile in Debug mode
Where the source code is = C:/devMinGW/cegui-0.8.3
Where the source code is = C:/devMinGW/cegui-0.8.3/build/dbg
Click Configure and choose MinGW Makefile
CMAKE_BUILD_TYPE = Debug
CMAKE_INSTALL_PREFIX = C:/devMinGW/cegui-0.8.3/build/inst
CMAKE_PREFIX_PATH = C:/devMinGW/cegui-deps-0.8.x-src/build/dependencies
uncheck CEGUI_BUILD_PYTHON_MODULES
uncheck CEGUI_BUILD_RENDERER_DIRECT3D11
uncheck CEGUI_BUILD_RENDERER_DIRECT3D10
uncheck CEGUI_BUILD_RENDERER_DIRECT3D9
uncheck CEGUI_SAMPLES_USE_DIRECT3D10
uncheck CEGUI_SAMPLES_USE_DIRECT3D11
uncheck CEGUI_SAMPLES_USE_DIRECT3D10
uncheck CEGUI_SAMPLES_USE_DIRECT3D9
uncheck CEGUI_SAMPLES_ENABLED
check CEGUI_BUILD_RENDERER_OPENGL
check CEGUI_BUILD_XMLPARSER_EXPAT
check CEGUI_HAS_FREETYPE
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/ogre/build/dbg
mingw32-make install
# To help CMake find easily cegui, create an environment variable
# CEGUIDIR=C:/devMinGW/cegui-0.8.3/build/inst
## SFML
# Open CMake gui and change (first, we compile in release mode)
Where the source code is = C:/devMinGW/SFML-2.1
Where the source code is = C:/devMinGW/SFML-2.1/build/rel
Click Configure and choose MinGW Makefile
CMAKE_BUILD_TYPE = Release
CMAKE_INSTALL_PREFIX = C:/devMinGW/SFML-2.1/build/inst
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/SFML-2.1/build/rel
mingw32-make install
# Then, we compile in Debug mode
Where the source code is = C:/devMinGW/SFML-2.1
Where the source code is = C:/devMinGW/SFML-2.1/build/dbg
Click Configure and choose MinGW Makefile
CMAKE_BUILD_TYPE = Debug
CMAKE_INSTALL_PREFIX = C:/devMinGW/SFML-2.1/build/inst
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/SFML-2.1/build/dbg
mingw32-make install
# To help CMake find easily SFML, create an environment variable
# SFML_ROOT=C:/devMinGW/SFML-2.1/build/inst
## OpenAl
# Open CMake gui and change (first, we compile in release mode)
Where the source code is = C:/devMinGW/openal-soft-1.15.1
Where the source code is = C:/devMinGW/openal-soft-1.15.1/build/rel
Click Configure and choose MinGW Makefile
CMAKE_BUILD_TYPE = Release
CMAKE_INSTALL_PREFIX = C:/devMinGW/openal-soft-1.15.1/build/inst
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/openal-soft-1.15.1/build/rel
mingw32-make install
# Then, we compile in Debug mode
Where the source code is = C:/devMinGW/openal-soft-1.15.1
Where the source code is = C:/devMinGW/openal-soft-1.15.1/build/dbg
Click Configure and choose MinGW Makefile
CMAKE_BUILD_TYPE = Debug
CMAKE_INSTALL_PREFIX = C:/devMinGW/openal-soft-1.15.1/build/inst
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/openal-soft-1.15.1/build/dbg
mingw32-make install
# To help CMake find easily OpenAl, create an environment variable
# OPENALDIR=C:/devMinGW/openal-soft-1.15.1/build/inst
## OpenDungeon sources
# Open your browser and go to c:/
# Right clic devMinGW and choose "git bash" (you have to enable browser integration when you install git gui)
# Download OD sources by entering
git clone -b development
git://git.code.sf.net/p/opendungeons/git od-src
# Once OD sources are downloaded, if you want to play, you need the medias. Go to c:/ again
# Right clic MinGW and choose Checkout SVN
# In URL of repository, enter
svn://svn.code.sf.net/p/opendungeons/svn/# In Checkout directory, enter
C:/devMinGW/od-media
# Once medias are downloaded, you can open CMake gui and change
Where the source code is = C:/devMinGW/od-src
Where the source code is = C:/devMinGW/od-bin
Click Configure and choose MinGW Makefile (if you set all the environment variables as said, everything should be found and no error should occur)
# There, you can change from release or debug as you wish
CMAKE_BUILD_TYPE = Release
CMAKE_CXX_FLAGS = -std=gnu++11
Click Configure then generate
# In the dos prompt
cd C:/devMinGW/openal-soft-1.15.1/build/dbg
mingw32-make
# copy C:/devMinGW/od-media/media/* => C:/devMinGW/od-bin
# edit plugins.cfg and plugins_d.cfg
# => PluginFolder=plugins
# TO PluginFolder=
# Then, last, we need to help OD to find all the required libraries. The simplest way to do that is to create an environment variable named PATH and to set all the dlls we built.If you have used c:/devMinGW as I did, you can set
# PATH=C:\devMinGW\boost_1_55_0\stage\lib;C:\devMinGW\ogre\build\sdk\bin\debug;C:\devMinGW\ogre\build\sdk\bin\release;C:\devMinGW\cegui-0.8.3\build\inst\bin;C:\devMinGW\SFML-2.1\build\inst\bin;C:\devMinGW\cegui-deps-0.8.x-src\build\dependencies\bin;C:\devMinGW\od-src\dependencies\pthreads\lib
# You can launch OpenDungeons.exe