User Tools

Site Tools


Current version: 0.8.5
iOS: 0.8.1+
Android: 0.8.5 (Play/Market version is obsolete!)

Github Coding has become social! Fork us!


Latest commit

# ideally, but does not work on sourceforge (does elsewhere); even http proxies don't help rss> 1 author 30m sidebar for frequently accessed stuff


Pre-build git binaries

There are prebuilt binaries available from here.

  1. Download and extract a build from above.
  2. Install Python 2.7 if you don't have it yet - NOT version 3 - for 32-bit Windows, even if you have a 64-bit OS.
  3. Copy GemRB.cfg.sample to GemRB.cfg and edit it:
    1. change GamePath to point to where your game is installed
  4. Run GemRB
    1. if there's a _s_error DLL error that causes an exit, install MSVC redistributable runtime 2013 (msvcr120.dll)
    2. if no plugins are found, edit PluginsPath in GemRB.cfg and make sure it is using right path delimiters (\)
    3. if you get an error about “module site” causing GemRB to close, it means your python install isn't being found: set the PYTHONPATH environmental variable to point to Python27\Lib (the folder containing in your installation)

If you have issues with any of these, please report them on IRC or forums, as none of our developers use windows primarily. These are the builds that become the official releases.

MinGW Build instructions

Building GemRB on Windows through MinGW. Adapted by Maighstir from zefklop's post “HOWTO : easy way to build GemRB on windows” at the Gibberlings3 boards.

Violet are paths that might differ on your setup.
Green need to be typed exactly as is.
UPPERCASE are things you need to look out for.

1. Get CMake

Download and install CMake. Simple enough, make sure to add it to the system path though.

2. Get Python

Download and install Python 2.7, 2.6 or 2.5 - NOT 3 - for 32-bit Windows, even if you have a 64-bit OS.

Python 2.5 if you may want to run the compiled binaries on a Windows 98 box, 2.6 if you want to move the installation to a machine that doesn't have Python 2.7 installed already. I noticed that when I did the 0.6.4 build was it? 2.7 apparently doesn't like being moved from its dear installation and starts wailing like a child having lost its mother - 2.6 doesn't have that problem in my experience.

3. Get MinGW

I suggest you install the lot to C:\MinGW, and future instructions will assume that location.

Download and run the latest automated MinGW installer (mingw-get-inst-<version>.exe), making sure to choose at least the following pieces when asked:

  • C Compiler
  • C++ Compiler

4. Get needed libraries

Extract the build libraries into the MinGW installation dir (C:\MinGW), keep the run libraries for later.

The folder structure should look like this (not complete, but enough to indicate that pieces are at their correct place):


  • bin\
    • mingw32-c++.exe
    • mingw32-gcc.exe
    • mingw32-make.exe
  • include\
    • AL\
    • libpng12\
  • lib\
    • libopenal.a
    • libpng.dll.a
  • share\

5. Get Git

Depending on if you prefer the command line or a graphical interface, you'll need either one or both of these:

  • msysGit - the command-line tool, also needed if you just want to run the graphical client. Get the one labeled “Full installer for official Git”.

Be careful what choices you make during the install, do NOT select “Run Git and included Unix tools from the Windows Command Prompt”, either of the other two works. Select the middle choice if you might want to run Git from the command line.

  • TortoiseGit- the GUI application, get whichever version suits your system.

6. Set up the build environment

… so you won't have to remember a dozen commands and type a novel in the command line each time you want to update

Now might be a good idea to decide where the heck you want to keep the source to GemRB, I'll just assume it's at C:\Users\you\gemrb_source for now, 'k? Doing without spaces is a good idea. Also decide on a final location for the compiled GemRB binaries, I'll assume C:\GemRB.

Now is also the time to extract the run libraries to wherever GemRB should be installed (C:\GemRB).

Your GemRB folder should now contain this:


  • zlib1.dll
  • vorbisfile.dll
  • SDL.dll
  • libvorbis.dll
  • libpng3.dll
  • libogg.dll

You'll need a few bat files.

In the first you'll need to specify where you want GemRB installed when all is said and done, where you hid those source files, and where you put MinGW. This one you can put wherever you want, probably within easy reach, it gets you into the build environment by setting a few variables and temporarily modifying the path. The others need to be put in the source dir (C:\Users\you\gemrb_source).


