initial commit
This commit is contained in:
5
scripts/32_bit/build_win32_debug.cmd
Normal file
5
scripts/32_bit/build_win32_debug.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
build_win.cmd Debug 1 0 0 0 0 0
|
||||
popd
|
5
scripts/32_bit/build_win32_debug_no_signing.cmd
Normal file
5
scripts/32_bit/build_win32_debug_no_signing.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
build_win.cmd Debug 1 0 0 0 0 0 "" 1
|
||||
popd
|
5
scripts/32_bit/build_win32_release.cmd
Normal file
5
scripts/32_bit/build_win32_release.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
build_win.cmd Release 1 0 0 0 0 0
|
||||
popd
|
5
scripts/32_bit/build_win32_release_no_signing.cmd
Normal file
5
scripts/32_bit/build_win32_release_no_signing.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
build_win.cmd Release 1 0 0 0 0 0 "" 1
|
||||
popd
|
5
scripts/32_bit/package_win32_debug.cmd
Normal file
5
scripts/32_bit/package_win32_debug.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
call build_win.cmd Debug 1 1 0 0 0 0
|
||||
popd
|
5
scripts/32_bit/package_win32_release.cmd
Normal file
5
scripts/32_bit/package_win32_release.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
call build_win.cmd Release 1 1 0 0 0 0
|
||||
popd
|
5
scripts/32_bit/package_win32_release_final.cmd
Normal file
5
scripts/32_bit/package_win32_release_final.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
call build_win.cmd Release 1 1 0 0 0 1 %1
|
||||
popd
|
5
scripts/32_bit/package_win32_release_no_testing.cmd
Normal file
5
scripts/32_bit/package_win32_release_no_testing.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
call build_win.cmd Release 1 1 1 0 0 0
|
||||
popd
|
5
scripts/32_bit/package_win32_release_testing_final.cmd
Normal file
5
scripts/32_bit/package_win32_release_testing_final.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
call build_win.cmd Release 1 1 0 0 0 1 %1 0 1
|
||||
popd
|
5
scripts/64_bit/build_win64_debug.cmd
Normal file
5
scripts/64_bit/build_win64_debug.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
build_win.cmd Debug 0 0 0 0 0
|
||||
popd
|
5
scripts/64_bit/build_win64_debug_no_signing.cmd
Normal file
5
scripts/64_bit/build_win64_debug_no_signing.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
build_win.cmd Debug 0 0 0 0 0 "" 1
|
||||
popd
|
5
scripts/64_bit/build_win64_release.cmd
Normal file
5
scripts/64_bit/build_win64_release.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
build_win.cmd Release 0 0 0 0 0
|
||||
popd
|
5
scripts/64_bit/package_win64_debug.cmd
Normal file
5
scripts/64_bit/package_win64_debug.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
call build_win.cmd Debug 1 0 0 0 0
|
||||
popd
|
5
scripts/64_bit/package_win64_release.cmd
Normal file
5
scripts/64_bit/package_win64_release.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
call build_win.cmd Release 1 0 0 0 0
|
||||
popd
|
5
scripts/64_bit/package_win64_release_final.cmd
Normal file
5
scripts/64_bit/package_win64_release_final.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
call build_win.cmd Release 1 0 0 0 1 %1
|
||||
popd
|
5
scripts/64_bit/package_win64_release_no_testing.cmd
Normal file
5
scripts/64_bit/package_win64_release_no_testing.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
call build_win.cmd Release 1 1 0 0 0
|
||||
popd
|
5
scripts/64_bit/package_win64_release_testing_final.cmd
Normal file
5
scripts/64_bit/package_win64_release_testing_final.cmd
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0%.."
|
||||
call build_win.cmd Release 1 0 0 0 1 %1 0 1
|
||||
popd
|
31
scripts/build_branch.sh
Executable file
31
scripts/build_branch.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo -1 > /proc/sys/fs/binfmt_misc/qemu-aarch64 || true
|
||||
echo ':qemu-aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64-static:OCF' > /proc/sys/fs/binfmt_misc/register
|
||||
|
||||
cd "$1"
|
||||
|
||||
branch=${2#"origin/"}
|
||||
|
||||
ln -sf "src/arm64" .
|
||||
ln -sf "src/docker" .
|
||||
ln -sf "src/compile_tag.sh" .
|
||||
ln -sf "src/detect_linux_build.sh" .
|
||||
ln -sf "src/run_builds.sh" .
|
||||
ln -sf "src/run_arm64_shell.sh" .
|
||||
ln -sf "src/run_docker_shell.sh" .
|
||||
chmod +x *.sh
|
||||
|
||||
if ./run_builds.sh "$branch" "$3"; then
|
||||
rm -f tag_builds/*.zip
|
||||
rm -f tag_builds/*.b64
|
||||
rm -f tag_builds/*.sha256
|
||||
rm -f tag_builds/*.sig
|
||||
rm -f tag_builds/*.status
|
||||
|
||||
cd tag_builds/solus/$branch
|
||||
./unittests || exit -1
|
||||
exit 0
|
||||
else
|
||||
exit -1
|
||||
fi
|
175
scripts/build_win.cmd
Normal file
175
scripts/build_win.cmd
Normal file
@ -0,0 +1,175 @@
|
||||
@echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
set ROOT=%~dp0%\..
|
||||
pushd "%ROOT%"
|
||||
|
||||
set ROOT=%CD%
|
||||
set PATH=%ROOT%\bin;%ROOT%\bin\curl\bin;%PATH%
|
||||
set CMAKE=cmake
|
||||
set VS_CMAKE_GENERATOR=Visual Studio 16 2019
|
||||
set TARGET_MODE=%1
|
||||
set /a ENABLE_PACKAGING=%2
|
||||
set /a DISABLE_TESTING=%3
|
||||
set /a DISABLE_PAUSE=%4
|
||||
shift
|
||||
set REPOSITORY=repertory
|
||||
set ERROR_EXIT=0
|
||||
|
||||
set OPENSSL_BIN="c:\OpenSSL-%BUILD_ARCH%\bin\openssl.exe"
|
||||
set REPERTORY_OPENSSL_ROOT="c:\OpenSSL-%BUILD_ARCH%"
|
||||
set BUILD_ARCH=Win64
|
||||
set BUILD_ARCH_LOWER=win64
|
||||
set MSBUILD_ARCH=x64
|
||||
set WINFSP_BASE_NAME=winfsp-x64
|
||||
if NOT EXIST %OPENSSL_BIN% (
|
||||
set OPENSSL_BIN="c:\Program Files\OpenSSL-!BUILD_ARCH!\bin\openssl.exe"
|
||||
set REPERTORY_OPENSSL_ROOT="c:\Program Files\OpenSSL-!BUILD_ARCH!"
|
||||
)
|
||||
|
||||
set PRIVATE_KEY="c:\src\cert\blockstorage_dev_private.pem"
|
||||
set PUBLIC_KEY="%ROOT%\blockstorage_dev_public.pem"
|
||||
|
||||
if "%TARGET_MODE%" NEQ "Debug" (
|
||||
if "%TARGET_MODE%" NEQ "Release" (
|
||||
call :ERROR "[Debug|Release] not specified"
|
||||
)
|
||||
)
|
||||
|
||||
if "%APPVEYOR_BUILD%" == "1" (
|
||||
set CMAKE_OPTS=-DOPENSSL_ROOT_DIR=C:\OpenSSL-v111-!BUILD_ARCH!
|
||||
) else (
|
||||
set CMAKE_OPTS=-DOPENSSL_ROOT_DIR=!REPERTORY_OPENSSL_ROOT!
|
||||
)
|
||||
|
||||
if "%DISABLE_SIGNING%" == "1" (
|
||||
set CMAKE_OPTS=%CMAKE_OPTS% -DENABLE_SIGNING=OFF
|
||||
) else (
|
||||
if "%USERNAME%" == "sgraves" (
|
||||
set CMAKE_OPTS=%CMAKE_OPTS% -DENABLE_SIGNING=ON
|
||||
)
|
||||
if "%USERNAME%" == "scott" (
|
||||
set CMAKE_OPTS=%CMAKE_OPTS% -DENABLE_SIGNING=ON
|
||||
)
|
||||
if "%USERNAME%" == "Scott Graves" (
|
||||
set CMAKE_OPTS=%CMAKE_OPTS% -DENABLE_SIGNING=ON
|
||||
)
|
||||
)
|
||||
|
||||
set BUILD_DIR=build%OUTPUT_DIR_EXTRA%
|
||||
for /F "tokens=*" %%f in ('git rev-parse --short HEAD') do (set GIT_REV=%%f)
|
||||
|
||||
mkdir "%BUILD_DIR%" >NUL 2>&1
|
||||
mkdir "%BUILD_DIR%\%TARGET_MODE%" >NUL 2>&1
|
||||
pushd "%BUILD_DIR%\%TARGET_MODE%" >NUL 2>&1
|
||||
echo Building [%TARGET_MODE%] [%BUILD_ARCH%]
|
||||
((%CMAKE% "%ROOT%" %CMAKE_OPTS% -A %MSBUILD_ARCH% -DCMAKE_BUILD_TYPE=%TARGET_MODE% -DCMAKE_GENERATOR="%VS_CMAKE_GENERATOR%" -DCMAKE_CONFIGURATION_TYPES="%TARGET_MODE%" && (%CMAKE% --build . --config %TARGET_MODE%)) || (
|
||||
popd
|
||||
call :ERROR "Compile Error"
|
||||
)
|
||||
|
||||
for /f "tokens=*" %%i in ('grep -m1 -a REPERTORY_VERSION repertory.vcxproj ^| sed -e "s/.*REPERTORY_VERSION=\"//g" -e "s/\".*//g"') do (
|
||||
set APP_VER=%%i
|
||||
)
|
||||
|
||||
for /f "tokens=2 delims=-" %%a in ("%APP_VER%") do (
|
||||
set APP_RELEASE_TYPE=%%a
|
||||
)
|
||||
for /f "tokens=1 delims=." %%a in ("%APP_RELEASE_TYPE%") do (
|
||||
set APP_RELEASE_TYPE=%%a
|
||||
)
|
||||
|
||||
if "%APP_RELEASE_TYPE%"=="alpha" set APP_RELEASE_TYPE=Alpha
|
||||
if "%APP_RELEASE_TYPE%"=="beta" set APP_RELEASE_TYPE=Beta
|
||||
if "%APP_RELEASE_TYPE%"=="rc" set APP_RELEASE_TYPE=RC
|
||||
if "%APP_RELEASE_TYPE%"=="release" set APP_RELEASE_TYPE=Release
|
||||
|
||||
echo Repertory Version: %APP_VER%
|
||||
set TARGET_MODE_LOWER=%TARGET_MODE%
|
||||
call :LOWERCASE TARGET_MODE_LOWER
|
||||
|
||||
set OUT_NAME=repertory_%APP_VER%_%GIT_REV%_!TARGET_MODE_LOWER!_%BUILD_ARCH_LOWER%.zip
|
||||
set OUT_FILE=..\..\%OUT_NAME%
|
||||
|
||||
pushd %TARGET_MODE%
|
||||
if "%DISABLE_TESTING%" NEQ "1" (
|
||||
echo Testing [%TARGET_MODE%]
|
||||
del /q unittests.err 1>NUL 2>&1
|
||||
start "Unittests" /wait /min cmd /v:on /c "unittests.exe>unittests.log 2>&1 || echo ^!errorlevel^!>unittests.err"
|
||||
if EXIST unittests.err (
|
||||
call :ERROR "Unittests Failed"
|
||||
)
|
||||
)
|
||||
|
||||
if "%APPVEYOR_BUILD%" NEQ "1" (
|
||||
echo Signing Application
|
||||
del /q repertory.exe.sha256 1>NUL 2>&1
|
||||
del /q repertory.exe.sig 1>NUL 2>&1
|
||||
((certutil -hashfile repertory.exe SHA256 | sed -e "1d" -e "$d" -e "s/\ //g") > repertory.exe.sha256) || (call :ERROR "Create repertory sha-256 failed")
|
||||
(%OPENSSL_BIN% dgst -sha256 -sign "%PRIVATE_KEY%" -out repertory.exe.sig repertory.exe) || (call :ERROR "Create repertory signature failed")
|
||||
(%OPENSSL_BIN% dgst -sha256 -verify "%PUBLIC_KEY%" -signature repertory.exe.sig repertory.exe) || (call :ERROR "Verify repertory signature failed")
|
||||
)
|
||||
|
||||
if "%ENABLE_PACKAGING%"=="1" (
|
||||
echo Creating Archive [%OUT_FILE%]
|
||||
(7za u "%OUT_FILE%" repertory.exe repertory.exe.sha256 repertory.exe.sig %WINFSP_BASE_NAME%.dll cacert.pem) || (call :ERROR "Create repertory zip failed")
|
||||
|
||||
echo Signing Archive [%OUT_FILE%]
|
||||
(certutil -hashfile "%OUT_FILE%" SHA256 | sed -e "1d" -e "$d" -e "s/\ //g" > "%OUT_FILE%.sha256") || (call :ERROR "Create zip sha-256 failed")
|
||||
(%OPENSSL_BIN% dgst -sha256 -sign "%PRIVATE_KEY%" -out "%OUT_FILE%.sig" "%OUT_FILE%") || (call :ERROR "Create zip signature failed")
|
||||
(%OPENSSL_BIN% dgst -sha256 -verify "%PUBLIC_KEY%" -signature "%OUT_FILE%.sig" "%OUT_FILE%") || (call :ERROR "Verify zip signature failed")
|
||||
(b64.exe -e "%OUT_FILE%.sig" "%OUT_FILE%.sig.b64") || (call :ERROR "Create zip base64 signature failed")
|
||||
for /f "delims=" %%i in ('type %OUT_FILE%.sig.b64') do set APP_SIG=!APP_SIG!%%i
|
||||
for /f "delims=" %%i in ('type %OUT_FILE%.sha256') do set APP_SHA256=!APP_SHA256!%%i
|
||||
)
|
||||
popd
|
||||
popd
|
||||
|
||||
goto :END
|
||||
|
||||
:ERROR
|
||||
echo %1
|
||||
set ERROR_EXIT=1
|
||||
if "%DISABLE_PAUSE%" NEQ "1" (
|
||||
pause
|
||||
)
|
||||
goto :END
|
||||
|
||||
:NO_QUOTES
|
||||
set %~1=!%~1:"=!
|
||||
goto :EOF
|
||||
|
||||
:LOWERCASE
|
||||
set %~1=!%~1:A=a!
|
||||
set %~1=!%~1:B=b!
|
||||
set %~1=!%~1:C=c!
|
||||
set %~1=!%~1:D=d!
|
||||
set %~1=!%~1:E=e!
|
||||
set %~1=!%~1:F=f!
|
||||
set %~1=!%~1:G=g!
|
||||
set %~1=!%~1:H=h!
|
||||
set %~1=!%~1:I=i!
|
||||
set %~1=!%~1:J=j!
|
||||
set %~1=!%~1:K=k!
|
||||
set %~1=!%~1:L=l!
|
||||
set %~1=!%~1:M=m!
|
||||
set %~1=!%~1:N=n!
|
||||
set %~1=!%~1:O=o!
|
||||
set %~1=!%~1:P=p!
|
||||
set %~1=!%~1:Q=q!
|
||||
set %~1=!%~1:R=r!
|
||||
set %~1=!%~1:S=s!
|
||||
set %~1=!%~1:T=t!
|
||||
set %~1=!%~1:U=u!
|
||||
set %~1=!%~1:V=v!
|
||||
set %~1=!%~1:W=w!
|
||||
set %~1=!%~1:X=x!
|
||||
set %~1=!%~1:Y=y!
|
||||
set %~1=!%~1:Z=z!
|
||||
goto :EOF
|
||||
|
||||
:END
|
||||
popd
|
||||
if "!ERROR_EXIT!" NEQ "0" (
|
||||
exit !ERROR_EXIT!
|
||||
)
|
9
scripts/make_debug.cmd
Normal file
9
scripts/make_debug.cmd
Normal file
@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
|
||||
call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat"
|
||||
|
||||
md ..\build2\debug
|
||||
pushd "..\build2\debug"
|
||||
(cmake ..\.. -G "CodeBlocks - NMake Makefiles" -DREPERTORY_ENABLE_SKYNET_PREMIUM_TESTS=ON -DREPERTORY_ENABLE_S3_TESTING=ON -DREPERTORY_ENABLE_S3=ON -DCMAKE_BUILD_TYPE=Debug -DREPERTORY_WRITE_SUPPORT=ON && nmake) || exit 1
|
||||
copy /y compile_commands.json ..
|
||||
popd
|
14
scripts/make_debug.sh
Executable file
14
scripts/make_debug.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p ../build/debug;cd ../build/debug && cmake ../.. -DREPERTORY_ENABLE_SKYNET=ON \
|
||||
-DREPERTORY_ENABLE_S3=ON \
|
||||
-DREPERTORY_ENABLE_SKYNET_PREMIUM_TESTS=ON \
|
||||
-DREPERTORY_ENABLE_S3_TESTING=ON \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DREPERTORY_WRITE_SUPPORT=ON && make -j10 || exit 1
|
||||
|
||||
cd ..
|
||||
|
||||
ln -sf debug/repertory .
|
||||
ln -sf debug/unittests .
|
||||
ln -sf debug/compile_commands.json .
|
9
scripts/make_release.cmd
Normal file
9
scripts/make_release.cmd
Normal file
@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
|
||||
call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat"
|
||||
|
||||
md ..\build2\release
|
||||
pushd "..\build2\release"
|
||||
(cmake ..\.. -G "CodeBlocks - NMake Makefiles" -DREPERTORY_ENABLE_SKYNET_PREMIUM_TESTS=ON -DREPERTORY_ENABLE_S3_TESTING=ON -DREPERTORY_ENABLE_S3=ON -DCMAKE_BUILD_TYPE=Release -DREPERTORY_WRITE_SUPPORT=ON && nmake) || exit 1
|
||||
copy /y compile_commands.json ..
|
||||
popd
|
14
scripts/make_release.sh
Executable file
14
scripts/make_release.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p ../build/release;cd ../build/release && cmake ../.. -DREPERTORY_ENABLE_SKYNET=ON \
|
||||
-DREPERTORY_ENABLE_S3=ON \
|
||||
-DREPERTORY_ENABLE_SKYNET_PREMIUM_TESTS=ON \
|
||||
-DREPERTORY_ENABLE_S3_TESTING=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DREPERTORY_WRITE_SUPPORT=ON && make -j10 || exit 1
|
||||
|
||||
cd ..
|
||||
|
||||
ln -sf release/repertory .
|
||||
ln -sf release/unittests .
|
||||
ln -sf release/compile_commands.json .
|
7
scripts/make_unix.sh
Executable file
7
scripts/make_unix.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
BUILD_TYPE=$1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
./make_${BUILD_TYPE}.sh || exit 1
|
7
scripts/make_win32.cmd
Normal file
7
scripts/make_win32.cmd
Normal file
@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
|
||||
set BUILD_TYPE=%1
|
||||
|
||||
pushd "%~dp0"
|
||||
make_%BUILD_TYPE%.cmd || exit 1
|
||||
popd
|
Reference in New Issue
Block a user