2020-08-30 00:41:54 +02:00
|
|
|
# Building
|
|
|
|
|
2020-09-05 12:58:27 +02:00
|
|
|
## With CMake
|
|
|
|
Make sure you have installed `build-essential make git cmake libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-dev`. Then you can do:
|
|
|
|
```
|
|
|
|
# Build the filelist.h
|
|
|
|
bash ./filelist.sh
|
|
|
|
#
|
|
|
|
mkdir build && cd build && cmake .. && make
|
|
|
|
```
|
|
|
|
|
2020-09-05 11:33:54 +02:00
|
|
|
Via docker:
|
|
|
|
```
|
|
|
|
# Build the docker image
|
|
|
|
docker build . -f .\Dockerfile.pc -t sdl2_playground-builder-pc
|
|
|
|
|
|
|
|
# Build filelist.h
|
|
|
|
docker run -it --rm -v ${PWD}:/project sdl2_playground-builder-pc bash -c "cd .. && bash filelist.sh"
|
|
|
|
|
|
|
|
# Generate the makefile
|
|
|
|
docker run -it --rm -v ${PWD}:/project sdl2_playground-builder-pc cmake ..
|
|
|
|
|
|
|
|
# build!
|
|
|
|
docker run -it --rm -v ${PWD}:/project sdl2_playground-builder-pc make
|
|
|
|
|
|
|
|
# The result will be in ${PWD}/cmake-build
|
|
|
|
```
|
|
|
|
|
2020-08-30 17:16:12 +02:00
|
|
|
## Windows binaries
|
|
|
|
|
|
|
|
### Windows with devkitPros version of msys2
|
2020-08-30 00:41:54 +02:00
|
|
|
Setup mingw:
|
|
|
|
1. Add the mingw64 repository to `/etc/pacman.conf`.
|
|
|
|
```
|
|
|
|
[mingw64]
|
|
|
|
Server = https://repo.msys2.org/mingw/x86_64
|
|
|
|
```
|
|
|
|
2. Install packages (List taken from [here](https://gist.github.com/thales17/fb2e4cff60890a51d9dddd4c6e832ad2))
|
|
|
|
```
|
|
|
|
pacman -Syu
|
2020-08-30 17:16:12 +02:00
|
|
|
pacman -S git mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-SDL2_mixer mingw64/mingw-w64-x86_64-SDL2_image mingw64/mingw-w64-x86_64-SDL2_ttf mingw64/mingw-w64-x86_64-SDL2_net mingw64/mingw-w64-x86_64-cmake make
|
2020-08-30 00:41:54 +02:00
|
|
|
```
|
2020-08-30 17:16:12 +02:00
|
|
|
3. Set the environment variable `MINGW64_PREFIX` to `C:/devkitPro/msys2/mingw64/bin/`
|
2020-08-30 00:41:54 +02:00
|
|
|
|
2020-08-30 17:16:12 +02:00
|
|
|
4. Build!
|
2020-08-30 00:41:54 +02:00
|
|
|
```
|
2020-08-30 13:57:54 +02:00
|
|
|
make -f .\Makefile.pc-win
|
2020-08-30 12:46:49 +02:00
|
|
|
```
|
|
|
|
|
2020-08-30 17:16:12 +02:00
|
|
|
### Windows with docker
|
2020-08-30 16:56:03 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
docker build . -f .\Dockerfile.pc-win -t sdl2_playground-builder-pc-win
|
|
|
|
docker run -it --rm -v ${PWD}:/project sdl2_playground-builder-pc-win make -f .\Makefile.pc-win -j16
|
|
|
|
```
|
|
|
|
|
2020-08-30 17:16:12 +02:00
|
|
|
## Wii U binaries
|
|
|
|
|
|
|
|
### With docker
|
|
|
|
|
|
|
|
```
|
|
|
|
docker build . -f .\Dockerfile.wiiu -t sdl2_playground-builder-wiiu
|
|
|
|
|
2020-10-02 21:33:09 +02:00
|
|
|
docker run -it --rm -v ${PWD}:/project sdl2_playground-builder-wiiu make -f Makefile.wiiu -j16
|
2020-08-30 17:16:12 +02:00
|
|
|
```
|
2020-08-30 12:46:49 +02:00
|
|
|
|
2020-08-30 17:16:12 +02:00
|
|
|
### With local installation
|
|
|
|
|
|
|
|
Install the following packages via [devkitPros pacman](https://devkitpro.org/wiki/devkitPro_pacman):
|
|
|
|
```
|
|
|
|
(dkp)pacman -S devkitPPC wut-tools wut wiiu-portlibs wiiu-sdl2-libs
|
|
|
|
```
|
2020-08-30 12:46:49 +02:00
|
|
|
|
|
|
|
Build via:
|
2020-08-30 17:16:12 +02:00
|
|
|
```
|
|
|
|
make -f Makefile.wiiu
|
|
|
|
```
|