diff --git a/build_scripts/Windows-msys2/build/build.bat b/build_scripts/Windows-msys2/build/build.bat index 972379aad..4fdaff09f 100644 --- a/build_scripts/Windows-msys2/build/build.bat +++ b/build_scripts/Windows-msys2/build/build.bat @@ -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 diff --git a/build_scripts/Windows-msys2/build/env.bat b/build_scripts/Windows-msys2/build/env.bat index c8cb71ff4..ccba33db3 100644 --- a/build_scripts/Windows-msys2/build/env.bat +++ b/build_scripts/Windows-msys2/build/env.bat @@ -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" diff --git a/build_scripts/Windows-msys2/build/pack.bat b/build_scripts/Windows-msys2/build/pack.bat index ceefd0144..313da7479 100644 --- a/build_scripts/Windows-msys2/build/pack.bat +++ b/build_scripts/Windows-msys2/build/pack.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 ) ) diff --git a/build_scripts/Windows-msys2/tools/webui.bat b/build_scripts/Windows-msys2/tools/webui.bat deleted file mode 100644 index b7af01e53..000000000 --- a/build_scripts/Windows-msys2/tools/webui.bat +++ /dev/null @@ -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 \ No newline at end of file diff --git a/build_scripts/Windows/build.bat b/build_scripts/Windows/build.bat index 4cec821b8..90bf2ae1c 100644 --- a/build_scripts/Windows/build.bat +++ b/build_scripts/Windows/build.bat @@ -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" diff --git a/build_scripts/Windows/build/build.bat b/build_scripts/Windows/build/build.bat index 9755fdadf..487647568 100644 --- a/build_scripts/Windows/build/build.bat +++ b/build_scripts/Windows/build/build.bat @@ -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 diff --git a/build_scripts/Windows/build/env.bat b/build_scripts/Windows/build/env.bat index b605cf502..98f70c87f 100644 --- a/build_scripts/Windows/build/env.bat +++ b/build_scripts/Windows/build/env.bat @@ -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 diff --git a/build_scripts/Windows/build/pack.bat b/build_scripts/Windows/build/pack.bat index 0dbf6e82d..1c844efa0 100644 --- a/build_scripts/Windows/build/pack.bat +++ b/build_scripts/Windows/build/pack.bat @@ -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" ( diff --git a/build_scripts/Windows/env/tools/prepare-msys2.bat b/build_scripts/Windows/env/tools/prepare-msys2.bat index 79ddb32c3..e4a4da8d5 100644 --- a/build_scripts/Windows/env/tools/prepare-msys2.bat +++ b/build_scripts/Windows/env/tools/prepare-msys2.bat @@ -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% diff --git a/build_scripts/Windows/env/tools/prepare-tools.bat b/build_scripts/Windows/env/tools/prepare-tools.bat index 94f213460..c2c1e1bdd 100644 --- a/build_scripts/Windows/env/tools/prepare-tools.bat +++ b/build_scripts/Windows/env/tools/prepare-tools.bat @@ -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