tomm / fab-agon-emulator

Agon Light, Agon Light 2, Agon Console8 Emulator for Linux, Windows, any system with libSDL
GNU General Public License v3.0
82 stars 19 forks source link

Switch Windows build environment to MSYS2 #55

Closed jblang closed 4 months ago

jblang commented 4 months ago

Current build instructions for Windows say to use an ad-hoc collection of tools that requires a lot of manual installation. MSYS2 provides a Linux-like build environment and packages for all the dependencies required to build fab-agon-emulator. Besides the convenience factor, the GnuWin32 packages have been removed from winget. The GNU Make packages from GnuWin32 is over 18 years old so it is better to use a more modern version.

I have made a msys-init.sh script which will automatically update MSYS2, install the dependencies and clone the git repo for the user. All the user has to do is install MSYS2 through the graphical installer and run the script. I also updated the build instructions and Makefile for the new environment. I needed to remove the check for Windows_NT from the makefile, because GNU Make detects MSYS2 as Windows_NT but MSYS2 has bash, and so the conditional check to use batch files would cause the build to fail.