mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-26 07:45:14 +00:00
Added instructions and adaptation for Windows build
This commit is contained in:
parent
fa6b8a1769
commit
6c80a46a3a
2 changed files with 17 additions and 1 deletions
12
README.md
12
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`.
|
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
|
## 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.
|
Begin by building the assembler and emulator by running the build script. The assembler(`uxnasm`) and emulator(`uxnemu`) are created in the `/bin` folder.
|
||||||
|
|
4
build.sh
4
build.sh
|
@ -24,7 +24,11 @@ fi
|
||||||
|
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
CFLAGS="-std=c89 -Wall -Wno-unknown-pragmas"
|
CFLAGS="-std=c89 -Wall -Wno-unknown-pragmas"
|
||||||
|
if [ -n "${MSYSTEM}" ]; then
|
||||||
|
UXNEMU_LDFLAGS="-static $(sdl2-config --cflags --static-libs)"
|
||||||
|
else
|
||||||
UXNEMU_LDFLAGS="-L/usr/local/lib $(sdl2-config --cflags --libs)"
|
UXNEMU_LDFLAGS="-L/usr/local/lib $(sdl2-config --cflags --libs)"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${1}" = '--debug' ];
|
if [ "${1}" = '--debug' ];
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue