mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Build webui
This commit is contained in:
parent
81a7d5a365
commit
a11dc09790
37
build_scripts/Windows-msys2/build/build-webui.bat
Normal file
37
build_scripts/Windows-msys2/build/build-webui.bat
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
:: Initialize environment
|
||||||
|
call "%~dp0..\env.bat"
|
||||||
|
if errorlevel 1 goto error_env
|
||||||
|
call "%EnvPath%\env.bat"
|
||||||
|
if errorlevel 1 goto error_env
|
||||||
|
call "%EnvPath%\env.bat"
|
||||||
|
if errorlevel 1 goto error_env
|
||||||
|
call "%EnvPath%\env-msys2.bat"
|
||||||
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
|
:: Initialize base environment
|
||||||
|
call "%~dp0env-base.bat" %*
|
||||||
|
if errorlevel 2 exit /B 2
|
||||||
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
|
:: Initialize environment
|
||||||
|
call "%~dp0env.bat" %*
|
||||||
|
if errorlevel 2 exit /B 2
|
||||||
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
|
call "%~dp0..\tools\webui.bat"
|
||||||
|
|
||||||
|
:error
|
||||||
|
|
||||||
|
title %COMSPEC%
|
||||||
|
|
||||||
|
if errorlevel 1 echo.& echo Webui generation failed& echo.
|
||||||
|
exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
|
:error_env
|
||||||
|
echo Failed to initialize environment.
|
||||||
|
endlocal
|
||||||
|
exit /B 1
|
@ -18,7 +18,7 @@ if errorlevel 2 exit /B 2
|
|||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
:: Install needed things
|
:: Install needed things
|
||||||
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S make git mingw-w64-%RsMSYS2Architecture%-toolchain mingw-w64-%RsMSYS2Architecture%-qt5 mingw-w64-%RsMSYS2Architecture%-miniupnpc mingw-w64-%RsMSYS2Architecture%-sqlcipher mingw-w64-%RsMSYS2Architecture%-libmicrohttpd mingw-w64-%RsMSYS2Architecture%-xapian-core mingw-w64-%RsMSYS2Architecture%-cmake mingw-w64-%RsMSYS2Architecture%-rapidjson"
|
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S make git mingw-w64-%RsMSYS2Architecture%-toolchain mingw-w64-%RsMSYS2Architecture%-qt5 mingw-w64-%RsMSYS2Architecture%-miniupnpc mingw-w64-%RsMSYS2Architecture%-sqlcipher mingw-w64-%RsMSYS2Architecture%-xapian-core mingw-w64-%RsMSYS2Architecture%-cmake mingw-w64-%RsMSYS2Architecture%-rapidjson"
|
||||||
|
|
||||||
:: Plugins
|
:: Plugins
|
||||||
if "%ParamPlugins%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-speex mingw-w64-%RsMSYS2Architecture%-speexdsp mingw-w64-%RsMSYS2Architecture%-curl mingw-w64-%RsMSYS2Architecture%-libxslt mingw-w64-%RsMSYS2Architecture%-opencv mingw-w64-%RsMSYS2Architecture%-ffmpeg"
|
if "%ParamPlugins%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-speex mingw-w64-%RsMSYS2Architecture%-speexdsp mingw-w64-%RsMSYS2Architecture%-curl mingw-w64-%RsMSYS2Architecture%-libxslt mingw-w64-%RsMSYS2Architecture%-opencv mingw-w64-%RsMSYS2Architecture%-ffmpeg"
|
||||||
@ -71,6 +71,11 @@ title Build - %SourceName%-%RsBuildConfig% [make]
|
|||||||
|
|
||||||
%EnvMSYS2Cmd% "make -j %NUMBER_OF_PROCESSORS%"
|
%EnvMSYS2Cmd% "make -j %NUMBER_OF_PROCESSORS%"
|
||||||
|
|
||||||
|
:: Webui
|
||||||
|
if "%ParamWebui%"=="1" (
|
||||||
|
call "%~dp0..\tools\webui.bat"
|
||||||
|
)
|
||||||
|
|
||||||
:error
|
:error
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ set ParamDebug=0
|
|||||||
set ParamAutologin=0
|
set ParamAutologin=0
|
||||||
set ParamPlugins=0
|
set ParamPlugins=0
|
||||||
set ParamTor=0
|
set ParamTor=0
|
||||||
|
set ParamWebui=0
|
||||||
set RS_QMAKE_CONFIG=
|
set RS_QMAKE_CONFIG=
|
||||||
|
|
||||||
:parameter_loop
|
:parameter_loop
|
||||||
@ -25,6 +26,8 @@ if "%~1" NEQ "" (
|
|||||||
set ParamPlugins=1
|
set ParamPlugins=1
|
||||||
) else if "%%~a"=="tor" (
|
) else if "%%~a"=="tor" (
|
||||||
set ParamTor=1
|
set ParamTor=1
|
||||||
|
) else if "%%~a"=="webui" (
|
||||||
|
set ParamWebui=1
|
||||||
) else if "%%~a"=="CONFIG+" (
|
) else if "%%~a"=="CONFIG+" (
|
||||||
set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% %1
|
set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% %1
|
||||||
) else (
|
) else (
|
||||||
@ -75,6 +78,9 @@ if "%ParamTor%"=="1" (
|
|||||||
set RsType=
|
set RsType=
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "%ParamWebui%"=="1" (
|
||||||
|
set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=rs_jsonapi" "CONFIG+=rs_webui"
|
||||||
|
)
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
@ -89,6 +95,7 @@ echo.
|
|||||||
echo Optional parameter (need clean when changed)
|
echo Optional parameter (need clean when changed)
|
||||||
echo autologin Build with autologin
|
echo autologin Build with autologin
|
||||||
echo plugins Build plugins
|
echo plugins Build plugins
|
||||||
|
echo webui Enable JsonAPI and pack webui files
|
||||||
echo.
|
echo.
|
||||||
echo Parameter for pack
|
echo Parameter for pack
|
||||||
echo tor Pack tor version
|
echo tor Pack tor version
|
||||||
|
@ -20,6 +20,7 @@ set RsBuildPath=%BuildPath%\Qt-%QtVersion%-%RsArchitecture%-%RsBuildConfig%
|
|||||||
set RsDeployPath=%DeployPath%\Qt-%QtVersion%%RsType%-%RsArchitecture%-%RsBuildConfig%
|
set RsDeployPath=%DeployPath%\Qt-%QtVersion%%RsType%-%RsArchitecture%-%RsBuildConfig%
|
||||||
set RsPackPath=%DeployPath%
|
set RsPackPath=%DeployPath%
|
||||||
set RsArchiveAdd=
|
set RsArchiveAdd=
|
||||||
|
set RsWebuiPath=%RootPath%\%SourceName%-webui
|
||||||
|
|
||||||
if not exist "%~dp0env-mod.bat" goto no_mod
|
if not exist "%~dp0env-mod.bat" goto no_mod
|
||||||
call "%~dp0env-mod.bat"
|
call "%~dp0env-mod.bat"
|
||||||
|
20
build_scripts/Windows-msys2/tools/webui.bat
Normal file
20
build_scripts/Windows-msys2/tools/webui.bat
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
setlocal
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo === webui
|
||||||
|
echo.
|
||||||
|
title Build webui
|
||||||
|
|
||||||
|
if not exist "%RsWebuiPath%" (
|
||||||
|
echo Checking out webui source into %RsWebuiPath%
|
||||||
|
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S git"
|
||||||
|
git clone https://github.com/RetroShare/RSNewWebUI.git "%RsWebuiPath%"
|
||||||
|
) else (
|
||||||
|
echo Webui source found at %RsWebuiPath%
|
||||||
|
)
|
||||||
|
|
||||||
|
pushd "%RsWebuiPath%\webui-src\make-src"
|
||||||
|
%EnvMSYS2Cmd% "sh build.sh"
|
||||||
|
popd
|
||||||
|
|
||||||
|
endlocal
|
@ -870,7 +870,7 @@ rs_jsonapi {
|
|||||||
genrestbedheader.name = Generating restbed header.
|
genrestbedheader.name = Generating restbed header.
|
||||||
genrestbedheader.input = genrestbedlib.output
|
genrestbedheader.input = genrestbedlib.output
|
||||||
genrestbedheader.output = $${RESTBED_HEADER_FILE}
|
genrestbedheader.output = $${RESTBED_HEADER_FILE}
|
||||||
genrestbedheader.CONFIG += target_predeps combine no_link
|
genrestbedheader.CONFIG += target_predeps no_link
|
||||||
genrestbedheader.variable_out = HEADERS
|
genrestbedheader.variable_out = HEADERS
|
||||||
genrestbedheader.commands = cd $${RESTBED_BUILD_PATH} && $(MAKE) install
|
genrestbedheader.commands = cd $${RESTBED_BUILD_PATH} && $(MAKE) install
|
||||||
QMAKE_EXTRA_COMPILERS += genrestbedheader
|
QMAKE_EXTRA_COMPILERS += genrestbedheader
|
||||||
|
@ -1157,7 +1157,7 @@ void RshareSettings::setWebinterfaceEnabled(bool enabled)
|
|||||||
QString RshareSettings::getWebinterfaceFilesDirectory()
|
QString RshareSettings::getWebinterfaceFilesDirectory()
|
||||||
{
|
{
|
||||||
#ifdef WINDOWS_SYS
|
#ifdef WINDOWS_SYS
|
||||||
return valueFromGroup("Webinterface","directory","data/webui/").toString();
|
return valueFromGroup("Webinterface","directory","./webui/").toString();
|
||||||
#else
|
#else
|
||||||
return valueFromGroup("Webinterface","directory","/usr/share/retroshare/webui/").toString();
|
return valueFromGroup("Webinterface","directory","/usr/share/retroshare/webui/").toString();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user