======================================================================
Building Open Dungeons from source on Windows and making a msi-package
======================================================================
Before you can build the game and make a msi-package you need some additional software, follow these steps:
1) Download:
http://www.ogre3d.org/download/sdk/
* We will need the MinGW version
http://www.cegui.org.uk/wiki/index.php/Downloads
* We will again need the MinGW version
http://www.sfml-dev.org/download.php
* We will again need the MinGW version
2) Setup environment variables:
a) Make OGRE_HOME point to the base of the Ogre SDK,
b) likewise let SFMLDIR point to the base of the SFML SDK,
c) likewise let CEGUIDIR point to the base of the CEGUI SDK,
d) and finally let BOOST_ROOT point to the boost directory inside of the Ogre root dir, which contains the Boost libraries.
3) Install tools and setup more environtment variables:
Install MinGW: http://sourceforge.net/projects/mingw/f ... w-get-inst
* 1) Use the latest repository, 2) select C++ and MSYS Basic, during install.
* Add the bin dir of the MinGW install dir to the Windows Path.
* Also make MINGWDIR point to the install dir of MinGW.
Install WiX 3.5 or later: http://wix.sourceforge.net/index.html
* Add the bin folder of the WiX install to the Windows Path.
We need two files from Paraffine: http://www.wintellect.com/CS/blogs/jrob ... /4107.aspx
* Copy the files Paraffine.exe and Paraffine.pdb from http://www.wintellect.com/CS/files/fold ... nload.aspx into the bin folder of the Wix Installation.
Install GIT and SVN using these links:
SVN: http://www.sliksvn.com/en/download
GIT: http://git-scm.com/download
* Check that SVN and GIT is available in path
4) Install CMake using this link:
Cmake: http://www.cmake.org/cmake/resources/software.html
* Remember to check the option to add Cmake to the path.
5) Install 7zip and add the base install folder to the path.
6) Now run the ODBuild.bat script which will make a folder ODBuildWork where it will build the game and finally make these files:
Bitmaps
Game
License.rtf
OD-Logo.ico
OpenDungeons.msi
OpenDungeons.wixobj
OpenDungeons.wixpdb
OpenDungeons.wxs
OpenDungeonsFragment.wixobj
OpenDungeonsFragment.wxs
Where OpenDungeons.msi will be the finished msi-installer package and Game contains a working version of the game.
rd /s /q ODBuildWork
mkdir ODBuildWork
cd ODBuildWork
REM We use call as git does not return propper exit codes which makes the script exit prematurely :(
call git clone git://opendungeons.git.sourceforge.net/gitroot/opendungeons/opendungeons opendungeons
cd opendungeons
call git checkout -b development remotes/origin/development
cd ..
svn export https://opendungeons.svn.sourceforge.net/svnroot/opendungeons/media opendungeons\build
cd opendungeons
cd build
REM Removes the .git folders in build and all subfolders.
REM FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.git*') DO RMDIR /S /Q "%%G"
cmake -G "MinGW Makefiles" ..
mingw32-make
C:\Users\ckr\Desktop\OD\ODWinInstallWiX\ODBuildWork\opendungeons\build>cmake -G
"MinGW Makefiles" ..
-- CMake build type is not set, defaulting to 'Release'
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for OIS...
-- OIS_PREFIX_PATH changed.
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found OIS: optimized;C:/Users/ckr/Desktop/OD/SDK/OgreSDK_MinGW_v1-8-1/lib/rel
ease/libOIS.dll.a;debug;C:/Users/ckr/Desktop/OD/SDK/OgreSDK_MinGW_v1-8-1/lib/deb
ug/libOIS_d.dll.a
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found Ogre Byatis (1.8.1)
-- Found OGRE: optimized;C:/Users/ckr/Desktop/OD/SDK/OgreSDK_MinGW_v1-8-1/lib/re
lease/libOgreMain.dll.a;debug;C:/Users/ckr/Desktop/OD/SDK/OgreSDK_MinGW_v1-8-1/l
ib/debug/libOgreMain_d.dll.a
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;C:/Users/ckr/Desktop/OD/SDK/OgreSDK_MinGW_v1-8-1
/lib/release/libOgrePaging.dll.a;debug;C:/Users/ckr/Desktop/OD/SDK/OgreSDK_MinGW
_v1-8-1/lib/debug/libOgrePaging_d.dll.a
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;C:/Users/ckr/Desktop/OD/SDK/OgreSDK_MinGW_v1-8-
1/lib/release/libOgreTerrain.dll.a;debug;C:/Users/ckr/Desktop/OD/SDK/OgreSDK_Min
GW_v1-8-1/lib/debug/libOgreTerrain_d.dll.a
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;C:/Users/ckr/Desktop/OD/SDK/OgreSDK_MinGW_v1-8
-1/lib/release/libOgreProperty.dll.a;debug;C:/Users/ckr/Desktop/OD/SDK/OgreSDK_M
inGW_v1-8-1/lib/debug/libOgreProperty_d.dll.a
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;C:/Users/ckr/Desktop/OD/SDK/OgreSDK_MinG
W_v1-8-1/lib/release/libOgreRTShaderSystem.dll.a;debug;C:/Users/ckr/Desktop/OD/S
DK/OgreSDK_MinGW_v1-8-1/lib/debug/libOgreRTShaderSystem_d.dll.a
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- looking for headers
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPack
ageHandleStandardArgs.cmake:97 (message):
Could NOT find CEGUI (missing: CEGUI_LIBRARY CEGUIOGRE_LIBRARY)
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStan
dardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindCEGUI.cmake:68 (find_package_handle_standard_args)
CMakeLists.txt:207 (find_package)
-- Configuring incomplete, errors occurred!
C:\Users\ckr\Desktop\OD\ODWinInstallWiX\ODBuildWork\opendungeons\build>mingw32-m
ake
mingw32-make: *** No targets specified and no makefile found. Stop.
C:\Users\ckr\Desktop\OD\ODWinInstallWiX\ODBuildWork\opendungeons\build>
Bertram {l Wrote}:Hi
From what I understand and if I'm correct, pkgconfig is a module trying to read a pkgconfig file permitting to put a different installation prefix by the binary user:
http://en.wikipedia.org/wiki/Pkg-config
http://www.cmake.org/pipermail/cmake/20 ... 47581.html
Now, depending on how the project is using the CMAKE_INSTALL_PREFIX variable in the CMakeLists.txt files for windows and whether you're using a pkg-config file, the solution differs IMHO.
If the app is using the current folder to find its data on windows or is setting a custom install prefix for this os, then you don't need pkgconfig for windows and can add:
IF (NOT WIN32)
find_package(PkgConfig)
ENDIF()
so that this module is ignored, for instance.
As for the CEGUI SDK, I think you don't have any choice than building your own sdk first, indeed. :/
Best regards,
paul424 {l Wrote}:First of all, I use Ogre 1.8.1, CEGUI 0.7.9 and SFML 1.6, which versions do you use?
Here I work with Ogre 1.8.1, CEGUI 0.7.6 and SFML 1.6 , OpenSuse 12.2.
oln {l Wrote}:I don't think you have to worry about the pkg-config thing, as it's not supposed to be used on windows anyway.
svenskmand {l Wrote}:Thanks for the info Can you maybe add this to the cmake file in the repo? Thanks
svenskmand {l Wrote}:I will try and figure out if I can compile cegui from source then :S I will make a script for that also.
Why do you try to crosscompile at all ? You just choose additional obstacles for goal .
Users browsing this forum: No registered users and 1 guest