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
.bashrcand restart shellexport LANG=en_US.UTF-8
-
Update packages
$ pacman -Syu $ pacman -Su
|
π
|
Sometimes after the first step the system fails telling that the process could not be exited. Just close the shell and reopen it. |
-
Install
mingw64bits toolchain$ pacman -S mingw-w64-x86_64-toolchain --noconfirm
-
Install
cmake$ pacman -S mingw-w64-x86_64-cmake --noconfirm
|
β
|
Do not install the package named cmake, use the one above.
|
-
(OPTIONAL) Add
makealias to.bashrcto avoid typingmingw32-makeevery 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
unzippackage 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
OpenTESArenaand move the directory$ git clone https://github.com/afritz1/OpenTESArena.git $ cd OpenTESArena
-
Create
builddirectory 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" ..
|
π
|
Both "Unix Makefiles" and "MingGW Makefiles" work.
However, Unix option does not require to remove |
-
Use
makealias to build$ make
-
Deploy
-
Copy the generate
.exeto 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
msys64directory and WildMidi zip):-
libgcc_s_seh-1.dll
-
libopenal-1.dll
-
libstdc++-6.dll
-
libWildMidi.dll
-
libwinpthread-1.dll
-
SDL2.dll
-
-