User:Gblues

From OpenMW Wiki
Revision as of 23:35, 15 May 2016 by Gblues (talk | contribs) (Detailed steps for setting up the binary dependencies; skeleton for the actual build instructions.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Building OpenMW on Windows

I've suffered through the pain of setting up a Windows build environment so you (hopefully) don't have to.

Prerequisites

1. Visual Studio (I used Visual Studio 2015 for this guide) 2. The latest version of CMake (3.5.2 as of this writing) 3. The latest version of git 4. The latest version of 7-Zip 5. You'll need about 15GB of disk space. I'm not sure on RAM, but generally it's good to have a lot. 8GB is probably OK. My system has 16GB. 6. Know your CPU architecture. I'm assuming 64-bit in this guide.

Path structure

This guide is prescriptive, rather than descriptive. Feel free to use your own organizational structure if you choose.

Create the following folder structure:

C:\
|- OpenMW\
   |- deps\
   |  |- src\
   |  +- build\
   |- src\
   |- build\
   +- out\

Libraries

This is where things get dicey, because you have to do a lot of legwork and, in most cases, build the dependent libraries yourself. Fun!

Boost

On Windows, you want to get the pre-built binaries that match up with your version of Visual Studio:

1. Go to the parent boost-binaries page. 2. Drill into the newest non-beta version (currently 1.61.0). 3. Download the *.exe that corresponds to your architecture and MSVC version (e.g. boost_1_61_0-msvc-14.0-64.exe for VS 2015 64-bit). 4. Run the *.exe you downloaded, and enter "C:\OpenMW\deps\boost" as the destination directory. 5. Set up the following environment variables:

  * BOOST_ROOT => C:\OpenMW\deps\boost
  * BOOST_LIBRARYDIR => C:\OpenMW\deps\boost\lib64-msvc-14.0

FFMPEG

OpenMW uses Zeranoe's FFmpeg builds for Windows.

1. Download the newest "shared" and "dev" archives. 2. Unzip each archive into their own directory. 3. Create the directory "C:\OpenMW\deps\ffmpeg". 4. Copy the contents of the "dev" archive into the ffmpeg directory you just created. 5. Copy the contents of the "shared" archive into the ffmpeg directory. You'll get a bunch of conflicts, just say "yes to all" to overwrite. 6. Set up the following environment variable:

  FFMPEG_HOME => C:\OpenMW\deps\ffmpeg

OpenAL

This is probably the easiest dependency to set up.

1. Download OpenAL11CoreSDK.exe from here 2. Install it to C:\OpenMW\deps\openal 3. Set up the following environment variable:

  OPENALDIR => C:\OpenmMW\deps\openal

SDL2

I'll probably have to come back and edit this because I remember having to do some finagling to get CMake to properly detect SDL2, which may have been me "doing it wrong". But here's the gist:

1. Download the VC development libraries. 2. Unzip the archive. 3. Copy the SDL2-2.0.4 to C:\OpenMW\deps 4. Set the following environment variable:

  SDL2DIR => C:\OpenMW\deps\SDL2-2.0.4

Bullet3

Bullet3 needs to be built from source.

TODO: instructions

FreeType

There's no x64 FreeType binary downloads, so we'll have to build it from source.

TODO: instructions

MyGUI

MyGUI needs to be built from source.

TODO: instructions

OpenSceneGraph (OSG)

OSG needs to be built from source.

Building OpenMW

You've got your dependencies sorted, now here's how to build OpenMW itself.

TODO: instructions