1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-08 07:55:14 +00:00

osx travis build tweaks

This commit is contained in:
Luke Ceddia 2018-01-11 21:14:15 +11:00
parent d9f17b3ccf
commit 0dbd7e03d2
2 changed files with 9 additions and 7 deletions

View file

@ -5,10 +5,10 @@ after_success: ".travis/push.sh"
matrix: matrix:
include: include:
- os: linux
compiler: gcc
- os: osx - os: osx
compiler: clang compiler: clang
- os: linux
compiler: gcc
env: env:
global: global:

View file

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
g++ --version
###### Part 1: Build old QB64 ###### ###### Part 1: Build old QB64 ######
echo "Preparing bootstrap:" echo "Preparing bootstrap:"
find . -type f -iname "*.command" -exec chmod +x {} \; find . -type f -iname "*.command" -exec chmod +x {} \;
@ -10,7 +12,7 @@ rm internal/temp/* 2> /dev/null
com_build() { com_build() {
cd internal/c/$1/os/osx cd internal/c/$1/os/osx
echo -n "Building $2..." echo "Building $2..."
./setup_build.command ./setup_build.command
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "$2 build failed." echo "$2 build failed."
@ -25,7 +27,7 @@ com_build "parts/video/font/ttf" "FreeType"
cp -r internal/source/* internal/temp/ cp -r internal/source/* internal/temp/
cd internal/c cd internal/c
echo -n "Bootstrapping QB64..." echo "Bootstrapping QB64..."
g++ -w qbx.cpp libqb/os/osx/libqb_setup.o parts/video/font/ttf/os/osx/src.o -framework GLUT -framework OpenGL -framework Cocoa -o ../../qb64_bootstrap g++ -w qbx.cpp libqb/os/osx/libqb_setup.o parts/video/font/ttf/os/osx/src.o -framework GLUT -framework OpenGL -framework Cocoa -o ../../qb64_bootstrap
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "QB64 bootstrap failed" echo "QB64 bootstrap failed"
@ -35,7 +37,7 @@ echo "Done"
cd - > /dev/null cd - > /dev/null
###### Part 2: Build new QB64 from .bas sources ###### ###### Part 2: Build new QB64 from .bas sources ######
echo -n "Translating .bas source..." echo "Translating .bas source..."
echo AutoBuildMsg\$ = CHR\$\(10\) + \"From git `echo $TRAVIS_COMMIT | sed 's/\(.......\).*$/\1/'`\" >> source/global/version.bas echo AutoBuildMsg\$ = CHR\$\(10\) + \"From git `echo $TRAVIS_COMMIT | sed 's/\(.......\).*$/\1/'`\" >> source/global/version.bas
./qb64_bootstrap -x -z source/qb64.bas > /tmp/qb64-output ./qb64_bootstrap -x -z source/qb64.bas > /tmp/qb64-output
rm qb64_bootstrap rm qb64_bootstrap
@ -46,10 +48,10 @@ if [ `wc -l /tmp/qb64-output |awk '{print $1}'` -gt 2 ]; then
fi fi
echo "Done" echo "Done"
echo -n "Testing compile/link..." echo "Testing compile/link..."
# extract g++ line # extract g++ line
cd internal/temp/ cd internal/temp/
cpp_call=`awk '$1=="g++" {print $0}' < recompile_lnx.sh` cpp_call=`awk '$1=="g++" {print $0}' < recompile_osx.command`
# run g++ # run g++
cd ../c/ cd ../c/