Compiling on windows with msys2

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderators: Forum Moderators, Developers

Post Reply
User avatar
loonycyborg
Windows Packager
Posts: 273
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Compiling on windows with msys2

Post by loonycyborg » June 3rd, 2018, 11:45 am

A new way of building on windows is possible now, using MSYS2. This project not only provides prepackaged gcc of recent version but also windows builds of dependencies saving me the need to make deps packages. It reuses pacman, package manager from arch linux to support updates too.

The procedure is as follows:

1. install MSYS2 as explained at http://msys2.org

2. open shell appropriate to arch you want to target, either Programs->MSYS2>MSYS2 MinGW 64-bit or Programs->MSYS2>MSYS2 MinGW 32-bit. Further commands are done in this shell.

3. Install dependencies:

Code: Select all

pacman -S git scons mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-SDL2_net mingw-w64-x86_64-SDL2_ttf mingw-w64-x86_64-boost mingw-w64-x86_64-gcc mingw-w64-x86_64-glew mingw-w64-x86_64-openssl mingw-w64-x86_64-pango mingw-w64-x86_64-pkg-config
replace x86_64 with i686 if you want to do 32-bit build

4. get a clone of wesnoth git repo:

Code: Select all

git clone https://github.com/wesnoth/wesnoth.git
cd wesnoth
to get stable branch:

Code: Select all

git checkout 1.14
5. build

Code: Select all

scons arch=native
"meh." - zookeeper

justapoise
Posts: 2
Joined: June 26th, 2018, 4:13 pm

Re: Compiling on windows with msys2

Post by justapoise » June 26th, 2018, 5:39 pm

Can't find boost and sdl2 during checking of prereqs.
After investigating, I found out that these options are needed:

Code: Select all

scons arch=native sdldir=/mingw64/\include/\SDL2 boostdir=/mingw64/\include/\boost boostlibdir=/mingw64/\bin boost_suffix=-mt

User avatar
SigurdFireDragon
Developer
Posts: 416
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Compiling on windows with msys2

Post by SigurdFireDragon » November 24th, 2018, 6:06 pm

Thank you for this loonycyborg.

Post Reply