Typical dev environment under windows

Re: Typical dev environment under windows

Postby hwoarangmy » 11 May 2014, 01:23

Bertram {l Wrote}:Np. It can happen. You don't have to open another one since I cherry-picked your commits. You may have noticed, but I asked Paul to try your commits as well (here on the forums) to make sure it doesn't break his build either,
and I'll merge your commits in the development branch once he's tried
Ok. I just changed what was needed for MSVS to accept to compile. I did no functional change to the code.

Bertram {l Wrote}:Is it something like this?
No, it is just a segfault with no error message displayed. I just get a message saying "GL Renderer Started"
then a seg fault. With gdb, I see it happens in RenderSystem_GL. But I haven't even tried the samples so I am not even sure that Ogre application works. Anyway, I am not planning on playing through the VM so it is enough to test if it compiles. It would be even better if I could run it but nvm.

BTW, I have tried the MinGW OD debug version and it is almost playable (laggy but not too much) :)
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Typical dev environment under windows

Postby paul424 » 11 May 2014, 12:06

Try workign with our culling algorithms and it won't be sloppy ....
User avatar
paul424
OD Moderator
 
Posts: 660
Joined: 24 Jan 2012, 13:54

Re: Typical dev environment under windows

Postby hwoarangmy » 11 May 2014, 17:51

paul424 {l Wrote}:Try workign with our culling algorithms and it won't be sloppy ....
Do you think it is why the game seems laggy in debug mode ?
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Typical dev environment under windows

Postby paul424 » 11 May 2014, 18:40

Not knowing your hardware specification plus whether you enabled at least Ogre's native Culling ( via plugin ) it is hard to guess what's causing the trouble ...
User avatar
paul424
OD Moderator
 
Posts: 660
Joined: 24 Jan 2012, 13:54

Re: Typical dev environment under windows

Postby Bertram » 12 May 2014, 09:31

No, it is just a segfault with no error message displayed. I just get a message saying "GL Renderer Started"
then a seg fault. With gdb, I see it happens in RenderSystem_GL. But I haven't even tried the samples so I am not even sure that Ogre application works. Anyway, I am not planning on playing through the VM so it is enough to test if it compiles. It would be even better if I could run it but nvm.

As you said, a compile test is already fine, if you can also run it on windows. If there is a problem running it on linux, I'll handle it. :)

For Paul too, I'll add the travis file shortly (See travis CI) https://travis-ci.org/ so we have automated Ubuntu based compilation runs.
I'll keep you informed.

Regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Typical dev environment under windows

Postby hwoarangmy » 12 May 2014, 22:49

Bertram {l Wrote}:
As you said, a compile test is already fine, if you can also run it on windows. If there is a problem running it on linux, I'll handle it. :)
I have tried on another VM and I could compile and run OD. I don't know what the problem is with mine but nvm.
Concerning the howtos, I need to get the sources from the official repository and then, I will post it in this thread.
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Typical dev environment under windows

Postby paul424 » 12 May 2014, 22:51

Hmm https://travis-ci.org/ seems to have a lot of potential, for example : it offers automate tests . What kind of test we could put there ?
User avatar
paul424
OD Moderator
 
Posts: 660
Joined: 24 Jan 2012, 13:54

Re: Typical dev environment under windows

Postby Bertram » 12 May 2014, 23:40

Don't really know but I do think the limits are very high. You can even pre-install own made packages in the build bootstrap.

Here is an example of build for Valyria Tear:
https://travis-ci.org/Bertram25/Valyria ... s/25017928
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Typical dev environment under windows

Postby hwoarangmy » 13 May 2014, 23:42

I have finished compilation from official sources (development branch) and medias with MinGW32. I am pleased to say that it works much better as I had seen during my first attempts. I saw no crash, the game is fluid. I didn't play that much but I made some rooms and mined some gold. I only saw glitches on the yellow ball that helps breaking walls (i don't know what it is).

I have pushed some minor changes in my repository and I need to check that there are no compilation problems with Linux/MSVS. If no problem, I will post the howtos.

But concerning MinGW32, I cannot compile with CXX_FLAGS=-std=c++11. I have to use -std=gnu++11 instead or it fails :
{l Code}: {l Select All Code}
In file included from c:\mingw\include\unistd.h:36:0,
                 from C:/devMinGW/ogre/build/sdk/include/OGRE/OgreStdHeaders.h:99,
                 from C:/devMinGW/ogre/build/sdk/include/OGRE/OgrePrerequisites.h:328,
                 from C:/devMinGW/ogre/build/sdk/include/OGRE/OgreSingleton.h:41,
                 from C:/devMinGW/git-OD/source/ResourceManager.h:13,
                 from C:\devMinGW\git-OD\dependencies\tinygettext\dictionary_manager.cpp:19:
