mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
Windows MinGW build:
- Upgraded MSYS2 - Upgraded OpenSSL-1.1.1p - Added build of WebUI
This commit is contained in:
parent
52dffddf64
commit
f4f799ec58
20 changed files with 124 additions and 30 deletions
|
@ -40,6 +40,7 @@ set NSIS_PARAM=%NSIS_PARAM% /DARCHITECTURE="%GCCArchitecture%"
|
|||
set NSIS_PARAM=%NSIS_PARAM% /DDATE="%RsDate%"
|
||||
|
||||
if exist "%EnvTorPath%\Tor\tor.exe" set NSIS_PARAM=%NSIS_PARAM% /DTORDIR="%EnvTorPath%\Tor"
|
||||
if exist "%RsWebuiBuildPath%" set NSIS_PARAM=%NSIS_PARAM% /DWEBUIDIR="%RsWebuiBuildPath%"
|
||||
|
||||
:: Get compiled version
|
||||
call "%ToolsPath%\get-rs-version.bat" "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\retroshare.exe" RsVersion
|
||||
|
|
|
@ -52,6 +52,7 @@ title Build - %SourceName%-%RsBuildConfig% [qmake]
|
|||
set RS_QMAKE_CONFIG=%RsBuildConfig%
|
||||
if "%ParamAutologin%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% rs_autologin
|
||||
if "%ParamJsonApi%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% rs_jsonapi
|
||||
if "%ParamWebui%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% rs_webui
|
||||
if "%ParamPlugins%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% retroshare_plugins
|
||||
if "%ParamUseNativeDialogs%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% rs_use_native_dialogs
|
||||
if "%ParamService%" NEQ "1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% no_retroshare_service
|
||||
|
@ -70,6 +71,14 @@ title Build - %SourceName%-%RsBuildConfig% [make]
|
|||
mingw32-make -j %CoreCount%
|
||||
if errorlevel 1 goto error
|
||||
|
||||
:: Webui
|
||||
if "%ParamWebui%"=="1" (
|
||||
call :build-webui
|
||||
if errorlevel 1 goto error
|
||||
) else (
|
||||
if exist "%RsWebuiBuildPath%" call "%ToolsPath%\remove-dir.bat" "%RsWebuiBuildPath%"
|
||||
)
|
||||
|
||||
echo.
|
||||
echo === Changelog
|
||||
echo.
|
||||
|
@ -89,3 +98,37 @@ exit /B %ERRORLEVEL%
|
|||
echo Failed to initialize environment.
|
||||
endlocal
|
||||
exit /B 1
|
||||
|
||||
:build-webui
|
||||
echo.
|
||||
echo === webui
|
||||
echo.
|
||||
title Build webui
|
||||
|
||||
if not exist "%RsWebuiPath%" (
|
||||
echo Checking out webui source into %RsWebuiPath%
|
||||
git clone https://github.com/RetroShare/RSNewWebUI.git "%RsWebuiPath%"
|
||||
if errorlevel 1 exit /B 1
|
||||
) else (
|
||||
echo Webui source found at %RsWebuiPath%
|
||||
pushd "%RsWebuiPath%"
|
||||
git pull
|
||||
popd
|
||||
if errorlevel 1 exit /B 1
|
||||
)
|
||||
|
||||
pushd "%RsWebuiPath%\webui-src\make-src"
|
||||
call build.bat
|
||||
popd
|
||||
if errorlevel 1 exit /B 1
|
||||
|
||||
if not exist "%RsWebuiPath%\webui" (
|
||||
%cecho% error "Webui is enabled, but no webui data found at %RsWebuiPath%\webui"
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
if exist "%RsWebuiBuildPath%" call "%ToolsPath%\remove-dir.bat" "%RsWebuiBuildPath%"
|
||||
move "%RsWebuiPath%\webui" "%RsWebuiBuildPath%"
|
||||
if errorlevel 1 exit /B 1
|
||||
|
||||
exit /B 0
|
||||
|
|
|
@ -4,6 +4,7 @@ set ParamDebug=0
|
|||
set ParamAutologin=0
|
||||
set ParamPlugins=0
|
||||
set ParamJsonApi=0
|
||||
set ParamWebui=0
|
||||
set ParamService=0
|
||||
set ParamFriendServer=0
|
||||
set ParamEmbeddedFriendServer=0
|
||||
|
@ -26,6 +27,9 @@ if "%~1" NEQ "" (
|
|||
set ParamAutologin=1
|
||||
) else if "%%~a"=="jsonapi" (
|
||||
set ParamJsonApi=1
|
||||
) else if "%%~a"=="webui" (
|
||||
set ParamJsonApi=1
|
||||
set ParamWebui=1
|
||||
) else if "%%~a"=="service" (
|
||||
set ParamService=1
|
||||
) else if "%%~a"=="friendserver" (
|
||||
|
@ -101,6 +105,8 @@ set RsBuildPath=%BuildPath%\Qt-%QtVersion%-%GCCArchitecture%-%RsBuildConfig%
|
|||
set RsDeployPath=%DeployPath%\Qt-%QtVersion%-%GCCArchitecture%%RsType%-%RsBuildConfig%
|
||||
set RsPackPath=%DeployPath%
|
||||
set RsArchiveAdd=
|
||||
set RsWebuiPath=%RootPath%\%SourceName%-webui
|
||||
set RsWebuiBuildPath=%BuildPath%\Qt-%QtVersion%-%GCCArchitecture%-%RsBuildConfig%\webui
|
||||
|
||||
if not exist "%~dp0env-mod.bat" goto no_mod
|
||||
call "%~dp0env-mod.bat"
|
||||
|
@ -120,6 +126,7 @@ if "%Module%"=="build" (
|
|||
echo Optional parameter ^(need clean when changed^)
|
||||
echo autologin Build with autologin
|
||||
echo jsonapi Build with jsonapi
|
||||
echo webui Build with jsonapi and webui
|
||||
echo service Build service
|
||||
echo friendserver Build Friend Server
|
||||
echo embedded-friendserver Build with embedded Friend Server
|
||||
|
|
|
@ -181,10 +181,10 @@ copy "%SourcePath%\libbitdht\src\bitdht\bdboot.txt" "%RsDeployPath%" %Quite%
|
|||
echo copy changelog.txt
|
||||
copy "%RsBuildPath%\changelog.txt" "%RsDeployPath%" %Quite%
|
||||
|
||||
if exist "%SourcePath%\libresapi\src\webui" (
|
||||
if exist "%RsWebuiBuildPath%" (
|
||||
echo copy webui
|
||||
mkdir "%RsDeployPath%\webui"
|
||||
xcopy /S "%SourcePath%\libresapi\src\webui" "%RsDeployPath%\webui" %Quite%
|
||||
xcopy /S "%RsWebuiBuildPath%" "%RsDeployPath%\webui" %Quite%
|
||||
)
|
||||
|
||||
if "%ParamTor%"=="1" (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue