Compiling on windows with msys2
Moderator: Forum Moderators
- loonycyborg
- Windows Packager
- Posts: 295
- Joined: April 1st, 2008, 4:45 pm
- Location: Russia/Moscow
Compiling on windows with msys2
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:
replace x86_64 with i686 if you want to do 32-bit build
4. get a clone of wesnoth git repo:
to get stable branch:
5. build
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
4. get a clone of wesnoth git repo:
Code: Select all
git clone https://github.com/wesnoth/wesnoth.git
cd wesnoth
Code: Select all
git checkout 1.14
Code: Select all
scons arch=native
"meh." - zookeeper
-
- Posts: 2
- Joined: June 26th, 2018, 4:13 pm
Re: Compiling on windows with msys2
Can't find boost and sdl2 during checking of prereqs.
After investigating, I found out that these options are needed:
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
-
- Developer
- Posts: 546
- Joined: January 12th, 2011, 2:18 am
- Location: Pennsylvania, USA
Re: Compiling on windows with msys2
Thank you for this loonycyborg.
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.