diff --git a/build.sh b/build.sh index 0109ee3..9e5c386 100755 --- a/build.sh +++ b/build.sh @@ -23,8 +23,14 @@ threads=$(($(nproc)+1)) cd extern/bullet/ mkdir -p build cd build -$cmake -DBUILD_DEMOS=0 -DBUILD_EXTRAS=0 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 .. -make -j$threads +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 .. + make -j$threads +fi cd $currentDir @@ -32,5 +38,11 @@ cd $currentDir mkdir -p build cd build -$cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 .. -make -j$threads +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 .. + make -j$threads +fi diff --git a/package.sh b/package.sh index 5d4be5f..27a3453 100755 --- a/package.sh +++ b/package.sh @@ -12,9 +12,14 @@ then platform="windows" fi -./build.sh clean +#./build.sh clean -./build.sh $platform +if hash ninja 2>/dev/null +then + ./build.sh $platform ninja +else + ./build.sh $platform +fi rc=$? @@ -26,7 +31,7 @@ then zip -r "MarbleGame_${platform^}.zip" "MarbleGame_${platform^}" if hash megacmd 2>/dev/null then - megacmd put "MarbleGame_${platform^}.zip" mega:/GameBuilds/ + megacmd -force put "MarbleGame_${platform^}.zip" mega:/GameBuilds/ fi rm -rf "MarbleGame_${platform^}" fi