commit 6c80a46a3a7877b898928b013e1645241069d57b parent fa6b8a176931a08f1f9cb700af758ddeda1ccfde Author: Andrew Alderwick <andrew@alderwick.co.uk> Date: Tue, 27 Jul 2021 21:13:12 +0100 Added instructions and adaptation for Windows build Diffstat:
M | README.md | | | 12 | ++++++++++++ |
M | build.sh | | | 6 | +++++- |
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md @@ -23,6 +23,18 @@ mk If the build fails on 9front because of missing headers or functions, try again after `rm -r /sys/include/npe`. +### Windows + +Uxn can be built on Windows with [MSYS2](https://www.msys2.org/). Install by downloading from their website or with Chocolatey with `choco install msys2`. In the MSYS shell, type: + +```sh +pacman -S git mingw-w64-x86_64-gcc mingw64/mingw-w64-x86_64-SDL2 +export PATH="${PATH}:/mingw64/bin" +git clone https://git.sr.ht/~rabbits/uxn +cd uxn +./build.sh +``` + ## Getting Started Begin by building the assembler and emulator by running the build script. The assembler(`uxnasm`) and emulator(`uxnemu`) are created in the `/bin` folder. diff --git a/build.sh b/build.sh @@ -24,7 +24,11 @@ fi mkdir -p bin CFLAGS="-std=c89 -Wall -Wno-unknown-pragmas" -UXNEMU_LDFLAGS="-L/usr/local/lib $(sdl2-config --cflags --libs)" +if [ -n "${MSYSTEM}" ]; then + UXNEMU_LDFLAGS="-static $(sdl2-config --cflags --static-libs)" +else + UXNEMU_LDFLAGS="-L/usr/local/lib $(sdl2-config --cflags --libs)" +fi if [ "${1}" = '--debug' ]; then