~paparazzi-uav/paparazzi/v5.0-manual

« back to all changes in this revision

Viewing changes to sw/ext/opencv_bebop/opencv/samples/python/_run_winpack_demo_python27.cmd

  • Committer: Paparazzi buildbot
  • Date: 2016-05-18 15:00:29 UTC
  • Revision ID: felix.ruess+docbot@gmail.com-20160518150029-e8lgzi5kvb4p7un9
Manual import commit 4b8bbb730080dac23cf816b98908dacfabe2a8ec from v5.0 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
@echo off
 
2
if NOT exist %CD%\..\..\..\build (
 
3
  echo ERROR: OpenCV Winpack installation is required
 
4
  pause
 
5
  exit
 
6
)
 
7
 
 
8
:: Path to FFMPEG binary files
 
9
set PATH=%PATH%;%CD%\..\..\..\build\bin\
 
10
 
 
11
:: Detect Python binary
 
12
python -V
 
13
if %ERRORLEVEL% EQU 0 (
 
14
  set PYTHON=python
 
15
) else (
 
16
  if exist C:\Python27-x64\python.exe (
 
17
    set PYTHON=C:\Python27-x64\python.exe
 
18
  ) else (
 
19
    if exist C:\Python27\python.exe (
 
20
      set PYTHON=C:\Python27\python.exe
 
21
    ) else (
 
22
      echo ERROR: Python not found
 
23
      pause
 
24
      exit
 
25
    )
 
26
  )
 
27
)
 
28
echo Using python: %PYTHON%
 
29
 
 
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
 
35
) else (
 
36
  if %ERRORLEVEL% EQU 64 (
 
37
    echo Detected: Python 64-bit
 
38
    set PYTHONPATH=%CD%\..\..\..\build\python\2.7\x64
 
39
  ) else (
 
40
    echo ERROR: Unknown python arch
 
41
    pause
 
42
    exit
 
43
  )
 
44
)
 
45
 
 
46
:: Launch demo
 
47
%PYTHON% demo.py