2016-09-06 15:31:41 -04:00
|
|
|
:: Initialize environment
|
|
|
|
call "%~dp0..\env.bat"
|
|
|
|
if errorlevel 1 goto error_env
|
|
|
|
|
|
|
|
set EnvRootPath=%RootPath%\%SourceName%-env
|
|
|
|
set EnvToolsPath=%EnvRootPath%\tools
|
|
|
|
set EnvTempPath=%EnvRootPath%\tmp
|
|
|
|
set EnvDownloadPath=%EnvRootPath%\download
|
2020-08-08 09:05:05 -04:00
|
|
|
set EnvTorPath=%EnvDownloadPath%\tor
|
2016-09-06 15:31:41 -04:00
|
|
|
|
|
|
|
set EnvSevenZipExe=%EnvToolsPath%\7z.exe
|
|
|
|
set EnvSedExe=%EnvToolsPath%\sed.exe
|
|
|
|
set EnvCutExe=%EnvToolsPath%\cut.exe
|
|
|
|
set EnvDependsExe=%EnvToolsPath%\depends.exe
|
|
|
|
set EnvMakeNSISExe=%EnvToolsPath%\NSIS\makensis.exe
|
2016-11-03 03:32:15 -04:00
|
|
|
set EnvCEchoExe=%EnvToolsPath%\cecho.exe
|
|
|
|
set cecho=call "%ToolsPath%\cecho.bat"
|
2016-09-06 15:31:41 -04:00
|
|
|
|
|
|
|
:: Create folders
|
|
|
|
if not exist "%EnvRootPath%" mkdir "%EnvRootPath%"
|
|
|
|
if not exist "%EnvToolsPath%" mkdir "%EnvToolsPath%"
|
|
|
|
if not exist "%EnvDownloadPath%" mkdir "%EnvDownloadPath%"
|
|
|
|
|
|
|
|
call "%~dp0tools\prepare-tools.bat"
|
2018-10-13 07:19:22 -04:00
|
|
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
|
|
|
|
|
|
|
:: Add MinGit to PATH
|
2017-02-27 02:16:48 -05:00
|
|
|
set PATH=%EnvToolsPath%\MinGit\cmd;%EnvToolsPath%\cmake\bin;%PATH%
|
2018-10-13 07:19:22 -04:00
|
|
|
set HOME=%EnvToolsPath%\MinGit\home
|
|
|
|
|
2022-06-23 16:09:15 -04:00
|
|
|
:: Add Doxygen to PATH
|
|
|
|
set PATH=%EnvToolsPath%\doxygen;%PATH%
|
|
|
|
|
2018-10-13 07:19:22 -04:00
|
|
|
exit /B 0
|
2016-09-06 15:31:41 -04:00
|
|
|
|
|
|
|
:error_env
|
|
|
|
echo Failed to initialize environment.
|
|
|
|
exit /B 1
|