dropshell release 2025.0526.2221
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
This commit is contained in:
33
source/multibuild.sh
Executable file
33
source/multibuild.sh
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Create output directory
|
||||
mkdir -p output
|
||||
|
||||
|
||||
function build_arch() {
|
||||
local arch=$1
|
||||
|
||||
if [ ! -f "${HOME}/.musl-cross/${arch}-linux-musl-cross/bin/${arch}-linux-musl-c++" ]; then
|
||||
echo "Musl cross compiler for ${arch} not found. Please run install_build_prerequisites.sh first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
CC="${HOME}/.musl-cross/${arch}-linux-musl-cross/bin/${arch}-linux-musl-gcc"
|
||||
CXX="${HOME}/.musl-cross/${arch}-linux-musl-cross/bin/${arch}-linux-musl-g++"
|
||||
|
||||
BUILDDIR=build/${arch}
|
||||
mkdir -p ${BUILDDIR}
|
||||
|
||||
cmake -B ${BUILDDIR} -G Ninja -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX}
|
||||
cmake --build ${BUILDDIR}
|
||||
|
||||
upx ${BUILDDIR}/dropshell
|
||||
cp ${BUILDDIR}/dropshell output/dropshell.${arch}
|
||||
}
|
||||
|
||||
build_arch x86_64
|
||||
build_arch aarch64
|
||||
|
||||
echo "Static binaries have been created:"
|
||||
ls -la output
|
Reference in New Issue
Block a user