Added simple release script.
This commit is contained in:
parent
61fa41c888
commit
c3a82530f1
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
|||||||
/**/lib
|
/**/lib
|
||||||
/**/obj
|
/**/obj
|
||||||
/.vs
|
/.vs
|
||||||
|
/out
|
||||||
|
2
Makefile
2
Makefile
@ -47,7 +47,7 @@ else ifneq ($(DEBUG),0)
|
|||||||
else
|
else
|
||||||
CFLAGS += -O3 -DNDEBUG
|
CFLAGS += -O3 -DNDEBUG
|
||||||
ifneq ($(FLTO),0)
|
ifneq ($(FLTO),0)
|
||||||
CFLAGS += -flto -fuse-linker-plugin
|
CFLAGS += -flto
|
||||||
endif
|
endif
|
||||||
ifneq ($(FPGO),0)
|
ifneq ($(FPGO),0)
|
||||||
CFLAGS += -fprofile-$(firstword $(FPGO))
|
CFLAGS += -fprofile-$(firstword $(FPGO))
|
||||||
|
39
mk-release.cmd
Normal file
39
mk-release.cmd
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
|
set ECHO="%~dp0.\etc\utils\win32\cecho.exe"
|
||||||
|
if "%MSVC_PATH%"=="" (
|
||||||
|
set "MSVC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%MSVC_PATH%\Auxiliary\Build\vcvarsall.bat" (
|
||||||
|
%ECHO% red "\nMSVC not found. Please check MSVC_PATH and try again^!\n"
|
||||||
|
pause
|
||||||
|
goto:eof
|
||||||
|
)
|
||||||
|
|
||||||
|
for %%p in (x86,x64) do (
|
||||||
|
call "%MSVC_PATH%\Auxiliary\Build\vcvarsall.bat" %%p
|
||||||
|
for %%c in (Release,Release_SSE2) do (
|
||||||
|
if not "%%p::%%c" == "x64::Release_SSE2" (
|
||||||
|
%ECHO% white "\n------------------------------------------------------------------------------"
|
||||||
|
%ECHO% white "Clean [%%p:%%c]"
|
||||||
|
%ECHO% white "------------------------------------------------------------------------------\n"
|
||||||
|
MSBuild.exe /property:Configuration=%%c /property:Platform=%%p /target:Clean /verbosity:normal "%~dp0\Slunk.sln"
|
||||||
|
if not "!ERRORLEVEL!"=="0" goto:BuildFailed
|
||||||
|
%ECHO% white "\n------------------------------------------------------------------------------"
|
||||||
|
%ECHO% white "Compile [%%p:%%c]"
|
||||||
|
%ECHO% white "------------------------------------------------------------------------------\n"
|
||||||
|
MSBuild.exe /property:Configuration=%%c /property:Platform=%%p /target:Build /verbosity:normal "%~dp0\Slunk.sln"
|
||||||
|
if not "!ERRORLEVEL!"=="0" goto:BuildFailed
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
%ECHO% green "\nBuild completed successfully.\n"
|
||||||
|
pause
|
||||||
|
goto:eof
|
||||||
|
|
||||||
|
:BuildFailed
|
||||||
|
%ECHO% red "\nBuild has failed ^!^!^!\n"
|
||||||
|
pause
|
24
mk-release.sh
Executable file
24
mk-release.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
|
||||||
|
|
||||||
|
readonly USE_STATIC=1
|
||||||
|
readonly USE_STRIP=1
|
||||||
|
readonly USE_MTUNE=corei7
|
||||||
|
|
||||||
|
PLATFORM="$(uname -a)"
|
||||||
|
unset SUFFIX
|
||||||
|
if [[ "${PLATFORM}" == MINGW* || "${PLATFORM}" == CYGWIN* ]]; then
|
||||||
|
SUFFIX=".exe"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "out"
|
||||||
|
rm -f "out/slunkcrypt-*"
|
||||||
|
|
||||||
|
for cpu in 32 64; do
|
||||||
|
[[ ${cpu} -lt 64 ]] && march=pentium2 || march=x86-64
|
||||||
|
make -B CPU=${cpu} MARCH=${march} MTUNE=${USE_MTUNE} STATIC=${USE_STATIC} STRIP=${USE_STRIP} clean all
|
||||||
|
cp -f "frontend/bin/slunkcrypt${SUFFIX}" "out/slunkcrypt-x${cpu}${SUFFIX}"
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\033[1;32m\nBuild completed successfully.\033[0m\n\n"
|
Loading…
Reference in New Issue
Block a user