setupvars: updated OpenCV location (#7563)

This commit is contained in:
Maksim Shabunin 2021-09-20 19:57:34 +03:00 committed by GitHub
parent 5dab18d995
commit 5e91bf93cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 14 deletions

View File

@ -23,12 +23,15 @@ if not "%1"=="" (
)
:: OpenCV
if exist "%INTEL_OPENVINO_DIR%\extras\opencv\setupvars.bat" (
call "%INTEL_OPENVINO_DIR%\extras\opencv\setupvars.bat"
goto :opencv_done
)
if exist "%INTEL_OPENVINO_DIR%\opencv\setupvars.bat" (
call "%INTEL_OPENVINO_DIR%\opencv\setupvars.bat"
) else (
set "OpenCV_DIR=%INTEL_OPENVINO_DIR%\opencv\x64\vc14\lib"
set "PATH=%INTEL_OPENVINO_DIR%\opencv\x64\vc14\bin;%PATH%"
goto :opencv_done
)
:opencv_done
:: Model Optimizer
if exist %INTEL_OPENVINO_DIR%\tools\model_optimizer (

View File

@ -60,15 +60,12 @@ if [ -e "$INSTALLDIR/tools/compile_tool" ]; then
export LD_LIBRARY_PATH=$INSTALLDIR/tools/compile_tool${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
fi
if [ -e "$INSTALLDIR/opencv" ]; then
if [ -f "$INSTALLDIR/opencv/setupvars.sh" ]; then
source "$INSTALLDIR/opencv/setupvars.sh"
else
export OpenCV_DIR="$INSTALLDIR/opencv/share/OpenCV"
export LD_LIBRARY_PATH="$INSTALLDIR/opencv/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export LD_LIBRARY_PATH="$INSTALLDIR/opencv/share/OpenCV/3rdparty/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
fi
fi
# OpenCV environment
for _loc in "extras/opencv" "opencv" ; do
_fname="$INSTALLDIR/${_loc}/setupvars.sh"
[ -f "${_fname}" ] && source "${_fname}" && break
done
if [ -f "$INTEL_OPENVINO_DIR/extras/dl_streamer/setupvars.sh" ]; then
@ -102,13 +99,13 @@ if command -v lsb_release >/dev/null 2>&1; then
OS_NAME=$(lsb_release -i -s)
fi
python_bitness=$(python3 -c 'import sys; print(64 if sys.maxsize > 2**32 else 32)')
python_bitness=$(python3 -c 'import sys; print(64 if sys.maxsize > 2**32 else 32)')
if [ "$python_bitness" != "" ] && [ "$python_bitness" != "64" ] && [ "$OS_NAME" != "Raspbian" ]; then
echo "[setupvars.sh] 64 bitness for Python $python_version is required"
fi
MINIMUM_REQUIRED_PYTHON_VERSION="3.6"
MAX_SUPPORTED_PYTHON_VERSION=$([[ "$OSTYPE" == "darwin"* ]] && echo '3.7' || echo '3.8')
MAX_SUPPORTED_PYTHON_VERSION=$([[ "$OSTYPE" == "darwin"* ]] && echo '3.7' || echo '3.8')
if [[ -n "$python_version" && "$(printf '%s\n' "$python_version" "$MINIMUM_REQUIRED_PYTHON_VERSION" | sort -V | head -n 1)" != "$MINIMUM_REQUIRED_PYTHON_VERSION" ]]; then
echo "[setupvars.sh] ERROR: Unsupported Python version. Please install one of Python 3.6-${MAX_SUPPORTED_PYTHON_VERSION} (64-bit) from https://www.python.org/downloads/"
return 1