mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 22:00:25 +08:00
Merge pull request #12612 from alalek:winpack_samples_python_launcher_update
This commit is contained in:
commit
e8fcd721b8
@ -1,12 +1,15 @@
|
|||||||
@echo off
|
@echo off
|
||||||
if NOT exist %CD%\..\..\..\build (
|
setlocal enableDelayedExpansion
|
||||||
|
|
||||||
|
set SCRIPTDIR=%~dp0
|
||||||
|
if NOT exist %SCRIPTDIR%\..\..\..\build (
|
||||||
echo ERROR: OpenCV Winpack installation is required
|
echo ERROR: OpenCV Winpack installation is required
|
||||||
pause
|
pause
|
||||||
exit
|
exit
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Path to FFMPEG binary files
|
:: Path to FFMPEG binary files
|
||||||
set PATH=%PATH%;%CD%\..\..\..\build\bin\
|
set PATH=%PATH%;%SCRIPTDIR%\..\..\..\build\bin\
|
||||||
|
|
||||||
:: Detect Python binary
|
:: Detect Python binary
|
||||||
python -V
|
python -V
|
||||||
@ -43,5 +46,17 @@ if %ERRORLEVEL% EQU 32 (
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Launch demo
|
:: Don't generate unnecessary .pyc cache files
|
||||||
|
set PYTHONDONTWRITEBYTECODE=1
|
||||||
|
|
||||||
|
if [%1]==[] goto rundemo
|
||||||
|
%PYTHON% %*
|
||||||
|
set result=%errorlevel%
|
||||||
|
IF %result% NEQ 0 (pause)
|
||||||
|
EXIT /B %result%
|
||||||
|
|
||||||
|
:rundemo
|
||||||
%PYTHON% demo.py
|
%PYTHON% demo.py
|
||||||
|
set result=%errorlevel%
|
||||||
|
IF %result% NEQ 0 (pause)
|
||||||
|
EXIT /B %result%
|
||||||
|
Loading…
Reference in New Issue
Block a user