This document describes how to setup a MYS2 environment to build OpenTESArena (https://github.com/afritz1/OpenTESArena). Note that this guide is exclusive for a 64 bits build.
-
Download and install last version from http://www.msys2.org/
-
(OPTIONAL) Change language in
.bashrc
and restart shellexport LANG=en_US.UTF-8
-
Update packages
$ pacman -Syu $ pacman -Su
Note
Sometimes after the first step the system fails telling that the process could not be exited. Just close the shell and reopen it.
-
Install
mingw
64bits toolchain$ pacman -S mingw-w64-x86_64-toolchain --noconfirm
-
Install
cmake
$ pacman -S mingw-w64-x86_64-cmake --noconfirm
Important
Do not install the package named
cmake
, use the one above.
-
(OPTIONAL) Add
make
alias to.bashrc
to avoid typingmingw32-make
every timealias make="mingw32-make"
-
(OPTIONAL) Install Git, or ignore it and just add yor current Git to the path.
$ pacman -S git --noconfirm
-
Install OpenAL (current version 1.18.0)
$ pacman -S mingw-w64-x86_64-openal --noconfirm
-
Install SDL2 (current version 2.0.5)
$ pacman -S mingw-w64-x86_64-SDL2 --noconfirm
-
Install WildMIDI (current version 0.4.1)
WildMidi is not available though package manager. First, you must install the
unzip
package and then do a manual installation.$ pacman -S unzip --noconfirm $ wget https://github.com/Mindwerks/wildmidi/releases/download/wildmidi-0.4.1/wildmidi-0.4.1-win64.zip $ cp wildmidi-0.4.1-win64/mingw/*.h /mingw64/include/ $ cp wildmidi-0.4.1-win64/mingw/*.a /mingw64/lib/
-
Clone
OpenTESArena
and move the directory$ git clone https://github.com/afritz1/OpenTESArena.git $ cd OpenTESArena
-
Create
build
directory and move into it$ mkdir build $ cd build
-
Now, there are 2 ways to
-
Create make files with
cmake
$ cmake \ -D CMAKE_MAKE_PROGRAM="mingw32-make" \ -D CMAKE_BUILD_TYPE=Release \ -G "Unix Makefiles" ..
Note
Both "Unix Makefiles" and "MingGW Makefiles" work. However, Unix option does not require to remove
sh
from the shell path.
-
Use
make
alias to build$ make
-
Deploy
-
Copy the generate
.exe
to a directory. -
Follow instruction it https://github.com/afritz1/OpenTESArena#windows regarding setup of ARENA dir, options.txt and MIDI accordingly.
-
Copy the required libraries to the deploy (found inside the
msys64
directory and WildMidi zip):-
libgcc_s_seh-1.dll
-
libopenal-1.dll
-
libstdc++-6.dll
-
libWildMidi.dll
-
libwinpthread-1.dll
-
SDL2.dll
-
-
.profile
is not executed. So shell configurations must be set in.bashrc
.