mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-30 12:09:51 +00:00
build-deps.cmd: check that powershell, git and cmake are in path using where.exe. Print instructions upon missing VS env vars or tools in PATH.
This commit is contained in:
+30
-20
@@ -32,7 +32,7 @@ setlocal EnableDelayedExpansion
|
|||||||
:: Make sure vcvarsall.bat is called and dev env set is up.
|
:: Make sure vcvarsall.bat is called and dev env set is up.
|
||||||
IF "%VSINSTALLDIR%"=="" (
|
IF "%VSINSTALLDIR%"=="" (
|
||||||
call utils\cecho.cmd 0 12 "Visual Studio environment variables not set - cannot proceed!"
|
call utils\cecho.cmd 0 12 "Visual Studio environment variables not set - cannot proceed!"
|
||||||
GOTO :Error
|
GOTO :ErrorAndPrintUsage
|
||||||
)
|
)
|
||||||
|
|
||||||
set PROJECT_NAME=IfcOpenShell
|
set PROJECT_NAME=IfcOpenShell
|
||||||
@@ -77,11 +77,14 @@ REM /clp:ErrorsOnly;WarningsOnly
|
|||||||
set INSTALL_CMD=MSBuild.exe /nologo /m:%IFCOS_NUM_BUILD_PROCS%
|
set INSTALL_CMD=MSBuild.exe /nologo /m:%IFCOS_NUM_BUILD_PROCS%
|
||||||
set BUILD_DIR=build-vs%VS_VER%-%TARGET_ARCH%
|
set BUILD_DIR=build-vs%VS_VER%-%TARGET_ARCH%
|
||||||
|
|
||||||
REM echo.
|
echo.
|
||||||
REM call cecho.cmd 0 15 "This script fetches and builds all %PROJECT_NAME% dependencies"
|
|
||||||
|
:: Check that required tools are in PATH
|
||||||
|
FOR %%i IN (powershell git cmake) DO (
|
||||||
|
where.exe %%i 1> NUL 2> NUL || call cecho.cmd 0 12 "Required tool `'%%i`' not installed or not added to PATH" && goto :ErrorAndPrintUsage
|
||||||
|
)
|
||||||
|
|
||||||
:: Print build configuration information
|
:: Print build configuration information
|
||||||
echo.
|
|
||||||
|
|
||||||
call cecho.cmd 0 10 "Script configuration:"
|
call cecho.cmd 0 10 "Script configuration:"
|
||||||
call cecho.cmd 0 13 "* CMake Generator`t= '`"%GENERATOR_DEFAULT%`'`t
|
call cecho.cmd 0 13 "* CMake Generator`t= '`"%GENERATOR_DEFAULT%`'`t
|
||||||
@@ -111,19 +114,7 @@ echo Defaults to NUMBER_OF_PROCESSORS.
|
|||||||
echo.
|
echo.
|
||||||
|
|
||||||
:: Print script's usage information
|
:: Print script's usage information
|
||||||
call cecho.cmd 0 10 "Requirements for a successful execution:"
|
call :PrintUsage
|
||||||
echo 1. Install PowerShell (preinstalled in Windows ^>= 7) and make sure 'powershell' is accessible from PATH.
|
|
||||||
echo - https://support.microsoft.com/en-us/kb/968929
|
|
||||||
echo 2. Install Git and make sure 'git' is accessible from PATH.
|
|
||||||
echo - http://code.google.com/p/tortoisegit/
|
|
||||||
echo 3. Install CMake and make sure 'cmake' is accessible from PATH.
|
|
||||||
echo - http://www.cmake.org/
|
|
||||||
echo 4. Visual Studio 2008 or newer (2013 or newer recommended).
|
|
||||||
echo - https://www.visualstudio.com/
|
|
||||||
echo 5. Run this batch script with Visual Studio environment variables set.
|
|
||||||
echo - https://msdn.microsoft.com/en-us/library/ms229859(v=vs.110).aspx
|
|
||||||
echo.
|
|
||||||
REM TODO 3ds Max SDK?
|
|
||||||
|
|
||||||
call cecho.cmd 0 14 "Warning: You will need roughly 8 GB of disk space to proceed `(VS 2015 x64 RelWithDebInfo`)."
|
call cecho.cmd 0 14 "Warning: You will need roughly 8 GB of disk space to proceed `(VS 2015 x64 RelWithDebInfo`)."
|
||||||
echo.
|
echo.
|
||||||
@@ -336,17 +327,20 @@ IF EXIST "%DEPS_DIR%\swigwin\". robocopy "%DEPS_DIR%\swigwin" "%INSTALL_DIR%\swi
|
|||||||
|
|
||||||
:Successful
|
:Successful
|
||||||
echo.
|
echo.
|
||||||
call %TOOLS%\utils\cecho.cmd 0 10 "%PROJECT_NAME% dependencies built."
|
call %THISDIR%\utils\cecho.cmd 0 10 "%PROJECT_NAME% dependencies built."
|
||||||
goto :Finish
|
goto :Finish
|
||||||
|
|
||||||
|
:ErrorAndPrintUsage
|
||||||
|
echo.
|
||||||
|
call :PrintUsage
|
||||||
:Error
|
:Error
|
||||||
echo.
|
echo.
|
||||||
call %TOOLS%\utils\cecho.cmd 0 12 "An error occurred! Aborting!"
|
call %THISDIR%\utils\cecho.cmd 0 12 "An error occurred! Aborting!"
|
||||||
goto :Finish
|
goto :Finish
|
||||||
|
|
||||||
:Finish
|
:Finish
|
||||||
set PATH=%ORIGINAL_PATH%
|
set PATH=%ORIGINAL_PATH%
|
||||||
cd %TOOLS%
|
cd %THISDIR%
|
||||||
endlocal
|
endlocal
|
||||||
goto :EOF
|
goto :EOF
|
||||||
|
|
||||||
@@ -428,3 +422,19 @@ call cecho.cmd 0 13 "Installing %2 %DEPENDENCY_NAME%. Please be patient, this wi
|
|||||||
set RET=%ERRORLEVEL%
|
set RET=%ERRORLEVEL%
|
||||||
popd
|
popd
|
||||||
exit /b %RET%
|
exit /b %RET%
|
||||||
|
|
||||||
|
:: PrintUsage - Prints usage information
|
||||||
|
:PrintUsage
|
||||||
|
call %THISDIR%\utils\cecho.cmd 0 10 "Requirements for a successful execution:"
|
||||||
|
echo 1. Install PowerShell (preinstalled in Windows ^>= 7) and make sure 'powershell' is accessible from PATH.
|
||||||
|
echo - https://support.microsoft.com/en-us/kb/968929
|
||||||
|
echo 2. Install Git and make sure 'git' is accessible from PATH.
|
||||||
|
echo - http://code.google.com/p/tortoisegit/
|
||||||
|
echo 3. Install CMake and make sure 'cmake' is accessible from PATH.
|
||||||
|
echo - http://www.cmake.org/
|
||||||
|
echo 4. Visual Studio 2008 or newer (2013 or newer recommended).
|
||||||
|
echo - https://www.visualstudio.com/
|
||||||
|
echo 5. Run this batch script with Visual Studio environment variables set.
|
||||||
|
echo - https://msdn.microsoft.com/en-us/library/ms229859(v=vs.110).aspx
|
||||||
|
echo.
|
||||||
|
REM TODO 3ds Max SDK instructions?
|
||||||
|
|||||||
Reference in New Issue
Block a user