From 0c01b6c02dbfc9828186219ddcca9d1111f9c5ce Mon Sep 17 00:00:00 2001 From: wuhui Date: Thu, 22 Sep 2022 10:22:15 +0800 Subject: [PATCH] Add SDL2 checker in build script --- build.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build.sh b/build.sh index 7c788b2..2e3d106 100755 --- a/build.sh +++ b/build.sh @@ -24,6 +24,22 @@ mkdir -p ./build/assets/ ./build/png2c ./assets/tsodinPog.png > ./build/assets/tsodinPog.c # Build VC demos +# Check if SDL2 has been installed +if ! [ -x "$(which sdl2-config)" ];then + set +x + echo "You have not installed SDL2" + echo "Checking 'https://wiki.libsdl.org/Installation' to install SDL2" + echo "Or quick look the installation guide from libsdl:" + echo "$ git clone https://github.com/libsdl-org/SDL" + echo "$ cd SDL" + echo "$ mkdir build" + echo "$ cd build" + echo "$ ../configure" + echo "$ make" + echo "$ sudo make install" + exit 1 +fi + build_vc_demo triangle & build_vc_demo 3d & build_vc_demo squish &