diff --git a/C++/scripts/build.sh b/C++/scripts/build.sh index fe86185..bbdb7f6 100755 --- a/C++/scripts/build.sh +++ b/C++/scripts/build.sh @@ -1,6 +1,11 @@ #Compiles the entire program then runs it, producing an executable. If the "test" argument is included, will try and run tests too (in the test folder) #C++ printf "Running program...\n\n\n" +output=$(dpkg -l | grep libx11-dev) +if [[ -z $output ]] +then + sudo apt install libx11-dev libpulse-dev mesa-common-dev libpng-dev +fi if [ "$1" = "test" ] then printf "Running tests...\n" diff --git a/C++/scripts/debug.sh b/C++/scripts/debug.sh index eca8844..2854ad6 100755 --- a/C++/scripts/debug.sh +++ b/C++/scripts/debug.sh @@ -1,6 +1,11 @@ #Compiles the entire program with debug flags then runs it in gdb. If the "test" argument is included, will try and run tests too (in the test folder) #C++ printf "Running program...\n\n\n" +output=$(dpkg -l | grep libx11-dev) +if [[ -z $output ]] +then + sudo apt install libx11-dev libpulse-dev mesa-common-dev libpng-dev +fi if [ "$1" = "test" ] then printf "Running tests...\n" diff --git a/C++/scripts/md5 b/C++/scripts/md5 index 47f3924..45f0dae 100644 --- a/C++/scripts/md5 +++ b/C++/scripts/md5 @@ -1,7 +1,7 @@ -build.sh:6fbec04ed16be42bab846f1eed603133 - +build.sh:d5e4e98a6f677aa0a9759ba0afb2fb77 - commit.sh:d03a46e721060c22ccb146e19d27e70a - -debug.sh:7f57c6640be5f262988961c3b45dce97 - +debug.sh:849488515cab075948653c15eec4177b - lines.sh:3b907786f7fc9204025993016c9080de - -release.sh:0a525311cc14b9c8aefc6f2b816129a1 - +release.sh:6a96fb84ba64ed60d31be436ec069f05 - temp:d41d8cd98f00b204e9800998ecf8427e - -web.sh:96f2c316536011a3defac50aecae487d - +web.sh:b982212b88b80a59ad607b47d2ff3e94 - diff --git a/C++/scripts/release.sh b/C++/scripts/release.sh index 807a40b..2f84395 100644 --- a/C++/scripts/release.sh +++ b/C++/scripts/release.sh @@ -1,6 +1,11 @@ #Creates a release build that focuses on high runtime performance. #C++ printf "Running program...\n\n\n" +output=$(dpkg -l | grep libx11-dev) +if [[ -z $output ]] +then + sudo apt install libx11-dev libpulse-dev mesa-common-dev libpng-dev +fi if g++ $(find . -type f -name "*.cpp" -not -path "./test/*") ${CUSTOM_PARAMS} -O3 -s -DNDEBUG -o ${PROJECT_NAME}; then ./${PROJECT_NAME} "$@" fi diff --git a/C++/scripts/web.sh b/C++/scripts/web.sh index 991d44f..c46d605 100755 --- a/C++/scripts/web.sh +++ b/C++/scripts/web.sh @@ -1,5 +1,10 @@ #Compiles emscripten instance of this project for the web. #C++ +output=$(dpkg -l | grep libx11-dev) +if [[ -z $output ]] +then + sudo apt install libx11-dev libpulse-dev mesa-common-dev libpng-dev +fi if [ -d "assets" ]; then em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*") -o ${PROJECT_NAME}.html -I pixelGameEngine.h --preload-file ./assets else diff --git a/C++ProjectTemplate b/C++ProjectTemplate index defd789..d21a6d6 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