• R/O
  • HTTP
  • SSH
  • HTTPS

SlunkCrypt: Commit

Official SlunkCrypt repository


Commit MetaInfo

Revisionc3a82530f1c3bef23f685042cf13b4be85ad2915 (tree)
Zeit2021-05-09 02:53:16
AutorLoRd_MuldeR <mulder2@gmx....>
CommiterLoRd_MuldeR

Log Message

Added simple release script.

Ändern Zusammenfassung

Diff

--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
44 /**/lib
55 /**/obj
66 /.vs
7+/out
--- a/Makefile
+++ b/Makefile
@@ -47,7 +47,7 @@ else ifneq ($(DEBUG),0)
4747 else
4848 CFLAGS += -O3 -DNDEBUG
4949 ifneq ($(FLTO),0)
50- CFLAGS += -flto -fuse-linker-plugin
50+ CFLAGS += -flto
5151 endif
5252 ifneq ($(FPGO),0)
5353 CFLAGS += -fprofile-$(firstword $(FPGO))
--- /dev/null
+++ b/mk-release.cmd
@@ -0,0 +1,39 @@
1+@echo off
2+setlocal enabledelayedexpansion
3+
4+set ECHO="%~dp0.\etc\utils\win32\cecho.exe"
5+if "%MSVC_PATH%"=="" (
6+ set "MSVC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC"
7+)
8+
9+if not exist "%MSVC_PATH%\Auxiliary\Build\vcvarsall.bat" (
10+ %ECHO% red "\nMSVC not found. Please check MSVC_PATH and try again^!\n"
11+ pause
12+ goto:eof
13+)
14+
15+for %%p in (x86,x64) do (
16+ call "%MSVC_PATH%\Auxiliary\Build\vcvarsall.bat" %%p
17+ for %%c in (Release,Release_SSE2) do (
18+ if not "%%p::%%c" == "x64::Release_SSE2" (
19+ %ECHO% white "\n------------------------------------------------------------------------------"
20+ %ECHO% white "Clean [%%p:%%c]"
21+ %ECHO% white "------------------------------------------------------------------------------\n"
22+ MSBuild.exe /property:Configuration=%%c /property:Platform=%%p /target:Clean /verbosity:normal "%~dp0\Slunk.sln"
23+ if not "!ERRORLEVEL!"=="0" goto:BuildFailed
24+ %ECHO% white "\n------------------------------------------------------------------------------"
25+ %ECHO% white "Compile [%%p:%%c]"
26+ %ECHO% white "------------------------------------------------------------------------------\n"
27+ MSBuild.exe /property:Configuration=%%c /property:Platform=%%p /target:Build /verbosity:normal "%~dp0\Slunk.sln"
28+ if not "!ERRORLEVEL!"=="0" goto:BuildFailed
29+ )
30+ )
31+)
32+
33+%ECHO% green "\nBuild completed successfully.\n"
34+pause
35+goto:eof
36+
37+:BuildFailed
38+%ECHO% red "\nBuild has failed ^!^!^!\n"
39+pause
--- /dev/null
+++ b/mk-release.sh
@@ -0,0 +1,24 @@
1+#!/bin/bash
2+set -e
3+cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
4+
5+readonly USE_STATIC=1
6+readonly USE_STRIP=1
7+readonly USE_MTUNE=corei7
8+
9+PLATFORM="$(uname -a)"
10+unset SUFFIX
11+if [[ "${PLATFORM}" == MINGW* || "${PLATFORM}" == CYGWIN* ]]; then
12+ SUFFIX=".exe"
13+fi
14+
15+mkdir -p "out"
16+rm -f "out/slunkcrypt-*"
17+
18+for cpu in 32 64; do
19+ [[ ${cpu} -lt 64 ]] && march=pentium2 || march=x86-64
20+ make -B CPU=${cpu} MARCH=${march} MTUNE=${USE_MTUNE} STATIC=${USE_STATIC} STRIP=${USE_STRIP} clean all
21+ cp -f "frontend/bin/slunkcrypt${SUFFIX}" "out/slunkcrypt-x${cpu}${SUFFIX}"
22+done
23+
24+printf "\033[1;32m\nBuild completed successfully.\033[0m\n\n"
Show on old repository browser