diff --git a/scripts/debian-12/1-install-deps.sh b/scripts/debian-12/1-install-deps.sh new file mode 100755 index 0000000..49345d0 --- /dev/null +++ b/scripts/debian-12/1-install-deps.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -ex + +apt-get update -y + +apt-get install -y liblua5.3-0 liblua5.3-dev curl zip unzip tar cmake make git g++ ninja-build diff --git a/scripts/debian-12/1.5-git-safe.sh b/scripts/debian-12/1.5-git-safe.sh new file mode 100644 index 0000000..0ffc84f --- /dev/null +++ b/scripts/debian-12/1.5-git-safe.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -ex + +git config --global --add safe.directory $(pwd) +git config --global --add safe.directory $(pwd)/vcpkg +git config --global --add safe.directory $(pwd)/deps/commandline \ No newline at end of file diff --git a/scripts/debian-12/2-configure.sh b/scripts/debian-12/2-configure.sh new file mode 100755 index 0000000..a1efec9 --- /dev/null +++ b/scripts/debian-12/2-configure.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -ex + +cmake . -B bin $1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O3 -g -Wl,-z,norelro -Wl,--hash-style=gnu -Wl,--build-id=none -Wl,-z,noseparate-code -ffunction-sections -fdata-sections -Wl,--gc-sections" -DBeamMP-Server_ENABLE_LTO=ON diff --git a/scripts/debian-12/3-build-tests.sh b/scripts/debian-12/3-build-tests.sh new file mode 100755 index 0000000..aa68e15 --- /dev/null +++ b/scripts/debian-12/3-build-tests.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -ex + +cmake --build bin --parallel -t BeamMP-Server-tests diff --git a/scripts/debian-12/3-build.sh b/scripts/debian-12/3-build.sh new file mode 100755 index 0000000..4671942 --- /dev/null +++ b/scripts/debian-12/3-build.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -ex + +cmake --build bin --parallel -t BeamMP-Server + +objcopy --only-keep-debug bin/BeamMP-Server bin/BeamMP-Server.debug +objcopy --add-gnu-debuglink bin/BeamMP-Server bin/BeamMP-Server.debug + +strip -s bin/BeamMP-Server diff --git a/scripts/debian-12/4-install-runtime-deps.sh b/scripts/debian-12/4-install-runtime-deps.sh new file mode 100755 index 0000000..e3a40b8 --- /dev/null +++ b/scripts/debian-12/4-install-runtime-deps.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -ex + +apt-get update -y + +apt-get install -y liblua5.3-0 curl + diff --git a/scripts/ubuntu-20.04/1-install-deps.sh b/scripts/ubuntu-20.04/1-install-deps.sh new file mode 100755 index 0000000..49345d0 --- /dev/null +++ b/scripts/ubuntu-20.04/1-install-deps.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -ex + +apt-get update -y + +apt-get install -y liblua5.3-0 liblua5.3-dev curl zip unzip tar cmake make git g++ ninja-build diff --git a/scripts/ubuntu-20.04/1.5-git-safe.sh b/scripts/ubuntu-20.04/1.5-git-safe.sh new file mode 100644 index 0000000..0ffc84f --- /dev/null +++ b/scripts/ubuntu-20.04/1.5-git-safe.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -ex + +git config --global --add safe.directory $(pwd) +git config --global --add safe.directory $(pwd)/vcpkg +git config --global --add safe.directory $(pwd)/deps/commandline \ No newline at end of file diff --git a/scripts/ubuntu-20.04/2-configure.sh b/scripts/ubuntu-20.04/2-configure.sh new file mode 100755 index 0000000..19a44a8 --- /dev/null +++ b/scripts/ubuntu-20.04/2-configure.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -ex + +./vcpkg/bootstrap-vcpkg.sh + +cmake . -B bin $1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O3 -g -Wl,-z,norelro -Wl,--hash-style=gnu -Wl,--build-id=none -Wl,-z,noseparate-code -ffunction-sections -fdata-sections -Wl,--gc-sections" -DBeamMP-Server_ENABLE_LTO=ON diff --git a/scripts/ubuntu-20.04/3-build-tests.sh b/scripts/ubuntu-20.04/3-build-tests.sh new file mode 100755 index 0000000..aa68e15 --- /dev/null +++ b/scripts/ubuntu-20.04/3-build-tests.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -ex + +cmake --build bin --parallel -t BeamMP-Server-tests diff --git a/scripts/ubuntu-20.04/3-build.sh b/scripts/ubuntu-20.04/3-build.sh new file mode 100755 index 0000000..4671942 --- /dev/null +++ b/scripts/ubuntu-20.04/3-build.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -ex + +cmake --build bin --parallel -t BeamMP-Server + +objcopy --only-keep-debug bin/BeamMP-Server bin/BeamMP-Server.debug +objcopy --add-gnu-debuglink bin/BeamMP-Server bin/BeamMP-Server.debug + +strip -s bin/BeamMP-Server diff --git a/scripts/ubuntu-20.04/4-install-runtime-deps.sh b/scripts/ubuntu-20.04/4-install-runtime-deps.sh new file mode 100755 index 0000000..e3a40b8 --- /dev/null +++ b/scripts/ubuntu-20.04/4-install-runtime-deps.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -ex + +apt-get update -y + +apt-get install -y liblua5.3-0 curl +