mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-11 23:49:38 -05:00
Added build of Retrotor to Windows build environment
This commit is contained in:
parent
e9b49e122f
commit
91634ba6c1
27
build_scripts/Windows/build-retrotor.bat
Normal file
27
build_scripts/Windows/build-retrotor.bat
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
:: Initialize environment
|
||||||
|
call "%~dp0env.bat"
|
||||||
|
if errorlevel 1 goto error_env
|
||||||
|
call "%EnvPath%\env.bat"
|
||||||
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
|
%cecho% info "Build libraries"
|
||||||
|
call "%~dp0build-libs\build-libs.bat" auto-copy
|
||||||
|
if errorlevel 1 %cecho% error "Failed to build libraries." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
|
%cecho% info "Build %SourceName%"
|
||||||
|
call "%~dp0build\build.bat" retrotor
|
||||||
|
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
|
%cecho% info "Pack %SourceName%"
|
||||||
|
call "%~dp0build\pack.bat" retrotor
|
||||||
|
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
|
exit /B 0
|
||||||
|
|
||||||
|
:error_env
|
||||||
|
echo Failed to initialize environment.
|
||||||
|
exit /B 1
|
@ -13,11 +13,11 @@ call "%~dp0build-libs\build-libs.bat" auto-copy
|
|||||||
if errorlevel 1 %cecho% error "Failed to build libraries." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to build libraries." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
%cecho% info "Build %SourceName%"
|
%cecho% info "Build %SourceName%"
|
||||||
call "%~dp0build\build.bat"
|
call "%~dp0build\build.bat" standard
|
||||||
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
%cecho% info "Pack %SourceName%"
|
%cecho% info "Pack %SourceName%"
|
||||||
call "%~dp0build\pack.bat"
|
call "%~dp0build\pack.bat" standard
|
||||||
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
|
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
%cecho% info "Build installer"
|
%cecho% info "Build installer"
|
||||||
|
@ -21,7 +21,7 @@ set /P LibsGCCVersion=<"%RootPath%\libs\gcc-version"
|
|||||||
if "%LibsGCCVersion%" NEQ "%GCCVersion%" echo Please use correct version of external libraries. (gcc %GCCVersion% ^<^> libs %LibsGCCVersion%).& exit /B 1
|
if "%LibsGCCVersion%" NEQ "%GCCVersion%" echo Please use correct version of external libraries. (gcc %GCCVersion% ^<^> libs %LibsGCCVersion%).& exit /B 1
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat" standard
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
:: Build defines for script
|
:: Build defines for script
|
||||||
|
@ -21,7 +21,7 @@ set /P LibsGCCVersion=<"%RootPath%\libs\gcc-version"
|
|||||||
if "%LibsGCCVersion%" NEQ "%GCCVersion%" echo Please use correct version of external libraries. (gcc %GCCVersion% ^<^> libs %LibsGCCVersion%).& exit /B 1
|
if "%LibsGCCVersion%" NEQ "%GCCVersion%" echo Please use correct version of external libraries. (gcc %GCCVersion% ^<^> libs %LibsGCCVersion%).& exit /B 1
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat" %*
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
:: Check git executable
|
:: Check git executable
|
||||||
@ -36,7 +36,7 @@ echo.
|
|||||||
echo === Version
|
echo === Version
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
title Build - %SourceName%-%RsBuildConfig% [Version]
|
title Build - %SourceName%%RsType%-%RsBuildConfig% [Version]
|
||||||
|
|
||||||
pushd "%SourcePath%\retroshare-gui\src\gui\images"
|
pushd "%SourcePath%\retroshare-gui\src\gui\images"
|
||||||
:: Touch resource file
|
:: Touch resource file
|
||||||
@ -50,16 +50,19 @@ echo.
|
|||||||
echo === qmake
|
echo === qmake
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
title Build - %SourceName%-%RsBuildConfig% [qmake]
|
title Build - %SourceName%%RsType%-%RsBuildConfig% [qmake]
|
||||||
|
|
||||||
qmake "%SourcePath%\RetroShare.pro" -r "CONFIG+=%RsBuildConfig% version_detail_bash_script rs_autologin retroshare_plugins"
|
set RS_QMAKE_CONFIG=%RsBuildConfig% version_detail_bash_script rs_autologin retroshare_plugins
|
||||||
|
if "%RsRetroTor%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% retrotor
|
||||||
|
|
||||||
|
qmake "%SourcePath%\RetroShare.pro" -r "CONFIG+=%RS_QMAKE_CONFIG%"
|
||||||
if errorlevel 1 goto error
|
if errorlevel 1 goto error
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo === make
|
echo === make
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
title Build - %SourceName%-%RsBuildConfig% [make]
|
title Build - %SourceName%%RsType%-%RsBuildConfig% [make]
|
||||||
|
|
||||||
if exist "%EnvJomExe%" (
|
if exist "%EnvJomExe%" (
|
||||||
"%EnvJomExe%"
|
"%EnvJomExe%"
|
||||||
|
@ -7,7 +7,7 @@ call "%~dp0..\env.bat"
|
|||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env.bat"
|
call "%EnvPath%\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat" %*
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
if not exist "%RsBuildPath%" exit /B 0
|
if not exist "%RsBuildPath%" exit /B 0
|
||||||
|
@ -1,3 +1,18 @@
|
|||||||
|
if "%~1"=="standard" (
|
||||||
|
set RsRetroTor=
|
||||||
|
set RsType=
|
||||||
|
) else (
|
||||||
|
if "%~1"=="retrotor" (
|
||||||
|
set RsRetroTor=1
|
||||||
|
set RsType=-tor
|
||||||
|
) else (
|
||||||
|
echo.
|
||||||
|
echo Usage: standard^|retrotor
|
||||||
|
echo.
|
||||||
|
exit /B 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
set BuildPath=%EnvRootPath%\builds
|
set BuildPath=%EnvRootPath%\builds
|
||||||
set DeployPath=%EnvRootPath%\deploy
|
set DeployPath=%EnvRootPath%\deploy
|
||||||
|
|
||||||
@ -19,8 +34,8 @@ call "%ToolsPath%\get-qt-version.bat" QtVersion
|
|||||||
if "%QtVersion%"=="" echo Cannot get Qt version.& exit /B 1
|
if "%QtVersion%"=="" echo Cannot get Qt version.& exit /B 1
|
||||||
|
|
||||||
set RsBuildConfig=release
|
set RsBuildConfig=release
|
||||||
set RsBuildPath=%BuildPath%\Qt-%QtVersion%-%RsBuildConfig%
|
set RsBuildPath=%BuildPath%\Qt-%QtVersion%%RsType%-%RsBuildConfig%
|
||||||
set RsDeployPath=%DeployPath%\Qt-%QtVersion%-%RsBuildConfig%
|
set RsDeployPath=%DeployPath%\Qt-%QtVersion%%RsType%-%RsBuildConfig%
|
||||||
set RsPackPath=%DeployPath%
|
set RsPackPath=%DeployPath%
|
||||||
set RsArchiveAdd=
|
set RsArchiveAdd=
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
:: Usage:
|
:: Usage:
|
||||||
:: call git-log.bat [no-ask]
|
:: call git-log.bat standard|retrotor [no-ask]
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set NoAsk=
|
set NoAsk=
|
||||||
if "%~1"=="no-ask" set NoAsk=1
|
if "%~2"=="no-ask" set NoAsk=1
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0..\env.bat"
|
call "%~dp0..\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%EnvPath%\env.bat"
|
call "%EnvPath%\env.bat"
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat" %1
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
:: Check git executable
|
:: Check git executable
|
||||||
@ -58,7 +58,7 @@ for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do
|
|||||||
set RsDate=%RsDate:~0,4%%RsDate:~4,2%%RsDate:~6,2%
|
set RsDate=%RsDate:~0,4%%RsDate:~4,2%%RsDate:~6,2%
|
||||||
|
|
||||||
:: Get last revision
|
:: Get last revision
|
||||||
set RsLastRefFile=%BuildPath%\Qt-%QtVersion%-%RsBuildConfig%-LastRef.txt
|
set RsLastRefFile=%BuildPath%\Qt-%QtVersion%%RsType%-%RsBuildConfig%-LastRef.txt
|
||||||
set RsLastRef=
|
set RsLastRef=
|
||||||
if exist "%RsLastRefFile%" set /P RsLastRef=<"%RsLastRefFile%"
|
if exist "%RsLastRefFile%" set /P RsLastRef=<"%RsLastRefFile%"
|
||||||
|
|
||||||
@ -86,9 +86,9 @@ if %errorlevel%==2 exit /B 1
|
|||||||
:no_confirm
|
:no_confirm
|
||||||
|
|
||||||
if "%RsBuildConfig%" NEQ "release" (
|
if "%RsBuildConfig%" NEQ "release" (
|
||||||
set RsGitLog=%DeployPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsArchiveAdd%-%RsBuildConfig%.txt
|
set RsGitLog=%DeployPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsType%%RsArchiveAdd%-%RsBuildConfig%.txt
|
||||||
) else (
|
) else (
|
||||||
set RsGitLog=%DeployPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsArchiveAdd%.txt
|
set RsGitLog=%DeployPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsType%%RsArchiveAdd%.txt
|
||||||
)
|
)
|
||||||
|
|
||||||
title %SourceName%-%RsBuildConfig% [git log]
|
title %SourceName%-%RsBuildConfig% [git log]
|
||||||
|
@ -23,7 +23,7 @@ set /P LibsGCCVersion=<"%RootPath%\libs\gcc-version"
|
|||||||
if "%LibsGCCVersion%" NEQ "%GCCVersion%" echo Please use correct version of external libraries. (gcc %GCCVersion% ^<^> libs %LibsGCCVersion%).& exit /B 1
|
if "%LibsGCCVersion%" NEQ "%GCCVersion%" echo Please use correct version of external libraries. (gcc %GCCVersion% ^<^> libs %LibsGCCVersion%).& exit /B 1
|
||||||
|
|
||||||
:: Initialize environment
|
:: Initialize environment
|
||||||
call "%~dp0env.bat"
|
call "%~dp0env.bat" %*
|
||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
:: Remove deploy path
|
:: Remove deploy path
|
||||||
@ -65,6 +65,17 @@ set RsDate=
|
|||||||
for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do set RsDate=%%I
|
for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do set RsDate=%%I
|
||||||
set RsDate=%RsDate:~0,4%%RsDate:~4,2%%RsDate:~6,2%
|
set RsDate=%RsDate:~0,4%%RsDate:~4,2%%RsDate:~6,2%
|
||||||
|
|
||||||
|
if "%RsRetroTor%"=="1" (
|
||||||
|
:: Check Retrotor
|
||||||
|
if not exist "%EnvDownloadPath%\tor\Tor\tor.exe" (
|
||||||
|
echo Tor binary not found. Please download Tor Expert Bundle from
|
||||||
|
echo https://www.torproject.org/download/download.html.en
|
||||||
|
echo and unpack to
|
||||||
|
echo %EnvDownloadPath%\tor
|
||||||
|
goto error
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
set QtMainVersion=%QtVersion:~0,1%
|
set QtMainVersion=%QtVersion:~0,1%
|
||||||
|
|
||||||
rem Qt 4 = QtSvg4.dll
|
rem Qt 4 = QtSvg4.dll
|
||||||
@ -75,9 +86,9 @@ if "%QtMainVersion%"=="4" set QtMainVersion2=4
|
|||||||
if "%QtMainVersion%"=="5" set QtMainVersion1=5
|
if "%QtMainVersion%"=="5" set QtMainVersion1=5
|
||||||
|
|
||||||
if "%RsBuildConfig%" NEQ "release" (
|
if "%RsBuildConfig%" NEQ "release" (
|
||||||
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsArchiveAdd%-%RsBuildConfig%.7z
|
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsType%%RsArchiveAdd%-%RsBuildConfig%.7z
|
||||||
) else (
|
) else (
|
||||||
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsArchiveAdd%.7z
|
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsRevision%-Qt-%QtVersion%%RsType%%RsArchiveAdd%.7z
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist "%Archive%" del /Q "%Archive%"
|
if exist "%Archive%" del /Q "%Archive%"
|
||||||
@ -85,7 +96,7 @@ if exist "%Archive%" del /Q "%Archive%"
|
|||||||
:: Create deploy path
|
:: Create deploy path
|
||||||
mkdir "%RsDeployPath%"
|
mkdir "%RsDeployPath%"
|
||||||
|
|
||||||
title Pack - %SourceName%-%RsBuildConfig% [copy files]
|
title Pack - %SourceName%%RsType%-%RsBuildConfig% [copy files]
|
||||||
|
|
||||||
set ExtensionsFile=%SourcePath%\libretroshare\src\rsserver\rsinit.cc
|
set ExtensionsFile=%SourcePath%\libretroshare\src\rsserver\rsinit.cc
|
||||||
set Extensions=
|
set Extensions=
|
||||||
@ -172,8 +183,13 @@ if exist "%SourcePath%\libresapi\src\webui" (
|
|||||||
xcopy /S "%SourcePath%\libresapi\src\webui" "%RsDeployPath%\webui" %Quite%
|
xcopy /S "%SourcePath%\libresapi\src\webui" "%RsDeployPath%\webui" %Quite%
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "%RsRetroTor%"=="1" (
|
||||||
|
echo copy tor
|
||||||
|
echo n | copy /-y "%EnvDownloadPath%\tor\Tor\*.*" "%RsDeployPath%" %Quite%
|
||||||
|
)
|
||||||
|
|
||||||
rem pack files
|
rem pack files
|
||||||
title Pack - %SourceName%-%RsBuildConfig% [pack files]
|
title Pack - %SourceName%%RsType%-%RsBuildConfig% [pack files]
|
||||||
|
|
||||||
"%EnvSevenZipExe%" a -mx=9 -t7z "%Archive%" "%RsDeployPath%\*"
|
"%EnvSevenZipExe%" a -mx=9 -t7z "%Archive%" "%RsDeployPath%\*"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user