mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Windows build environment:
- Fixed download of Tor binaries - Fixed download of doxygen - Updated MSYS2 installer - Changed build of WebUI
This commit is contained in:
parent
8475a7424d
commit
b124222d87
@ -97,11 +97,6 @@ title Build - %SourceName%-%RsBuildConfig% [make]
|
||||
%EnvMSYS2Cmd% "make -j %CoreCount%"
|
||||
if errorlevel 1 goto error
|
||||
|
||||
:: Webui
|
||||
if "%ParamWebui%"=="1" (
|
||||
call "%~dp0..\tools\webui.bat"
|
||||
)
|
||||
|
||||
:error
|
||||
popd
|
||||
|
||||
|
@ -18,7 +18,7 @@ set RsBuildPath=%BuildPath%\Qt-%QtVersion%-%RsToolchain%-%RsCompiler%-%RsBuildCo
|
||||
set RsDeployPath=%DeployPath%\Qt-%QtVersion%%RsType%-%RsToolchain%-%RsCompiler%-%RsBuildConfig%
|
||||
set RsPackPath=%DeployPath%
|
||||
set RsArchiveAdd=
|
||||
set RsWebuiPath=%RootPath%\%SourceName%-webui
|
||||
set RsWebuiBuildPath=%RsBuildPath%\retroshare-webui\webui
|
||||
|
||||
if not exist "%~dp0env-mod.bat" goto no_mod
|
||||
call "%~dp0env-mod.bat"
|
||||
|
@ -187,12 +187,12 @@ echo copy buildinfo.txt
|
||||
copy "%RsBuildPath%\buildinfo.txt" "%RsDeployPath%" %Quite%
|
||||
|
||||
if "%ParamWebui%"=="1" (
|
||||
if exist "%RsWebuiPath%\webui" (
|
||||
if exist "%RsWebuiBuildPath%" (
|
||||
echo copy webui
|
||||
mkdir "%RsDeployPath%\webui"
|
||||
xcopy /S "%RsWebuiPath%\webui" "%RsDeployPath%\webui" %Quite%
|
||||
xcopy /S "%RsWebuiBuildPath%" "%RsDeployPath%\webui" %Quite%
|
||||
) else (
|
||||
%cecho% error "Webui is enabled, but no webui data found at %RsWebuiPath%\webui"
|
||||
%cecho% error "Webui is enabled, but no webui data found at %RsWebuiBuildPath%"
|
||||
goto error
|
||||
)
|
||||
)
|
||||
|
@ -1,22 +0,0 @@
|
||||
setlocal
|
||||
|
||||
echo.
|
||||
echo === webui
|
||||
echo.
|
||||
title Build webui
|
||||
|
||||
if not exist "%RsWebuiPath%" (
|
||||
echo Checking out webui source into %RsWebuiPath%
|
||||
if not "%ParamNoupdate%"=="1" (
|
||||
%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
|
@ -17,7 +17,7 @@ call "%~dp0build\build.bat" release autologin webui plugins nativedialogs servic
|
||||
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
|
||||
|
||||
%cecho% info "Pack %SourceName%"
|
||||
call "%~dp0build\pack.bat" release plugins service
|
||||
call "%~dp0build\pack.bat" release webui plugins service
|
||||
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
|
||||
|
||||
%cecho% info "Build installer"
|
||||
|
@ -71,14 +71,6 @@ 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.
|
||||
@ -98,37 +90,3 @@ 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
|
||||
|
@ -105,8 +105,7 @@ 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
|
||||
set RsWebuiBuildPath=%RsBuildPath%\retroshare-webui\webui
|
||||
|
||||
if not exist "%~dp0env-mod.bat" goto no_mod
|
||||
call "%~dp0env-mod.bat"
|
||||
@ -138,6 +137,7 @@ if "%Module%"=="build" (
|
||||
)
|
||||
if "%Module%"=="pack" (
|
||||
echo Optional parameter
|
||||
echo webui Pack webui
|
||||
echo service Pack service
|
||||
echo friendserver Pack Friend Server ^(needs Tor^)
|
||||
echo tor Pack Tor version
|
||||
|
@ -181,10 +181,11 @@ copy "%SourcePath%\libbitdht\src\bitdht\bdboot.txt" "%RsDeployPath%" %Quite%
|
||||
echo copy changelog.txt
|
||||
copy "%RsBuildPath%\changelog.txt" "%RsDeployPath%" %Quite%
|
||||
|
||||
if exist "%RsWebuiBuildPath%" (
|
||||
if defined ParamWebui (
|
||||
echo copy webui
|
||||
mkdir "%RsDeployPath%\webui"
|
||||
xcopy /S "%RsWebuiBuildPath%" "%RsDeployPath%\webui" %Quite%
|
||||
if errorlevel 1 %cecho% error "WebUi not found"& goto error
|
||||
)
|
||||
|
||||
if "%ParamTor%"=="1" (
|
||||
|
@ -16,7 +16,7 @@ if "%~1"=="clean" (
|
||||
goto exit
|
||||
)
|
||||
|
||||
set MSYS2Version=20220503
|
||||
set MSYS2Version=20230318
|
||||
|
||||
set MSYS2Install=msys2-base-x86_64-%MSYS2Version%.sfx.exe
|
||||
set MSYS2Url=https://github.com/msys2/msys2-installer/releases/download/%MSYS2Version:~0,4%-%MSYS2Version:~4,2%-%MSYS2Version:~6,2%/%MSYS2Install%
|
||||
|
@ -16,8 +16,8 @@ set NSISInstallPath=%EnvToolsPath%\NSIS
|
||||
set MinGitInstall=MinGit-2.28.0-32-bit.zip
|
||||
set MinGitUrl=https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/%MinGitInstall%
|
||||
set MinGitInstallPath=%EnvToolsPath%\MinGit
|
||||
set DoxygenInstall=doxygen-1.9.4.windows.x64.bin.zip
|
||||
set DoxygenUrl=https://www.doxygen.nl/files/%DoxygenInstall%
|
||||
set DoxygenInstall=doxygen-1.9.6.windows.x64.bin.zip
|
||||
set DoxygenUrl=https://github.com/doxygen/doxygen/releases/download/Release_1_9_6/%DoxygenInstall%
|
||||
set DoxygenInstallPath=%EnvToolsPath%\doxygen
|
||||
set CMakeVersion=cmake-3.19.0-win32-x86
|
||||
set CMakeInstall=%CMakeVersion%.zip
|
||||
@ -176,7 +176,7 @@ mkdir "%EnvTempPath%"
|
||||
call "%ToolsPath%\download-file.bat" "%TorDownloadIndexUrl%" "%EnvTempPath%\index.html"
|
||||
if not exist "%EnvTempPath%\index.html" %cecho% error "Cannot download Tor installation" & goto error
|
||||
|
||||
for /F "tokens=1,2 delims= " %%A in ('%EnvSedExe% -r -n -e"s/.*href=\"^(.*^)^(tor-win32.*\.zip^)\".*/\2 \1\2/p" "%EnvTempPath%\index.html"') do set TorInstall=%%A& set TorDownloadUrl=%TorProjectUrl%%%B
|
||||
for /F "tokens=1,2 delims= " %%A in ('%EnvSedExe% -r -n -e"s/.*href=\"^(.*^)^(tor-.*windows-i686\.tar\.gz^)\".*/\2 \1\2/p" "%EnvTempPath%\index.html"') do set TorInstall=%%A& set TorDownloadUrl=%%B
|
||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||
if "%TorInstall%"=="" %cecho% error "Cannot download Tor installation" & goto error
|
||||
if "%TorDownloadUrl%"=="" %cecho% error "Cannot download Tor installation" & goto error
|
||||
@ -189,7 +189,7 @@ if not exist "%EnvTorPath%\Tor\tor.exe" (
|
||||
if not exist "%EnvDownloadPath%\%TorInstall%" %cecho% error "Cannot download Tor installation" & goto error
|
||||
|
||||
%cecho% info "Unpack Tor"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTorPath%" "%EnvDownloadPath%\%TorInstall%"
|
||||
"%EnvSevenZipExe%" x -so "%EnvDownloadPath%\%TorInstall%" | "%EnvSevenZipExe%" x -si -ttar -o"%EnvTorPath%"
|
||||
)
|
||||
|
||||
:exit
|
||||
|
Loading…
Reference in New Issue
Block a user