c:\mingw\include\io.h:301:14: error: 'off64_t' does not name a type
 __CRT_INLINE off64_t lseek64 (int, off64_t, int);
              ^
c:\mingw\include\io.h:302:14: error: 'off64_t' does not name a type
 __CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) {
              ^
In file included from C:/devMinGW/ogre/build/sdk/include/OGRE/OgreStdHeaders.h:99:0,
                 from C:/devMinGW/ogre/build/sdk/include/OGRE/OgrePrerequisites.h:328,
                 from C:/devMinGW/ogre/build/sdk/include/OGRE/OgreSingleton.h:41,
                 from C:/devMinGW/git-OD/source/ResourceManager.h:13,
                 from C:\devMinGW\git-OD\dependencies\tinygettext\dictionary_manager.cpp:19:
c:\mingw\include\unistd.h:65:20: error: 'off_t' has not been declared
 int ftruncate(int, off_t);
                    ^
c:\mingw\include\unistd.h:67:38: error: 'off_t' has not been declared
 __CRT_INLINE int ftruncate(int __fd, off_t __length)
                                      ^
mingw32-make[2]: *** [CMakeFiles/OpenDungeons.dir/dependencies/tinygettext/dictionary_manager.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles/OpenDungeons.dir/all] Error 2
mingw32-make: *** [all] Error 2
I took no time to investigate since it works with -std=gnu++11 flag. Is it a problem ?
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Typical dev environment under windows

Postby Bertram » 14 May 2014, 08:24

Hi!

From what I understood, gnu++11 is activating gnu extension while c++11 restrict to only c++ new standard, as described here:
http://stackoverflow.com/questions/1061 ... -std-gnu11
http://gcc.gnu.org/onlinedocs/gcc-4.9.0 ... ct-Options

In any case, I do believe it's not your fault. Let's simply activate the right standard flag depending on the case and write it down somewhere not to forget about it.

Thanks for all the work done! :)
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Typical dev environment under windows

Postby hwoarangmy » 14 May 2014, 21:17

Hi,

I have tested the last modifications I made on my repository. It compiles and runs with Linux (in my Ubuntu 14.4 VM), MSVS and MinGW.
So far, I have not found a pretty way to activate the c++11 flag. I have seen in CMakeList.txt that it is already set (at least, tried) :
{l Code}: {l Select All Code}
if (CMAKE_COMPILER_IS_GNUCXX)
  set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wunused -Wno-deprecated -fno-strict-aliasing" CACHE STRING "compile flags" FORCE)
  list( APPEND CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS}   -g -O2")
  set ( CMAKE_CXX_FLAGS_RELEASE  "${CMAKE_CXX_FLAGS}   -O3 " )
endif ()
But if we believe in the result we see, it seems like Linux gcc/MinGW are not GNUCXX compilers :)

By the way, concerning VirtualBox, I could make OD work. It seems like the crash was due to the cause that I activated the 3D hardware module. But when I do so, OpenGL renderer crashes. If I don't do it, the game is very laggy (as we can imagine without hardware 3D) but it works.

I'm gonna check if there is a way to activate c++11 that works in any case...
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Typical dev environment under windows

Postby Bertram » 15 May 2014, 08:43

Hi :)

But if we believe in the result we see, it seems like Linux gcc/MinGW are not GNUCXX compilers :)

According to what I read in the cmake doc (I'll need to find those links back), variables such as CMAKE_COMPILER_IS_GNUCXX
are initialized when the parser reaches the PROJECT() statement, or at least it's the behaviour I witnessed on my system.

Thus, if you move the project(OpenDungeons) statement at the beginning of the file, it will set up the given flags correctly.

So, why didn't we apply this change on development?
Because it broke certain build configurations such as Paul's. In any way, I do believe we should apply this change sooner or later,
but I don't want to put unnecessary pressure on Paul's shoulder and force him to adapt his system for something not that urgent.

But maybe Paul can prove me wrong?

I hope this will help you.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Typical dev environment under windows

Postby hwoarangmy » 15 May 2014, 21:04

Bertram {l Wrote}:Because it broke certain build configurations
Ok. then I'm done with the Makefile modifications :)
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Typical dev environment under windows

Postby paul424 » 15 May 2014, 21:12

Since some commit I get
-- Found OGRE_Overlay: optimized;/usr/lib64/libOgreOverlay.so;debug;/usr/lib64/libOgreOverlay.so

which works fine ... both Bertram and origin branches . ...

As to your placement alg : it's fine , though I don't see creatures engaging into fight with the phantoms anymore ....
User avatar
paul424
OD Moderator
 
Posts: 660
Joined: 24 Jan 2012, 13:54

Re: Typical dev environment under windows

Postby Danimal » 15 May 2014, 22:38

Paul, i convinced Bertram to change all weapons range (except mage) to 1, maybe thats what you mean
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

Re: Typical dev environment under windows

Postby Bertram » 15 May 2014, 22:47

Hi guys, :)

