diff --git a/build-clean.sh b/build-clean.sh new file mode 100755 index 000000000..671b375e1 --- /dev/null +++ b/build-clean.sh @@ -0,0 +1,12 @@ +#!/bin/sh -e + +# Purpose of this is to in theroy be safer than rm -r... + +if [ -f CMakeLists.txt ]; then + mkdir -p build + cd build +fi + +if [ -f CMakeCache.txt ]; then + rm -r * +fi diff --git a/build-client.sh b/build-client.sh new file mode 100755 index 000000000..53e3942eb --- /dev/null +++ b/build-client.sh @@ -0,0 +1,12 @@ +#!/bin/sh -e + +if [ -f CMakeLists.txt ]; then + mkdir -p build + cd build +fi + +if ! [ -f CMakeCache.txt ]; then + cmake -DCMAKE_BUILD_TYPE=Release -DUNITY_BUILDS=OFF -DWHOLE_PROGRAM_OPTIMISATION=OFF -DBUILD_CLIENT=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. +fi + +make -j$(nproc) diff --git a/build-fastcompile.sh b/build-fastcompile.sh new file mode 100755 index 000000000..2b5d1c6fc --- /dev/null +++ b/build-fastcompile.sh @@ -0,0 +1,12 @@ +#!/bin/sh -e + +if [ -f CMakeLists.txt ]; then + mkdir -p build + cd build +fi + +if ! [ -f CMakeCache.txt ]; then + cmake -DCMAKE_BUILD_TYPE=Release -DUNITY_BUILDS=OFF -DWHOLE_PROGRAM_OPTIMISATION=OFF .. +fi + +make -j$(nproc) diff --git a/build-release.sh b/build-release.sh new file mode 100755 index 000000000..dcd108325 --- /dev/null +++ b/build-release.sh @@ -0,0 +1,12 @@ +#!/bin/sh -e + +if [ -f CMakeLists.txt ]; then + mkdir -p build + cd build +fi + +if ! [ -f CMakeCache.txt ]; then + cmake -DCMAKE_BUILD_TYPE=Release .. +fi + +make -j$(nproc) diff --git a/build.sh b/build.sh new file mode 100755 index 000000000..af8ed086f --- /dev/null +++ b/build.sh @@ -0,0 +1,12 @@ +#!/bin/sh -e + +if [ -f CMakeLists.txt ]; then + mkdir -p build + cd build +fi + +if ! [ -f CMakeCache.txt ]; then + cmake .. +fi + +make -j$(nproc) diff --git a/start.sh b/start.sh new file mode 100755 index 000000000..fe53e530a --- /dev/null +++ b/start.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if [ -f CMakeLists.txt ]; then + mkdir -p build + cd build +fi + +if ! [ -f CMakeCache.txt ]; then + cmake .. +fi + +if ! [ -f Server/Cuberite ]; then + make -j$(nproc) +fi + +if ! [ -d res ]; then + ln -s ../client-resources/ res +fi + +cd Server +LD_PRELOAD=/usr/local/lib/libhydride.so ./Cuberite +#LD_PRELOAD=/usr/local/lib/libhydride.so gdb ./Cuberite