New Easy Build scripts for linux.

I want to go fast, these allow you to simply run the script and it goes.
This commit is contained in:
Rebekah 2024-02-13 10:52:22 -05:00
parent 0606ca3008
commit d8b5b2e876
Signed by: oneechanhax
GPG Key ID: 183EB7902964DAE5
6 changed files with 82 additions and 0 deletions

12
build-clean.sh Executable file
View File

@ -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

12
build-client.sh Executable file
View File

@ -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)

12
build-fastcompile.sh Executable file
View File

@ -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)

12
build-release.sh Executable file
View File

@ -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)

12
build.sh Executable file
View File

@ -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)

22
start.sh Executable file
View File

@ -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