Added build script for Mingw-w64 and Cygwin.
This commit is contained in:
parent
e9e02040df
commit
509924c84c
7
etc/utils/build_info.sh
Executable file
7
etc/utils/build_info.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
if [ -n "$1" ]; then CC="$1"; elif [ -z "$CC" ]; then CC="cc"; fi
|
||||
|
||||
echo "Built : `date -u +"%Y-%m-%d %H:%M:%S"`"
|
||||
echo "Platform : `uname -s -r -v -m`"
|
||||
echo "Target : `$CC -dumpmachine`"
|
||||
echo "Compiler : `$CC -v 2>&1 | grep -iE '\b(gcc|clang)\s+version\b' | head -n 1`"
|
@ -1 +1 @@
|
||||
sudo hdiutil create archive.dmg -ov -volname "CRC-64" -fs HFS+ -srcfolder out
|
||||
sudo hdiutil create archive.dmg -ov -volname "SlunkCrypt" -fs HFS+ -srcfolder out
|
||||
|
@ -7,7 +7,7 @@ if [ -z "${cc_path}" ]; then
|
||||
fi
|
||||
|
||||
mk_slunk() {
|
||||
make -B CC="${cc_path}" TARGET="${1}-apple-macos" FLTO=1
|
||||
make -B CC="${cc_path}" TARGET="${1}-apple-darwin" FLTO=1
|
||||
strip -o "out/slunkcrypt-${1}" "frontend/bin/slunkcrypt"
|
||||
}
|
||||
|
||||
|
9
etc/utils/win32/mk-release.cmd
Normal file
9
etc/utils/win32/mk-release.cmd
Normal file
@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
cd /d "%~dp0..\..\.."
|
||||
|
||||
set "MSYS2_DIR=C:\msys64"
|
||||
|
||||
call "%MSYS2_DIR%\msys2_shell.cmd" -mingw32 -no-start -defterm -where "%CD%" -c "./etc/utils/win32/%~n0.sh"
|
||||
call "%MSYS2_DIR%\msys2_shell.cmd" -mingw64 -no-start -defterm -where "%CD%" -c "./etc/utils/win32/%~n0.sh"
|
||||
|
||||
pause
|
42
etc/utils/win32/mk-release.sh
Executable file
42
etc/utils/win32/mk-release.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cd -- "$(dirname -- "${0}")/../../.."
|
||||
|
||||
if [ -z "${cc_path}" ]; then
|
||||
cc_path="cc"
|
||||
fi
|
||||
|
||||
readonly machine="$("${cc_path}" -dumpmachine)"
|
||||
|
||||
if [[ "${machine}" == *"-cygwin" ]]; then
|
||||
readonly use_flto=0
|
||||
else
|
||||
readonly use_flto=1
|
||||
fi
|
||||
|
||||
mk_slunk() {
|
||||
make -B CC="${cc_path}" MARCH=${2} MTUNE=${3} STATIC=1 STRIP=1 FLTO=${use_flto}
|
||||
cp -vf "frontend/bin/slunkcrypt" "out/_next_/slunkcrypt-${1}"
|
||||
}
|
||||
|
||||
mkdir -p "out/_next_"
|
||||
|
||||
make -B CC="${cc_path}" clean
|
||||
|
||||
case "${machine}" in
|
||||
x86_64*)
|
||||
mk_slunk "x86_64" "x86-64" "nocona"
|
||||
;;
|
||||
i686*)
|
||||
mk_slunk "i686" "pentiumpro" "pentium3"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown target CPU type !!!"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
if [[ "${machine}" == *"-cygwin" ]]; then
|
||||
cp -vfu "$(which cygwin1.dll)" "out/_next_"
|
||||
fi
|
||||
|
||||
echo "Build completed successfully."
|
Loading…
Reference in New Issue
Block a user