2
if NOT exist %CD%\..\..\..\build (
3
echo ERROR: OpenCV Winpack installation is required
8
:: Path to FFMPEG binary files
9
set PATH=%PATH%;%CD%\..\..\..\build\bin\
11
:: Detect Python binary
13
if %ERRORLEVEL% EQU 0 (
16
if exist C:\Python27-x64\python.exe (
17
set PYTHON=C:\Python27-x64\python.exe
19
if exist C:\Python27\python.exe (
20
set PYTHON=C:\Python27\python.exe
22
echo ERROR: Python not found
28
echo Using python: %PYTHON%
30
:: Detect python architecture
31
%PYTHON% -c "import platform; exit(64 if platform.architecture()[0] == '64bit' else 32)"
32
if %ERRORLEVEL% EQU 32 (
33
echo Detected: Python 32-bit
34
set PYTHONPATH=%CD%\..\..\..\build\python\2.7\x86
36
if %ERRORLEVEL% EQU 64 (
37
echo Detected: Python 64-bit
38
set PYTHONPATH=%CD%\..\..\..\build\python\2.7\x64
40
echo ERROR: Unknown python arch