mmitch / gbsplay

gameboy sound player
https://mmitch.github.io/gbsplay/
Other
98 stars 20 forks source link

Tips for building on Windows? #35

Open livvy94 opened 3 years ago

livvy94 commented 3 years ago

Hello, what kind of environment do you need to build this into a Windows executable? I have the Windows Linux Subsystem, but I assume that if I use that, it will only be launchable from within a WSL command line, and I'm looking for something (that isn't an old WinAmp plugin) that I can associate with the .gbs file format, akin to NSFPlay.

mmitch commented 3 years ago

It should compile both under Cygwin and MSYS2, although I don't know what the differences between those two are.

ranma commented 3 years ago

There seems to be a bug with -fstack-clash-protection (https://github.com/msys2/MINGW-packages/issues/5348), to work around that use ./configure --disable-hardening

mmitch commented 3 years ago

Also your request has triggered some fixes to the MSYS2 build, so be sure to git pull before your next build ;-)

mmitch commented 3 years ago

After some additional fixes to configure we now have an automated build environment under Windows that tells us that MSYS, MINGW64 and MINGW32 should work "out of the box".

Please try it and tell us the results.

mmitch commented 3 years ago

@vince94 Does one of the MSYS or MINGW builds work for you?

livvy94 commented 3 years ago

Hey there, I just saw the notification for this thread. I think I ended up using a different player for the arrangement I was working on. I've never used MSYS or MINGW before (I'm more of a musician than a programmer) and I have tried MINGW32 before several years ago (couldn't figure out how to get past the installer where you have to know which components you want and what they do) but I'll see if I can figure it out again. EDIT: I tried following the setup tutorial on msys2.org, but I keep getting error: failed to prepare transaction (could not find database) when I try to run pacman -S --needed base-devel mingw-w64-x86_64-toolchain (step 7). Are there builds available for download somewhere? The first place I normally check is Releases but it seems to only have a copy of the repo/the same files you get when you run git clone.

ranma commented 3 years ago

We don't provide any prebuilt binaries (so far). If you want to try it I can offer you http://uguu.de/~ranma/gbsplay.exe (untested, just built it on Linux using the mingw toolchain).

$ sha1sum gbsplay.exe
ec022e92de95261d6e0c82dbcfe61bba255ebc4f  gbsplay.exe
$ file gbsplay.exe
gbsplay.exe: PE32 executable (console) Intel 80386, for MS Windows

(Note this also needs libwinpthread-1.dll and zlib1.dll mingw libraries to run)

$ wine gbsplay.exe
Usage: Z:\[...]\gbsplay.exe [option(s)] <gbs-file> [start_at_subsong [stop_at_subsong] ]
[...]
$ wine gbsplay.exe  examples/nightmode.gbs
GBSVersion:       1
Title:            "Nightmode"
Author:           "Laxity"
[...]