1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 12:40:36 +00:00
QB64-PE/.ci/bootstrap.sh

41 lines
1 KiB
Bash
Raw Normal View History

2020-01-03 11:43:20 +00:00
#!/bin/bash
2020-01-06 07:36:05 +00:00
OS=$1
2020-01-03 11:43:20 +00:00
com_build() {
2020-01-06 07:36:05 +00:00
cd internal/c/$1/os/$OS
echo -n "Building $2..."
if [[ $OS == "osx" ]]; then
./setup_build.command
else
./setup_build.sh
fi
if [ $? -ne 0 ]; then
echo "$2 build failed."
exit 1
fi
echo "Done"
cd - > /dev/null
2020-01-03 11:43:20 +00:00
}
com_build "libqb" "libQB"
com_build "parts/video/font/ttf" "FreeType"
2020-01-06 07:36:05 +00:00
if [[ $OS == "lnx" ]]; then
com_build "parts/core" "FreeGLUT"
fi
2020-01-03 11:43:20 +00:00
cp -r internal/source/* internal/temp/
cd internal/c
echo -n "Bootstrapping QB64..."
2020-01-06 07:36:05 +00:00
if [[ $OS == "osx" ]]; then
2020-02-21 00:43:23 +00:00
clang++ -w qbx.cpp libqb/os/osx/libqb_setup.o parts/video/font/ttf/os/osx/src.o -framework GLUT -framework OpenGL -framework Cocoa -lcurses -o ../../qb64_bootstrap
2020-01-06 07:36:05 +00:00
else
g++ -w qbx.cpp libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lcurses -lpthread -ldl -lrt -D FREEGLUT_STATIC -DDEPENDENCY_USER_MODS -o ../../qb64_bootstrap
fi
2020-01-03 11:43:20 +00:00
if [ $? -ne 0 ]; then
echo "QB64 bootstrap failed"
exit 1
fi
echo "Done"