https://wiki.openmw.org/api.php?action=feedcontributions&user=Brotherbrick&feedformat=atomOpenMW Wiki - User contributions [en]2024-03-29T06:36:49ZUser contributionsMediaWiki 1.39.3https://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=1376Development Environment Setup2014-01-17T12:33:43Z<p>Brotherbrick: /* Packages */</p>
<hr />
<div>This page will describe how to set a dev env for several OSes.<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.libsdl.org/ SDL2] - input and windowing<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - GUI toolkit<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
** [http://connect.creativelabs.com/openal/default.aspx OpenAL] or [http://kcat.strangesoft.net/openal.html#download OpenAL soft] - for sound playback<br />
** [http://www.ffmpeg.org/ FFmpeg] For sound decoding and BINK video playback. Alternatively, you could use Audiere or mpg123 for sound decoding, but videos won't work then.<br />
<br />
* OpenMW additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010/2012/2013==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010/2012/2013 - normal or free (C++) express versions.<br />
* CMake: [http://www.cmake.org/cmake/resources/software.html CMake] at least v2.8, but grab the latest stable release.<br />
* Git - Our version control software: [http://code.google.com/p/msysgit/downloads/list Git] at least v1.8.x, but grab the latest stable release.<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.9 SDK for your Visual Studio version. Environment variable '''OGRE_HOME'''.<br />
* [http://sourceforge.net/projects/boost/files/boost-binaries/ Boost]: The lib shipped with OGRE are old and shouldn't be used. Replace those with Boost v1.50.0 (or later) binaries and headers. Headers go to "'''OGRE_ROOT'''\boost\boost" and libs go to "'''OGRE_ROOT'''\boost\lib" . Environment variable '''BOOST_ROOT'''. Download the installer for your Visual Studio version.<br />
* [http://www.bulletphysics.com/ Bullet] Download and build bullet, and make sure the libraries are put into the <install_path\lib\Release> folder, strip the ending off (like _vs2010) and set the environment variables '''BULLET_ROOT''' <install_path>, and '''BULLET_INCLUDE_DIR''' <install_path\src> folder.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable '''FREETYPE_DIR''' and '''MYGUI_DEPENDENCIES_DIR''' to the <install_path><br />
* [http://www.ogre3d.org/tikiwiki/MyGUI MyGUI]: Download and build following compilation instructions and set the '''MYGUI_HOME''' environment variable. In vs90 or vs100, set the mygui.ogreplatform properties->c/c++->general->additional includes to have 'c:\'''BOOST_ROOT'''\' as well.<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: Download OpenAL11CoreSDK and set the environment variable '''OPENALDIR'''.<br />
* [http://qt-project.org/downloads QT]. Download the latest Qt4 version for your Visual Studio version and install the environment variable '''QTDIR'''. Example: qt-win-opensource-4.8.4-vs2010.exe<br />
* [https://code.google.com/p/msinttypes/ msinttypes] Download and extract to your visual studio 'install_root\VC\include' directory and overwrite the files there. This will give you C99 compliant inttypes.<br />
* [http://ffmpeg.zeranoe.com/builds/ FFmpeg] Download and extract the dev and exe of ffmpeg. The latest builds don't work. A known working version is commit 1eabd71, available in the "previous versions" links on that page. The environment variable is '''FFMPEG_HOME'''.<br />
* [http://www.libsdl.org/download-2.0.php SDL2] Download and extract the SDL2 VS "Development Libraries". [http://www.libsdl.org/release/SDL2-devel-2.0.1-VC.zip SDL2-devel-2.0.1-VC.zip] Then set the SDL2_LIBRARY variable to the location of the SDL2.dll file.<br />
<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
==Installing Dependencies==<br />
<br />
===Arch===<br />
There is a development package available for OpenMW on the AUR.<br />
It can be found at [https://aur.archlinux.org/packages/openmw-git/].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo===<br />
<br />
'''Instructions broken - missing SDL2 and ffmpeg<br />
'''<br />
You have to emerge dev-games/ogre with useflags "boost freeimage opengl threads zip" and dev-games/mygui with useflag ogre. The mygui package might need to be unmasked, see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 Gentoo handbook] and is available in portage since 2012-11-01.<br />
<br />
===Ubuntu===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo add-apt-repository ppa:openmw/openmw<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libopenal-dev libpng-dev libogre-1.9-dev \<br />
libsdl2-dev libqt4-dev uuid-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-wave-dev libboost-chrono-dev libboost-program-options-dev \<br />
libboost-system-dev libav-tools libavcodec-dev libavformat-dev \<br />
libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev \<br />
libbullet-dev libmygui-dev libunshield-dev libtinyxml-dev cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories:<br />
<br />
'''Instructions broken - missing SDL2 and ffmpeg. libsndfile and libmpg123 can be removed'''.<br />
<syntaxhighlight lang="bash"><br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
</syntaxhighlight><br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<syntaxhighlight lang="bash"><br />
yum install libmpg123-devel<br />
</syntaxhighlight><br />
<br />
==Fetching the source==<br />
<br />
Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
</syntaxhighlight><br />
<br />
==Building==<br />
<br />
===With make===<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir build<br />
cd build<br />
cmake ../<br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Now we can start compiling. Normally you can just run<br />
<br />
<syntaxhighlight lang="bash"><br />
make<br />
</syntaxhighlight><br />
<br />
but if you have multiple cores, you can decrease your compile time by doing this:<br />
<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
===With codeblocks===<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir build<br />
cd build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
===With Kdevelop===<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=1375Development Environment Setup2014-01-17T12:32:44Z<p>Brotherbrick: /* Key requirements */ this is silly, do not post stuff without checking with the owners first</p>
<hr />
<div>This page will describe how to set a dev env for several OSes.<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.libsdl.org/ SDL2] - input and windowing<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - GUI toolkit<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
** [http://connect.creativelabs.com/openal/default.aspx OpenAL] or [http://kcat.strangesoft.net/openal.html#download OpenAL soft] - for sound playback<br />
** [http://www.ffmpeg.org/ FFmpeg] For sound decoding and BINK video playback. Alternatively, you could use Audiere or mpg123 for sound decoding, but videos won't work then.<br />
<br />
* OpenMW additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010/2012/2013==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010/2012/2013 - normal or free (C++) express versions.<br />
* CMake: [http://www.cmake.org/cmake/resources/software.html CMake] at least v2.8, but grab the latest stable release.<br />
* Git - Our version control software: [http://code.google.com/p/msysgit/downloads/list Git] at least v1.8.x, but grab the latest stable release.<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.9 SDK for your Visual Studio version. Environment variable '''OGRE_HOME'''.<br />
* [http://sourceforge.net/projects/boost/files/boost-binaries/ Boost]: The lib shipped with OGRE are old and shouldn't be used. Replace those with Boost v1.50.0 (or later) binaries and headers. Headers go to "'''OGRE_ROOT'''\boost\boost" and libs go to "'''OGRE_ROOT'''\boost\lib" . Environment variable '''BOOST_ROOT'''. Download the installer for your Visual Studio version.<br />
* [http://www.bulletphysics.com/ Bullet] Download and build bullet, and make sure the libraries are put into the <install_path\lib\Release> folder, strip the ending off (like _vs2010) and set the environment variables '''BULLET_ROOT''' <install_path>, and '''BULLET_INCLUDE_DIR''' <install_path\src> folder.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable '''FREETYPE_DIR''' and '''MYGUI_DEPENDENCIES_DIR''' to the <install_path><br />
* [http://www.ogre3d.org/tikiwiki/MyGUI MyGUI]: Download and build following compilation instructions and set the '''MYGUI_HOME''' environment variable. In vs90 or vs100, set the mygui.ogreplatform properties->c/c++->general->additional includes to have 'c:\'''BOOST_ROOT'''\' as well.<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: Download OpenAL11CoreSDK and set the environment variable '''OPENALDIR'''.<br />
* [http://qt-project.org/downloads QT]. Download the latest Qt4 version for your Visual Studio version and install the environment variable '''QTDIR'''. Example: qt-win-opensource-4.8.4-vs2010.exe<br />
* [https://code.google.com/p/msinttypes/ msinttypes] Download and extract to your visual studio 'install_root\VC\include' directory and overwrite the files there. This will give you C99 compliant inttypes.<br />
* [http://ffmpeg.zeranoe.com/builds/ FFmpeg] Download and extract the dev and exe of ffmpeg. The latest builds don't work. A known working version is commit 1eabd71, available in the "previous versions" links on that page. The environment variable is '''FFMPEG_HOME'''.<br />
* [http://www.libsdl.org/download-2.0.php SDL2] Download and extract the SDL2 VS "Development Libraries". [http://www.libsdl.org/release/SDL2-devel-2.0.1-VC.zip SDL2-devel-2.0.1-VC.zip] Then set the SDL2_LIBRARY variable to the location of the SDL2.dll file.<br />
<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
==Installing Dependencies==<br />
<br />
===Arch===<br />
There is a development package available for OpenMW on the AUR.<br />
It can be found at [https://aur.archlinux.org/packages/openmw-git/].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo===<br />
<br />
'''Instructions broken - missing SDL2 and ffmpeg<br />
'''<br />
You have to emerge dev-games/ogre with useflags "boost freeimage opengl threads zip" and dev-games/mygui with useflag ogre. The mygui package might need to be unmasked, see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 Gentoo handbook] and is available in portage since 2012-11-01.<br />
<br />
===Ubuntu===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo add-apt-repository ppa:openmw/openmw<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libopenal-dev libpng-dev libogre-1.8-dev \<br />
libsdl2-dev libqt4-dev uuid-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-wave-dev libboost-chrono-dev libboost-program-options-dev \<br />
libboost-system-dev libav-tools libavcodec-dev libavformat-dev \<br />
libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev \<br />
libbullet-dev libmygui-dev libunshield-dev libtinyxml-dev cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories:<br />
<br />
'''Instructions broken - missing SDL2 and ffmpeg. libsndfile and libmpg123 can be removed'''.<br />
<syntaxhighlight lang="bash"><br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
</syntaxhighlight><br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<syntaxhighlight lang="bash"><br />
yum install libmpg123-devel<br />
</syntaxhighlight><br />
<br />
==Fetching the source==<br />
<br />
Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
</syntaxhighlight><br />
<br />
==Building==<br />
<br />
===With make===<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir build<br />
cd build<br />
cmake ../<br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Now we can start compiling. Normally you can just run<br />
<br />
<syntaxhighlight lang="bash"><br />
make<br />
</syntaxhighlight><br />
<br />
but if you have multiple cores, you can decrease your compile time by doing this:<br />
<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
===With codeblocks===<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir build<br />
cd build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
===With Kdevelop===<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=1368Development Environment Setup2014-01-17T08:11:45Z<p>Brotherbrick: /* Libraries */ qt update</p>
<hr />
<div>This page will describe how to set a dev env for several OSes.<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.libsdl.org/ SDL2] - input and windowing<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - GUI toolkit<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
** [http://connect.creativelabs.com/openal/default.aspx OpenAL] or [http://kcat.strangesoft.net/openal.html#download OpenAL soft] - for sound playback<br />
** [http://www.ffmpeg.org/ FFmpeg] For sound decoding and BINK video playback. Alternatively, you could use Audiere or mpg123 for sound decoding, but videos won't work then.<br />
<br />
* OpenMW additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010/2012/2013==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010/2012/2013 - normal or free (C++) express versions.<br />
* CMake: [http://www.cmake.org/cmake/resources/software.html CMake] at least v2.8, but grab the latest stable release.<br />
* Git - Our version control software: [http://code.google.com/p/msysgit/downloads/list Git] at least v1.8.x, but grab the latest stable release.<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.9 SDK for your Visual Studio version. Environment variable '''OGRE_HOME'''.<br />
* [http://sourceforge.net/projects/boost/files/boost-binaries/ Boost]: The lib shipped with OGRE are old and shouldn't be used. Replace those with Boost v1.50.0 (or later) binaries and headers. Headers go to "'''OGRE_ROOT'''\boost\boost" and libs go to "'''OGRE_ROOT'''\boost\lib" . Environment variable '''BOOST_ROOT'''. Download the installer for your Visual Studio version.<br />
* [http://www.bulletphysics.com/ Bullet] Download and build bullet, and make sure the libraries are put into the <install_path\lib\Release> folder, strip the ending off (like _vs2010) and set the environment variables '''BULLET_ROOT''' <install_path>, and '''BULLET_INCLUDE_DIR''' <install_path\src> folder.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable '''FREETYPE_DIR''' and '''MYGUI_DEPENDENCIES_DIR''' to the <install_path><br />
* [http://www.ogre3d.org/tikiwiki/MyGUI MyGUI]: Download and build following compilation instructions and set the '''MYGUI_HOME''' environment variable. In vs90 or vs100, set the mygui.ogreplatform properties->c/c++->general->additional includes to have 'c:\'''BOOST_ROOT'''\' as well.<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: Download OpenAL11CoreSDK and set the environment variable '''OPENALDIR'''.<br />
* [http://qt-project.org/downloads QT]. Download the latest Qt4 version for your Visual Studio version and install the environment variable '''QTDIR'''. Example: qt-win-opensource-4.8.4-vs2010.exe<br />
* [https://code.google.com/p/msinttypes/ msinttypes] Download and extract to your visual studio 'install_root\VC\include' directory and overwrite the files there. This will give you C99 compliant inttypes.<br />
* [http://ffmpeg.zeranoe.com/builds/ FFmpeg] Download and extract the dev and exe of ffmpeg. The latest builds don't work. A known working version is commit 1eabd71, available in the "previous versions" links on that page. The environment variable is '''FFMPEG_HOME'''.<br />
* [http://www.libsdl.org/download-2.0.php SDL2] Download and extract the SDL2 VS "Development Libraries". [http://www.libsdl.org/release/SDL2-devel-2.0.1-VC.zip SDL2-devel-2.0.1-VC.zip] Then set the SDL2_LIBRARY variable to the location of the SDL2.dll file.<br />
<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
==Installing Dependencies==<br />
<br />
===Arch===<br />
There is a development package available for OpenMW on the AUR.<br />
It can be found at [https://aur.archlinux.org/packages/openmw-git/].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo===<br />
You have to emerge dev-games/ogre with useflags "boost freeimage opengl threads zip" and dev-games/mygui with useflag ogre. The mygui package might need to be unmasked, see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 Gentoo handbook] and is available in portage since 2012-11-01.<br />
TODO: You also need SDL2 and ffmpeg<br />
<br />
===Ubuntu===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo add-apt-repository ppa:openmw/build<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libopenal-dev libpng-dev libogre-1.8-dev \<br />
libsdl2-dev libqt4-dev uuid-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-wave-dev libboost-chrono-dev libboost-program-options-dev \<br />
libboost-system-dev libav-tools libavcodec-dev libavformat-dev \<br />
libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev \<br />
libbullet-dev libmygui-dev libunshield-dev libtinyxml-dev cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories:<br />
<br />
TODO: Add SDL2 and ffmpeg. Remove libsndfile and libmpg123.<br />
<syntaxhighlight lang="bash"><br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
</syntaxhighlight><br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<syntaxhighlight lang="bash"><br />
yum install libmpg123-devel<br />
</syntaxhighlight><br />
<br />
==Fetching the source==<br />
<br />
Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
</syntaxhighlight><br />
<br />
==Building==<br />
<br />
===With make===<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir build<br />
cd build<br />
cmake ../<br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Now we can start compiling. Normally you can just run<br />
<br />
<syntaxhighlight lang="bash"><br />
make<br />
</syntaxhighlight><br />
<br />
but if you have multiple cores, you can decrease your compile time by doing this:<br />
<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
===With codeblocks===<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir build<br />
cd build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
===With Kdevelop===<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=1201Development Environment Setup2013-11-13T12:29:12Z<p>Brotherbrick: /* Libraries */</p>
<hr />
<div>This page will describe how to set a dev env for several OSes.<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.libsdl.org/ SDL2] - input and windowing<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - GUI toolkit<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
** [http://connect.creativelabs.com/openal/default.aspx OpenAL] or [http://kcat.strangesoft.net/openal.html#download OpenAL soft] - for sound playback<br />
** [http://www.ffmpeg.org/ FFmpeg] For sound decoding and BINK video playback. Alternatively, you could use Audiere or mpg123 for sound decoding, but videos won't work then.<br />
<br />
* OpenMW additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* CMake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: [http://code.google.com/p/msysgit/downloads/list Git] v1.8.x<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.8 SDK for Visual Studio 2008 or 2010. Environment variable '''OGRE_HOME'''.<br />
* [http://sourceforge.net/projects/boost/files/boost-binaries/1.50.0/ Boost]: The lib shipped with OGRE are old and shouldn't be used. Replace those with Boost v1.50.0 binaries and headers. Headers go to "'''OGRE_ROOT'''\boost\boost" and libs go to "'''OGRE_ROOT'''\boost\lib" . Environment variable '''BOOST_ROOT'''. Download the headers and the binary mt and mt-gd for vc90 or vc100 files:<br />
**boost_1_50_headers.zip<br />
**chrono<br />
**date_time<br />
**filesystem<br />
**program_options<br />
**system<br />
**thread<br />
**wave<br />
* [http://www.bulletphysics.com/ Bullet 2.8.1] Download and build bullet, and make sure the libraries are put into the <install_path\lib\Release> folder, strip the ending off (like _vs2010) and set the environment variables '''BULLET_ROOT''' <install_path>, and '''BULLET_INCLUDE_DIR''' <install_path\src> folder.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable '''FREETYPE_DIR''' and '''MYGUI_DEPENDENCIES_DIR''' to the <install_path><br />
* [http://www.ogre3d.org/tikiwiki/MyGUI MyGUI]: Download and build following compilation instructions and set the '''MYGUI_HOME''' environment variable. In vs90 or vs100, set the mygui.ogreplatform properties->c/c++->general->additional includes to have 'c:\'''BOOST_ROOT'''\' as well.<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: Download OpenAL11CoreSDK and set the environment variable '''OPENALDIR'''.<br />
* [http://qt.nokia.com/downloads QT]. Download the vs90 or vs100 version and install the environment variable '''QTDIR'''. Example: qt-win-opensource-4.8.4-vs2010.exe<br />
* [https://code.google.com/p/msinttypes/ msinttypes] Download and extract to your vs90 or vs100 'install_root\VC\include' directory and overwrite the files there. This will give you C99 compliant inttypes.<br />
* [http://ffmpeg.zeranoe.com/builds/ FFmpeg] Download and extract the dev and exe of ffmpeg. The latest builds don't work. A known working version is commit 1eabd71, available in the "previous versions" links on that page. The environment variable is '''FFMPEG_HOME'''.<br />
* [http://www.libsdl.org/download-2.0.php SDL2] Download and extract the SDL2 VS "Development Libraries". [http://www.libsdl.org/release/SDL2-devel-2.0.1-VC.zip SDL2-devel-2.0.1-VC.zip] Then set the SDL2_LIBRARY variable to the location of the SDL2.dll file.<br />
<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
==Installing Dependencies==<br />
<br />
===Arch===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo===<br />
You have to emerge dev-games/ogre with useflags "boost freeimage opengl threads zip" and dev-games/mygui with useflag ogre. The mygui package might need to be unmasked, see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 Gentoo handbook] and is available in portage since 2012-11-01.<br />
TODO: You also need SDL2 <br />
<br />
===Ubuntu===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo add-apt-repository ppa:openmw/build<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libopenal-dev libpng-dev libogre-1.8-dev \<br />
libsdl2-dev libqt4-dev uuid-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-wave-dev libboost-chrono-dev libboost-program-options-dev \<br />
libboost-system-dev libav-tools libavcodec-dev libavformat-dev \<br />
libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev \<br />
libbullet-dev libmygui-dev libunshield-dev libtinyxml-dev cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories:<br />
<br />
TODO: Add SDL2<br />
<syntaxhighlight lang="bash"><br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
</syntaxhighlight><br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<syntaxhighlight lang="bash"><br />
yum install libmpg123-devel<br />
</syntaxhighlight><br />
<br />
==Fetching the source==<br />
<br />
Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
</syntaxhighlight><br />
<br />
==Building==<br />
<br />
===With make===<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir build<br />
cd build<br />
cmake ../<br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can decrease your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
===With codeblocks===<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir build<br />
cd build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
===With Kdevelop===<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
Create a data folder anywhere, then edit your openmw.cfg file to point to that folder.<br />
<br />
Then you have to copy the game data from your disc or installation into that data folder.<br />
The datafiles are inside data1.cab/data1.hdr and data2.cab on the disc.<br />
<br />
You can use ''unshield'' to extract data from your Morrowind CD. Create a temporary folder first, then copy the three files over and use the command ''unshield x data1.hdr data2.cab'' inside that folder.<br />
<br />
You just need to copy these files to your ''data'' folder, the other files can be deleted after unshielding:<br />
* Video (found on the disc)<br />
* Music (found where you unshielded the cabs)<br />
* Sound (found where you unshielded the cabs)<br />
* Splash (found where you unshielded the cabs)<br />
* Morrowind.esm (found in Data_Files after unshielding)<br />
* Morrowind.bsa (found in Data_Files after unshielding)<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=1200Development Environment Setup2013-11-13T12:19:36Z<p>Brotherbrick: /* Libraries */</p>
<hr />
<div>This page will describe how to set a dev env for several OSes.<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.libsdl.org/ SDL2] - input and windowing<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - GUI toolkit<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
** [http://connect.creativelabs.com/openal/default.aspx OpenAL] or [http://kcat.strangesoft.net/openal.html#download OpenAL soft] - for sound playback<br />
** [http://www.ffmpeg.org/ FFmpeg] For sound decoding and BINK video playback. Alternatively, you could use Audiere or mpg123 for sound decoding, but videos won't work then.<br />
<br />
* OpenMW additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* CMake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: [http://code.google.com/p/msysgit/downloads/list Git] v1.8.x<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.8 SDK for Visual Studio 2008 or 2010. Environment variable '''OGRE_HOME'''.<br />
* [http://sourceforge.net/projects/boost/files/boost-binaries/1.50.0/ Boost]: The lib shipped with OGRE are old and shouldn't be used. Replace those with Boost v1.50.0 binaries and headers. Headers go to "'''OGRE_ROOT'''\boost\boost" and libs go to "'''OGRE_ROOT'''\boost\lib" . Environment variable '''BOOST_ROOT'''. Download the headers and the binary mt and mt-gd for vc90 or vc100 files:<br />
**boost_1_50_headers.zip<br />
**chrono<br />
**date_time<br />
**filesystem<br />
**program_options<br />
**system<br />
**thread<br />
**wave<br />
* [http://www.bulletphysics.com/ Bullet 2.8.1] Download and build bullet, and make sure the libraries are put into the <install_path\lib\Release> folder, strip the ending off (like _vs2010) and set the environment variables '''BULLET_ROOT''' <install_path>, and '''BULLET_INCLUDE_DIR''' <install_path\src> folder.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable '''FREETYPE_DIR''' and '''MYGUI_DEPENDENCIES_DIR''' to the <install_path><br />
* [http://www.ogre3d.org/tikiwiki/MyGUI MyGUI]: Download and build following compilation instructions and set the '''MYGUI_HOME''' environment variable. In vs90 or vs100, set the mygui.ogreplatform properties->c/c++->general->additional includes to have 'c:\'''BOOST_ROOT'''\' as well.<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: Download OpenAL11CoreSDK and set the environment variable '''OPENALDIR'''.<br />
* [http://qt.nokia.com/downloads QT]. Download the vs90 or vs100 version and install the environment variable '''QTDIR'''. Example: qt-win-opensource-4.8.4-vs2010.exe<br />
* [https://code.google.com/p/msinttypes/ msinttypes] Download and extract to your vs90 or vs100 'install_root\VC\include' directory and overwrite the files there. This will give you C99 compliant inttypes.<br />
* [http://ffmpeg.zeranoe.com/builds/ FFmpeg] Download and extract the dev and exe of ffmpeg. The latest builds don't work. A known working version is commit 1eabd71, available in the "previous versions" links on that page. The environment variable is '''FFMPEG_HOME'''.<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
==Installing Dependencies==<br />
<br />
===Arch===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo===<br />
You have to emerge dev-games/ogre with useflags "boost freeimage opengl threads zip" and dev-games/mygui with useflag ogre. The mygui package might need to be unmasked, see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 Gentoo handbook] and is available in portage since 2012-11-01.<br />
TODO: You also need SDL2 <br />
<br />
===Ubuntu===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo add-apt-repository ppa:openmw/build<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libopenal-dev libpng-dev libogre-1.8-dev \<br />
libsdl2-dev libqt4-dev uuid-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-wave-dev libboost-chrono-dev libboost-program-options-dev \<br />
libboost-system-dev libav-tools libavcodec-dev libavformat-dev \<br />
libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev \<br />
libbullet-dev libmygui-dev libunshield-dev libtinyxml-dev cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories:<br />
<br />
TODO: Add SDL2<br />
<syntaxhighlight lang="bash"><br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
</syntaxhighlight><br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<syntaxhighlight lang="bash"><br />
yum install libmpg123-devel<br />
</syntaxhighlight><br />
<br />
==Fetching the source==<br />
<br />
Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
</syntaxhighlight><br />
<br />
==Building==<br />
<br />
===With make===<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir build<br />
cd build<br />
cmake ../<br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can decrease your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
===With codeblocks===<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir build<br />
cd build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
===With Kdevelop===<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
Create a data folder anywhere, then edit your openmw.cfg file to point to that folder.<br />
<br />
Then you have to copy the game data from your disc or installation into that data folder.<br />
The datafiles are inside data1.cab/data1.hdr and data2.cab on the disc.<br />
<br />
You can use ''unshield'' to extract data from your Morrowind CD. Create a temporary folder first, then copy the three files over and use the command ''unshield x data1.hdr data2.cab'' inside that folder.<br />
<br />
You just need to copy these files to your ''data'' folder, the other files can be deleted after unshielding:<br />
* Video (found on the disc)<br />
* Music (found where you unshielded the cabs)<br />
* Sound (found where you unshielded the cabs)<br />
* Splash (found where you unshielded the cabs)<br />
* Morrowind.esm (found in Data_Files after unshielding)<br />
* Morrowind.bsa (found in Data_Files after unshielding)<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=1191Development Environment Setup2013-10-18T11:16:11Z<p>Brotherbrick: /* Packages */</p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: [http://code.google.com/p/msysgit/downloads/list Git] v1.8.x<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.8 SDK for Visual Studio 2008 or 2010. Environment variable '''OGRE_HOME'''.<br />
* [http://sourceforge.net/projects/boost/files/boost-binaries/1.50.0/ Boost]: The lib shipped with OGRE are old and shouldn't be used. Replace those with Boost v1.50.0 binaries and headers. Headers go to "'''OGRE_ROOT'''\boost\boost" and libs go to "'''OGRE_ROOT'''\boost\lib" . Environment variable '''BOOST_ROOT'''. Download the headers and the binary mt and mt-gd for vc90 or vc100 files:<br />
**boost_1_50_headers.zip<br />
**system<br />
**filesystem<br />
**program_options<br />
**thread<br />
**date_time<br />
**chrono<br />
* [http://www.bulletphysics.com/ Bullet 2.8.1] Download and build bullet, and make sure the libraries are put into the <install_path\lib\Release> folder, strip the ending off (like _vs2010) and set the environment variables '''BULLET_ROOT''' <install_path>, and '''BULLET_INCLUDE_DIR''' <install_path\src> folder.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable '''FREETYPE_DIR''' and '''MYGUI_DEPENDENCIES_DIR''' to the <install_path><br />
* [http://www.ogre3d.org/tikiwiki/MyGUI MyGUI]: Download and build following compilation instructions and set the '''MYGUI_HOME''' environment variable. In vs90 or vs100, set the mygui.ogreplatform properties->c/c++->general->additional includes to have 'c:\'''BOOST_ROOT'''\' as well.<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: Download OpenAL11CoreSDK and set the environment variable '''OPENALDIR'''.<br />
* [http://qt.nokia.com/downloads QT]. Download the vs90 or vs100 version and install the environment variable '''QTDIR'''. Example: qt-win-opensource-4.8.4-vs2010.exe<br />
* [https://code.google.com/p/msinttypes/ msinttypes] Download and extract to your vs90 or vs100 'install_root\VC\include' directory and overwrite the files there. This will give you C99 compliant inttypes.<br />
* [http://ffmpeg.zeranoe.com/builds/ FFmpeg] Download and extract the dev and exe of ffmpeg. The latest builds don't work. A known working version is commit 1eabd71, available in the "previous versions" links on that page. The environment variable is '''FFMPEG_HOME'''.<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
==Installing Dependencies==<br />
<br />
===Arch===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo===<br />
You have to emerge dev-games/ogre with useflags "boost cg freeimage ois opengl threads zip" and dev-games/mygui with useflag ogre. The mygui package might need to be unmasked, see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 Gentoo handbook] and is available in portage since 2012-11-01.<br />
<br />
===Ubuntu===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo add-apt-repository ppa:openmw/build<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libopenal-dev libpng-dev libogre-1.8-dev \<br />
libsdl2-dev libqt4-dev uuid-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-wave-dev libboost-chrono-dev libboost-program-options-dev \<br />
libboost-system-dev libav-tools libavcodec-dev libavformat-dev \<br />
libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev \<br />
libbullet-dev libmygui-dev libunshield-dev libtinyxml-dev cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories (this is for building OpenMW and later the OGRE plugin):<br />
<syntaxhighlight lang="bash"><br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ois-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
</syntaxhighlight><br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<syntaxhighlight lang="bash"><br />
yum install Cg libmpg123-devel<br />
</syntaxhighlight><br />
<br />
====Cg Plugin Setup====<br />
As of 0.13.0, we will need to compile a plugin for OGRE that does not come with the default OGRE packages from Fedora. This plugin is the '''Plugin_CgProgramManager.so''' file, which needs the Cg package (installed previously) to compile. First, determine which version of OGRE you have installed (as of Fedora 16, this will be 1.8rc1):<br />
<syntaxhighlight lang="bash"><br />
rpm -qi ogre-devel<br />
</syntaxhighlight><br />
<br />
Go to the main OGRE website and download the source tarball for that version. You MUST download the source for the same version you have installed.<br />
<br />
[http://www.ogre3d.org/download/source]<br />
<br />
Unzip the tarball, and compile the source code with the following:<br />
<syntaxhighlight lang="bash"><br />
cmake<br />
make<br />
</syntaxhighlight><br />
<br />
Once the libraries have been compiled, the '''Plugin_CgProgramManager.so''' file should be in the lib directory. As root, copy this file to the OGRE lib directory on your system. For 64bit systems, this will be located at:<br />
<syntaxhighlight lang="text"><br />
/usr/lib64/OGRE<br />
</syntaxhighlight><br />
For 32bit systems:<br />
<syntaxhighlight lang="text"><br />
/usr/lib/OGRE<br />
</syntaxhighlight><br />
Next, run the following command to register the new library:<br />
<syntaxhighlight lang="bash"><br />
/sbin/ldconfig<br />
</syntaxhighlight><br />
<br />
==Fetching the source==<br />
<br />
Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
</syntaxhighlight><br />
<br />
==Building==<br />
<br />
===With make===<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir build<br />
cd build<br />
cmake ../<br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can decrease your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
===With codeblocks===<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir build<br />
cd build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
===With Kdevelop===<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
Create a data folder anywhere, then edit your openmw.cfg file to point to that folder.<br />
<br />
Then you have to copy the game data from your disc or installation into that data folder.<br />
The datafiles are inside data1.cab/data1.hdr and data2.cab on the disc.<br />
<br />
You can use ''unshield'' to extract data from your Morrowind CD. Create a temporary folder first, then copy the three files over and use the command ''unshield x data1.hdr data2.cab'' inside that folder.<br />
<br />
You just need to copy these files to your ''data'' folder, the other files can be deleted after unshielding:<br />
* Video (found on the disc)<br />
* Music (found where you unshielded the cabs)<br />
* Sound (found where you unshielded the cabs)<br />
* Splash (found where you unshielded the cabs)<br />
* Morrowind.esm (found in Data_Files after unshielding)<br />
* Morrowind.bsa (found in Data_Files after unshielding)<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=1190Development Environment Setup2013-10-18T11:15:16Z<p>Brotherbrick: /* Packages */</p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: [http://code.google.com/p/msysgit/downloads/list Git] v1.8.x<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.8 SDK for Visual Studio 2008 or 2010. Environment variable '''OGRE_HOME'''.<br />
* [http://sourceforge.net/projects/boost/files/boost-binaries/1.50.0/ Boost]: The lib shipped with OGRE are old and shouldn't be used. Replace those with Boost v1.50.0 binaries and headers. Headers go to "'''OGRE_ROOT'''\boost\boost" and libs go to "'''OGRE_ROOT'''\boost\lib" . Environment variable '''BOOST_ROOT'''. Download the headers and the binary mt and mt-gd for vc90 or vc100 files:<br />
**boost_1_50_headers.zip<br />
**system<br />
**filesystem<br />
**program_options<br />
**thread<br />
**date_time<br />
**chrono<br />
* [http://www.bulletphysics.com/ Bullet 2.8.1] Download and build bullet, and make sure the libraries are put into the <install_path\lib\Release> folder, strip the ending off (like _vs2010) and set the environment variables '''BULLET_ROOT''' <install_path>, and '''BULLET_INCLUDE_DIR''' <install_path\src> folder.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable '''FREETYPE_DIR''' and '''MYGUI_DEPENDENCIES_DIR''' to the <install_path><br />
* [http://www.ogre3d.org/tikiwiki/MyGUI MyGUI]: Download and build following compilation instructions and set the '''MYGUI_HOME''' environment variable. In vs90 or vs100, set the mygui.ogreplatform properties->c/c++->general->additional includes to have 'c:\'''BOOST_ROOT'''\' as well.<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: Download OpenAL11CoreSDK and set the environment variable '''OPENALDIR'''.<br />
* [http://qt.nokia.com/downloads QT]. Download the vs90 or vs100 version and install the environment variable '''QTDIR'''. Example: qt-win-opensource-4.8.4-vs2010.exe<br />
* [https://code.google.com/p/msinttypes/ msinttypes] Download and extract to your vs90 or vs100 'install_root\VC\include' directory and overwrite the files there. This will give you C99 compliant inttypes.<br />
* [http://ffmpeg.zeranoe.com/builds/ FFmpeg] Download and extract the dev and exe of ffmpeg. The latest builds don't work. A known working version is commit 1eabd71, available in the "previous versions" links on that page. The environment variable is '''FFMPEG_HOME'''.<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
==Installing Dependencies==<br />
<br />
===Arch===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo===<br />
You have to emerge dev-games/ogre with useflags "boost cg freeimage ois opengl threads zip" and dev-games/mygui with useflag ogre. The mygui package might need to be unmasked, see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 Gentoo handbook] and is available in portage since 2012-11-01.<br />
<br />
===Ubuntu===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo add-apt-repository ppa:openmw/build<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libopenal-dev libpng-dev libogre-1.8-dev libsdl2-dev libqt4-dev uuid-dev \<br />
libboost-filesystem-dev libboost-thread-dev libboost-wave-dev \<br />
libboost-chrono-dev libboost-program-options-dev libboost-system-dev \<br />
libav-tools libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev \<br />
libbullet-dev libmygui-dev libunshield-dev libtinyxml-dev cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories (this is for building OpenMW and later the OGRE plugin):<br />
<syntaxhighlight lang="bash"><br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ois-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
</syntaxhighlight><br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<syntaxhighlight lang="bash"><br />
yum install Cg libmpg123-devel<br />
</syntaxhighlight><br />
<br />
====Cg Plugin Setup====<br />
As of 0.13.0, we will need to compile a plugin for OGRE that does not come with the default OGRE packages from Fedora. This plugin is the '''Plugin_CgProgramManager.so''' file, which needs the Cg package (installed previously) to compile. First, determine which version of OGRE you have installed (as of Fedora 16, this will be 1.8rc1):<br />
<syntaxhighlight lang="bash"><br />
rpm -qi ogre-devel<br />
</syntaxhighlight><br />
<br />
Go to the main OGRE website and download the source tarball for that version. You MUST download the source for the same version you have installed.<br />
<br />
[http://www.ogre3d.org/download/source]<br />
<br />
Unzip the tarball, and compile the source code with the following:<br />
<syntaxhighlight lang="bash"><br />
cmake<br />
make<br />
</syntaxhighlight><br />
<br />
Once the libraries have been compiled, the '''Plugin_CgProgramManager.so''' file should be in the lib directory. As root, copy this file to the OGRE lib directory on your system. For 64bit systems, this will be located at:<br />
<syntaxhighlight lang="text"><br />
/usr/lib64/OGRE<br />
</syntaxhighlight><br />
For 32bit systems:<br />
<syntaxhighlight lang="text"><br />
/usr/lib/OGRE<br />
</syntaxhighlight><br />
Next, run the following command to register the new library:<br />
<syntaxhighlight lang="bash"><br />
/sbin/ldconfig<br />
</syntaxhighlight><br />
<br />
==Fetching the source==<br />
<br />
Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
</syntaxhighlight><br />
<br />
==Building==<br />
<br />
===With make===<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir build<br />
cd build<br />
cmake ../<br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can decrease your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
===With codeblocks===<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir build<br />
cd build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
===With Kdevelop===<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
Create a data folder anywhere, then edit your openmw.cfg file to point to that folder.<br />
<br />
Then you have to copy the game data from your disc or installation into that data folder.<br />
The datafiles are inside data1.cab/data1.hdr and data2.cab on the disc.<br />
<br />
You can use ''unshield'' to extract data from your Morrowind CD. Create a temporary folder first, then copy the three files over and use the command ''unshield x data1.hdr data2.cab'' inside that folder.<br />
<br />
You just need to copy these files to your ''data'' folder, the other files can be deleted after unshielding:<br />
* Video (found on the disc)<br />
* Music (found where you unshielded the cabs)<br />
* Sound (found where you unshielded the cabs)<br />
* Splash (found where you unshielded the cabs)<br />
* Morrowind.esm (found in Data_Files after unshielding)<br />
* Morrowind.bsa (found in Data_Files after unshielding)<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=1189Development Environment Setup2013-10-18T07:07:14Z<p>Brotherbrick: /* Packages */ Removing old dependencies</p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: [http://code.google.com/p/msysgit/downloads/list Git] v1.8.x<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.8 SDK for Visual Studio 2008 or 2010. Environment variable '''OGRE_HOME'''.<br />
* [http://sourceforge.net/projects/boost/files/boost-binaries/1.50.0/ Boost]: The lib shipped with OGRE are old and shouldn't be used. Replace those with Boost v1.50.0 binaries and headers. Headers go to "'''OGRE_ROOT'''\boost\boost" and libs go to "'''OGRE_ROOT'''\boost\lib" . Environment variable '''BOOST_ROOT'''. Download the headers and the binary mt and mt-gd for vc90 or vc100 files:<br />
**boost_1_50_headers.zip<br />
**system<br />
**filesystem<br />
**program_options<br />
**thread<br />
**date_time<br />
**chrono<br />
* [http://www.bulletphysics.com/ Bullet 2.8.1] Download and build bullet, and make sure the libraries are put into the <install_path\lib\Release> folder, strip the ending off (like _vs2010) and set the environment variables '''BULLET_ROOT''' <install_path>, and '''BULLET_INCLUDE_DIR''' <install_path\src> folder.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable '''FREETYPE_DIR''' and '''MYGUI_DEPENDENCIES_DIR''' to the <install_path><br />
* [http://www.ogre3d.org/tikiwiki/MyGUI MyGUI]: Download and build following compilation instructions and set the '''MYGUI_HOME''' environment variable. In vs90 or vs100, set the mygui.ogreplatform properties->c/c++->general->additional includes to have 'c:\'''BOOST_ROOT'''\' as well.<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: Download OpenAL11CoreSDK and set the environment variable '''OPENALDIR'''.<br />
* [http://qt.nokia.com/downloads QT]. Download the vs90 or vs100 version and install the environment variable '''QTDIR'''. Example: qt-win-opensource-4.8.4-vs2010.exe<br />
* [https://code.google.com/p/msinttypes/ msinttypes] Download and extract to your vs90 or vs100 'install_root\VC\include' directory and overwrite the files there. This will give you C99 compliant inttypes.<br />
* [http://ffmpeg.zeranoe.com/builds/ FFmpeg] Download and extract the dev and exe of ffmpeg. The latest builds don't work. A known working version is commit 1eabd71, available in the "previous versions" links on that page. The environment variable is '''FFMPEG_HOME'''.<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
==Installing Dependencies==<br />
<br />
===Arch===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo===<br />
You have to emerge dev-games/ogre with useflags "boost cg freeimage ois opengl threads zip" and dev-games/mygui with useflag ogre. The mygui package might need to be unmasked, see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 Gentoo handbook] and is available in portage since 2012-11-01.<br />
<br />
===Ubuntu===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo add-apt-repository ppa:openmw/build<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libopenal-dev libpng-dev libogre-1.8-dev libmpg123-dev \<br />
libsndfile1-dev libblkid-dev libfreeimage-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-chrono-dev libboost-program-options-dev libboost-system-dev libboost-wave-dev uuid-dev \<br />
libqt4-opengl libqt4-dev libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libswscale-dev \<br />
libpostproc-dev libbullet-dev libmygui-dev libunshield-dev cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories (this is for building OpenMW and later the OGRE plugin):<br />
<syntaxhighlight lang="bash"><br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ois-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
</syntaxhighlight><br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<syntaxhighlight lang="bash"><br />
yum install Cg libmpg123-devel<br />
</syntaxhighlight><br />
<br />
====Cg Plugin Setup====<br />
As of 0.13.0, we will need to compile a plugin for OGRE that does not come with the default OGRE packages from Fedora. This plugin is the '''Plugin_CgProgramManager.so''' file, which needs the Cg package (installed previously) to compile. First, determine which version of OGRE you have installed (as of Fedora 16, this will be 1.8rc1):<br />
<syntaxhighlight lang="bash"><br />
rpm -qi ogre-devel<br />
</syntaxhighlight><br />
<br />
Go to the main OGRE website and download the source tarball for that version. You MUST download the source for the same version you have installed.<br />
<br />
[http://www.ogre3d.org/download/source]<br />
<br />
Unzip the tarball, and compile the source code with the following:<br />
<syntaxhighlight lang="bash"><br />
cmake<br />
make<br />
</syntaxhighlight><br />
<br />
Once the libraries have been compiled, the '''Plugin_CgProgramManager.so''' file should be in the lib directory. As root, copy this file to the OGRE lib directory on your system. For 64bit systems, this will be located at:<br />
<syntaxhighlight lang="text"><br />
/usr/lib64/OGRE<br />
</syntaxhighlight><br />
For 32bit systems:<br />
<syntaxhighlight lang="text"><br />
/usr/lib/OGRE<br />
</syntaxhighlight><br />
Next, run the following command to register the new library:<br />
<syntaxhighlight lang="bash"><br />
/sbin/ldconfig<br />
</syntaxhighlight><br />
<br />
==Fetching the source==<br />
<br />
Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
</syntaxhighlight><br />
<br />
==Building==<br />
<br />
===With make===<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir build<br />
cd build<br />
cmake ../<br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can decrease your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
===With codeblocks===<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir build<br />
cd build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
===With Kdevelop===<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
Create a data folder anywhere, then edit your openmw.cfg file to point to that folder.<br />
<br />
Then you have to copy the game data from your disc or installation into that data folder.<br />
The datafiles are inside data1.cab/data1.hdr and data2.cab on the disc.<br />
<br />
You can use ''unshield'' to extract data from your Morrowind CD. Create a temporary folder first, then copy the three files over and use the command ''unshield x data1.hdr data2.cab'' inside that folder.<br />
<br />
You just need to copy these files to your ''data'' folder, the other files can be deleted after unshielding:<br />
* Video (found on the disc)<br />
* Music (found where you unshielded the cabs)<br />
* Sound (found where you unshielded the cabs)<br />
* Splash (found where you unshielded the cabs)<br />
* Morrowind.esm (found in Data_Files after unshielding)<br />
* Morrowind.bsa (found in Data_Files after unshielding)<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=995Development Environment Setup2013-03-15T15:59:15Z<p>Brotherbrick: /* Libraries */</p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: [http://code.google.com/p/msysgit/downloads/list Git] v1.8.x<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.8 SDK for Visual Studio 2008 or 2010. Environment variable '''OGRE_HOME'''.<br />
* [http://sourceforge.net/projects/boost/files/boost-binaries/1.50.0/ Boost]: The lib shipped with OGRE are old and shouldn't be used. Replace those with Boost v1.50.0 binaries and headers. Headers go to "'''OGRE_ROOT'''\boost\boost" and libs go to "'''OGRE_ROOT'''\boost\lib" . Environment variable '''BOOST_ROOT'''. Download the headers and the binary mt and mt-gd for vc90 or vc100 files:<br />
**boost_1_50_headers.zip<br />
**system<br />
**filesystem<br />
**program_options<br />
**thread<br />
**date_time<br />
**chrono<br />
* [http://www.bulletphysics.com/ Bullet 2.8.1] Download and build bullet, and make sure the libraries are put into the <install_path\lib\Release> folder, strip the ending off (like _vs2010) and set the environment variables '''BULLET_ROOT''' <install_path>, and '''BULLET_INCLUDE_DIR''' <install_path\src> folder.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable '''FREETYPE_DIR''' and '''MYGUI_DEPENDENCIES_DIR'''to the <install_path><br />
* [http://www.ogre3d.org/tikiwiki/MyGUI MyGUI]: Download and build following compilation instructions and set the '''MYGUI_HOME''' environment variable. In vs90 or vs100, set the mygui.ogreplatform properties->c/c++->general->additional includes to have 'c:\'''BOOST_ROOT'''\' as well.<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: Download OpenAL11CoreSDK and set the environment variable '''OPENALDIR'''.<br />
* [http://qt.nokia.com/downloads QT]. Download the vs90 or vs100 version and install the environment variable '''QTDIR'''. Example: qt-win-opensource-4.8.4-vs2010.exe<br />
* [https://code.google.com/p/msinttypes/ msinttypes] Download and extract to your vs90 or vs100 'install_root\VC\include' directory and overwrite the files there. This will give you C99 compliant inttypes.<br />
* [http://ffmpeg.zeranoe.com/builds/ FFmpeg] Download and extract the dev and exe of ffmpeg. The environment variable is '''FFMPEG_HOME'''.<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
===Arch Dependencies===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo Dependencies===<br />
You have to emerge dev-games/ogre with useflags "boost cg freeimage ois opengl threads zip" and dev-games/mygui with useflag ogre. The mygui package might need to be unmasked, see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 Gentoo handbook] and is available in portage since 2012-11-01.<br />
<br />
===Ubuntu Dependencies===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-add-repository ppa:openmw/build<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libois-dev libopenal-dev libpng-dev libogre-dev libmpg123-dev libsndfile1-dev\<br />
libblkid-dev libfreeimage-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev\<br />
libboost-program-options-dev libboost-system-dev libboost-wave-dev uuid-dev libqt4-opengl libqt4-dev \<br />
libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev ffmpeg \<br />
libbullet-dev libmygui-dev cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fetching the source===<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
cd openmw<br />
git submodule update --init<br />
<br />
</syntaxhighlight><br />
<br />
===Building===<br />
<br />
====With make====<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir Build<br />
cd Build<br />
cmake ../openmw/ <br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can decrease your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
====With codeblocks====<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
cd Build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
====With Kdevelop====<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories (this is for building OpenMW and later the OGRE plugin):<br />
<br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ois-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
<br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<br />
yum install Cg libmpg123-devel<br />
<br />
<br />
====Cg Plugin Setup====<br />
As of 0.13.0, we will need to compile a plugin for OGRE that does not come with the default OGRE packages from Fedora. This plugin is the '''Plugin_CgProgramManager.so''' file, which needs the Cg package (installed previously) to compile. First, determine which version of OGRE you have installed (as of Fedora 16, this will be 1.8rc1):<br />
<br />
rpm -qi ogre-devel<br />
<br />
<br />
Go to the main OGRE website and download the source tarball for that version. You MUST download the source for the same version you have installed.<br />
<br />
[http://www.ogre3d.org/download/source]<br />
<br />
Unzip the tarball, and compile the source code with the following:<br />
<br />
cmake<br />
make<br />
<br />
<br />
Once the libraries have been compiled, the '''Plugin_CgProgramManager.so''' file should be in the lib directory. As root, copy this file to the OGRE lib directory on your system. For 64bit systems, this will be located at:<br />
<br />
/usr/lib64/OGRE<br />
<br />
For 32bit systems:<br />
<br />
/usr/lib/OGRE<br />
<br />
Next, run the following command to register the new library:<br />
<br />
/sbin/ldconfig<br />
<br />
<br />
====Building OpenMW====<br />
Now we can compile OpenMW. Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot: [https://github.com/zinnschlag/openmw] with the following:<br />
<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
Unzip the tarball or change into the directory that has your cloned git files, and run the following commands to build the source:<br />
<br />
cmake<br />
make<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
Create a data folder anywhere, then edit your openmw.cfg file to point to that folder.<br />
<br />
Then you have to copy the game data from your disc or installation into that data folder.<br />
The datafiles are inside data1.cab/data1.hdr and data2.cab on the disc.<br />
<br />
You can use ''unshield'' to extract data from your Morrowind CD. Create a temporary folder first, then copy the three files over and use the command ''unshield x data1.hdr data2.cab'' inside that folder.<br />
<br />
You just need to copy thoses files to your ''data'' folder, the other files can be deleted after unshielding:<br />
* Video (found on the disc)<br />
* Music (found where you unshielded the cabs)<br />
* Sound (found where you unshielded the cabs)<br />
* Splash (found where you unshielded the cabs)<br />
* Morrowind.esm (found in Data_Files after unshielding)<br />
* Morrowind.bsa (found in Data_Files after unshielding)<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=987Development Environment Setup2013-03-08T14:13:52Z<p>Brotherbrick: updated debian/ubuntu requirements</p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: [http://code.google.com/p/msysgit/downloads/list Git] v1.8.x<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.8 SDK for Visual Studio 2008 or 2010. Environment variable '''OGRE_HOME'''.<br />
* [http://sourceforge.net/projects/boost/files/boost-binaries/1.50.0/ Boost]: The lib shipped with OGRE are old and shouldn't be used. Replace those with Boost v1.50.0 binaries and headers. Headers go to "'''OGRE_ROOT'''\boost\boost" and libs go to "'''OGRE_ROOT'''\boost\lib" . Environment variable '''BOOST_ROOT'''. Download the headers and the binary mt and mt-gd for vc90 or vc100 files:<br />
**boost_1_50_headers.zip<br />
**system<br />
**filesystem<br />
**program_options<br />
**thread<br />
**date_time<br />
**chrono<br />
* [http://www.bulletphysics.com/ Bullet 2.8.1] Download and build bullet, and make sure the libraries are put into the <install_path\lib\Release> folder, and set the environment variables '''BULLET_ROOT''' <install_path>, and '''BULLET_INCLUDE_DIR''' <install_path\src> folder.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable '''FREETYPE_DIR''' and '''MYGUI_DEPENDENCIES_DIR'''to the <install_path><br />
* [http://www.ogre3d.org/tikiwiki/MyGUI MyGUI]: Download and build following compilation instructions and set the '''MYGUI_HOME''' environment variable. In vs90 or vs100, set the mygui.ogreplatform properties->c/c++->general->additional includes to have 'c:\'''BOOST_ROOT'''\' as well.<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: Download OpenAL11CoreSDK and set the environment variable '''OPENALDIR'''.<br />
* [http://qt.nokia.com/downloads QT]. Download the vs90 or vs100 version and install the environment variable '''QTDIR'''. Example: qt-win-opensource-4.8.4-vs2010.exe<br />
* [https://code.google.com/p/msinttypes/ msinttypes] Download and extract to your vs90 or vs100 'install_root\VC\include' directory and overwrite the files there. This will give you C99 compliant inttypes.<br />
* [http://ffmpeg.zeranoe.com/builds/ FFmpeg] Download and extract the dev and exe of ffmpeg. The environment variable is '''FFMPEG_HOME'''.<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
===Arch Dependencies===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo Dependencies===<br />
You have to emerge dev-games/ogre with useflags "boost cg freeimage ois opengl threads zip" and dev-games/mygui with useflag ogre. The mygui package might need to be unmasked, see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 Gentoo handbook] and is available in portage since 2012-11-01.<br />
<br />
===Ubuntu Dependencies===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-add-repository ppa:openmw/build<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libois-dev libopenal-dev libpng-dev libogre-dev libmpg123-dev libsndfile1-dev\<br />
libblkid-dev libfreeimage-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev\<br />
libboost-program-options-dev libboost-system-dev libboost-wave-dev uuid-dev libqt4-opengl libqt4-dev \<br />
libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev ffmpeg \<br />
libbullet-dev libmygui-dev cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fetching the source===<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
cd openmw<br />
git submodule update --init<br />
<br />
</syntaxhighlight><br />
<br />
===Building===<br />
<br />
====With make====<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir Build<br />
cd Build<br />
cmake ../openmw/ <br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can decrease your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
====With codeblocks====<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
cd Build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
====With Kdevelop====<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories (this is for building OpenMW and later the OGRE plugin):<br />
<br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ois-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
<br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<br />
yum install Cg libmpg123-devel<br />
<br />
<br />
====Cg Plugin Setup====<br />
As of 0.13.0, we will need to compile a plugin for OGRE that does not come with the default OGRE packages from Fedora. This plugin is the '''Plugin_CgProgramManager.so''' file, which needs the Cg package (installed previously) to compile. First, determine which version of OGRE you have installed (as of Fedora 16, this will be 1.8rc1):<br />
<br />
rpm -qi ogre-devel<br />
<br />
<br />
Go to the main OGRE website and download the source tarball for that version. You MUST download the source for the same version you have installed.<br />
<br />
[http://www.ogre3d.org/download/source]<br />
<br />
Unzip the tarball, and compile the source code with the following:<br />
<br />
cmake<br />
make<br />
<br />
<br />
Once the libraries have been compiled, the '''Plugin_CgProgramManager.so''' file should be in the lib directory. As root, copy this file to the OGRE lib directory on your system. For 64bit systems, this will be located at:<br />
<br />
/usr/lib64/OGRE<br />
<br />
For 32bit systems:<br />
<br />
/usr/lib/OGRE<br />
<br />
Next, run the following command to register the new library:<br />
<br />
/sbin/ldconfig<br />
<br />
<br />
====Building OpenMW====<br />
Now we can compile OpenMW. Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot: [https://github.com/zinnschlag/openmw] with the following:<br />
<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
Unzip the tarball or change into the directory that has your cloned git files, and run the following commands to build the source:<br />
<br />
cmake<br />
make<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
Create a data folder anywhere, then edit your openmw.cfg file to point to that folder.<br />
<br />
Then you have to copy the game data from your disc or installation into that data folder.<br />
The datafiles are inside data1.cab/data1.hdr and data2.cab on the disc.<br />
<br />
You can use ''unshield'' to extract data from your Morrowind CD. Create a temporary folder first, then copy the three files over and use the command ''unshield x data1.hdr data2.cab'' inside that folder.<br />
<br />
You just need to copy thoses files to your ''data'' folder, the other files can be deleted after unshielding:<br />
* Video (found on the disc)<br />
* Music (found where you unshielded the cabs)<br />
* Sound (found where you unshielded the cabs)<br />
* Splash (found where you unshielded the cabs)<br />
* Morrowind.esm (found in Data_Files after unshielding)<br />
* Morrowind.bsa (found in Data_Files after unshielding)<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=986Development Environment Setup2013-03-08T09:43:28Z<p>Brotherbrick: /* Visual Studio 2008/2010 */</p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: [http://code.google.com/p/msysgit/downloads/list Git] v1.8.x<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.8 SDK for Visual Studio 2008 or 2010. Environment variable '''OGRE_HOME'''.<br />
* [http://sourceforge.net/projects/boost/files/boost-binaries/1.50.0/ Boost]: The lib shipped with OGRE are old and shouldn't be used. Replace those with Boost v1.50.0 binaries and headers. Headers go to "'''OGRE_ROOT'''\boost\boost" and libs go to "'''OGRE_ROOT'''\boost\lib" . Environment variable '''BOOST_ROOT'''. Download the headers and the binary mt and mt-gd for vc90 or vc100 files:<br />
**boost_1_50_headers.zip<br />
**system<br />
**filesystem<br />
**program_options<br />
**thread<br />
**date_time<br />
**chrono<br />
* [http://www.bulletphysics.com/ Bullet 2.8.1] Download and build bullet, and make sure the libraries are put into the <install_path\lib\Release> folder, and set the environment variables '''BULLET_ROOT''' <install_path>, and '''BULLET_INCLUDE_DIR''' <install_path\src> folder.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable '''FREETYPE_DIR''' and '''MYGUI_DEPENDENCIES_DIR'''to the <install_path><br />
* [http://www.ogre3d.org/tikiwiki/MyGUI MyGUI]: Download and build following compilation instructions and set the '''MYGUI_HOME''' environment variable. In vs90 or vs100, set the mygui.ogreplatform properties->c/c++->general->additional includes to have 'c:\'''BOOST_ROOT'''\' as well.<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: Download OpenAL11CoreSDK and set the environment variable '''OPENALDIR'''.<br />
* [http://qt.nokia.com/downloads QT]. Download the vs90 or vs100 version and install the environment variable '''QTDIR'''. Example: qt-win-opensource-4.8.4-vs2010.exe<br />
* [https://code.google.com/p/msinttypes/ msinttypes] Download and extract to your vs90 or vs100 'install_root\VC\include' directory and overwrite the files there. This will give you C99 compliant inttypes.<br />
* [http://ffmpeg.zeranoe.com/builds/ FFmpeg] Download and extract the dev and exe of ffmpeg. The environment variable is '''FFMPEG_HOME'''.<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
===Arch Dependencies===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo Dependencies===<br />
You have to emerge dev-games/ogre with useflags "boost cg freeimage ois opengl threads zip" and dev-games/mygui with useflag ogre. The mygui package might need to be unmasked, see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 Gentoo handbook] and is available in portage since 2012-11-01.<br />
<br />
===Ubuntu Dependencies===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-add-repository ppa:openmw/build<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libois-dev libopenal-dev libpng-dev libogre-dev libmpg123-dev\<br />
libsndfile1-dev libblkid-dev libfreeimage-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-program-options-dev libboost-system-dev libboost-wave-dev uuid-dev libqt4-opengl libqt4-dev \<br />
libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev ffmpeg \<br />
libbullet-dev libmygui-dev cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fetching the source===<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
cd openmw<br />
git submodule update --init<br />
<br />
</syntaxhighlight><br />
<br />
===Building===<br />
<br />
====With make====<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir Build<br />
cd Build<br />
cmake ../openmw/ <br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can decrease your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
====With codeblocks====<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
cd Build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
====With Kdevelop====<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories (this is for building OpenMW and later the OGRE plugin):<br />
<br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ois-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
<br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<br />
yum install Cg libmpg123-devel<br />
<br />
<br />
====Cg Plugin Setup====<br />
As of 0.13.0, we will need to compile a plugin for OGRE that does not come with the default OGRE packages from Fedora. This plugin is the '''Plugin_CgProgramManager.so''' file, which needs the Cg package (installed previously) to compile. First, determine which version of OGRE you have installed (as of Fedora 16, this will be 1.8rc1):<br />
<br />
rpm -qi ogre-devel<br />
<br />
<br />
Go to the main OGRE website and download the source tarball for that version. You MUST download the source for the same version you have installed.<br />
<br />
[http://www.ogre3d.org/download/source]<br />
<br />
Unzip the tarball, and compile the source code with the following:<br />
<br />
cmake<br />
make<br />
<br />
<br />
Once the libraries have been compiled, the '''Plugin_CgProgramManager.so''' file should be in the lib directory. As root, copy this file to the OGRE lib directory on your system. For 64bit systems, this will be located at:<br />
<br />
/usr/lib64/OGRE<br />
<br />
For 32bit systems:<br />
<br />
/usr/lib/OGRE<br />
<br />
Next, run the following command to register the new library:<br />
<br />
/sbin/ldconfig<br />
<br />
<br />
====Building OpenMW====<br />
Now we can compile OpenMW. Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot: [https://github.com/zinnschlag/openmw] with the following:<br />
<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
Unzip the tarball or change into the directory that has your cloned git files, and run the following commands to build the source:<br />
<br />
cmake<br />
make<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
Create a data folder anywhere, then edit your openmw.cfg file to point to that folder.<br />
<br />
Then you have to copy the game data from your disc or installation into that data folder.<br />
The datafiles are inside data1.cab/data1.hdr and data2.cab on the disc.<br />
<br />
You can use ''unshield'' to extract data from your Morrowind CD. Create a temporary folder first, then copy the three files over and use the command ''unshield x data1.hdr data2.cab'' inside that folder.<br />
<br />
You just need to copy thoses files to your ''data'' folder, the other files can be deleted after unshielding:<br />
* Video (found on the disc)<br />
* Music (found where you unshielded the cabs)<br />
* Sound (found where you unshielded the cabs)<br />
* Splash (found where you unshielded the cabs)<br />
* Morrowind.esm (found in Data_Files after unshielding)<br />
* Morrowind.bsa (found in Data_Files after unshielding)<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=846Development Environment Setup2013-02-06T08:15:34Z<p>Brotherbrick: /* Packages */</p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: The file you want is '''Git-1.7.1-preview20100612.exe''' found [http://code.google.com/p/msysgit/downloads/list HERE].<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.8 SDK for Visual Studio 2008 or 2010. Environment variable '''OGRE_HOME'''.<br />
* [http://www.boost.org/users/download/ Boost]: Boost lib used by OGRE but perhaps you should set it manually. In OGRE boost system, file_system, and program_options are missing, you should download the mt and mt-gd for vc90 and putt libs and dll in your OgreSDK_vc9_v1-7-1\boost_1_42\lib dir, they are in the boost-binaries\1.42.0 section in sourceforge download page. The boost source included in OGRE is missing filesystem and program_option, you should download them from boost sources and copy the directories in Ogre3D\boost_1_42\boost dir. Environment variable '''BOOST_ROOT'''.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable FREETYPE_DIR to the <install_path><br />
* OIS (included with the Ogre SDK on windows)<br />
* [http://www.ogre3d.org/tikiwiki/MyGUI MyGUI]: Follow the compilation instructions (building in the source directory) and set the MYGUI_HOME environment variable.<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: OpenAL11CoreSDK, environment variable '''OPENALDIR'''.<br />
* [http://audiere.sourceforge.net/download.php Audiere]: Environment variable '''AUDIERE_DIR'''.<br />
* [http://qt.nokia.com/downloads QT]. Environment variable '''QTDIR'''.<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
Then you should update include dirs of project to add OGRE (<path_to_ogre>\include and <path_to_ogre>\include\OGRE).<br />
<br />
Then you should include the correct path to needed libs (OgreSDK\lib & boost\lib) if not done by the CMake script. This may require first setting the OGRE_HOME environment, e.g. <code>set OGRE_HOME=C:\OgreSDK</code>.<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
===Arch Dependencies===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo Dependencies===<br />
You have to emerge dev-games/ogre with useflags "boost cg freeimage ois opengl threads zip" and dev-games/mygui with useflag ogre. The mygui package might need to be unmasked, see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=3 Gentoo handbook] and is available in portage since 2012-11-01.<br />
<br />
===Ubuntu Dependencies===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-add-repository ppa:openmw/build<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libois-dev libopenal-dev libpng-dev libogre-dev libmpg123-dev\<br />
libsndfile1-dev libblkid-dev libfreeimage-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-program-options-dev libboost-system-dev libboost-wave-dev uuid-dev libqt4-opengl libqt4-dev \<br />
libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev ffmpeg \<br />
libbullet-dev libmygui-dev cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fetching the source===<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
cd openmw<br />
git submodule update --init<br />
<br />
</syntaxhighlight><br />
<br />
===Building===<br />
<br />
====With make====<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir Build<br />
cd Build<br />
cmake ../openmw/ <br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can decrease your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
====With codeblocks====<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
cd Build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
====With Kdevelop====<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories (this is for building OpenMW and later the OGRE plugin):<br />
<br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ois-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
<br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<br />
yum install Cg libmpg123-devel<br />
<br />
<br />
====Cg Plugin Setup====<br />
As of 0.13.0, we will need to compile a plugin for OGRE that does not come with the default OGRE packages from Fedora. This plugin is the '''Plugin_CgProgramManager.so''' file, which needs the Cg package (installed previously) to compile. First, determine which version of OGRE you have installed (as of Fedora 16, this will be 1.8rc1):<br />
<br />
rpm -qi ogre-devel<br />
<br />
<br />
Go to the main OGRE website and download the source tarball for that version. You MUST download the source for the same version you have installed.<br />
<br />
[http://www.ogre3d.org/download/source]<br />
<br />
Unzip the tarball, and compile the source code with the following:<br />
<br />
cmake<br />
make<br />
<br />
<br />
Once the libraries have been compiled, the '''Plugin_CgProgramManager.so''' file should be in the lib directory. As root, copy this file to the OGRE lib directory on your system. For 64bit systems, this will be located at:<br />
<br />
/usr/lib64/OGRE<br />
<br />
For 32bit systems:<br />
<br />
/usr/lib/OGRE<br />
<br />
Next, run the following command to register the new library:<br />
<br />
/sbin/ldconfig<br />
<br />
<br />
====Building OpenMW====<br />
Now we can compile OpenMW. Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot: [https://github.com/zinnschlag/openmw] with the following:<br />
<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
Unzip the tarball or change into the directory that has your cloned git files, and run the following commands to build the source:<br />
<br />
cmake<br />
make<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
Create a data folder anywhere, then edit your openmw.cfg file to point to that folder.<br />
<br />
Then you have to copy the game data from your disc or installation into that data folder.<br />
The datafiles are inside data1.cab/data1.hdr and data2.cab on the disc.<br />
<br />
You can use ''unshield'' to extract data from your Morrowind CD. Create a temporary folder first, then copy the three files over and use the command ''unshield x data1.hdr data2.cab'' inside that folder.<br />
<br />
You just need to copy thoses files to your ''data'' folder, the other files can be deleted after unshielding:<br />
* Video (found on the disc)<br />
* Music (found where you unshielded the cabs)<br />
* Sound (found where you unshielded the cabs)<br />
* Splash (found where you unshielded the cabs)<br />
* Morrowind.esm (found in Data_Files after unshielding)<br />
* Morrowind.bsa (found in Data_Files after unshielding)<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=728Development Environment Setup2012-09-18T09:44:52Z<p>Brotherbrick: fixed typos and unnecessary stuff</p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://help.github.com/ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.8] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI 3.2.0] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet 2.80] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.org/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: The file you want is '''Git-1.7.1-preview20100612.exe''' found [http://code.google.com/p/msysgit/downloads/list HERE].<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.8 SDK for Visual Studio 2008 or 2010. Environment variable '''OGRE_HOME'''.<br />
* [http://www.boost.org/users/download/ Boost]: Boost lib used by OGRE but perhaps you should set it manually. In OGRE boost system, file_system, and program_options are missing, you should download the mt and mt-gd for vc90 and putt libs and dll in your OgreSDK_vc9_v1-7-1\boost_1_42\lib dir, they are in the boost-binaries\1.42.0 section in sourceforge download page. The boost source included in OGRE is missing filesystem and program_option, you should download them from boost sources and copy the directories in Ogre3D\boost_1_42\boost dir. Environment variable '''BOOST_ROOT'''.<br />
* [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype]: Freetype2, and set the environment variable FREETYPE_DIR to the <install_path><br />
* OIS<br />
* [http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx OpenAL]: OpenAL11CoreSDK, environment variable '''OPENALDIR'''.<br />
* [http://audiere.sourceforge.net/download.php Audiere]: Environment variable '''AUDIERE_DIR'''.<br />
* [http://qt.nokia.com/downloads QT]. Environment variable '''QTDIR'''.<br />
* GNU C compiler Library<br />
* libsndfile<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon)<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
Then you should update include dirs of project to add OGRE (<path_to_ogre>\include and <path_to_ogre>\include\OGRE).<br />
<br />
Then you should include the correct path to needed libs (OgreSDK\lib & boost\lib) if not done by the CMake script. This may require first setting the OGRE_HOME environment, e.g. <code>set OGRE_HOME=C:\OgreSDK</code>.<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via Eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
===Arch Dependencies===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Gentoo Dependencies===<br />
You have to emerge dev-games/ogre with useflags "boost cg freeimage ois opengl threads zip" and from zugaina overlay, dev-games/mygui with useflag ogre.<br />
<br />
===Ubuntu Dependencies===<br />
<br />
====Key requirements====<br />
Because some dependencies of OpenMW are not in the Ubuntu repositories we made a development repository on Launchpad which provides packages for the missing dependencies.<br />
<br />
To be able to install these packages you need to add the openmw/build Launchpad PPA by running:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-add-repository ppa:openmw/build<br />
</syntaxhighlight><br />
<br />
and to make sure that the ppa will be used run:<br />
<syntaxhighlight lang="bash"><br />
sudo apt-get update<br />
</syntaxhighlight><br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libois-dev libopenal-dev libmpg123-dev libpng-dev libogre-dev \<br />
libsndfile1-dev libblkid-dev libfreeimage-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-program-options-dev libboost-system-dev libboost-wave-dev uuid-dev libqt4-opengl libqt4-dev \<br />
libbullet-dev libmygui-dev nvidia-cg-toolkit cmake build-essential<br />
<br />
</syntaxhighlight><br />
<br />
===Fetching the source===<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
cd openmw<br />
git submodule update --init<br />
<br />
</syntaxhighlight><br />
<br />
===Building===<br />
<br />
====With make====<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir Build<br />
cd Build<br />
cmake ../openmw/ <br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can decrease your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
====With codeblocks====<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
cd Build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
====With Kdevelop====<br />
<br />
Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (.../OpenMW/openmw). You will have to choose build folder.<br />
<br />
For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "openmw", clicking "+" and choosing "openmw/apps/openmw/openmw" as "Project Target".<br />
<br />
===Fedora===<br />
<br />
====Package Installations====<br />
<br />
First off, we will need to download all of the necessery development libraries from the main Fedora repositories (this is for building OpenMW and later the OGRE plugin):<br />
<br />
yum install @development-tools<br />
<br />
yum install cmake openal-soft-devel bullet-devel ois-devel ogre-devel libblkid-devel boost-devel qt-devel libsndfile-devel \<br />
zziplib-devel freetype-devel libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel freeimage-devel openexr-devel \<br />
glew-devel tinyxml-devel tbb cppunit-devel git<br />
<br />
<br />
Next, we will need to enable the RPMFusion repositories on our system if it isn't already done so, per the instructions found here: [http://rpmfusion.org/Configuration]<br />
<br />
Once the RPMFusion repositories (both free and non-free) have been installed, we will also need the following packages:<br />
<br />
yum install Cg libmpg123-devel<br />
<br />
<br />
====Cg Plugin Setup====<br />
As of 0.13.0, we will need to compile a plugin for OGRE that does not come with the default OGRE packages from Fedora. This plugin is the '''Plugin_CgProgramManager.so''' file, which needs the Cg package (installed previously) to compile. First, determine which version of OGRE you have installed (as of Fedora 16, this will be 1.8rc1):<br />
<br />
rpm -qi ogre-devel<br />
<br />
<br />
Go to the main OGRE website and download the source tarball for that version. You MUST download the source for the same version you have installed.<br />
<br />
[http://www.ogre3d.org/download/source]<br />
<br />
Unzip the tarball, and compile the source code with the following:<br />
<br />
cmake<br />
make<br />
<br />
<br />
Once the libraries have been compiled, the '''Plugin_CgProgramManager.so''' file should be in the lib directory. As root, copy this file to the OGRE lib directory on your system. For 64bit systems, this will be located at:<br />
<br />
/usr/lib64/OGRE<br />
<br />
For 32bit systems:<br />
<br />
/usr/lib/OGRE<br />
<br />
Next, run the following command to register the new library:<br />
<br />
/sbin/ldconfig<br />
<br />
<br />
====Building OpenMW====<br />
Now we can compile OpenMW. Download the source from the main downloads page: [http://code.google.com/p/openmw/downloads/list], or get the latest git snapshot: [https://github.com/zinnschlag/openmw] with the following:<br />
<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
Unzip the tarball or change into the directory that has your cloned git files, and run the following commands to build the source:<br />
<br />
cmake<br />
make<br />
<br />
=Mac OS X=<br />
<br />
== Initial setup ==<br />
<br />
First of all, clone OpenMW repo.<br />
<br />
<syntaxhighlight lang="bash"><br />
$ git clone github.com/zinnschlag/openmw<br />
</syntaxhighlight><br />
Or use your github url if you forked.<br />
<br />
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.<br />
<br />
It's useful to create env var for lib install prefix:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export OMW_LIB_PREFIX=$HOME/path/libs/root<br />
</syntaxhighlight><br />
Most of libs can be installed from [https://github.com/mxcl/homebrew Homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.<br />
<br />
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ export CFLAGS="-arch i386"<br />
$ export CXXFLAGS="-arch i386"<br />
$ export LDFLAGS="-arch i386"<br />
</syntaxhighlight><br />
If you close your terminal, you should set env vars again before pcoceeding to next steps!<br />
<br />
== Boost ==<br />
<br />
Download [http://www.boost.org boost] and install it with the following command:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/boost/source<br />
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX<br />
$ ./bjam --build-dir=build --layout=versioned \<br />
--toolset=darwin architecture=x86 address-model=32 \<br />
--link-shared,static --prefix=$OMW_LIB_PREFIX install<br />
</syntaxhighlight><br />
Alternatively you can install boost with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install boost --universal</syntaxhighlight><br />
I think MacPorts also should support universal build for boost.<br />
<br />
== Ogre ==<br />
<br />
Download [http://www.ogre3d.org Ogre] SDK (tested with 1.8rc1), unpack it somewhere and move <tt>lib/Release/Ogre.framework</tt> into <tt>/Library/Frameworks</tt>.<br />
<br />
== OIS ==<br />
<br />
Download patched [https://github.com/corristo/ois-fork OIS] and use the XCode project provided. Be sure to set your build architecture to <tt>i386</tt>. Once it built, locate built OIS.framework with Xcode and move it to <tt>/Library/Frameworks</tt>.<br />
<br />
== mpg123 ==<br />
<br />
Download [http://www.mpg123.de MPG 123] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/mpg123/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \<br />
--disable-dependency-tracking \<br />
--with-optimization=4 \<br />
--with-audio=dummy \<br />
--with-default-audio=dummy \<br />
--with-cpu=sse_alone \<br />
$ make install<br />
</syntaxhighlight><br />
<br />
== libsndfile ==<br />
<br />
Download [http://www.mega-nerd.com/libsndfile libsndfile] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/libsndfile/source<br />
$ ./configure --prefix=$OMW_LIB_PREFIX \<br />
--disable-dependency-tracking<br />
$ make install<br />
</syntaxhighlight><br />
or install with homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install libsndfile --universal</syntaxhighlight><br />
<br />
== Bullet ==<br />
<br />
Download [http://bulletphysics.org Bullet] and build it:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /path/to/bullet/source<br />
$ mkdir build<br />
$ cd build<br />
$ cmake -DCMAKE_BUILD_TYPE=Release \<br />
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \<br />
-DBUILD_EXTRAS=OFF \<br />
-DBUILD_DEMOS=OFF \<br />
-DCMAKE_OSX_ARCHITECTURES=i386 \<br />
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \<br />
-G"Unix Makefiles" ../<br />
$ make install</syntaxhighlight><br />
<br />
or install with homebrew:<br />
<syntaxhighlight lang="bash">$ brew install bullet --HEAD --universal</syntaxhighlight><br />
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.<br />
<br />
== Qt ==<br />
<br />
Install [http://qt.nokia.com/ Qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:<br />
<br />
<syntaxhighlight lang="bash">$ brew install qt --universal</syntaxhighlight><br />
== Run CMake ==<br />
<br />
Generate the Makefile for OpenMW as follows and build OpenMW:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ mkdir /path/to/openmw/build/dir<br />
$ cd /path/to/open/build/dir<br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=i386 \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \<br />
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \<br />
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \<br />
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \<br />
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \<br />
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \<br />
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
You can use <tt>-G&quot;Xcode&quot;</tt> if you prefer Xcode, or -G&quot;Eclipse CDT4 - Unix Makefiles&quot; if you prefer Eclipse. You also can specify <tt>-D CMAKE_BUILD_TYPE=Debug</tt> for debug build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.<br />
<br />
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:<br />
<br />
<syntaxhighlight lang="bash"><br />
$ cmake \<br />
-D CMAKE_OSX_ARCHITECTURES=&quot;i386&quot; \<br />
-D OGRE_SDK=/path/to/ogre/sdk \<br />
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \<br />
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \<br />
-G "Unix Makefiles" /path/to/openmw/source/dir<br />
$ make<br />
</syntaxhighlight><br />
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: <tt>-D CMAKE_C_COMPILER=/usr/bin/clang</tt> and <tt>-D CMAKE_CXX_COMPILER=/usr/bin/clang</tt><br />
<br />
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:<br />
<br />
<pre>-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"</pre><br />
== Run ==<br />
<br />
From your build directory run:<br />
<br />
<syntaxhighlight lang="bash">$ OpenMW.app/Contents/MacOS/openmw</syntaxhighlight><br />
or:<br />
<syntaxhighlight lang="bash">$ open OpenMW.app</syntaxhighlight><br />
Enjoy!<br />
<br />
=Eclipse=<br />
You have to use the C/C++ version of Eclipse, that you can download [https://www.eclipse.org/downloads/ here]<br />
<br />
==Git within Eclipse==<br />
If you want to use Eclipse as Git explorer:<br />
# From the project explorer, right click, and select "Import..."<br />
# Select "Git / Projects from Git"<br />
# Click "Next"<br />
# Select "Local"<br />
# Click "Next"<br />
#"Add..." / "Browse", and select openmw's directory<br />
# Click "Next"<br />
# Select "Use the new project wizard", and "Finish".<br />
<br />
== Import the project==<br />
Select "C/C++ / Makefile project with existing code" as project type. In "Existing code location", click browse, and again,select openmw's folder. Also select "Linux GCC" as toolchain, then click "Finish".<br />
<br />
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like<br />
<br />
make -j 4 -C ${ProjDirPath}../build<br />
<br />
Now you should be able to build openmw.<br />
<br />
== Fix includes==<br />
To fix includes (Eclipse complaining about Ogre and Bullet), go to project properties, "C/C++ General", "Paths and symbols", select "GNU C++".<br />
<br />
Click the "add" button to add the following paths :<br />
<br />
/usr/include/OGRE<br />
<br />
/usr/include/bullet<br />
<br />
== Run ==<br />
To run it, create a new Run configuration. Select openmw as project, and click "search project" to find the executable (../build/openmw). Then go to the Arguments panel and uncheck "Use default" for working directory, and type in : "${workspace_loc:openmw}../build"<br />
<br />
Apply, and you should now be able to run openmw !<br />
<br />
=Data=<br />
Create a data folder anywhere, then edit your openmw.cfg file to point to that folder.<br />
<br />
Then you have to copy the game data from your disc or installation into that data folder.<br />
The datafiles are inside data1.cab/data1.hdr and data2.cab on the disc.<br />
<br />
You can use ''unshield'' to extract data from your Morrowind CD. Create a temporary folder first, then copy the three files over and use the command ''unshield x data1.hdr data2.cab'' inside that folder.<br />
<br />
You just need to copy thoses files to your ''data'' folder, the other files can be deleted after unshielding:<br />
* Video (found on the disc)<br />
* Music (found where you unshielded the cabs)<br />
* Sound (found where you unshielded the cabs)<br />
* Splash (found where you unshielded the cabs)<br />
* Morrowind.esm (found in Data_Files after unshielding)<br />
* Morrowind.bsa (found in Data_Files after unshielding)<br />
<br />
For a detailed description of how to obtain the data files check [[Getting_Data_Files_for_Linux_Install]].</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Main_Page&diff=254Main Page2012-03-13T15:00:21Z<p>Brotherbrick: /* Getting Started */</p>
<hr />
<div>__NOTOC__<br />
<br />
{|<br />
| width="100%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===What is OpenMW?===<br />
<br />
OpenMW is a new engine for 2002's Game of the Year, [http://en.wikipedia.org/wiki/Morrowind The Elder Scrolls 3: Morrowind].<br />
It aims to be a fully playable (and improved!), open source implementation of the game's engine and functionality.<br />
You will still need the original game data to play OpenMW. OpenMW will run on Windows, Mac OS X and Linux.<br />
<br />
See also: [http://openmw.org/faq/ Frequently Asked Questions (FAQ)] Questions? [http://openmw.org/forum/ Try the forum!]<br />
<br />
See [http://openmw.org/ the blog] for recent progress report !<br />
<br />
{| width="100%"<br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><center><br />
<br />
===Download OpenMW===<br />
<br />
Latest Version: 0.12 (06 March 2012)<br />
<br />
[http://code.google.com/p/openmw/downloads/list Download Now!]<br />
<br />
[[Project_History|Project History]]<br />
<br />
</center></div><br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><center><br />
<br />
===Latest News===<br />
<br />
</center><br />
<br />
* [http://openmw.org/2012/03/06/openmw-0-12-0-released/ OpenMW 0.12 Released] (March 06 2012)<br />
* [http://openmw.org/2011/09/26/openmw-0-11-1-release/ OpenMW 0.11.1 Released!] (September 26 2011)<br />
* [http://openmw.com/forum/viewtopic.php?f=13&t=418 OpenMW 0.10.0 is out!] (3 April 2011)<br />
* [http://openmw.com/forum/viewtopic.php?f=13&t=385 OpenMW 0.9.0 Source Code Available] (10 Feb 2011)<br />
* [http://openmw.com/forum/viewtopic.php?f=13&t=275 OpenMW 0.9.0 is out!] (13 Jan 2011)<br />
<br />
<center><br />
<br />
Last Five News items displayed, archive news can be [http://openmw.com/forum/viewforum.php?f=13 here.]<br />
<br />
</center></div><br />
|}<br />
<br />
<div style="background-color: #ffcc99; border: 2px solid #cc6600; margin: 3px; padding: 3px"><center><br />
<br />
===[[Contribution Wanted]]===<br />
<br />
</center></div><br />
<br />
{| width="100%"<br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===Getting Started===<br />
<br />
* [http://openmw.org/forum/ Official Forums]<br />
* [[Installation Instructions]]<br />
* [http://openmw.org/faq/ FAQ]<br />
* [[Controls and Commands]]<br />
* [http://bugs.openmw.org/projects/openmw/issues?set_filter=1&f%5B%5D=status_id&op%5Bstatus_id%5D=%21&v%5Bstatus_id%5D%5B%5D=3&v%5Bstatus_id%5D%5B%5D=5&v%5Bstatus_id%5D%5B%5D=6&f%5B%5D=tracker_id&op%5Btracker_id%5D=%3D&v%5Btracker_id%5D%5B%5D=1&f%5B%5D=&c%5B%5D=project&c%5B%5D=tracker&c%5B%5D=status&c%5B%5D=priority&c%5B%5D=subject&c%5B%5D=assigned_to&c%5B%5D=updated_on&group_by=tracker Known Issues]<br />
<br />
</div><br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===Development===<br />
<br />
* [[Developer Reference]]<br />
* [http://bugs.openmw.org/projects/openmw Issue Tracker]<br />
* [[Policies and Standards]] - must read for developers<br />
* [http://zinnschlag.github.com/openmw/index.html Source documentation]<br />
* [http://github.com/zinnschlag/openmw OpenMW source at GitHub]<br />
* [[GitHub FAQ]]<br />
* [[Development Environment Setup]]<br />
* [[Wishlist]]<br />
* [http://openmw.org/the-team/ Developers]<br />
<br />
</div><br />
|}<br />
<br />
{| width="100%"<br />
| width="100%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===More links===<br />
<br />
* [[Screenshots]] (more on the [http://openmw.sourceforge.net/jaws/index.php/photos/album/1 old site].)<br />
* [http://openmw.org/media/ Videos]<br />
* [[Project History]]<br />
* [[Star's Guide to OpenMW]] - (WIP) Complete guide to OpenMW from different contributor perspectives. Great for beginners.<br />
* [[Web Presence]] - Where you can find OpenMW on the web.<br />
<br />
</div><br />
|}<br />
<br />
{| width="100%"<br />
| width="100%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===Other Resources===<br />
<br />
* [[Tools and Documents]]<br />
* [http://www.uesp.net/wiki/Morrowind:Morrowind The Unofficial Morrowind Wiki Pages] - a wiki with extensive information about Morrowind.<br />
* [http://www.youtube.com/watch?v=oEj02vszkEc Morrowind Video Review by Gamespot]<br />
* [http://bethblog.com/ Bethseda Blog] - Blog produced by the developers of Morrowind<br />
* [http://store.steampowered.com/app/22320/ Purchase Morrowind] - available from Steam<br />
<br />
</div><br />
|}<br />
<br />
[[Special:AllPages|{{NUMBEROFPAGES}} Pages]] - Please help by contributing!</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Main_Page&diff=253Main Page2012-03-13T15:00:11Z<p>Brotherbrick: /* Getting Started */</p>
<hr />
<div>__NOTOC__<br />
<br />
{|<br />
| width="100%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===What is OpenMW?===<br />
<br />
OpenMW is a new engine for 2002's Game of the Year, [http://en.wikipedia.org/wiki/Morrowind The Elder Scrolls 3: Morrowind].<br />
It aims to be a fully playable (and improved!), open source implementation of the game's engine and functionality.<br />
You will still need the original game data to play OpenMW. OpenMW will run on Windows, Mac OS X and Linux.<br />
<br />
See also: [http://openmw.org/faq/ Frequently Asked Questions (FAQ)] Questions? [http://openmw.org/forum/ Try the forum!]<br />
<br />
See [http://openmw.org/ the blog] for recent progress report !<br />
<br />
{| width="100%"<br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><center><br />
<br />
===Download OpenMW===<br />
<br />
Latest Version: 0.12 (06 March 2012)<br />
<br />
[http://code.google.com/p/openmw/downloads/list Download Now!]<br />
<br />
[[Project_History|Project History]]<br />
<br />
</center></div><br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><center><br />
<br />
===Latest News===<br />
<br />
</center><br />
<br />
* [http://openmw.org/2012/03/06/openmw-0-12-0-released/ OpenMW 0.12 Released] (March 06 2012)<br />
* [http://openmw.org/2011/09/26/openmw-0-11-1-release/ OpenMW 0.11.1 Released!] (September 26 2011)<br />
* [http://openmw.com/forum/viewtopic.php?f=13&t=418 OpenMW 0.10.0 is out!] (3 April 2011)<br />
* [http://openmw.com/forum/viewtopic.php?f=13&t=385 OpenMW 0.9.0 Source Code Available] (10 Feb 2011)<br />
* [http://openmw.com/forum/viewtopic.php?f=13&t=275 OpenMW 0.9.0 is out!] (13 Jan 2011)<br />
<br />
<center><br />
<br />
Last Five News items displayed, archive news can be [http://openmw.com/forum/viewforum.php?f=13 here.]<br />
<br />
</center></div><br />
|}<br />
<br />
<div style="background-color: #ffcc99; border: 2px solid #cc6600; margin: 3px; padding: 3px"><center><br />
<br />
===[[Contribution Wanted]]===<br />
<br />
</center></div><br />
<br />
{| width="100%"<br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===Getting Started===<br />
<br />
* [http://openmw.org/forum/ Official Forums]<br />
* [[Installation Instructions]]<br />
* [http://openmw.org/faq/ FAQ]<br />
* [[Controls and Commands]]<br />
* [http://bugs.openmw.org/projects/openmw/issues?set_filter=1&f%5B%5D=status_id&op%5Bstatus_id%5D=%21&v%5Bstatus_id%5D%5B%5D=3&v%5Bstatus_id%5D%5B%5D=5&v%5Bstatus_id%5D%5B%5D=6&f%5B%5D=tracker_id&op%5Btracker_id%5D=%3D&v%5Btracker_id%5D%5B%5D=1&f%5B%5D=&c%5B%5D=project&c%5B%5D=tracker&c%5B%5D=status&c%5B%5D=priority&c%5B%5D=subject&c%5B%5D=assigned_to&c%5B%5D=updated_on&group_by=tracker | Known Issues]<br />
<br />
</div><br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===Development===<br />
<br />
* [[Developer Reference]]<br />
* [http://bugs.openmw.org/projects/openmw Issue Tracker]<br />
* [[Policies and Standards]] - must read for developers<br />
* [http://zinnschlag.github.com/openmw/index.html Source documentation]<br />
* [http://github.com/zinnschlag/openmw OpenMW source at GitHub]<br />
* [[GitHub FAQ]]<br />
* [[Development Environment Setup]]<br />
* [[Wishlist]]<br />
* [http://openmw.org/the-team/ Developers]<br />
<br />
</div><br />
|}<br />
<br />
{| width="100%"<br />
| width="100%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===More links===<br />
<br />
* [[Screenshots]] (more on the [http://openmw.sourceforge.net/jaws/index.php/photos/album/1 old site].)<br />
* [http://openmw.org/media/ Videos]<br />
* [[Project History]]<br />
* [[Star's Guide to OpenMW]] - (WIP) Complete guide to OpenMW from different contributor perspectives. Great for beginners.<br />
* [[Web Presence]] - Where you can find OpenMW on the web.<br />
<br />
</div><br />
|}<br />
<br />
{| width="100%"<br />
| width="100%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===Other Resources===<br />
<br />
* [[Tools and Documents]]<br />
* [http://www.uesp.net/wiki/Morrowind:Morrowind The Unofficial Morrowind Wiki Pages] - a wiki with extensive information about Morrowind.<br />
* [http://www.youtube.com/watch?v=oEj02vszkEc Morrowind Video Review by Gamespot]<br />
* [http://bethblog.com/ Bethseda Blog] - Blog produced by the developers of Morrowind<br />
* [http://store.steampowered.com/app/22320/ Purchase Morrowind] - available from Steam<br />
<br />
</div><br />
|}<br />
<br />
[[Special:AllPages|{{NUMBEROFPAGES}} Pages]] - Please help by contributing!</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Testing&diff=250Testing2012-03-13T13:50:47Z<p>Brotherbrick: /* Extra Information */</p>
<hr />
<div>For anyone who wants to give OpenMW a try, this will get you started in testing things out.<br />
<br />
== Crashcourse ==<br />
'openmw --help' gives a good overview of options available at launch.<br />
'openmw --new-game' will place in the beginning of the game aboard the boat.<br />
<br />
F1 to enter console screen to issue commands.<br />
<br />
Physics: the command is ToggleCollision (or TCL).<br />
<br />
Teleport: the command is coc (e.g. coc "Seyda Neen" or coc Balmora).<br />
<br />
Animate: the command to run the animations of an object is 'npcid->playgroup all 1' (e.g. Runa->playgroup all 1).<br />
<br />
== Scripting == <br />
The current status of [[Scripting_(status)| script commands]] used in OpenMW.<br />
<br />
The complete list of [http://www.uesp.net/wiki/Morrowind:Console Console] script commands used in Morrowind along with their description.<br />
<br />
== Extra Information ==<br />
<br />
Here is a list of [[Morrowind_Interior_Cell_Names|Interior Cell Names]] in Morrowind that you can use to go from one place to another.<br />
<br />
There is a [[Test_Level | Test Level]] project that is also interesting.</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Testing&diff=249Testing2012-03-13T13:50:30Z<p>Brotherbrick: /* Extra Information */</p>
<hr />
<div>For anyone who wants to give OpenMW a try, this will get you started in testing things out.<br />
<br />
== Crashcourse ==<br />
'openmw --help' gives a good overview of options available at launch.<br />
'openmw --new-game' will place in the beginning of the game aboard the boat.<br />
<br />
F1 to enter console screen to issue commands.<br />
<br />
Physics: the command is ToggleCollision (or TCL).<br />
<br />
Teleport: the command is coc (e.g. coc "Seyda Neen" or coc Balmora).<br />
<br />
Animate: the command to run the animations of an object is 'npcid->playgroup all 1' (e.g. Runa->playgroup all 1).<br />
<br />
== Scripting == <br />
The current status of [[Scripting_(status)| script commands]] used in OpenMW.<br />
<br />
The complete list of [http://www.uesp.net/wiki/Morrowind:Console Console] script commands used in Morrowind along with their description.<br />
<br />
== Extra Information ==<br />
<br />
Here is a list of [[Morrowind_Interior_Cell_Names|Interior Cell Names]] in Morrowind that you can use to go from one place to another.<br />
<br />
There is a [[http://openmw.org/wiki/index.php?title=Test_Level | Test Level]] project that is also interesting.</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Testing&diff=248Testing2012-03-13T13:50:14Z<p>Brotherbrick: /* Extra Information */</p>
<hr />
<div>For anyone who wants to give OpenMW a try, this will get you started in testing things out.<br />
<br />
== Crashcourse ==<br />
'openmw --help' gives a good overview of options available at launch.<br />
'openmw --new-game' will place in the beginning of the game aboard the boat.<br />
<br />
F1 to enter console screen to issue commands.<br />
<br />
Physics: the command is ToggleCollision (or TCL).<br />
<br />
Teleport: the command is coc (e.g. coc "Seyda Neen" or coc Balmora).<br />
<br />
Animate: the command to run the animations of an object is 'npcid->playgroup all 1' (e.g. Runa->playgroup all 1).<br />
<br />
== Scripting == <br />
The current status of [[Scripting_(status)| script commands]] used in OpenMW.<br />
<br />
The complete list of [http://www.uesp.net/wiki/Morrowind:Console Console] script commands used in Morrowind along with their description.<br />
<br />
== Extra Information ==<br />
<br />
Here is a list of [[Morrowind_Interior_Cell_Names|Interior Cell Names]] in Morrowind that you can use to go from one place to another.<br />
<br />
There is a [[http://openmw.org/wiki/index.php?title=Test_Level]] project that is also interesting.</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Project_History&diff=244Project History2012-03-13T13:45:43Z<p>Brotherbrick: </p>
<hr />
<div>== Changelog ==<br />
<br />
=== Future Versions ===<br />
[http://bugs.openmw.org/projects/openmw/roadmap | Roadmap] <br />
<br />
=== Version 0.12.0 ===<br />
''' Released March 06 2012 '''<br />
* Various rendering fixes and optimizations <br />
* Refactored engine class<br />
* Automatic package building <br />
* Various build fixes and cleanup<br />
* Various configuration fixes and cleanup, including detection of existing Morrowind installations<br />
* Basic NPC/Creature animation support added, must be activated from console <br />
* Basic implementation of Journal Window added<br />
* Fix for local scripts continuing to run if associated object is deleted <br />
* Fix for crash when taking screenshots <br />
* Fix for crash when visiting Akulakhan’s Chamber<br />
* Added catching of exceptions thrown in input handling functions <br />
* Fix for NPC Activation not working properly <br />
* Allow the player to move away from pre-defined cells <br />
<br />
* Regression: Sounds other than music not working <br />
* Regression: Scroll and button background graphics in launcher not working in Linux package <br />
<br />
=== Version 0.11.1 ===<br />
''' Released September 26 2011 '''<br />
* Launcher implemented<br />
* Misc. code cleanup<br />
* Some optimizations implemented, further optimizations are planned<br />
* Fix to allow resource loading outside of BSA files<br />
* Fix to search for openmw.cfg in the correct locations<br />
* Added the TCL alias for ToggleCollision<br />
* Added missing cfg file support for some command line options<br />
* Added reporting of resulting state to Toggle type script instructions<br />
* Fix for some NPC IDs being interpreted as Topic IDs<br />
* Implemented back end for player journal<br />
* Implemented MessageBox<br />
* Implemented tab completion in console<br />
* Implemented handling multiple data directories<br />
* Fix for accessing objects in cells via ID with mixed or upper case IDs<br />
* Fixed unicode conversion issue to allow localized encoding of gui strings<br />
<br />
=== Version 0.10.0 ===<br />
''' Released April 03 2011 '''<br />
* NPC dialogue window (not functional yet)<br />
* Collisions with objects<br />
* Refactor the PlayerPos class<br />
* Adjust file locations<br />
* CMake files and test linking for Bullet<br />
* Replace Ogre raycasting test for activation with something more precise<br />
* Adjust player movement according to collision results<br />
* FPS display<br />
* Various Portability Improvements<br />
* Mac OS X support is back!<br />
<br />
=== Version 0.9.0 ===<br />
''' Released January 13 2011 '''<br />
* Exterior cells loading, unloading and management<br />
* Character Creation GUI<br />
* Character creation<br />
* Make cell names case insensitive when doing internal lookups<br />
* Music player<br />
* NPCs rendering<br />
<br />
=== Version 0.8.0 ===<br />
''' Released September 10 2010 '''<br />
* GUI<br />
* Complete and working script engine (thanks to Marc Zinnschlag)<br />
* In game console<br />
* Sky rendering<br />
* Sound and music<br />
* Tons of smaller stuff<br />
<br />
=== Version 0.7.0 ===<br />
''' Released June 22 2010 '''<br />
* This release is a complete rewrite in C++.<br />
* All D code has been culled, and all modules have been rewritten.<br />
* The game is now back up to the level of rendering interior cells and moving around, but physics, sound, GUI, and scripting still remain to be ported from the old codebase.<br />
<br />
=== Version 0.6.0 ===<br />
''' Released March 3 2009 '''<br />
* Coded a GUI system using MyGUI<br />
* Skinned MyGUI to look like Morrowind (work in progress)<br />
* Integrated the Monster script engine<br />
* Rewrote some functions into script code<br />
* Very early MyGUI < > Monster binding<br />
* Fixed Windows sound problems (replaced old openal32.dll)<br />
<br />
=== Version 0.5.0 ===<br />
''' Released November 5 2008 '''<br />
* Collision detection with Bullet<br />
* Experimental walk & fall character physics<br />
* New key bindings:<br />
** t toggle physics mode (walking, flying, ghost),<br />
** n night eye, brightens the scene<br />
* Fixed incompatability with DMD 1.032 and newer compilers<br />
* * (thanks to tomqyp)<br />
* Various minor changes and updates<br />
<br />
=== Version 0.4.0 ===<br />
''' Released August 30 2008 '''<br />
* Switched from Audiere to OpenAL <br />
* * (BIG thanks to Chris Robinson)<br />
* Added complete Makefile (again) as a alternative build tool<br />
* More realistic lighting (thanks again to Chris Robinson)<br />
* Various localization fixes tested with Russian and French versions<br />
* Temporary workaround for the Unicode issue: invalid UTF displayed as '?'<br />
* Added ns option to disable sound, for debugging<br />
* Various bug fixes<br />
* Cosmetic changes to placate gdc Wall<br />
<br />
=== Version 0.3.0 ===<br />
''' Released July 10 2008 '''<br />
* Built and tested on Windows XP<br />
* Partial support for FreeBSD (exceptions do not work)<br />
* You no longer have to download Monster separately<br />
* Made an alternative for building without DSSS (but DSSS still works)<br />
* Renamed main program from 'morro' to 'openmw'<br />
* Made the config system more robust<br />
* Added oc switch for showing Ogre config window on startup<br />
* Removed some config files, these are auto generated when missing. <br />
* Separated plugins.cfg into linux and windows versions.<br />
* Updated Makefile and sources for increased portability <br />
confirmed to work against OIS 1.0.0 (Ubuntu repository package)<br />
** (thanks to Dmitry Marakasov)<br />
<br />
=== Version 0.2.0 ===<br />
''' Released June 17 2008 '''<br />
* Compiles with gdc<br />
* Switched to DSSS for building D code<br />
* Includes the program esmtool<br />
<br />
=== Version 0.1.0 ===<br />
''' Released June 03 2008 '''<br />
* first release</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Project_History&diff=243Project History2012-03-13T13:45:16Z<p>Brotherbrick: </p>
<hr />
<div>== Changelog ==<br />
<br />
== Future Versions ==<br />
[http://bugs.openmw.org/projects/openmw/roadmap | Roadmap] <br />
<br />
=== Version 0.12.0 ===<br />
''' Released March 06 2012 '''<br />
* Various rendering fixes and optimizations <br />
* Refactored engine class<br />
* Automatic package building <br />
* Various build fixes and cleanup<br />
* Various configuration fixes and cleanup, including detection of existing Morrowind installations<br />
* Basic NPC/Creature animation support added, must be activated from console <br />
* Basic implementation of Journal Window added<br />
* Fix for local scripts continuing to run if associated object is deleted <br />
* Fix for crash when taking screenshots <br />
* Fix for crash when visiting Akulakhan’s Chamber<br />
* Added catching of exceptions thrown in input handling functions <br />
* Fix for NPC Activation not working properly <br />
* Allow the player to move away from pre-defined cells <br />
<br />
* Regression: Sounds other than music not working <br />
* Regression: Scroll and button background graphics in launcher not working in Linux package <br />
<br />
=== Version 0.11.1 ===<br />
''' Released September 26 2011 '''<br />
* Launcher implemented<br />
* Misc. code cleanup<br />
* Some optimizations implemented, further optimizations are planned<br />
* Fix to allow resource loading outside of BSA files<br />
* Fix to search for openmw.cfg in the correct locations<br />
* Added the TCL alias for ToggleCollision<br />
* Added missing cfg file support for some command line options<br />
* Added reporting of resulting state to Toggle type script instructions<br />
* Fix for some NPC IDs being interpreted as Topic IDs<br />
* Implemented back end for player journal<br />
* Implemented MessageBox<br />
* Implemented tab completion in console<br />
* Implemented handling multiple data directories<br />
* Fix for accessing objects in cells via ID with mixed or upper case IDs<br />
* Fixed unicode conversion issue to allow localized encoding of gui strings<br />
<br />
=== Version 0.10.0 ===<br />
''' Released April 03 2011 '''<br />
* NPC dialogue window (not functional yet)<br />
* Collisions with objects<br />
* Refactor the PlayerPos class<br />
* Adjust file locations<br />
* CMake files and test linking for Bullet<br />
* Replace Ogre raycasting test for activation with something more precise<br />
* Adjust player movement according to collision results<br />
* FPS display<br />
* Various Portability Improvements<br />
* Mac OS X support is back!<br />
<br />
=== Version 0.9.0 ===<br />
''' Released January 13 2011 '''<br />
* Exterior cells loading, unloading and management<br />
* Character Creation GUI<br />
* Character creation<br />
* Make cell names case insensitive when doing internal lookups<br />
* Music player<br />
* NPCs rendering<br />
<br />
=== Version 0.8.0 ===<br />
''' Released September 10 2010 '''<br />
* GUI<br />
* Complete and working script engine (thanks to Marc Zinnschlag)<br />
* In game console<br />
* Sky rendering<br />
* Sound and music<br />
* Tons of smaller stuff<br />
<br />
=== Version 0.7.0 ===<br />
''' Released June 22 2010 '''<br />
* This release is a complete rewrite in C++.<br />
* All D code has been culled, and all modules have been rewritten.<br />
* The game is now back up to the level of rendering interior cells and moving around, but physics, sound, GUI, and scripting still remain to be ported from the old codebase.<br />
<br />
=== Version 0.6.0 ===<br />
''' Released March 3 2009 '''<br />
* Coded a GUI system using MyGUI<br />
* Skinned MyGUI to look like Morrowind (work in progress)<br />
* Integrated the Monster script engine<br />
* Rewrote some functions into script code<br />
* Very early MyGUI < > Monster binding<br />
* Fixed Windows sound problems (replaced old openal32.dll)<br />
<br />
=== Version 0.5.0 ===<br />
''' Released November 5 2008 '''<br />
* Collision detection with Bullet<br />
* Experimental walk & fall character physics<br />
* New key bindings:<br />
** t toggle physics mode (walking, flying, ghost),<br />
** n night eye, brightens the scene<br />
* Fixed incompatability with DMD 1.032 and newer compilers<br />
* * (thanks to tomqyp)<br />
* Various minor changes and updates<br />
<br />
=== Version 0.4.0 ===<br />
''' Released August 30 2008 '''<br />
* Switched from Audiere to OpenAL <br />
* * (BIG thanks to Chris Robinson)<br />
* Added complete Makefile (again) as a alternative build tool<br />
* More realistic lighting (thanks again to Chris Robinson)<br />
* Various localization fixes tested with Russian and French versions<br />
* Temporary workaround for the Unicode issue: invalid UTF displayed as '?'<br />
* Added ns option to disable sound, for debugging<br />
* Various bug fixes<br />
* Cosmetic changes to placate gdc Wall<br />
<br />
=== Version 0.3.0 ===<br />
''' Released July 10 2008 '''<br />
* Built and tested on Windows XP<br />
* Partial support for FreeBSD (exceptions do not work)<br />
* You no longer have to download Monster separately<br />
* Made an alternative for building without DSSS (but DSSS still works)<br />
* Renamed main program from 'morro' to 'openmw'<br />
* Made the config system more robust<br />
* Added oc switch for showing Ogre config window on startup<br />
* Removed some config files, these are auto generated when missing. <br />
* Separated plugins.cfg into linux and windows versions.<br />
* Updated Makefile and sources for increased portability <br />
confirmed to work against OIS 1.0.0 (Ubuntu repository package)<br />
** (thanks to Dmitry Marakasov)<br />
<br />
=== Version 0.2.0 ===<br />
''' Released June 17 2008 '''<br />
* Compiles with gdc<br />
* Switched to DSSS for building D code<br />
* Includes the program esmtool<br />
<br />
=== Version 0.1.0 ===<br />
''' Released June 03 2008 '''<br />
* first release</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Main_Page&diff=242Main Page2012-03-13T13:43:31Z<p>Brotherbrick: /* Download OpenMW */</p>
<hr />
<div>__NOTOC__<br />
<br />
{|<br />
| width="100%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===What is OpenMW?===<br />
<br />
OpenMW is a new engine for 2002's Game of the Year, [http://en.wikipedia.org/wiki/Morrowind The Elder Scrolls 3: Morrowind].<br />
It aims to be a fully playable (and improved!), open source implementation of the game's engine and functionality.<br />
You will still need the original game data to play OpenMW. OpenMW will run on Windows, Mac OS X and Linux.<br />
<br />
See also: [http://openmw.org/faq/ Frequently Asked Questions (FAQ)] Questions? [http://openmw.org/forum/ Try the forum!]<br />
<br />
See [http://openmw.org/ the blog] for recent progress report !<br />
<br />
{| width="100%"<br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><center><br />
<br />
===Download OpenMW===<br />
<br />
Latest Version: 0.12 (06 March 2012)<br />
<br />
[http://code.google.com/p/openmw/downloads/list Download Now!]<br />
<br />
[[Project_History|Project History]]<br />
<br />
</center></div><br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><center><br />
<br />
===Latest News===<br />
<br />
</center><br />
<br />
* [http://openmw.org/2012/03/06/openmw-0-12-0-released/ OpenMW 0.12 Released] (March 06 2012)<br />
* [http://openmw.org/2011/09/26/openmw-0-11-1-release/ OpenMW 0.11.1 Released!] (September 26 2011)<br />
* [http://openmw.com/forum/viewtopic.php?f=13&t=418 OpenMW 0.10.0 is out!] (3 April 2011)<br />
* [http://openmw.com/forum/viewtopic.php?f=13&t=385 OpenMW 0.9.0 Source Code Available] (10 Feb 2011)<br />
* [http://openmw.com/forum/viewtopic.php?f=13&t=275 OpenMW 0.9.0 is out!] (13 Jan 2011)<br />
<br />
<center><br />
<br />
Last Five News items displayed, archive news can be [http://openmw.com/forum/viewforum.php?f=13 here.]<br />
<br />
</center></div><br />
|}<br />
<br />
<div style="background-color: #ffcc99; border: 2px solid #cc6600; margin: 3px; padding: 3px"><center><br />
<br />
===[[Contribution Wanted]]===<br />
<br />
</center></div><br />
<br />
{| width="100%"<br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===Getting Started===<br />
<br />
* [http://openmw.org/forum/ Official Forums]<br />
* [[Installation Instructions]]<br />
* [http://openmw.org/faq/ FAQ]<br />
* [[Controls and Commands]]<br />
* [http://bugs.openmw.org/projects/openmw/issues?query_id=6 Known Issues]<br />
<br />
</div><br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===Development===<br />
<br />
* [[Developer Reference]]<br />
* [http://bugs.openmw.org/projects/openmw Issue Tracker]<br />
* [[Policies and Standards]] - must read for developers<br />
* [http://zinnschlag.github.com/openmw/index.html Source documentation]<br />
* [http://github.com/zinnschlag/openmw OpenMW source at GitHub]<br />
* [[GitHub FAQ]]<br />
* [[Development Environment Setup]]<br />
* [[Wishlist]]<br />
* [http://openmw.org/the-team/ Developers]<br />
<br />
</div><br />
|}<br />
<br />
{| width="100%"<br />
| width="100%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===More links===<br />
<br />
* [[Screenshots]] (more on the [http://openmw.sourceforge.net/jaws/index.php/photos/album/1 old site].)<br />
* [http://openmw.org/media/ Videos]<br />
* [[Project History]]<br />
* [[Star's Guide to OpenMW]] - (WIP) Complete guide to OpenMW from different contributor perspectives. Great for beginners.<br />
* [[Web Presence]] - Where you can find OpenMW on the web.<br />
<br />
</div><br />
|}<br />
<br />
{| width="100%"<br />
| width="100%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===Other Resources===<br />
<br />
* [[Tools and Documents]]<br />
* [http://www.uesp.net/wiki/Morrowind:Morrowind The Unofficial Morrowind Wiki Pages] - a wiki with extensive information about Morrowind.<br />
* [http://www.youtube.com/watch?v=oEj02vszkEc Morrowind Video Review by Gamespot]<br />
* [http://bethblog.com/ Bethseda Blog] - Blog produced by the developers of Morrowind<br />
* [http://store.steampowered.com/app/22320/ Purchase Morrowind] - available from Steam<br />
<br />
</div><br />
|}<br />
<br />
[[Special:AllPages|{{NUMBEROFPAGES}} Pages]] - Please help by contributing!</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Main_Page&diff=241Main Page2012-03-13T13:43:08Z<p>Brotherbrick: /* Download OpenMW */</p>
<hr />
<div>__NOTOC__<br />
<br />
{|<br />
| width="100%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===What is OpenMW?===<br />
<br />
OpenMW is a new engine for 2002's Game of the Year, [http://en.wikipedia.org/wiki/Morrowind The Elder Scrolls 3: Morrowind].<br />
It aims to be a fully playable (and improved!), open source implementation of the game's engine and functionality.<br />
You will still need the original game data to play OpenMW. OpenMW will run on Windows, Mac OS X and Linux.<br />
<br />
See also: [http://openmw.org/faq/ Frequently Asked Questions (FAQ)] Questions? [http://openmw.org/forum/ Try the forum!]<br />
<br />
See [http://openmw.org/ the blog] for recent progress report !<br />
<br />
{| width="100%"<br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><center><br />
<br />
===Download OpenMW===<br />
<br />
Latest Version: 0.12 (06 March 2012)<br />
<br />
[http://code.google.com/p/openmw/downloads/list Download Now!]<br />
<br />
[[Project_History]]<br />
<br />
</center></div><br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><center><br />
<br />
===Latest News===<br />
<br />
</center><br />
<br />
* [http://openmw.org/2012/03/06/openmw-0-12-0-released/ OpenMW 0.12 Released] (March 06 2012)<br />
* [http://openmw.org/2011/09/26/openmw-0-11-1-release/ OpenMW 0.11.1 Released!] (September 26 2011)<br />
* [http://openmw.com/forum/viewtopic.php?f=13&t=418 OpenMW 0.10.0 is out!] (3 April 2011)<br />
* [http://openmw.com/forum/viewtopic.php?f=13&t=385 OpenMW 0.9.0 Source Code Available] (10 Feb 2011)<br />
* [http://openmw.com/forum/viewtopic.php?f=13&t=275 OpenMW 0.9.0 is out!] (13 Jan 2011)<br />
<br />
<center><br />
<br />
Last Five News items displayed, archive news can be [http://openmw.com/forum/viewforum.php?f=13 here.]<br />
<br />
</center></div><br />
|}<br />
<br />
<div style="background-color: #ffcc99; border: 2px solid #cc6600; margin: 3px; padding: 3px"><center><br />
<br />
===[[Contribution Wanted]]===<br />
<br />
</center></div><br />
<br />
{| width="100%"<br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===Getting Started===<br />
<br />
* [http://openmw.org/forum/ Official Forums]<br />
* [[Installation Instructions]]<br />
* [http://openmw.org/faq/ FAQ]<br />
* [[Controls and Commands]]<br />
* [http://bugs.openmw.org/projects/openmw/issues?query_id=6 Known Issues]<br />
<br />
</div><br />
| width="50%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===Development===<br />
<br />
* [[Developer Reference]]<br />
* [http://bugs.openmw.org/projects/openmw Issue Tracker]<br />
* [[Policies and Standards]] - must read for developers<br />
* [http://zinnschlag.github.com/openmw/index.html Source documentation]<br />
* [http://github.com/zinnschlag/openmw OpenMW source at GitHub]<br />
* [[GitHub FAQ]]<br />
* [[Development Environment Setup]]<br />
* [[Wishlist]]<br />
* [http://openmw.org/the-team/ Developers]<br />
<br />
</div><br />
|}<br />
<br />
{| width="100%"<br />
| width="100%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===More links===<br />
<br />
* [[Screenshots]] (more on the [http://openmw.sourceforge.net/jaws/index.php/photos/album/1 old site].)<br />
* [http://openmw.org/media/ Videos]<br />
* [[Project History]]<br />
* [[Star's Guide to OpenMW]] - (WIP) Complete guide to OpenMW from different contributor perspectives. Great for beginners.<br />
* [[Web Presence]] - Where you can find OpenMW on the web.<br />
<br />
</div><br />
|}<br />
<br />
{| width="100%"<br />
| width="100%" valign="top" |<br />
<div style="border: 1px dotted #cc6600; margin: 3px; padding: 3px"><br />
<br />
===Other Resources===<br />
<br />
* [[Tools and Documents]]<br />
* [http://www.uesp.net/wiki/Morrowind:Morrowind The Unofficial Morrowind Wiki Pages] - a wiki with extensive information about Morrowind.<br />
* [http://www.youtube.com/watch?v=oEj02vszkEc Morrowind Video Review by Gamespot]<br />
* [http://bethblog.com/ Bethseda Blog] - Blog produced by the developers of Morrowind<br />
* [http://store.steampowered.com/app/22320/ Purchase Morrowind] - available from Steam<br />
<br />
</div><br />
|}<br />
<br />
[[Special:AllPages|{{NUMBEROFPAGES}} Pages]] - Please help by contributing!</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=230Development Environment Setup2012-02-28T10:42:26Z<p>Brotherbrick: /* Packages */</p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://openmw.com/wiki/index.php?title=GitHub_FAQ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.7.x] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.com/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: The file you want is '''Git-1.7.1-preview20100612.exe''' found [http://code.google.com/p/msysgit/downloads/list HERE].<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.7.1 SDK for Visual Studio 2008 or 2010]<br />
* Boost: [http://www.boost.org/users/download/ Boost lib used by OGRE but perhaps you should set it manually], in OGRE, boost system, file_system, and program_options are missing, you should download the mt and mt-gd for vc90 and putt libs and dll in your OgreSDK_vc9_v1-7-1\boost_1_42\lib dir, they are in the boost-binaries\1.42.0 section in sourceforge download page. The boost source included in OGRE is missing filesystem and program_option, you should download them from boost sources and copy the directories in Ogre3D\boost_1_42\boost dir.<br />
* Freetype: [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype2] and set the environment variable FREETYPE_DIR to the <install_path><br />
* OIS<br />
* OpenAL<br />
* Audiere<br />
* GNU C compiler Library<br />
* libsndfile<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon) Once everything is installed properly, run the following command in the directory that you installed OpenMW's source to:<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
Then you should update include dirs of project to add OGRE (<path_to_ogre>\include and <path_to_ogre>\include\OGRE).<br />
<br />
Then you should include the correct path to needed libs (OgreSDK\lib & boost\lib) if not done by the CMake script. This may require first setting the OGRE_HOME environment, e.g. <code>set OGRE_HOME=C:\OgreSDK</code>.<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
===Arch Dependencies===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Ubuntu Dependencies===<br />
<br />
====Key requirement====<br />
<br />
In order to install Ogre, you need to add ubuntu's packager for Ogre (Andrew Fenn) as trusted:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 6F7E2F0B<br />
<br />
</syntaxhighlight><br />
<br />
note: "6F7E2F0B" is the id of Andrew Fenn.<br />
<br />
In synaptic, go to settings -> Repositories -> add copy this into the field and click add source.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ppa:andrewfenn/ogredev<br />
<br />
</syntaxhighlight><br />
<br />
within synaptic search for ogre and mark 1.7.1 for installation. click apply.<br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libois-dev libopenal-dev libmpg123-dev libpng-dev libogre-dev \<br />
libsndfile1-dev libblkid-dev libfreeimage-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-program-options-dev libboost-system-dev uuid-dev libqt4-opengl libqt4-dev \<br />
cmake build-essential<br />
<br />
</syntaxhighlight><br />
If there is a missing package, then it does not exist in your distribution's repository. This can happen with older versions. You will need to either find another source or build it yourself. Examples can be seen below.<br />
<br />
=====Ogre=====<br />
<br />
======Boost libraries not included within the libogre-dev custom package.======<br />
<br />
'''Note''': libboost-system-dev will be autoincluded in at least the filesystem package.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
libboost-filesystem-dev<br />
libboost-thread-dev<br />
libboost-program-options-dev<br />
<br />
</syntaxhighlight><br />
<br />
Install the development files for libogre-dev 1.7.1<br />
<br />
======Check======<br />
<br />
Do you have the 1.7.1 version?<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
pkg-config --modversion --cflags OGRE<br />
<br />
</syntaxhighlight><br />
<br />
More information is available here on the custom libogre-dev package. https://launchpad.net/~andrewfenn/+archive/ogredev<br />
<br />
=====Bullet=====<br />
<br />
You will also need to install bullet package. You can install from source which can be found at [http://www.bulletphysics.com/ http://www.bulletphysics.com] or you can get the GetDeb version at [http://www.playdeb.net http://www.playdeb.net ] . <br />
<br />
It also uses the cmake build system and can be installed like:<br />
<syntaxhighlight lang="bash"><br />
cmake .<br />
make<br />
sudo make install<br />
</syntaxhighlight><br />
<br />
Or the GetDeb version:<br />
<syntaxhighlight lang="bash"><br />
wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -<br />
sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu oneiric-getdeb games" >> /etc/apt/sources.list.d/getdeb.list'<br />
apt-get update<br />
apt-get install libbullet-dev<br />
</syntaxhighlight><br />
<br />
===Fetching the source===<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
cd openmw<br />
git submodule update --init<br />
cd ..<br />
<br />
</syntaxhighlight><br />
<br />
===Building===<br />
<br />
====With make====<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir Build<br />
cd Build<br />
cmake ../openmw/ <br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can increase your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
====With codeblocks====<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
cd Build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
=Mac OS X=<br />
<br />
===Dependencies===<br />
<br />
Make sure you set the following variables<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
export CFLAGS="-arch i386"<br />
<br />
export CXXFLAGS="-arch i386"<br />
export LDFLAGS="-arch i386"<br />
<br />
</syntaxhighlight><br />
<br />
====MacPort====<br />
<br />
To download many of the required packages for building Open Morrowind you can use the MacPorts utility for the Mac OSX<br />
<br />
http://www.macports.org/<br />
<br />
====Generic libraries required====<br />
<br />
You may have these installed but just incase run this to install a lot of generic libraries required for the build<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install libpng jpeg libxml2 +universal<br />
sudo port install pkgconfig xmlto autoconf automake libtool +no_x11 +quartz<br />
<br />
sudo port install freetype freeimage libzzip +universal<br />
<br />
</syntaxhighlight><br />
<br />
====Cmake====<br />
<br />
Using MacPort, install cmake. Cmake is what will be used to compile all the source files<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install cmake<br />
<br />
</syntaxhighlight><br />
<br />
====Boost====<br />
<br />
Boost is a collection of c++ libraries that is required for Open Morrowind<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install boost +universal<br />
<br />
</syntaxhighlight><br />
<br />
====OIS====<br />
<br />
OIS is required to control input form the keyboard and mouse in the game<br />
<br />
Download the latest code from<br />
<br />
http://sourceforge.net/projects/wgois<br />
<br />
Download and install the latest version<br />
<br />
Go to the install directory<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cd Mac<br />
cd XCode-2.2<br />
<br />
</syntaxhighlight><br />
<br />
Load the project file in XCODE Build the project and copy the files, this assumes you are in the root directory of the OIS project<br />
<br />
Copy OIS.dylib and libOIS.a to /opt/local/lib/ Copy the folder OIS.framework to /Library/Frameworks<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/OIS.dylib /opt/local/lib/<br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/libOIS.a /opt/local/lib/<br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/OIS.framework /Library/Frameworks/<br />
<br />
</syntaxhighlight><br />
<br />
====Ogre====<br />
<br />
Download the SDK from http://www.ogre3d.org/download/sdk<br />
<br />
In the OgreSDK directory of the download, copy the <sdk area>/lib and <sdk area>/include directory to /opt/local/lib/ and /opt/local/include (respectively) <br />
Copy the folder <sdk area>/lib/release/OGRE.framework to /Library/Frameworks<br />
<br />
====Mpg123====<br />
<br />
Download the source from http://sourceforge.net/projects/mpg123/files/mpg123/<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
./configure --cpu_type=i386<br />
make<br />
sudo make install<br />
<br />
</syntaxhighlight><br />
<br />
====SND====<br />
<br />
Download the source from http://www.mega-nerd.com/libsndfile/#Download<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
./configure<br />
./make <br />
sudo make install<br />
<br />
</syntaxhighlight><br />
<br />
===Build===<br />
<br />
====Fetching the source====<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
cd openmw<br />
git submodule update --init<br />
cd ..<br />
<br />
</syntaxhighlight><br />
<br />
====Building====<br />
<br />
Note that this is an out-of-source build. Generally this is the preferred method when working with cmake.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
<br />
cd Build<br />
cmake ../openmw/<br />
make<br />
<br />
</syntaxhighlight><br />
<br />
This creates a regular makefile.<br />
<br />
====Test====<br />
<br />
Set up the environment. From the OpenMW directory<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Game<br />
cd Game<br />
mkdir Contents<br />
mkdir Contents/Resources<br />
mkdir Contents/Plugins<br />
<br />
</syntaxhighlight><br />
<br />
Copy Ogre plugins from Ogre SDK to Plugins subdir:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cp /path/to/ogre/sdk/lib/*.dylib Contents/Plugins<br />
<br />
</syntaxhighlight><br />
<br />
Create symlink to resources subdirectory:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s ../../../Build/resources Contents/Resources/resources<br />
<br />
</syntaxhighlight><br />
<br />
Create symlinks for *.cfg files:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Contents/MacOS<br />
ln -s ../../../Build/plugins.cfg Contents/MacOS/plugins.cfg<br />
<br />
ln -s ../../../Build/openmw.cfg Contents/MacOS/openmw.cfg<br />
<br />
</syntaxhighlight><br />
<br />
Create symbolic links to the executable<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s ../Build/openmw openmw<br />
<br />
</syntaxhighlight><br />
<br />
Link the data from the morrowind installation<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s /path/to/morrowind/data/files Contents/Resources/data<br />
<br />
</syntaxhighlight><br />
<br />
<br />
Edit the file<br />
<br />
/Build/openmw.cfg Contents/MacOS/openmw.cfg<br />
<br />
with data and resource location<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
data=<path_to>/OpenMW/Game/Contents/Resources/data<br />
<br />
resources=<path_to>/OpenMW/Game/Contents/Resources/resources<br />
<br />
</syntaxhighlight><br />
<br />
<br />
Run the game<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
<path_to>/OpenMW/Game/openmw<br />
<br />
</syntaxhighlight><br />
<br />
=Data=<br />
You can use ''unshield'' to extract data from your Morrowind CD.<br />
<br />
Datafiles are inside data1.cab and data2.cab.<br />
You just need to copy thoses files to you ''data'' folder :<br />
* Sound<br />
* Music<br />
* Video<br />
* Splash<br />
* Morrowind.esm<br />
* Morrowind.bsa<br />
<br />
Edit your openmw.cfg file, and you are ready !</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=229Development Environment Setup2012-02-28T10:20:29Z<p>Brotherbrick: /* Packages */</p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://openmw.com/wiki/index.php?title=GitHub_FAQ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.7.x] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.com/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: The file you want is '''Git-1.7.1-preview20100612.exe''' found [http://code.google.com/p/msysgit/downloads/list HERE].<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.7.1 SDK for Visual Studio 2008 or 2010]<br />
* Boost: [http://www.boost.org/users/download/ Boost lib used by OGRE but perhaps you should set it manually], in OGRE, boost system, file_system, and program_options are missing, you should download the mt and mt-gd for vc90 and putt libs and dll in your OgreSDK_vc9_v1-7-1\boost_1_42\lib dir, they are in the boost-binaries\1.42.0 section in sourceforge download page. The boost source included in OGRE is missing filesystem and program_option, you should download them from boost sources and copy the directories in Ogre3D\boost_1_42\boost dir.<br />
* Freetype: [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype2] and set the environment variable FREETYPE_DIR to the <install_path><br />
* OIS<br />
* OpenAL<br />
* Audiere<br />
* GNU C compiler Library<br />
* libsndfile<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon) Once everything is installed properly, run the following command in the directory that you installed OpenMW's source to:<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
Then you should update include dirs of project to add OGRE (<path_to_ogre>\include and <path_to_ogre>\include\OGRE).<br />
<br />
Then you should include the correct path to needed libs (OgreSDK\lib & boost\lib) if not done by the CMake script. This may require first setting the OGRE_HOME environment, e.g. <code>set OGRE_HOME=C:\OgreSDK</code>.<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
===Arch Dependencies===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Ubuntu Dependencies===<br />
<br />
====Key requirement====<br />
<br />
In order to install Ogre, you need to add ubuntu's packager for Ogre (Andrew Fenn) as trusted:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 6F7E2F0B<br />
<br />
</syntaxhighlight><br />
<br />
note: "6F7E2F0B" is the id of Andrew Fenn.<br />
<br />
In synaptic, go to settings -> Repositories -> add copy this into the field and click add source.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ppa:andrewfenn/ogredev<br />
<br />
</syntaxhighlight><br />
<br />
within synaptic search for ogre and mark 1.7.1 for installation. click apply.<br />
<br />
====Packages====<br />
You will need g++ in order to compile OpenMW.<br />
<br />
To setup a build environment and install all dependencies type:<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libois-dev libopenal-dev libmpg123-dev libpng-dev libogre-dev \<br />
libsndfile1-dev libblkid-dev libfreeimage-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-program-options-dev libboost-system-dev uuid-dev libqt4-opengl libqt4-dev build-essential<br />
<br />
</syntaxhighlight><br />
If there is a missing package, then it does not exist in your distribution's repository. This can happen with older versions. You will need to either find another source or build it yourself. Examples can be seen below.<br />
<br />
=====Ogre=====<br />
<br />
======Boost libraries not included within the libogre-dev custom package.======<br />
<br />
'''Note''': libboost-system-dev will be autoincluded in at least the filesystem package.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
libboost-filesystem-dev<br />
libboost-thread-dev<br />
libboost-program-options-dev<br />
<br />
</syntaxhighlight><br />
<br />
Install the development files for libogre-dev 1.7.1<br />
<br />
======Check======<br />
<br />
Do you have the 1.7.1 version?<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
pkg-config --modversion --cflags OGRE<br />
<br />
</syntaxhighlight><br />
<br />
More information is available here on the custom libogre-dev package. https://launchpad.net/~andrewfenn/+archive/ogredev<br />
<br />
=====Bullet=====<br />
<br />
You will also need to install bullet package. You can install from source which can be found at [http://www.bulletphysics.com/ http://www.bulletphysics.com] or you can get the GetDeb version at [http://www.playdeb.net http://www.playdeb.net ] . <br />
<br />
It also uses the cmake build system and can be installed like:<br />
<syntaxhighlight lang="bash"><br />
cmake .<br />
make<br />
sudo make install<br />
</syntaxhighlight><br />
<br />
Or the GetDeb version:<br />
<syntaxhighlight lang="bash"><br />
wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -<br />
sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu oneiric-getdeb games" >> /etc/apt/sources.list.d/getdeb.list'<br />
apt-get update<br />
apt-get install libbullet-dev<br />
</syntaxhighlight><br />
<br />
===Fetching the source===<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
cd openmw<br />
git submodule update --init<br />
cd ..<br />
<br />
</syntaxhighlight><br />
<br />
===Building===<br />
<br />
====With make====<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir Build<br />
cd Build<br />
cmake ../openmw/ <br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can increase your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
====With codeblocks====<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
cd Build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
=Mac OS X=<br />
<br />
===Dependencies===<br />
<br />
Make sure you set the following variables<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
export CFLAGS="-arch i386"<br />
<br />
export CXXFLAGS="-arch i386"<br />
export LDFLAGS="-arch i386"<br />
<br />
</syntaxhighlight><br />
<br />
====MacPort====<br />
<br />
To download many of the required packages for building Open Morrowind you can use the MacPorts utility for the Mac OSX<br />
<br />
http://www.macports.org/<br />
<br />
====Generic libraries required====<br />
<br />
You may have these installed but just incase run this to install a lot of generic libraries required for the build<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install libpng jpeg libxml2 +universal<br />
sudo port install pkgconfig xmlto autoconf automake libtool +no_x11 +quartz<br />
<br />
sudo port install freetype freeimage libzzip +universal<br />
<br />
</syntaxhighlight><br />
<br />
====Cmake====<br />
<br />
Using MacPort, install cmake. Cmake is what will be used to compile all the source files<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install cmake<br />
<br />
</syntaxhighlight><br />
<br />
====Boost====<br />
<br />
Boost is a collection of c++ libraries that is required for Open Morrowind<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install boost +universal<br />
<br />
</syntaxhighlight><br />
<br />
====OIS====<br />
<br />
OIS is required to control input form the keyboard and mouse in the game<br />
<br />
Download the latest code from<br />
<br />
http://sourceforge.net/projects/wgois<br />
<br />
Download and install the latest version<br />
<br />
Go to the install directory<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cd Mac<br />
cd XCode-2.2<br />
<br />
</syntaxhighlight><br />
<br />
Load the project file in XCODE Build the project and copy the files, this assumes you are in the root directory of the OIS project<br />
<br />
Copy OIS.dylib and libOIS.a to /opt/local/lib/ Copy the folder OIS.framework to /Library/Frameworks<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/OIS.dylib /opt/local/lib/<br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/libOIS.a /opt/local/lib/<br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/OIS.framework /Library/Frameworks/<br />
<br />
</syntaxhighlight><br />
<br />
====Ogre====<br />
<br />
Download the SDK from http://www.ogre3d.org/download/sdk<br />
<br />
In the OgreSDK directory of the download, copy the <sdk area>/lib and <sdk area>/include directory to /opt/local/lib/ and /opt/local/include (respectively) <br />
Copy the folder <sdk area>/lib/release/OGRE.framework to /Library/Frameworks<br />
<br />
====Mpg123====<br />
<br />
Download the source from http://sourceforge.net/projects/mpg123/files/mpg123/<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
./configure --cpu_type=i386<br />
make<br />
sudo make install<br />
<br />
</syntaxhighlight><br />
<br />
====SND====<br />
<br />
Download the source from http://www.mega-nerd.com/libsndfile/#Download<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
./configure<br />
./make <br />
sudo make install<br />
<br />
</syntaxhighlight><br />
<br />
===Build===<br />
<br />
====Fetching the source====<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
cd openmw<br />
git submodule update --init<br />
cd ..<br />
<br />
</syntaxhighlight><br />
<br />
====Building====<br />
<br />
Note that this is an out-of-source build. Generally this is the preferred method when working with cmake.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
<br />
cd Build<br />
cmake ../openmw/<br />
make<br />
<br />
</syntaxhighlight><br />
<br />
This creates a regular makefile.<br />
<br />
====Test====<br />
<br />
Set up the environment. From the OpenMW directory<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Game<br />
cd Game<br />
mkdir Contents<br />
mkdir Contents/Resources<br />
mkdir Contents/Plugins<br />
<br />
</syntaxhighlight><br />
<br />
Copy Ogre plugins from Ogre SDK to Plugins subdir:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cp /path/to/ogre/sdk/lib/*.dylib Contents/Plugins<br />
<br />
</syntaxhighlight><br />
<br />
Create symlink to resources subdirectory:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s ../../../Build/resources Contents/Resources/resources<br />
<br />
</syntaxhighlight><br />
<br />
Create symlinks for *.cfg files:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Contents/MacOS<br />
ln -s ../../../Build/plugins.cfg Contents/MacOS/plugins.cfg<br />
<br />
ln -s ../../../Build/openmw.cfg Contents/MacOS/openmw.cfg<br />
<br />
</syntaxhighlight><br />
<br />
Create symbolic links to the executable<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s ../Build/openmw openmw<br />
<br />
</syntaxhighlight><br />
<br />
Link the data from the morrowind installation<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s /path/to/morrowind/data/files Contents/Resources/data<br />
<br />
</syntaxhighlight><br />
<br />
<br />
Edit the file<br />
<br />
/Build/openmw.cfg Contents/MacOS/openmw.cfg<br />
<br />
with data and resource location<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
data=<path_to>/OpenMW/Game/Contents/Resources/data<br />
<br />
resources=<path_to>/OpenMW/Game/Contents/Resources/resources<br />
<br />
</syntaxhighlight><br />
<br />
<br />
Run the game<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
<path_to>/OpenMW/Game/openmw<br />
<br />
</syntaxhighlight><br />
<br />
=Data=<br />
You can use ''unshield'' to extract data from your Morrowind CD.<br />
<br />
Datafiles are inside data1.cab and data2.cab.<br />
You just need to copy thoses files to you ''data'' folder :<br />
* Sound<br />
* Music<br />
* Video<br />
* Splash<br />
* Morrowind.esm<br />
* Morrowind.bsa<br />
<br />
Edit your openmw.cfg file, and you are ready !</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=189Development Environment Setup2012-02-25T08:52:39Z<p>Brotherbrick: /* Bullet */</p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://openmw.com/wiki/index.php?title=GitHub_FAQ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.7.x] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.com/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: The file you want is '''Git-1.7.1-preview20100612.exe''' found [http://code.google.com/p/msysgit/downloads/list HERE].<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.7.1 SDK for Visual Studio 2008 or 2010]<br />
* Boost: [http://www.boost.org/users/download/ Boost lib used by OGRE but perhaps you should set it manually], in OGRE, boost system, file_system, and program_options are missing, you should download the mt and mt-gd for vc90 and putt libs and dll in your OgreSDK_vc9_v1-7-1\boost_1_42\lib dir, they are in the boost-binaries\1.42.0 section in sourceforge download page. The boost source included in OGRE is missing filesystem and program_option, you should download them from boost sources and copy the directories in Ogre3D\boost_1_42\boost dir.<br />
* Freetype: [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype2] and set the environment variable FREETYPE_DIR to the <install_path><br />
* OIS<br />
* OpenAL<br />
* Audiere<br />
* GNU C compiler Library<br />
* libsndfile<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon) Once everything is installed properly, run the following command in the directory that you installed OpenMW's source to:<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
Then you should update include dirs of project to add OGRE (<path_to_ogre>\include and <path_to_ogre>\include\OGRE).<br />
<br />
Then you should include the correct path to needed libs (OgreSDK\lib & boost\lib) if not done by the CMake script. This may require first setting the OGRE_HOME environment, e.g. <code>set OGRE_HOME=C:\OgreSDK</code>.<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
===Arch Dependencies===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Ubuntu Dependencies===<br />
<br />
====Key requirement====<br />
<br />
In order to install Ogre, you need to add ubuntu's packager for Ogre (Andrew Fenn) as trusted:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 6F7E2F0B<br />
<br />
</syntaxhighlight><br />
<br />
note: "6F7E2F0B" is the id of Andrew Fenn.<br />
<br />
In synaptic, go to settings -> Repositories -> add copy this into the field and click add source.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ppa:andrewfenn/ogredev<br />
<br />
</syntaxhighlight><br />
<br />
within synaptic search for ogre and mark 1.7.1 for installation. click apply.<br />
<br />
====Packages====<br />
<br />
<syntaxhighlight lang="bash"><br />
git<br />
libois-dev<br />
libopenal-dev<br />
libaudiere-dev<br />
libmpg123-dev<br />
libogre-dev<br />
libsndfile1-dev<br />
libblkid-dev<br />
libfreeimage-dev<br />
libqt4-opengl<br />
uuid-dev<br />
</syntaxhighlight><br />
<br />
You will also need g++ in order to compile OpenMW.<br />
<br />
To install all dependencies type:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libois-dev libopenal-dev libmpg123-dev libpng-dev libogre-dev \<br />
libsndfile1-dev libblkid-dev libfreeimage-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-program-options-dev libboost-system-dev uuid-dev libqt4-opengl libqt4-dev<br />
<br />
</syntaxhighlight><br />
<br />
=====Ogre=====<br />
<br />
======Boost libraries not included within the libogre-dev custom package.======<br />
<br />
'''Note''': libboost-system-dev will be autoincluded in at least the filesystem package.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
libboost-filesystem-dev<br />
libboost-thread-dev<br />
libboost-program-options-dev<br />
<br />
</syntaxhighlight><br />
<br />
Install the development files for libogre-dev 1.7.1<br />
<br />
======Check======<br />
<br />
Do you have the 1.7.1 version?<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
pkg-config --modversion --cflags OGRE<br />
<br />
</syntaxhighlight><br />
<br />
More information is available here on the custom libogre-dev package. https://launchpad.net/~andrewfenn/+archive/ogredev<br />
<br />
=====Bullet=====<br />
<br />
You will also need to install bullet package. You can install from source which can be found at [http://www.bulletphysics.com/ http://www.bulletphysics.com] or you can get the GetDeb version at [http://www.playdeb.net http://www.playdeb.net ] . <br />
<br />
It also uses the cmake build system and can be installed like:<br />
<syntaxhighlight lang="bash"><br />
cmake .<br />
make<br />
sudo make install<br />
</syntaxhighlight><br />
<br />
Or the GetDeb version:<br />
<syntaxhighlight lang="bash"><br />
wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -<br />
sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu oneiric-getdeb games" >> /etc/apt/sources.list.d/getdeb.list'<br />
apt-get update<br />
apt-get install libbullet-dev<br />
</syntaxhighlight><br />
<br />
===Fetching the source===<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
cd openmw<br />
git submodule update --init<br />
cd ..<br />
<br />
</syntaxhighlight><br />
<br />
===Building===<br />
<br />
====With make====<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir Build<br />
cd Build<br />
cmake ../openmw/ <br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can increase your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
====With codeblocks====<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
cd Build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
=Mac OS X=<br />
<br />
===Dependencies===<br />
<br />
Make sure you set the following variables<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
export CFLAGS="-arch i386"<br />
<br />
export CXXFLAGS="-arch i386"<br />
export LDFLAGS="-arch i386"<br />
<br />
</syntaxhighlight><br />
<br />
====MacPort====<br />
<br />
To download many of the required packages for building Open Morrowind you can use the MacPorts utility for the Mac OSX<br />
<br />
http://www.macports.org/<br />
<br />
====Generic libraries required====<br />
<br />
You may have these installed but just incase run this to install a lot of generic libraries required for the build<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install libpng jpeg libxml2 +universal<br />
sudo port install pkgconfig xmlto autoconf automake libtool +no_x11 +quartz<br />
<br />
sudo port install freetype freeimage libzzip +universal<br />
<br />
</syntaxhighlight><br />
<br />
====Cmake====<br />
<br />
Using MacPort, install cmake. Cmake is what will be used to compile all the source files<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install cmake<br />
<br />
</syntaxhighlight><br />
<br />
====Boost====<br />
<br />
Boost is a collection of c++ libraries that is required for Open Morrowind<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install boost +universal<br />
<br />
</syntaxhighlight><br />
<br />
====OIS====<br />
<br />
OIS is required to control input form the keyboard and mouse in the game<br />
<br />
Download the latest code from<br />
<br />
http://sourceforge.net/projects/wgois<br />
<br />
Download and install the latest version<br />
<br />
Go to the install directory<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cd Mac<br />
cd XCode-2.2<br />
<br />
</syntaxhighlight><br />
<br />
Load the project file in XCODE Build the project and copy the files, this assumes you are in the root directory of the OIS project<br />
<br />
Copy OIS.dylib and libOIS.a to /opt/local/lib/ Copy the folder OIS.framework to /Library/Frameworks<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/OIS.dylib /opt/local/lib/<br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/libOIS.a /opt/local/lib/<br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/OIS.framework /Library/Frameworks/<br />
<br />
</syntaxhighlight><br />
<br />
====Ogre====<br />
<br />
Download the SDK from http://www.ogre3d.org/download/sdk<br />
<br />
In the OgreSDK directory of the download, copy the <sdk area>/lib and <sdk area>/include directory to /opt/local/lib/ and /opt/local/include (respectively) <br />
Copy the folder <sdk area>/lib/release/OGRE.framework to /Library/Frameworks<br />
<br />
====Mpg123====<br />
<br />
Download the source from http://sourceforge.net/projects/mpg123/files/mpg123/<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
./configure --cpu_type=i386<br />
make<br />
sudo make install<br />
<br />
</syntaxhighlight><br />
<br />
====SND====<br />
<br />
Download the source from http://www.mega-nerd.com/libsndfile/#Download<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
./configure<br />
./make <br />
sudo make install<br />
<br />
</syntaxhighlight><br />
<br />
===Build===<br />
<br />
====Fetching the source====<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
cd openmw<br />
git submodule update --init<br />
cd ..<br />
<br />
</syntaxhighlight><br />
<br />
====Building====<br />
<br />
Note that this is an out-of-source build. Generally this is the preferred method when working with cmake.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
<br />
cd Build<br />
cmake ../openmw/<br />
make<br />
<br />
</syntaxhighlight><br />
<br />
This creates a regular makefile.<br />
<br />
====Test====<br />
<br />
Set up the environment. From the OpenMW directory<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Game<br />
cd Game<br />
mkdir Contents<br />
mkdir Contents/Resources<br />
mkdir Contents/Plugins<br />
<br />
</syntaxhighlight><br />
<br />
Copy Ogre plugins from Ogre SDK to Plugins subdir:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cp /path/to/ogre/sdk/lib/*.dylib Contents/Plugins<br />
<br />
</syntaxhighlight><br />
<br />
Create symlink to resources subdirectory:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s ../../../Build/resources Contents/Resources/resources<br />
<br />
</syntaxhighlight><br />
<br />
Create symlinks for *.cfg files:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Contents/MacOS<br />
ln -s ../../../Build/plugins.cfg Contents/MacOS/plugins.cfg<br />
<br />
ln -s ../../../Build/openmw.cfg Contents/MacOS/openmw.cfg<br />
<br />
</syntaxhighlight><br />
<br />
Create symbolic links to the executable<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s ../Build/openmw openmw<br />
<br />
</syntaxhighlight><br />
<br />
Link the data from the morrowind installation<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s /path/to/morrowind/data/files Contents/Resources/data<br />
<br />
</syntaxhighlight><br />
<br />
<br />
Edit the file<br />
<br />
/Build/openmw.cfg Contents/MacOS/openmw.cfg<br />
<br />
with data and resource location<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
data=<path_to>/OpenMW/Game/Contents/Resources/data<br />
<br />
resources=<path_to>/OpenMW/Game/Contents/Resources/resources<br />
<br />
</syntaxhighlight><br />
<br />
<br />
Run the game<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
<path_to>/OpenMW/Game/openmw<br />
<br />
</syntaxhighlight><br />
<br />
=Data=<br />
You can use ''unshield'' to extract data from your Morrowind CD.<br />
<br />
Datafiles are inside data1.cab and data2.cab.<br />
You just need to copy thoses files to you ''data'' folder :<br />
* Sound<br />
* Music<br />
* Video<br />
* Splash<br />
* Morrowind.esm<br />
* Morrowind.bsa<br />
<br />
Edit your openmw.cfg file, and you are ready !</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=188Development Environment Setup2012-02-25T08:51:51Z<p>Brotherbrick: /* Packages */</p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://openmw.com/wiki/index.php?title=GitHub_FAQ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.7.x] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.com/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: The file you want is '''Git-1.7.1-preview20100612.exe''' found [http://code.google.com/p/msysgit/downloads/list HERE].<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.7.1 SDK for Visual Studio 2008 or 2010]<br />
* Boost: [http://www.boost.org/users/download/ Boost lib used by OGRE but perhaps you should set it manually], in OGRE, boost system, file_system, and program_options are missing, you should download the mt and mt-gd for vc90 and putt libs and dll in your OgreSDK_vc9_v1-7-1\boost_1_42\lib dir, they are in the boost-binaries\1.42.0 section in sourceforge download page. The boost source included in OGRE is missing filesystem and program_option, you should download them from boost sources and copy the directories in Ogre3D\boost_1_42\boost dir.<br />
* Freetype: [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype2] and set the environment variable FREETYPE_DIR to the <install_path><br />
* OIS<br />
* OpenAL<br />
* Audiere<br />
* GNU C compiler Library<br />
* libsndfile<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon) Once everything is installed properly, run the following command in the directory that you installed OpenMW's source to:<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
Then you should update include dirs of project to add OGRE (<path_to_ogre>\include and <path_to_ogre>\include\OGRE).<br />
<br />
Then you should include the correct path to needed libs (OgreSDK\lib & boost\lib) if not done by the CMake script. This may require first setting the OGRE_HOME environment, e.g. <code>set OGRE_HOME=C:\OgreSDK</code>.<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
===Arch Dependencies===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Ubuntu Dependencies===<br />
<br />
====Key requirement====<br />
<br />
In order to install Ogre, you need to add ubuntu's packager for Ogre (Andrew Fenn) as trusted:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 6F7E2F0B<br />
<br />
</syntaxhighlight><br />
<br />
note: "6F7E2F0B" is the id of Andrew Fenn.<br />
<br />
In synaptic, go to settings -> Repositories -> add copy this into the field and click add source.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ppa:andrewfenn/ogredev<br />
<br />
</syntaxhighlight><br />
<br />
within synaptic search for ogre and mark 1.7.1 for installation. click apply.<br />
<br />
====Packages====<br />
<br />
<syntaxhighlight lang="bash"><br />
git<br />
libois-dev<br />
libopenal-dev<br />
libaudiere-dev<br />
libmpg123-dev<br />
libogre-dev<br />
libsndfile1-dev<br />
libblkid-dev<br />
libfreeimage-dev<br />
libqt4-opengl<br />
uuid-dev<br />
</syntaxhighlight><br />
<br />
You will also need g++ in order to compile OpenMW.<br />
<br />
To install all dependencies type:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libois-dev libopenal-dev libmpg123-dev libpng-dev libogre-dev \<br />
libsndfile1-dev libblkid-dev libfreeimage-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-program-options-dev libboost-system-dev uuid-dev libqt4-opengl libqt4-dev<br />
<br />
</syntaxhighlight><br />
<br />
=====Ogre=====<br />
<br />
======Boost libraries not included within the libogre-dev custom package.======<br />
<br />
'''Note''': libboost-system-dev will be autoincluded in at least the filesystem package.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
libboost-filesystem-dev<br />
libboost-thread-dev<br />
libboost-program-options-dev<br />
<br />
</syntaxhighlight><br />
<br />
Install the development files for libogre-dev 1.7.1<br />
<br />
======Check======<br />
<br />
Do you have the 1.7.1 version?<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
pkg-config --modversion --cflags OGRE<br />
<br />
</syntaxhighlight><br />
<br />
More information is available here on the custom libogre-dev package. https://launchpad.net/~andrewfenn/+archive/ogredev<br />
<br />
=====Bullet=====<br />
<br />
You will also need to install bullet package. You can install from source which can be found at [http://www.bulletphysics.com/ http://www.bulletphysics.com] or you can get the gotdeb version at [http://www.playdeb.net http://www.playdeb.net ] . <br />
<br />
It also uses the cmake build system and can be installed like:<br />
<syntaxhighlight lang="bash"><br />
cmake .<br />
make<br />
sudo make install<br />
</syntaxhighlight><br />
<br />
Or gotdeb version:<br />
<syntaxhighlight lang="bash"><br />
wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -<br />
sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu oneiric-getdeb games" >> /etc/apt/sources.list.d/getdeb.list'<br />
apt-get update<br />
apt-get install libbullet-dev<br />
</syntaxhighlight><br />
<br />
===Fetching the source===<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
cd openmw<br />
git submodule update --init<br />
cd ..<br />
<br />
</syntaxhighlight><br />
<br />
===Building===<br />
<br />
====With make====<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir Build<br />
cd Build<br />
cmake ../openmw/ <br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can increase your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
====With codeblocks====<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
cd Build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
=Mac OS X=<br />
<br />
===Dependencies===<br />
<br />
Make sure you set the following variables<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
export CFLAGS="-arch i386"<br />
<br />
export CXXFLAGS="-arch i386"<br />
export LDFLAGS="-arch i386"<br />
<br />
</syntaxhighlight><br />
<br />
====MacPort====<br />
<br />
To download many of the required packages for building Open Morrowind you can use the MacPorts utility for the Mac OSX<br />
<br />
http://www.macports.org/<br />
<br />
====Generic libraries required====<br />
<br />
You may have these installed but just incase run this to install a lot of generic libraries required for the build<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install libpng jpeg libxml2 +universal<br />
sudo port install pkgconfig xmlto autoconf automake libtool +no_x11 +quartz<br />
<br />
sudo port install freetype freeimage libzzip +universal<br />
<br />
</syntaxhighlight><br />
<br />
====Cmake====<br />
<br />
Using MacPort, install cmake. Cmake is what will be used to compile all the source files<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install cmake<br />
<br />
</syntaxhighlight><br />
<br />
====Boost====<br />
<br />
Boost is a collection of c++ libraries that is required for Open Morrowind<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install boost +universal<br />
<br />
</syntaxhighlight><br />
<br />
====OIS====<br />
<br />
OIS is required to control input form the keyboard and mouse in the game<br />
<br />
Download the latest code from<br />
<br />
http://sourceforge.net/projects/wgois<br />
<br />
Download and install the latest version<br />
<br />
Go to the install directory<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cd Mac<br />
cd XCode-2.2<br />
<br />
</syntaxhighlight><br />
<br />
Load the project file in XCODE Build the project and copy the files, this assumes you are in the root directory of the OIS project<br />
<br />
Copy OIS.dylib and libOIS.a to /opt/local/lib/ Copy the folder OIS.framework to /Library/Frameworks<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/OIS.dylib /opt/local/lib/<br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/libOIS.a /opt/local/lib/<br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/OIS.framework /Library/Frameworks/<br />
<br />
</syntaxhighlight><br />
<br />
====Ogre====<br />
<br />
Download the SDK from http://www.ogre3d.org/download/sdk<br />
<br />
In the OgreSDK directory of the download, copy the <sdk area>/lib and <sdk area>/include directory to /opt/local/lib/ and /opt/local/include (respectively) <br />
Copy the folder <sdk area>/lib/release/OGRE.framework to /Library/Frameworks<br />
<br />
====Mpg123====<br />
<br />
Download the source from http://sourceforge.net/projects/mpg123/files/mpg123/<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
./configure --cpu_type=i386<br />
make<br />
sudo make install<br />
<br />
</syntaxhighlight><br />
<br />
====SND====<br />
<br />
Download the source from http://www.mega-nerd.com/libsndfile/#Download<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
./configure<br />
./make <br />
sudo make install<br />
<br />
</syntaxhighlight><br />
<br />
===Build===<br />
<br />
====Fetching the source====<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
cd openmw<br />
git submodule update --init<br />
cd ..<br />
<br />
</syntaxhighlight><br />
<br />
====Building====<br />
<br />
Note that this is an out-of-source build. Generally this is the preferred method when working with cmake.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
<br />
cd Build<br />
cmake ../openmw/<br />
make<br />
<br />
</syntaxhighlight><br />
<br />
This creates a regular makefile.<br />
<br />
====Test====<br />
<br />
Set up the environment. From the OpenMW directory<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Game<br />
cd Game<br />
mkdir Contents<br />
mkdir Contents/Resources<br />
mkdir Contents/Plugins<br />
<br />
</syntaxhighlight><br />
<br />
Copy Ogre plugins from Ogre SDK to Plugins subdir:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cp /path/to/ogre/sdk/lib/*.dylib Contents/Plugins<br />
<br />
</syntaxhighlight><br />
<br />
Create symlink to resources subdirectory:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s ../../../Build/resources Contents/Resources/resources<br />
<br />
</syntaxhighlight><br />
<br />
Create symlinks for *.cfg files:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Contents/MacOS<br />
ln -s ../../../Build/plugins.cfg Contents/MacOS/plugins.cfg<br />
<br />
ln -s ../../../Build/openmw.cfg Contents/MacOS/openmw.cfg<br />
<br />
</syntaxhighlight><br />
<br />
Create symbolic links to the executable<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s ../Build/openmw openmw<br />
<br />
</syntaxhighlight><br />
<br />
Link the data from the morrowind installation<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s /path/to/morrowind/data/files Contents/Resources/data<br />
<br />
</syntaxhighlight><br />
<br />
<br />
Edit the file<br />
<br />
/Build/openmw.cfg Contents/MacOS/openmw.cfg<br />
<br />
with data and resource location<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
data=<path_to>/OpenMW/Game/Contents/Resources/data<br />
<br />
resources=<path_to>/OpenMW/Game/Contents/Resources/resources<br />
<br />
</syntaxhighlight><br />
<br />
<br />
Run the game<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
<path_to>/OpenMW/Game/openmw<br />
<br />
</syntaxhighlight><br />
<br />
=Data=<br />
You can use ''unshield'' to extract data from your Morrowind CD.<br />
<br />
Datafiles are inside data1.cab and data2.cab.<br />
You just need to copy thoses files to you ''data'' folder :<br />
* Sound<br />
* Music<br />
* Video<br />
* Splash<br />
* Morrowind.esm<br />
* Morrowind.bsa<br />
<br />
Edit your openmw.cfg file, and you are ready !</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Development_Environment_Setup&diff=187Development Environment Setup2012-02-24T07:49:06Z<p>Brotherbrick: </p>
<hr />
<div>This page will describe how to set a dev env for several OSes. Please note that it is a work in progress and that it will be reliable only once each platform is marked as [TESTED].<br />
<br />
You might also want to read the [http://openmw.com/wiki/index.php?title=GitHub_FAQ GitHub FAQ] first.<br />
<br />
=Third-Party Libraries and Tools=<br />
<br />
* OpenMW currently uses the following libraries:<br />
** [http://www.ogre3d.org/ OGRE 1.7.x] - the main graphic engine<br />
** [http://www.wreckedgames.com/ OIS] - a cross-platform C++ input handling library<br />
** [http://www.ogre3d.org/wiki/index.php/MyGUI MyGUI] - the in-game windows and menus<br />
** [http://audiere.sourceforge.net/ Audiere] and [http://connect.creativelabs.com/openal/default.aspx OpenAL] - for sound support<br />
** [http://www.bulletphysics.com/ Bullet] - the physics engine<br />
<br />
* OpenMw additionally uses the following tools:<br />
** [http://www.cmake.org/ CMake] - used to manage the build process<br />
** [http://git-scm.com/ Git] - used as the source control management system<br />
<br />
For those unfamiliar with Git, the Sphere RPG Engine group has a fairly useful short wiki page entitled [http://www.spheredev.org/wiki/Git_for_the_lazy "Git for the lazy"]. Make sure to also check out the [http://openmw.com/wiki/index.php?title=GitHub_FAQ GitHub FAQ].<br />
<br />
=Windows=<br />
<br />
==Visual Studio 2008/2010==<br />
<br />
===Tools===<br />
<br />
* Visual Studio 2008/2010 - normal or free express versions.<br />
* Cmake: [http://www.cmake.org/cmake/resources/software.html CMake] v2.8<br />
* Git - Our version control software: The file you want is '''Git-1.7.1-preview20100612.exe''' found [http://code.google.com/p/msysgit/downloads/list HERE].<br />
<br />
===Libraries===<br />
<br />
* [http://www.ogre3d.org/download/sdk Ogre]: Choose OGRE v1.7.1 SDK for Visual Studio 2008 or 2010]<br />
* Boost: [http://www.boost.org/users/download/ Boost lib used by OGRE but perhaps you should set it manually], in OGRE, boost system, file_system, and program_options are missing, you should download the mt and mt-gd for vc90 and putt libs and dll in your OgreSDK_vc9_v1-7-1\boost_1_42\lib dir, they are in the boost-binaries\1.42.0 section in sourceforge download page. The boost source included in OGRE is missing filesystem and program_option, you should download them from boost sources and copy the directories in Ogre3D\boost_1_42\boost dir.<br />
* Freetype: [http://gnuwin32.sourceforge.net/downlinks/freetype.php Freetype2] and set the environment variable FREETYPE_DIR to the <install_path><br />
* OIS<br />
* OpenAL<br />
* Audiere<br />
* GNU C compiler Library<br />
* libsndfile<br />
<br />
Once this is done, you're ready to get the source code.<br />
<br />
* Get the OpenMW [[Source code]] using GIT or Tortoise Git<br />
<br />
Download and install all of these and make sure the environment (the system and Cmake) knows where they are. (Coming soon) Once everything is installed properly, run the following command in the directory that you installed OpenMW's source to:<br />
<br />
===Running and using CMake===<br />
<br />
First, before opening Cmake, create a sibling directory called "OpenMW - build" next to the root "openmw" so that an out-of-source build can be done.<br />
<br />
<syntaxhighlight lang="dos"><br />
"<Cmake's Install Directory>\bin\cmake.exe" ..\openmw -G "Visual Studio 9 2008"<br />
</syntaxhighlight><br />
<br />
Then you should update include dirs of project to add OGRE (<path_to_ogre>\include and <path_to_ogre>\include\OGRE).<br />
<br />
Then you should include the correct path to needed libs (OgreSDK\lib & boost\lib) if not done by the CMake script. This may require first setting the OGRE_HOME environment, e.g. <code>set OGRE_HOME=C:\OgreSDK</code>.<br />
<br />
At this point, you've got an exe generated, it needed OGRE dll to be run, the lazy way is to copy the OpenMW in OgreSDK\bin\debug that contains all needed files (dll en .cfg). In the same directory than the .exe, you should have the data directory of the Morrowind game - or alternatively, on Windows Vista or Windows 7, you can create a symbolic link to the data directory:<br />
<br />
<syntaxhighlight lang="dos"><br />
<br />
C:\dev\omw\build>mklink /D data "c:\Program Files\Bethesda Softworks\Morrowind\Data Files"<br />
symbolic link created for data <<===>> c:\Program Files\Bethesda Softworks\Morrowind\Data Files<br />
<br />
</syntaxhighlight><br />
<br />
===Git on Windows===<br />
<br />
====via Cygwin====<br />
<br />
Git is available on Windows via [http://www.cygwin.com/ cygwin]. Git can be used directly on Windows instead of grabbing source zip files from Github. <br />
The cygwin environment will allow you to use the same git command line commands as are recommended for the Linux environment. Note however that the cygwin <br />
version of CMake does not appear to support VS2008 as a valid target; therefore, cygwin can only be used for Git commands and a standard Windows command prompt should be used for invoking CMake.<br />
<br />
====via msysGit====<br />
<br />
There is also a stand-alone compiled package called [http://code.google.com/p/msysgit/ msysgit]. This will give you a Cygwin-like console with the git command, which you may find easier than via Cygwin.<br />
<br />
<br />
====via TortoiseGit====<br />
<br />
There is also a GUI git client for the one used to TortoiseSVN or TortoiseCVS which is called [http://code.google.com/p/tortoisegit/ TortoiseGIT]. <br />
It will give you a nice GUI inside the Windows explorer. This is the easy way.<br />
<br />
====via eclipse====<br />
<br />
First of all, you need the [http://www.eclipse.org/egit/ egit plugin]. Install it, restart eclipse, "file -> import -> git -> clone"<br />
<br />
=Linux=<br />
<br />
===Arch Dependencies===<br />
There are two AUR packages available for OpenMW, a stable and a development version.<br />
They can be found at [http://aur.archlinux.org/packages.php?O=0&K=openmw&do_Search=Go https://aur.archlinux.org].<br />
<br />
Information about building packages from the Arch User Repository (AUR) can be found at the [http://wiki.archlinux.org/index.php/Arch_User_Repository Arch wiki].<br />
<br />
===Ubuntu Dependencies===<br />
<br />
====Key requirement====<br />
<br />
In order to install Ogre, you need to add ubuntu's packager for Ogre (Andrew Fenn) as trusted:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 6F7E2F0B<br />
<br />
</syntaxhighlight><br />
<br />
note: "6F7E2F0B" is the id of Andrew Fenn.<br />
<br />
In synaptic, go to settings -> Repositories -> add copy this into the field and click add source.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ppa:andrewfenn/ogredev<br />
<br />
</syntaxhighlight><br />
<br />
within synaptic search for ogre and mark 1.7.1 for installation. click apply.<br />
<br />
====Packages====<br />
<br />
<syntaxhighlight lang="bash"><br />
git<br />
libois-dev<br />
libopenal-dev<br />
libaudiere-dev<br />
libmpg123-dev<br />
libogre-dev<br />
libsndfile1-dev<br />
libblkid-dev<br />
libfreeimage-dev<br />
libqt4-opengl<br />
uuid-dev<br />
</syntaxhighlight><br />
<br />
You will also need g++ in order to compile OpenMW.<br />
<br />
To install all dependencies type:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo apt-get install git libois-dev libopenal-dev libaudiere-dev libmpg123-dev libogre-dev \<br />
libsndfile1-dev libblkid-dev libfreeimage-dev libboost-filesystem-dev libboost-thread-dev \<br />
libboost-program-options-dev libboost-system-dev uuid-dev libqt4-opengl<br />
<br />
</syntaxhighlight><br />
<br />
=====Ogre=====<br />
<br />
======Boost libraries not included within the libogre-dev custom package.======<br />
<br />
'''Note''': libboost-system-dev will be autoincluded in at least the filesystem package.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
libboost-filesystem-dev<br />
libboost-thread-dev<br />
libboost-program-options-dev<br />
<br />
</syntaxhighlight><br />
<br />
Install the development files for libogre-dev 1.7.1<br />
<br />
======Check======<br />
<br />
Do you have the 1.7.1 version?<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
pkg-config --modversion --cflags OGRE<br />
<br />
</syntaxhighlight><br />
<br />
More information is available here on the custom libogre-dev package. https://launchpad.net/~andrewfenn/+archive/ogredev<br />
<br />
=====Bullet=====<br />
<br />
You will also need to install bullet package which can be found at [http://www.bulletphysics.com/ http://www.bulletphysics.com]. It also uses the cmake build system and can be installed like:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cmake .<br />
make<br />
sudo make install<br />
<br />
</syntaxhighlight><br />
<br />
===Fetching the source===<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
cd openmw<br />
git submodule update --init<br />
cd ..<br />
<br />
</syntaxhighlight><br />
<br />
===Building===<br />
<br />
====With make====<br />
<br />
Note that this is an out-of-source build. Generally, this is the preferred method when working with cmake.<br />
<syntaxhighlight lang="bash"><br />
mkdir Build<br />
cd Build<br />
cmake ../openmw/ <br />
</syntaxhighlight><br />
This creates a regular makefile.<br />
<br />
Normally you can just run 'make' but if you have multiple cores, you can increase your compile time by doing this:<br />
<syntaxhighlight lang="bash"><br />
make -j`getconf _NPROCESSORS_ONLN`<br />
</syntaxhighlight><br />
<br />
====With codeblocks====<br />
<br />
If you want to create a Code::Blocks project instead, use these lines:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
cd Build<br />
cmake -G "CodeBlocks - Unix Makefiles" ../openmw/<br />
<br />
</syntaxhighlight><br />
<br />
Please note, that the Code::Blocks generator only generates a makefile with a Code::Blocks wrapper.<br />
<br />
=Mac OS X=<br />
<br />
===Dependencies===<br />
<br />
Make sure you set the following variables<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
export CFLAGS="-arch i386"<br />
<br />
export CXXFLAGS="-arch i386"<br />
export LDFLAGS="-arch i386"<br />
<br />
</syntaxhighlight><br />
<br />
====MacPort====<br />
<br />
To download many of the required packages for building Open Morrowind you can use the MacPorts utility for the Mac OSX<br />
<br />
http://www.macports.org/<br />
<br />
====Generic libraries required====<br />
<br />
You may have these installed but just incase run this to install a lot of generic libraries required for the build<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install libpng jpeg libxml2 +universal<br />
sudo port install pkgconfig xmlto autoconf automake libtool +no_x11 +quartz<br />
<br />
sudo port install freetype freeimage libzzip +universal<br />
<br />
</syntaxhighlight><br />
<br />
====Cmake====<br />
<br />
Using MacPort, install cmake. Cmake is what will be used to compile all the source files<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install cmake<br />
<br />
</syntaxhighlight><br />
<br />
====Boost====<br />
<br />
Boost is a collection of c++ libraries that is required for Open Morrowind<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
sudo port install boost +universal<br />
<br />
</syntaxhighlight><br />
<br />
====OIS====<br />
<br />
OIS is required to control input form the keyboard and mouse in the game<br />
<br />
Download the latest code from<br />
<br />
http://sourceforge.net/projects/wgois<br />
<br />
Download and install the latest version<br />
<br />
Go to the install directory<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cd Mac<br />
cd XCode-2.2<br />
<br />
</syntaxhighlight><br />
<br />
Load the project file in XCODE Build the project and copy the files, this assumes you are in the root directory of the OIS project<br />
<br />
Copy OIS.dylib and libOIS.a to /opt/local/lib/ Copy the folder OIS.framework to /Library/Frameworks<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/OIS.dylib /opt/local/lib/<br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/libOIS.a /opt/local/lib/<br />
<br />
cp -rp ./Mac/XCode-2.2/build/Debug/OIS.framework /Library/Frameworks/<br />
<br />
</syntaxhighlight><br />
<br />
====Ogre====<br />
<br />
Download the SDK from http://www.ogre3d.org/download/sdk<br />
<br />
In the OgreSDK directory of the download, copy the <sdk area>/lib and <sdk area>/include directory to /opt/local/lib/ and /opt/local/include (respectively) <br />
Copy the folder <sdk area>/lib/release/OGRE.framework to /Library/Frameworks<br />
<br />
====Mpg123====<br />
<br />
Download the source from http://sourceforge.net/projects/mpg123/files/mpg123/<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
./configure --cpu_type=i386<br />
make<br />
sudo make install<br />
<br />
</syntaxhighlight><br />
<br />
====SND====<br />
<br />
Download the source from http://www.mega-nerd.com/libsndfile/#Download<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
./configure<br />
./make <br />
sudo make install<br />
<br />
</syntaxhighlight><br />
<br />
===Build===<br />
<br />
====Fetching the source====<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir OpenMW<br />
cd OpenMW<br />
git clone git://github.com/zinnschlag/openmw.git<br />
<br />
cd openmw<br />
git submodule update --init<br />
cd ..<br />
<br />
</syntaxhighlight><br />
<br />
====Building====<br />
<br />
Note that this is an out-of-source build. Generally this is the preferred method when working with cmake.<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Build<br />
<br />
cd Build<br />
cmake ../openmw/<br />
make<br />
<br />
</syntaxhighlight><br />
<br />
This creates a regular makefile.<br />
<br />
====Test====<br />
<br />
Set up the environment. From the OpenMW directory<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Game<br />
cd Game<br />
mkdir Contents<br />
mkdir Contents/Resources<br />
mkdir Contents/Plugins<br />
<br />
</syntaxhighlight><br />
<br />
Copy Ogre plugins from Ogre SDK to Plugins subdir:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
cp /path/to/ogre/sdk/lib/*.dylib Contents/Plugins<br />
<br />
</syntaxhighlight><br />
<br />
Create symlink to resources subdirectory:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s ../../../Build/resources Contents/Resources/resources<br />
<br />
</syntaxhighlight><br />
<br />
Create symlinks for *.cfg files:<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
mkdir Contents/MacOS<br />
ln -s ../../../Build/plugins.cfg Contents/MacOS/plugins.cfg<br />
<br />
ln -s ../../../Build/openmw.cfg Contents/MacOS/openmw.cfg<br />
<br />
</syntaxhighlight><br />
<br />
Create symbolic links to the executable<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s ../Build/openmw openmw<br />
<br />
</syntaxhighlight><br />
<br />
Link the data from the morrowind installation<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
ln -s /path/to/morrowind/data/files Contents/Resources/data<br />
<br />
</syntaxhighlight><br />
<br />
<br />
Edit the file<br />
<br />
/Build/openmw.cfg Contents/MacOS/openmw.cfg<br />
<br />
with data and resource location<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
data=<path_to>/OpenMW/Game/Contents/Resources/data<br />
<br />
resources=<path_to>/OpenMW/Game/Contents/Resources/resources<br />
<br />
</syntaxhighlight><br />
<br />
<br />
Run the game<br />
<br />
<syntaxhighlight lang="bash"><br />
<br />
<path_to>/OpenMW/Game/openmw<br />
<br />
</syntaxhighlight><br />
<br />
=Data=<br />
You can use ''unshield'' to extract data from your Morrowind CD.<br />
<br />
Datafiles are inside data1.cab and data2.cab.<br />
You just need to copy thoses files to you ''data'' folder :<br />
* Sound<br />
* Music<br />
* Video<br />
* Splash<br />
* Morrowind.esm<br />
* Morrowind.bsa<br />
<br />
Edit your openmw.cfg file, and you are ready !</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Testing&diff=180Testing2012-02-09T10:34:20Z<p>Brotherbrick: </p>
<hr />
<div>For anyone who wants to give OpenMW a try, this will get you started in testing things out.<br />
<br />
== Crashcourse ==<br />
'openmw --help' gives a good overview of options available at launch.<br />
'openmw --new-game' will place in the beginning of the game aboard the boat.<br />
<br />
F1 to enter console screen to issue commands.<br />
<br />
Physics: the command is ToggleCollision (or TCL).<br />
<br />
Teleport: the command is coc (e.g. coc "Seyda Neen" or coc Balmora).<br />
<br />
Animate: the command to run the animations of an object is 'npcid->playgroup all 1' (e.g. Runa->playgroup all 1).<br />
<br />
== Scripting == <br />
The current status of [[Scripting_(status)| script commands]] used in OpenMW.<br />
<br />
The complete list of [http://www.uesp.net/wiki/Morrowind:Console Console] script commands used in Morrowind along with their description.<br />
<br />
== Extra Information ==<br />
<br />
Here is a list of [[Morrowind_Interior_Cell_Names|Interior Cell Names]] in Morrowind that you can use to go from one place to another.</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Testing&diff=166Testing2012-02-07T08:05:27Z<p>Brotherbrick: </p>
<hr />
<div><br />
== Testing ==<br />
For anyone who wants to give OpenMW a try, this will get you started in testing things out.<br />
<br />
== Crashcourse ==<br />
'openmw --help' gives a good overview of options available at launch.<br />
'openmw --new-game' will place in the beginning of the game aboard the boat.<br />
<br />
F1 to enter console screen to issue commands.<br />
<br />
Physics: the command is ToggleCollision (or TCL).<br />
<br />
Teleport: the command is coc (e.g. coc "Seyda Neen" or coc Balmora).<br />
<br />
Animate: the command to toggle animation is 'npcid->playgroup all 1' (e.g. Runa->playgroup all 1).<br />
<br />
== Extra Information == <br />
<br />
Here is a list of [http://www.uesp.net/wiki/Morrowind:Console Console] commands used in Morrowind.<br />
<br />
Here is a list of [[Scripting_(status)| script commands]] used in Morrowind.<br />
<br />
Here is a list of [[Morrowind_Interior_Cell_Names|Interior Cell Names]] in Morrowind that you can use to go from one place to another.</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Testing&diff=165Testing2012-02-06T11:38:57Z<p>Brotherbrick: /* Crashcourse */</p>
<hr />
<div><br />
== Testing ==<br />
For anyone who wants to give OpenMW a try, this will get you started in testing things out.<br />
<br />
== Crashcourse ==<br />
'openmw --help' gives a good overview of options available at launch.<br />
'openmw --new-game' will place in the beginning of the game aboard the boat.<br />
<br />
F1 to enter console screen to issue commands.<br />
<br />
Physics: the command is ToggleCollision (or TCL).<br />
<br />
Teleport: the command is coc (e.g. coc "Seyda Neen" or coc Balmora).<br />
<br />
Animate: the command to toggle animation is 'npcid->playgroup all 1' (e.g. Runa->playgroup all 1).<br />
<br />
== Extra Information == <br />
<br />
Here is a list of [[Scripting_(status)| script commands]] used in Morrowind.<br />
<br />
Here is a list of [[Morrowind_Interior_Cell_Names|Interior Cell Names]] in Morrowind that you can use to go from one place to another.</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Testing&diff=164Testing2012-02-06T10:13:19Z<p>Brotherbrick: </p>
<hr />
<div><br />
== Testing ==<br />
For anyone who wants to give OpenMW a try, this will get you started in testing things out.<br />
<br />
== Crashcourse ==<br />
'openmw --help' gives a good overview of options available at launch.<br />
'openmw --new-game' will place in the beginning of the game aboard the boat.<br />
<br />
F1 to enter console screen to issue commands.<br />
<br />
Physics: the command is ToggleCollision (or TCL).<br />
Teleport: the command is coc (e.g. coc "Seyda Neen" or coc Balmora).<br />
Animate: the command to toggle animation is 'npcid->playgroup all 1' (e.g. Runa->playgroup all 1).<br />
<br />
== Extra Information == <br />
<br />
Here is a list of [[Scripting_(status)| script commands]] used in Morrowind.<br />
<br />
Here is a list of [[Morrowind_Interior_Cell_Names|Interior Cell Names]] in Morrowind that you can use to go from one place to another.</div>Brotherbrickhttps://wiki.openmw.org/index.php?title=Testing&diff=163Testing2012-02-06T10:05:53Z<p>Brotherbrick: Created page with " == Testing == For anyone who wants to give OpenMW a try, this will get you started in testing things out. == Crashcourse == 'openmw --new-game' will place in the beginning o..."</p>
<hr />
<div><br />
== Testing ==<br />
For anyone who wants to give OpenMW a try, this will get you started in testing things out.<br />
<br />
== Crashcourse ==<br />
'openmw --new-game' will place in the beginning of the game aboard the boat.<br />
<br />
F1 to enter console screen to issue commands.<br />
<br />
Physics: the command is ToggleCollision (or TCL).<br />
Teleport: the command is coc (e.g. coc "Seyda Neen" or coc Balmora).<br />
Animate: the command to toggle animation is 'npcid->playgroup all 1' (e.g. Runa->playgroup all 1).<br />
<br />
== Extra Information == <br />
<br />
Here is a list of [[Scripting_(status)| script commands]] used in Morrowind.<br />
<br />
Here is a list of [[Morrowind_Interior_Cell_Names|Interior Cell Names]] in Morrowind that you can use to go from one place to another.</div>Brotherbrick