2022-12-29 02:13:30 -06:00
|
|
|
#Creates a release build that focuses on high runtime performance. Use "full" argument to completely rebuild PGE.
|
2022-10-10 01:25:06 -05:00
|
|
|
#C++
|
|
|
|
|
printf "Running program...\n\n\n"
|
2022-11-25 22:44:12 -06:00
|
|
|
output=$(dpkg -l | grep libx11-dev)
|
|
|
|
|
if [[ -z $output ]]
|
|
|
|
|
then
|
2023-06-02 22:13:31 -05:00
|
|
|
sudo apt install libx11-dev libpulse-dev mesa-common-dev libpng-dev libstdc++-12-dev
|
2022-11-25 22:44:12 -06:00
|
|
|
fi
|
2022-12-29 02:13:30 -06:00
|
|
|
if [ "$1" == "full" ]; then
|
|
|
|
|
rm "pixelGameEngine.o"
|
|
|
|
|
fi
|
|
|
|
|
if [ ! -f "pixelGameEngine.o" ]
|
|
|
|
|
then
|
|
|
|
|
printf "Pixel Game Engine compile object missing. Compiling for the first time..."
|
|
|
|
|
g++ -c pixelGameEngine.cpp
|
|
|
|
|
fi
|
|
|
|
|
if g++ $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine.o ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then
|
2022-10-10 01:25:06 -05:00
|
|
|
./${PROJECT_NAME} "$@"
|
|
|
|
|
fi
|
|
|
|
|
printf "\n\n"
|