Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(windows):Add msvs parameter to ocio_deps.bat for ocio.bat argument parity #1974

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions share/dev/windows/ocio_deps.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@ set DOXYGEN_CONTINUE_ANYWAY=n

set %PYTHON_DOCUMENTATION_REQUIREMENTS=..\..\..\docs\requirements.txt

rem Microsoft Visual Studio path
set MSVS_PATH=%programfiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build

rem Command line arguments processing
:args_loop
if NOT "%~1"=="" (
if "%~1"=="--vcpkg" (
set VCPKG_INSTALL_DIR=%~2
)
if "%~1"=="--msvs" (
set MSVS_PATH=%~2
)

if "%~1"=="--help" (
goto :help
Expand Down Expand Up @@ -103,20 +109,24 @@ if ErrorLevel 1 (
exit /b
)

echo Checking for Microsoft Visual Studio...
set MSVS=0
for /d %%a in ("%programfiles%\Microsoft Visual Studio*") do (
for /f "tokens=3 delims=\" %%x in ("%%a") do set MSVS=1
IF NOT EXIST "!MSVS_PATH!" (
echo Could not find MS Visual Studio. Please provide the location for Microsoft Visual Studio vcvars64.bat or modify MSVS_PATH in the script.
rem The double dash are in quote here because otherwise the echo command thow an error.
echo "--msvs <path>"
echo E.g. C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build
exit /b
)

if !MSVS!==0 (
echo No Microsoft Visual Studio installation was found in !programfiles!.
echo For non-standard installation path, please use the following option:
rem The double dash are in quote here because otherwise the echo command thow an error.
echo "ocio_deps --vs <path>"
rem ****************************************************************************************************************
rem Setting up the environment using MS Visual Studio batch script
set VCVARS64_PATH="!MSVS_PATH!\vcvars64.bat"
SlawekNowy marked this conversation as resolved.
Show resolved Hide resolved
IF NOT EXIST !VCVARS64_PATH! (
rem Checking for vcvars64.bat script.
rem !MSVS_PATH! is checked earlier in the script
echo VCVARS64_PATH=!VCVARS64_PATH! does not exist
echo Make sure that Microsoft Visual Studio is installed.
exit /b
)

echo Checking for Vcpkg...
where /q vcpkg
set IS_VCPKG_PRESENT=False && if ErrorLevel 1 ( set IS_VCPKG_PRESENT=False ) && if EXIST !VCPKG_INSTALL_DIR!\vcpkg.exe ( set IS_VCPKG_PRESENT=True )
Expand Down