mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added support for other msys2 environments
This commit is contained in:
parent
f03862b984
commit
00f82602d2
@ -66,6 +66,7 @@ echo %RS_QMAKE_CONFIG% > buildinfo.txt
|
||||
echo %RsBuildConfig% >> buildinfo.txt
|
||||
echo %RsArchitecture% >> buildinfo.txt
|
||||
echo Qt %QtVersion% >> buildinfo.txt
|
||||
echo %RsToolchain% >> buildinfo.txt
|
||||
echo %RsCompiler% >> buildinfo.txt
|
||||
|
||||
call "%ToolsPath%\msys2-path.bat" "%SourcePath%" MSYS2SourcePath
|
||||
|
@ -1,6 +1,4 @@
|
||||
:: Process commandline parameter
|
||||
set Param32=0
|
||||
set Param64=0
|
||||
set ParamRelease=0
|
||||
set ParamDebug=0
|
||||
set ParamAutologin=0
|
||||
@ -12,14 +10,36 @@ set ParamIndexing=0
|
||||
set ParamNoupdate=0
|
||||
set CoreCount=%NUMBER_OF_PROCESSORS%
|
||||
set RS_QMAKE_CONFIG=
|
||||
set RsToolchain=
|
||||
set tcc=0
|
||||
|
||||
:parameter_loop
|
||||
if "%~1" NEQ "" (
|
||||
for /f "tokens=1,2 delims==" %%a in ("%~1") do (
|
||||
if "%%~a"=="32" (
|
||||
set Param32=1
|
||||
set RsToolchain=mingw32
|
||||
set /A tcc=tcc+1
|
||||
) else if "%%~a"=="64" (
|
||||
set Param64=1
|
||||
set RsToolchain=mingw64
|
||||
set /A tcc=tcc+1
|
||||
) else if "%%~a"=="mingw32" (
|
||||
set RsToolchain=mingw32
|
||||
set /A tcc=tcc+1
|
||||
) else if "%%~a"=="mingw64" (
|
||||
set RsToolchain=mingw64
|
||||
set /A tcc=tcc+1
|
||||
) else if "%%~a"=="ucrt64" (
|
||||
set RsToolchain=ucrt64
|
||||
set /A tcc=tcc+1
|
||||
) else if "%%~a"=="clang64" (
|
||||
set RsToolchain=clang64
|
||||
set /A tcc=tcc+1
|
||||
) else if "%%~a"=="clang32" (
|
||||
set RsToolchain=clang32
|
||||
set /A tcc=tcc+1
|
||||
) else if "%%~a"=="clangarm64" (
|
||||
set RsToolchain=clangarm64
|
||||
set /A tcc=tcc+1
|
||||
) else if "%%~a"=="release" (
|
||||
set ParamRelease=1
|
||||
) else if "%%~a"=="debug" (
|
||||
@ -52,22 +72,37 @@ if "%~1" NEQ "" (
|
||||
goto parameter_loop
|
||||
)
|
||||
|
||||
if "%Param32%"=="1" (
|
||||
if "%Param64%"=="1" (
|
||||
echo.
|
||||
echo 32-bit or 64-bit?
|
||||
if %tcc% NEQ 1 (
|
||||
echo Multiple or no toolchain specified
|
||||
goto :usage
|
||||
)
|
||||
|
||||
set RsBit=32
|
||||
if "%RsToolchain%"=="mingw32" (
|
||||
set RsArchitecture=x86
|
||||
set RsMSYS2Architecture=i686
|
||||
)
|
||||
|
||||
if "%Param64%"=="1" (
|
||||
set RsBit=64
|
||||
set MSYSTEM=MINGW32
|
||||
) else if "%RsToolchain%"=="mingw64" (
|
||||
set RsArchitecture=x64
|
||||
set RsMSYS2Architecture=x86_64
|
||||
set MSYSTEM=MINGW64
|
||||
) else if "%RsToolchain%"=="ucrt64" (
|
||||
set RsArchitecture=x64
|
||||
set RsMSYS2Architecture=ucrt-x86_64
|
||||
set MSYSTEM=UCRT64
|
||||
) else if "%RsToolchain%"=="clang64" (
|
||||
set RsArchitecture=x64
|
||||
set RsMSYS2Architecture=clang-x86_64
|
||||
set MSYSTEM=CLANG64
|
||||
set ParamClang=1
|
||||
) else if "%RsToolchain%"=="clang32" (
|
||||
set RsArchitecture=x86
|
||||
set RsMSYS2Architecture=clang-i686
|
||||
set MSYSTEM=CLANG32
|
||||
set ParamClang=1
|
||||
) else if "%RsToolchain%"=="clangarm64" (
|
||||
set RsArchitecture=arm64
|
||||
set RsMSYS2Architecture=clang-aarch64
|
||||
set MSYSTEM=CLANGARM64
|
||||
)
|
||||
|
||||
if "%ParamClang%"=="1" (
|
||||
@ -76,8 +111,6 @@ if "%ParamClang%"=="1" (
|
||||
set RsCompiler=GCC
|
||||
)
|
||||
|
||||
if "%RsBit%"=="" goto :usage
|
||||
|
||||
if "%ParamRelease%"=="1" (
|
||||
if "%ParamDebug%"=="1" (
|
||||
echo.
|
||||
@ -108,10 +141,13 @@ exit /B 0
|
||||
|
||||
:usage
|
||||
echo.
|
||||
echo Usage: 32^|64 release^|debug [autologin plugins webui singlethread clang indexing noupdate] ["CONFIG+=..."]
|
||||
echo Usage: 32^|64^|other release^|debug [autologin plugins webui singlethread clang indexing noupdate] ["CONFIG+=..."]
|
||||
echo.
|
||||
echo Mandatory parameter
|
||||
echo 32^|64 32-bit or 64-bit Version
|
||||
echo 32^|64 32-bit or 64-bit version (same as mingw32 or mingw64)
|
||||
echo Or you can specify any other toolchain supported by msys2:
|
||||
echo mingw32^|mingw64^|clang32^|clang64^|ucrt64^|clangarm64
|
||||
echo More info: https://www.msys2.org/docs/environments
|
||||
echo release^|debug Build release or debug version
|
||||
echo.
|
||||
echo Optional parameter (need clean when changed)
|
||||
|
@ -2,8 +2,6 @@ call "%~dp0env-base.bat" %*
|
||||
if errorlevel 2 exit /B 2
|
||||
if errorlevel 1 goto error_env
|
||||
|
||||
set MSYSTEM=MINGW%RsBit%
|
||||
|
||||
set BuildPath=%EnvRootPath%\builds
|
||||
set DeployPath=%EnvRootPath%\deploy
|
||||
|
||||
@ -14,10 +12,10 @@ if not exist "%DeployPath%" mkdir "%DeployPath%"
|
||||
call "%ToolsPath%\get-qt-version.bat" QtVersion
|
||||
if "%QtVersion%"=="" %cecho% error "Cannot get Qt version." & exit /B 1
|
||||
|
||||
set RsMinGWPath=%EnvMSYS2BasePath%\mingw%RsBit%
|
||||
set RsMinGWPath=%EnvMSYS2BasePath%\%RsToolchain%
|
||||
|
||||
set RsBuildPath=%BuildPath%\Qt-%QtVersion%-%RsArchitecture%-%RsCompiler%-%RsBuildConfig%
|
||||
set RsDeployPath=%DeployPath%\Qt-%QtVersion%%RsType%-%RsArchitecture%-%RsCompiler%-%RsBuildConfig%
|
||||
set RsBuildPath=%BuildPath%\Qt-%QtVersion%-%RsToolchain%-%RsCompiler%-%RsBuildConfig%
|
||||
set RsDeployPath=%DeployPath%\Qt-%QtVersion%%RsType%-%RsToolchain%-%RsCompiler%-%RsBuildConfig%
|
||||
set RsPackPath=%DeployPath%
|
||||
set RsArchiveAdd=
|
||||
set RsWebuiPath=%RootPath%\%SourceName%-webui
|
||||
|
Loading…
Reference in New Issue
Block a user