2018-03-08 11:45:24 -05:00
|
|
|
if "%~1"=="standard" (
|
|
|
|
set RsRetroTor=
|
|
|
|
set RsType=
|
|
|
|
) else (
|
|
|
|
if "%~1"=="retrotor" (
|
|
|
|
set RsRetroTor=1
|
|
|
|
set RsType=-tor
|
|
|
|
) else (
|
|
|
|
echo.
|
|
|
|
echo Usage: standard^|retrotor
|
|
|
|
echo.
|
2018-05-07 00:42:52 -04:00
|
|
|
exit /B 2
|
2018-03-08 11:45:24 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2016-09-06 15:31:41 -04:00
|
|
|
set BuildPath=%EnvRootPath%\builds
|
|
|
|
set DeployPath=%EnvRootPath%\deploy
|
|
|
|
|
|
|
|
if not exist "%BuildPath%" mkdir "%BuildPath%"
|
|
|
|
if not exist "%DeployPath%" mkdir "%DeployPath%"
|
|
|
|
|
|
|
|
:: Check Qt environment
|
|
|
|
set QtPath=
|
|
|
|
call "%ToolsPath%\find-in-path.bat" QtPath qmake.exe
|
2018-05-07 00:42:52 -04:00
|
|
|
if "%QtPath%"=="" %cecho% error "Please run command in the Qt Command Prompt." & exit /B 1
|
2016-09-06 15:31:41 -04:00
|
|
|
|
|
|
|
:: Check MinGW environment
|
|
|
|
set MinGWPath=
|
|
|
|
call "%ToolsPath%\find-in-path.bat" MinGWPath gcc.exe
|
2018-05-07 00:42:52 -04:00
|
|
|
if "%MinGWPath%"=="" %cecho% error "Please run command in the Qt Command Prompt." & exit /B 1
|
2016-09-06 15:31:41 -04:00
|
|
|
|
|
|
|
:: Get Qt version
|
|
|
|
call "%ToolsPath%\get-qt-version.bat" QtVersion
|
2018-05-07 00:42:52 -04:00
|
|
|
if "%QtVersion%"=="" %cecho% error "Cannot get Qt version." & exit /B 1
|
|
|
|
|
|
|
|
:: Get gcc versions
|
|
|
|
call "%ToolsPath%\get-gcc-version.bat" GCCVersion
|
|
|
|
if "%GCCVersion%"=="" %cecho% error "Cannot get gcc version." & exit /B 1
|
|
|
|
|
|
|
|
set BuildLibsPath=%EnvRootPath%\build-libs\gcc-%GCCVersion%
|
2016-09-06 15:31:41 -04:00
|
|
|
|
|
|
|
set RsBuildConfig=release
|
2018-03-08 11:45:24 -05:00
|
|
|
set RsBuildPath=%BuildPath%\Qt-%QtVersion%%RsType%-%RsBuildConfig%
|
|
|
|
set RsDeployPath=%DeployPath%\Qt-%QtVersion%%RsType%-%RsBuildConfig%
|
2016-09-06 15:31:41 -04:00
|
|
|
set RsPackPath=%DeployPath%
|
|
|
|
set RsArchiveAdd=
|
|
|
|
|
2016-10-04 15:45:59 -04:00
|
|
|
if not exist "%~dp0env-mod.bat" goto no_mod
|
|
|
|
call "%~dp0env-mod.bat"
|
2016-09-06 15:31:41 -04:00
|
|
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
2016-10-04 15:45:59 -04:00
|
|
|
:no_mod
|
2016-09-06 15:31:41 -04:00
|
|
|
|
|
|
|
exit /B 0
|