Updated Linux build script to better match the officially supported Debian platforms.

This commit is contained in:
LoRd_MuldeR 2022-06-18 14:38:42 +02:00
parent ae340c4070
commit 5e7b6ebb09
Signed by: mulder
GPG Key ID: 2B5913365F57E03F
4 changed files with 26 additions and 11 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# sudo apt install crossbuild-essential-{i386,armel,arm64,mips,mips64} # sudo apt install crossbuild-essential-{i386,armel,armhf,arm64,mipsel,mips64el}
set -e set -e
cd -- "$(dirname -- "${BASH_SOURCE[0]}")" cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
@ -30,7 +30,8 @@ curl -vkf -o "musl-latest.tar.gz" "https://musl.libc.org/releases/musl-latest.ta
mk_musl x86_64 mk_musl x86_64
mk_musl i686 i686-linux-gnu mk_musl i686 i686-linux-gnu
mk_musl arm arm-linux-gnueabi mk_musl armel arm-linux-gnueabi
mk_musl aarch64 aarch64-linux-gnu mk_musl armhf arm-linux-gnueabihf
mk_musl mips mips-linux-gnu mk_musl arm64 aarch64-linux-gnu
mk_musl mips64 mips64-linux-gnuabi64 mk_musl mipsel mipsel-linux-gnu
mk_musl mips64el mips64el-linux-gnuabi64

View File

@ -56,10 +56,18 @@
# define CPU_ARCH "x86" # define CPU_ARCH "x86"
#elif defined(__aarch64__) || defined(_M_ARM64) #elif defined(__aarch64__) || defined(_M_ARM64)
# define CPU_ARCH "arm64" # define CPU_ARCH "arm64"
#elif defined(__arm__) && defined(__ARM_FP)
# define CPU_ARCH "armhf"
#elif defined(__arm__) && defined(__ARMEL__)
# define CPU_ARCH "armel"
#elif defined(__arm__) || defined(_M_ARM) #elif defined(__arm__) || defined(_M_ARM)
# define CPU_ARCH "arm" # define CPU_ARCH "arm"
#elif defined(__mips__) && defined(__mips64) && defined(_MIPSEL)
# define CPU_ARCH "mips64el"
#elif defined(__mips__) && defined(__mips64) #elif defined(__mips__) && defined(__mips64)
# define CPU_ARCH "mips64" # define CPU_ARCH "mips64"
#elif (defined(__mips__) || defined(__mips)) && defined(_MIPSEL)
# define CPU_ARCH "mipsel"
#elif defined(__mips__) || defined(__mips) #elif defined(__mips__) || defined(__mips)
# define CPU_ARCH "mips" # define CPU_ARCH "mips"
#else #else

View File

@ -323,7 +323,7 @@ namespace com.muldersoft.slunkcrypt.gui.utils.cpu
// P/Invoke methods // P/Invoke methods
// ------------------------------------------------------------------ // ------------------------------------------------------------------
private class Internal private static class Internal
{ {
const string DLL_NAME_X86 = "cpu-capabilities-x86.dll"; const string DLL_NAME_X86 = "cpu-capabilities-x86.dll";
const string DLL_NAME_X64 = "cpu-capabilities-x64.dll"; const string DLL_NAME_X64 = "cpu-capabilities-x64.dll";

View File

@ -12,15 +12,21 @@ function mk_slunk() {
cp -vf "frontend/bin/slunkcrypt" "out/slunkcrypt-${1}" cp -vf "frontend/bin/slunkcrypt" "out/slunkcrypt-${1}"
} }
if [[ "$OSTYPE" != "linux-gnu"* ]]; then
echo "This script is supposed to run on the linux platform !!!"
exit 1
fi
rm -rf "out" && mkdir -p "out" rm -rf "out" && mkdir -p "out"
$BASH -x -c "make clean" $BASH -x -c "make clean"
mk_slunk "i686" "MARCH=pentiumpro MTUNE=generic"
mk_slunk "x86_64" "MARCH=x86-64 MTUNE=nocona" mk_slunk "x86_64" "MARCH=x86-64 MTUNE=nocona"
mk_slunk "arm" mk_slunk "i686" "MARCH=pentiumpro MTUNE=pentium3"
mk_slunk "aarch64" mk_slunk "armel"
mk_slunk "mips" mk_slunk "armhf"
mk_slunk "mips64" mk_slunk "arm64"
mk_slunk "mipsel"
mk_slunk "mips64el"
printf "\033[1;32m\nBuild completed successfully.\033[0m\n\n" printf "\033[1;32m\nBuild completed successfully.\033[0m\n\n"