diff --git a/win/build-deps.cmd b/win/build-deps.cmd index d04e9e6c47..31adbedd6f 100644 --- a/win/build-deps.cmd +++ b/win/build-deps.cmd @@ -24,6 +24,13 @@ @echo off echo. +for %%Q in ("%~dp0\.") DO set "batpath=%%~fQ" + +if NOT "%CD%" == "%batpath%" ( + GOTO :ErrorAndPrintUsage +) + + set PROJECT_NAME=IfcOpenShell call utils\cecho.cmd 15 0 "This script fetches and builds all %PROJECT_NAME% dependencies" echo. @@ -562,3 +569,5 @@ 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. +echo NB: This script needs to be ran from the directory directly containing it. +echo.