mirror of
https://github.com/ssloy/tinyraycaster.git
synced 2025-09-03 02:42:36 +02:00
@@ -35,7 +35,7 @@ As an example, [here are the sources](https://github.com/stephane-hulot/thanksgi
|
|||||||
|
|
||||||
## Compilation
|
## Compilation
|
||||||
```sh
|
```sh
|
||||||
sudo apt-get install libsdl2-dev
|
sudo apt install -y libsdl2-dev git
|
||||||
git clone https://github.com/ssloy/tinyraycaster.git
|
git clone https://github.com/ssloy/tinyraycaster.git
|
||||||
cd tinyraycaster
|
cd tinyraycaster
|
||||||
mkdir build
|
mkdir build
|
||||||
@@ -44,7 +44,7 @@ cmake ..
|
|||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
You can open the project in Gitpod, a free online dev evironment for GitHub:
|
You can open the project in Gitpod, a free online dev environment for GitHub:
|
||||||
|
|
||||||
[](https://gitpod.io/#https://github.com/ssloy/tinyraycaster)
|
[](https://gitpod.io/#https://github.com/ssloy/tinyraycaster)
|
||||||
|
|
||||||
|
25
build.sh
Executable file
25
build.sh
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
BUILD_DIR="build"
|
||||||
|
BUILD_BIN="tinyraycaster"
|
||||||
|
|
||||||
|
# Take care of dependencies
|
||||||
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
|
if brew help >/dev/null && ! brew list sdl2 >/dev/null 2>&1 ; then
|
||||||
|
brew install sdl2
|
||||||
|
fi
|
||||||
|
elif [ "$(uname)" == "Linux" ]; then
|
||||||
|
# Ubuntu/Debian
|
||||||
|
if [ -f /etc/lsb-release ] && ! dpkg -l libsdl2-dev >/dev/null ; then
|
||||||
|
sudo apt install -y libsdl2-dev
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build the project and run it
|
||||||
|
if [ ! -d "${BUILD_DIR}" ]; then
|
||||||
|
mkdir "${BUILD_DIR}"
|
||||||
|
fi
|
||||||
|
cd "${BUILD_DIR}"
|
||||||
|
cmake ..
|
||||||
|
make
|
||||||
|
"./${BUILD_BIN}"
|
Reference in New Issue
Block a user