mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-18 04:14:28 -05:00
8c7920b545
- Fixed deploy path with tor - Disabled webui in installer - Optimized file get-gcc-version.bat - Optimized file get-qt-version.bat - Renamed file msys-path.bat to msys2-path.bat - Removed file download-file-wildcard.bat - Removed file winhttpjs.bat - Removed download and usage of wget.exe
52 lines
1.3 KiB
Batchfile
52 lines
1.3 KiB
Batchfile
:: Usage:
|
|
:: call build-libs.bat [make tasks]
|
|
|
|
@echo off
|
|
|
|
setlocal
|
|
|
|
:: Parameter
|
|
set MakeParam="DOWNLOAD_PATH=../../download"
|
|
|
|
set MakeTask=
|
|
:param_loop
|
|
if "%~1" NEQ "" (
|
|
set MakeTask=%MakeTask% %1
|
|
shift /1
|
|
goto param_loop
|
|
)
|
|
|
|
:: Initialize environment
|
|
call "%~dp0..\env.bat"
|
|
if errorlevel 1 goto error_env
|
|
call "%EnvPath%\env-msys2.bat"
|
|
if errorlevel 1 goto error_env
|
|
|
|
:: Check MSYS environment
|
|
if not exist "%EnvMSYS2SH%" %cecho% error "Please install MSYS2 first." & exit /B 1
|
|
|
|
:: Initialize environment
|
|
call "%~dp0env.bat"
|
|
if errorlevel 1 goto error_env
|
|
|
|
call "%ToolsPath%\msys2-path.bat" "%~dp0" MSYS2CurPath
|
|
call "%ToolsPath%\msys2-path.bat" "%BuildLibsPath%" MSYS2BuildLibsPath
|
|
|
|
if not exist "%BuildLibsPath%" mkdir "%BuildLibsPath%"
|
|
|
|
set MSYSTEM=MINGW%MSYS2Base%
|
|
set MSYS2_PATH_TYPE=inherit
|
|
|
|
%EnvMSYS2Cmd% "pacman --needed --noconfirm -S diffutils perl tar make wget mingw-w64-%MSYS2Architecture%-make"
|
|
::mingw-w64-%MSYS2Architecture%-cmake
|
|
::%EnvMSYS2Cmd% "pacman --noconfirm -Rd --nodeps mingw-w64-%MSYS2Architecture%-zlib"
|
|
|
|
%EnvMSYS2Cmd% "cd "%MSYS2BuildLibsPath%" && make -f %MSYS2CurPath%/makefile %MakeParam% %MakeTask%"
|
|
|
|
exit /B %ERRORLEVEL%
|
|
|
|
:error_env
|
|
echo Failed to initialize environment.
|
|
endlocal
|
|
exit /B 1
|