Ok. then I'm done with the Makefile modifications :)

Thanks for the help. :)

which works fine ... both Bertram and origin branches . ...

Glad to hear it's working fine. :)

As to your placement alg : it's fine , though I don't see creatures engaging into fight with the phantoms anymore ....

Paul, i convinced Bertram to change all weapons range (except mage) to 1, maybe thats what you mean

Yes, I do think Danimal is right here. I saw some creatures engage but it has become rarer, indeed.
Might need to set it back to something like 2 or 3. I'll try this week-end.

Regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Typical dev environment under windows

Postby Bertram » 15 May 2014, 23:14

Ok, I pushed latest hwoarangmy's patch regarding CMake to permit MingW compilation, and added mine about removing the leftovers of threading, and the start of room file cleanups. :)

To me: Next is the implementation of room spots and objects as specified by Danimal.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Typical dev environment under windows

Postby hwoarangmy » 15 May 2014, 23:15

Linux howto install - Ubuntu 14.04

# First of all, we need some tools to build Open Dungeons. We will also need them to build CEGUI (version 0.8.3 is not available with Ubuntu as a library).
sudo apt-get install g++
sudo apt-get install cmake
sudo apt-get install git
sudo apt-get install subversion

# In this howto, we will not compile the needed libraries. We will install the packages available. If you prefer, you can build them yourself every library.

## OIS
sudo apt-get install libois-dev

## OGRE
sudo apt-get install libogre-1.9-dev

## libexpat (for cegui xml parser)
sudo apt-get install libexpat-dev

## libfreetype
sudo apt-get install libfreetype6-dev

# CEGUI 0.8.3 is not available. We need to download it and compile it : http://cegui.org.uk/download
# First, download CEGUI dependencies and CEGUI sources. The current version is 0.8.3
# untar it in /usr/local
cd /usr/local
sudo tar xvzf /home/user/cegui-8.3.0.tar.gz
cd cegui-8.3.0
sudo cmake .

# Check that CEGUI_HAS_FREETYPE is set :
grep CEGUI_HAS_FREETYPE CMakeCache.txt
# In my case, it is not (like the other freetype files). So, let's set them manually.
sudo cmake -DCEGUI_HAS_FREETYPE=ON -DFREETYPE_H_PATH_ft2build=/usr/include/freetype2/ -DFREETYPE_H_PATH_ftconfig=/usr/include/freetype2/ -DFREETYPE_LIB=/usr/lib/i386-linux-gnu/libfreetype.so .

sudo make
sudo make install
# If you want CMake to find CEGUI, you need to set CEGUIDIR to the path where you installed CEGUI. In my case :
export CEGUIDIR=/usr/local/cegui-8.3.0

## SFML
sudo apt-get install libsfml-dev

## OpenAl
sudo apt-get install libopenal-dev

## OD
# Now, we have all the needed libraries.
cd
mkdir dev
cd dev
# we get the sources
git clone -b development git://git.code.sf.net/p/opendungeons/git src-od
# and, if we want a playable version, the medias
svn checkout svn://svn.code.sf.net/p/opendungeons/svn/ media-od
cd src-od

# If you had set CEGUIDIR, CMake should find what it needs alone
cmake -DCMAKE_CXX_FLAGS=-std=gnu++11 .

# If you didn't set CEGUIDIR, you can force CMake
cmake -DCEGUI_LIBRARY_REL=/usr/local/cegui-0.8.3/lib/libCEGUIBase-0.so -DCEGUI_OGRE_LIBRARY_REL=/usr/local/cegui-0.8.3/lib/libCEGUIOgreRenderer-0.so -DCEGUI_INCLUDE_DIR=/usr/local/cegui-0.8.3/cegui/include/ -DCMAKE_CXX_FLAGS=-std=gnu++11 .

# Now, lets compile the game:
make

# We need to set the path to OpenGl renderer (RenderSystem_GL.so). In my case, is is /usr/lib/i386-linux-gnu/OGRE-1.9.0
# Edit plugins.cfg et plugins_d.cfg. Line 4 => PluginFolder=/usr/lib/i386-linux-gnu/OGRE-1.9.0

