]> git.lizzy.rs Git - dragonblocks_alpha.git/blobdiff - snapshot.sh
Fix client terrain crashes and performance
[dragonblocks_alpha.git] / snapshot.sh
index f3401553616dbca3a078d3342f115df92885a5d1..9c1098fc482e74c3cfdcc7c174f8753af72db74c 100755 (executable)
@@ -1,20 +1,23 @@
-#! /bin/bash
+#!/bin/bash
+VERSION=`git tag --points-at HEAD`
+if [[ $VERSION = "" ]]; then
+       VERSION=`git rev-parse --short HEAD`
+fi
+DIR=dragonblocks_alpha-$VERSION
 mkdir .build
 cp -r * .build/
-cd .build/src
-if ! (make clobber && make all RELEASE=TRUE -j$(nproc) && make clean); then
-    cd ../..
-    rm -rf .build
+cd .build/
+mkdir build
+cd build
+if ! (cmake -B . -S ../src -DCMAKE_BUILD_TYPE=Release -DRESSOURCE_PATH="\"\"" -DCMAKE_C_FLAGS="-Ofast" && make clean && make -j$(nproc)); then
+       cd ../..
+       rm -rf .build
        exit 1
 fi
-cp Dragonblocks DragonblocksServer ..
+cp dragonblocks dragonblocks_server ..
 cd ..
-rm -rf .git* deps src BUILDING.md snapshot.sh upload.sh DragonblocksAlpha-*.zip
+rm -rf .git* deps src build BUILDING.md snapshot.sh upload.sh dragonblocks_alpha-* screenshot-*.png
 cd ..
-mv .build DragonblocksAlpha
-VERSION=`git tag --points-at HEAD`
-if [[ $VERSION = "" ]]; then
-       VERSION=`git rev-parse --short HEAD`
-fi
-zip -r DragonblocksAlpha-$VERSION.zip DragonblocksAlpha/*
-rm -rf DragonblocksAlpha
+mv .build $DIR
+zip -r $DIR.zip $DIR/*
+rm -rf $DIR