SET GEMRB_SOURCEDIR=C:\Users\you\gemrb_source
set LANG=en
set PATH=%PATH%;%MINGW_DIR%\bin;%MINGW_DIR%\include;%MINGW_DIR%\lib;%MINGW_DIR%\include\ogg;%MINGW_DIR%\include\SDL;%MINGW_DIR%\include\AL;%MINGW_DIR%\include\libpng12;
set CMAKE_C_COMPILER=%MINGW_DIR%\bin\gcc.exe
set CMAKE_MAKE_PROGRAM=%MINGW_DIR%\bin\mingw32-make.exe
start cmd /K title GemRB Buildenv: MinGW

The second one is the one you call to make the build. Don't change anything unless you know what you're doing (“messing things up” doesn't count as knowing).


@IF /I "_%1"=="_clean" GOTO clean
@IF /I "_%1"=="_debug" GOTO clean
@GOTO beginbuild
@IF /I "_%1"=="_pause" (
	@CALL ..\make_mingw.cmd %1
	@GOTO end
@IF /I "_%1"=="_debug" (
	@CALL ..\make_mingw.cmd>..\%GEMRB_BUILDDIR%.log 2>&1
	@GOTO end
@CALL ..\make_mingw.cmd

The third does the actual work for you. Don't change this one either.


@GCC -dumpversion>"%TEMP%\gccver"
@SET /P GCCVER=<"%TEMP%\gccver"
@DEL "%TEMP%\gccver"
@ECHO Build environment:  MinGW, GCC %GCCVER%
@IF /I "_%1"=="_pause" PAUSE
@IF NOT "%ERRORLEVEL%"=="0" GOTO error
@IF /I "_%1"=="_pause" PAUSE
@IF NOT "%ERRORLEVEL%"=="0" GOTO error
@IF /I "_%1"=="_pause" PAUSE
mingw32-make install
@IF NOT "%ERRORLEVEL%"=="0" GOTO error
@COPY /Y "%MINGW_DIR%\bin\libgcc_s_dw2-1.dll" "%GEMRB_INSTALLDIR%\libgcc_s_dw2-1.dll"
@COPY /Y "%MINGW_DIR%\bin\libstdc++-6.dll" "%GEMRB_INSTALLDIR%\libstdc++-6.dll"
@ECHO Build and install Successful
@GOTO end

And the fourth one is only used to remove the build directory when the clean or debug switches has been used.


@rmdir /s /q %1

7. Fetch GemRB source

7a. If this is the first time you fetch it:

Open that empty source directory we created recently (C:\Users\you\gemrb_source) right-click somewhere in it's shiny white space and choose “Git Clone…”. In that Url box you paste git://, and click OK.

For command-line Git, CD to the source dir, and type git clone git://

If you did it right, the source directory should now contain a directory called “gemrb” which in turn contains the files NEWS, AUTHORS and a lot of others, as per the following listing:


  • make.cmd
  • make_mingw.cmd
  • deldir.cmd
  • gemrb\
    • NEWS
    • gemrb\
      • GemRB.cpp

7b. Subsequent times:

Right-click the gemrb directory (C:\Users\you\gemrb_source\gemrb) (either open it and right-click on white space, or just right-click its icon) and select “Git Sync…”, then just click the “Pull” button.

For command-line, CD to the gemrb dir and run git pull.

8. Start the build

Now magic happens.

Find GemRB-Buildenv.cmd and run it, wherever it is. Type make. Wait until you get the command prompt back with the message “Build and install Successful”. Done, you can exit out of the command prompt.

NOTICE: if GEMRB_INSTALLDIR or GEMRB_SOURCEDIR is set to be inside Program Files, and you're running Windows 7 or Vista with UAC active (as it is by default), GemRB-Buildenv.cmd must be “Run as administrator”.

make.cmd takes three switches, you can only use one of them at a time though:

  • clean: delete the build dir before building.
  • debug: same as clean, and also logs the whole build to a file.
  • pause: makes build_mingw.cmd pause after each step so you can review what it has done before pressing enter to continue with the next step

9. Done/final notes

This tutorial was made by Maighstir on the IRC channel ( #gemrb) and the Gibberlings3 forums. The quickest way to get help is probably to ask a question in the relevant topic on the forum, or in the IRC channel.

Whenever you want to update your copy of GemRB, run steps 7b and 8.

If you want to copy your newly built GemRB to another computer (that doesn't have the same version of Python installed), you need to first copy python26.dll (or python25.dll) to the GemRB folder. It is installed to the Windows\system32 folder. As mentioned earlier, this isn't a good idea with Python 2.7.

You may also have to install OpenAL. Readily available from Creative, titled “OpenAL Installer for Windows” with the filename “”.

You still need to make a config file for each of the games you want to play, but that is outside the scope of this page.

install/windows.txt · Last modified: 2017/09/17 08:51 by lynxlynxlynx