# Now that the game is compiled, we need to add the medias. Let's add some links
ln -s ../media-od/media/* .

# That's it, you can play :
./OpenDungeons.bin
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Typical dev environment under windows

Postby Bertram » 16 May 2014, 09:15

Heya :)

I added the instructions there:
http://opendungeons.sourceforge.net/wik ... _on_ubuntu

And linked them from the build from source page.

Thanks a lot!!
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Typical dev environment under windows

Postby hwoarangmy » 16 May 2014, 22:44

#############################################
## 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
Last edited by hwoarangmy on 18 May 2014, 07:59, edited 1 time in total.
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Typical dev environment under windows

Postby hwoarangmy » 18 May 2014, 07:54

#############################################
## Microsoft Visual Studio

# 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 :
# Visual Studio 2012
# http://www.microsoft.com/en-us/download ... x?id=34673
# 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)
# 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:\devMSVS where I will compile everything. If you use something else, you need to replace it.
# Open a browser and create C:\devMSVS

## Boost
# I downloaded the actual version 1.55
# http://www.boost.org/users/download/
# unzip it in c:/devMSVS
# Open Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools
# => VS2012 x86 Native Tool Command Prompt
cd c:\devMSVS\boost_1_55_0
bootstrap.bat
b2 --build-dir=c:\devMSVS\boost_1_55_0\build --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:/devMSVS/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:\devMSVS\ogredeps
# Open CMake GUI and change
Where the source code is = C:/devMSVS/ogredeps
Where the source code is = C:/devMSVS/ogredeps/build
Click Configure and choose Visual Studio 11
CMAKE_INSTALL_PREFIX = C:/devMSVS/ogredeps/build/inst
Click Configure then generate
# Go to C:/devMSVS/ogredeps/build and open the .sln file with Visual Studio
# Choose Release in the combo. Right clic INSTALL project and select "Generate"
# Choose Debug in the combo. Right clic INSTALL project and select "Generate"

## Ogre :
# Open tortoise hg and clic on File->clone a repository
Source : https://bitbucket.org/sinbad/ogre/ -u v1-9
Destination : C:/devMSVS/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:/devMSVS/ogre
Where the source code is = C:/devMSVS/ogre/build
Click Configure and choose Visual Studio 11
CMAKE_INSTALL_PREFIX = C:/devMSVS/ogre/build/sdk
OGRE_DEPENDENCIES_DIR = C:/devMSVS/ogredeps/build/inst
uncheck OGRE_BUILD_RENDERSYSTEM_D3D11
uncheck OGRE_BUILD_RENDERSYSTEM_D3D9
Click Configure then generate
# Go to C:/devMSVS/ogre/build and open the .sln file with Visual Studio
# Choose Release in the combo. Right clic INSTALL project and select "Generate"
# Choose Debug in the combo. Right clic INSTALL project and select "Generate"
# To help CMake find easily ogre, create an environment variable
# OGRE_SDK=C:/devMSVS/ogre/build/sdk

## CEGUI deps
# go to
# http://cegui.org.uk/download
# Download cegui-deps-0.8.x-src.zip
# Unzip it in C:/devMSVS/cegui-deps-0.8.x-src
# Then, you can open CMake gui and change
Where the source code is = C:/devMSVS/cegui-deps-0.8.x-src
Where the source code is = C:/devMSVS/cegui-deps-0.8.x-src/build
Click Configure and choose Visual Studio 11
CMAKE_INSTALL_PREFIX = C:/devMSVS/cegui-deps-0.8.x-src/build/inst
uncheck CEGUI_BUILD_EFFECTS11 (DirectX11)
Click Configure then generate
# Go to C:/devMSVS/cegui-deps-0.8.x-src/build and open the .sln file with Visual Studio
# Choose Release in the combo. Right clic ALL_BUILD project and select "Generate"
# Choose Debug in the combo. Right clic ALL_BUILD project and select "Generate"
# Unfortunately, install project doesnt exists with CEGUI deps. They will be in C:\devMSVS\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:/devMSVS/cegui-0.8.3
# Then, you can open CMake gui and change
Where the source code is = C:/devMSVS/cegui-0.8.3
Where the source code is = C:/devMSVS/cegui-0.8.3/build
Click Configure and choose Visual Studio 11
CMAKE_INSTALL_PREFIX = C:/devMSVS/cegui-0.8.3/build/inst
CMAKE_PREFIX_PATH = C:/devMSVS/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
# Go to C:/devMSVS/cegui-0.8.3/build and open the .sln file with Visual Studio
# Choose Release in the combo. Right clic INSTALL project and select "Generate"
# Choose Debug in the combo. Right clic INSTALL project and select "Generate"
# To help CMake find easily cegui, create an environment variable
# CEGUIDIR=C:/devMSVS/cegui-0.8.3/build/inst

## SFML
# Open CMake gui and change (first, we compile in release mode)
Where the source code is = C:/devMSVS/SFML-2.1
Where the source code is = C:/devMSVS/SFML-2.1/build
Click Configure and choose Visual Studio 11
CMAKE_INSTALL_PREFIX = C:/devMSVS/SFML-2.1/build/inst
Click Configure then generate
# Go to C:/devMSVS/SFML-2.1/build and open the .sln file with Visual Studio
# Choose Release in the combo. Right clic INSTALL project and select "Generate"
# Choose Debug in the combo. Right clic INSTALL project and select "Generate"
# To help CMake find easily SFML, create an environment variable
# SFML_ROOT=C:/devMSVS/SFML-2.1/build/inst


## OpenAl
# Open CMake gui and change (first, we compile in release mode)
Where the source code is = C:/devMSVS/openal-soft-1.15.1
Where the source code is = C:/devMSVS/openal-soft-1.15.1/build
Click Configure and choose Visual Studio 11
CMAKE_INSTALL_PREFIX = C:/devMSVS/openal-soft-1.15.1/build/inst
Click Configure then generate
# Go to C:/devMSVS/openal-soft-1.15.1/build and open the .sln file with Visual Studio
# Choose Release in the combo. Right clic INSTALL project and select "Generate"
# Choose Debug in the combo. Right clic INSTALL project and select "Generate"
# To help CMake find easily OpenAl, create an environment variable
# OPENALDIR=C:/devMSVS/openal-soft-1.15.1/build/inst



## OpenDungeon sources
# Open your browser and go to c:/
# Right clic devMSVS 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:/devMSVS/od-media
# Once medias are downloaded, you can open CMake gui and change
Where the source code is = C:/devMSVS/od-src
Where the source code is = C:/devMSVS/od-bin
Click Configure and choose Visual Studio 11 (if you set all the environment variables as said, everything should be found and no error should occur)
Click Configure then generate
# Go to C:/devMSVS/od-bin and open the .sln file with Visual Studio
# Choose Release in the combo. Right clic OpenDungeons project and select "Generate"
# copy C:/devMSVS/od-media/media/* => C:/devMSVS/od-bin
# edit plugins.cfg and plugins_d.cfg
# => PluginFolder=plugins
# TO PluginFolder=
# => Plugin=RenderSystem_Direct3D9
# TO #Plugin=RenderSystem_Direct3D9

# 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:/devMSVS as I did, you can set
# PATH=C:\devMSVS\boost_1_55_0\stage\lib;C:\devMSVS\ogre\build\sdk\bin\debug;C:\devMSVS\ogre\build\sdk\bin\release;C:\devMSVS\cegui-0.8.3\build\inst\bin;C:\devMSVS\SFML-2.1\build\inst\bin;C:\devMSVS\cegui-deps-0.8.x-src\build\dependencies\bin;C:\devMSVS\od-src\dependencies\pthreads\lib

# OpenDungeons.exe sould be in C:/devMSVS/od-bin/Release if you compiled in Release mode or C:/devMSVS/od-bin/Debug if you compiled in Debug.
# You can lauch if from the IDE. But if you launch it from the browser, make sure to copy it to C:/devMSVS/od-bin
# You can play the game
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Typical dev environment under windows

Postby Bertram » 19 May 2014, 11:13

The newest how-to for MSVC has been added and formatted here:
http://opendungeons.sourceforge.net/wik ... _msvc_2012

Thanks a LOT for the work done on it!! :)

I'll add the MingW one shortly.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Typical dev environment under windows

Postby Bertram » 19 May 2014, 11:16

Hi again,

{l Code}: {l Select All Code}
# 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__)
#


Have you already reported this problem to CEGUI upstream?

Best regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Typical dev environment under windows

Postby hwoarangmy » 19 May 2014, 20:04

Bertram {l Wrote}:Have you already reported this problem to CEGUI upstream?
No because I don't like to report things that I have not tested on the other configurations. But I believe theses changes could be integrated as they are. If you want, feel free to tell them :)
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Typical dev environment under windows

Postby Bertram » 20 May 2014, 19:02

Ok, I'll do it. :)
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Who is online

Users browsing this forum: No registered users and 1 guest