Added support for ninja build system and fixed uploading to Mega.

This commit is contained in:
Faerbit 2014-11-24 15:59:59 +01:00
parent 8a96be1275
commit 8cccd9fc8c
2 changed files with 24 additions and 7 deletions

View File

@ -23,8 +23,14 @@ threads=$(($(nproc)+1))
cd extern/bullet/ cd extern/bullet/
mkdir -p build mkdir -p build
cd build cd build
if [[ $2 == "ninja" ]]
then
$cmake -DBUILD_DEMOS=0 -DBUILD_EXTRAS=0 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -GNinja ..
ninja
else
$cmake -DBUILD_DEMOS=0 -DBUILD_EXTRAS=0 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 .. $cmake -DBUILD_DEMOS=0 -DBUILD_EXTRAS=0 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 ..
make -j$threads make -j$threads
fi
cd $currentDir cd $currentDir
@ -32,5 +38,11 @@ cd $currentDir
mkdir -p build mkdir -p build
cd build cd build
if [[ $2 == "ninja" ]]
then
$cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -GNinja ..
ninja
else
$cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 .. $cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 ..
make -j$threads make -j$threads
fi

View File

@ -12,9 +12,14 @@ then
platform="windows" platform="windows"
fi fi
./build.sh clean #./build.sh clean
if hash ninja 2>/dev/null
then
./build.sh $platform ninja
else
./build.sh $platform ./build.sh $platform
fi
rc=$? rc=$?
@ -26,7 +31,7 @@ then
zip -r "MarbleGame_${platform^}.zip" "MarbleGame_${platform^}" zip -r "MarbleGame_${platform^}.zip" "MarbleGame_${platform^}"
if hash megacmd 2>/dev/null if hash megacmd 2>/dev/null
then then
megacmd put "MarbleGame_${platform^}.zip" mega:/GameBuilds/ megacmd -force put "MarbleGame_${platform^}.zip" mega:/GameBuilds/
fi fi
rm -rf "MarbleGame_${platform^}" rm -rf "MarbleGame_${platform^}"
fi fi