forked from highfidelity/psmoveapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.win32
170 lines (109 loc) · 6.08 KB
/
README.win32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
Building and running the PS Move API on a legacy operating system
=================================================================
We usually build PS Move API for Windows on Linux via cross-compliation, as
we don't run Windows for day-to-day work. For cross-compiling the PS Move API
for Windows on Linux, you can use the following script:
contrib/cross-compile-mingw64
Please take into account that Bluetooth pairing on Windows still does not work
as smoothly as on both Mac OS X and Linux. If you plan to do serious
development, it's time to switch to Mac OS X or Linux. As an alternative, you
can use a Linux host for Bluetooth communcation, and export the controller via
"moved" to the Windows host. This setup has reliable pairing, and you can still
develop and build your applications in Windows if you have to.
Requirements
------------
- MinGW
http://mingw-w64.sourceforge.net/
- CMake
http://www.cmake.org/cmake/resources/software.html
- OpenCV
http://sourceforge.net/projects/opencvlibrary/files/opencv-win/
- Git
http://code.google.com/p/msysgit/
- CL Eye Driver (if you plan to use the PS Eye camera)
http://codelaboratories.com/get/cl-eye-driver/
Optional dependency:
- CLEyeSDK
http://codelaboratories.com/get/cl-eye-sdk/
IMPORTANT: Get the right MinGW version!
-> "Regular" MinGW might not be able to build the PS Move API, as we are
using some features that are only included in MinGW-w64.
-> Get "MinGW-w64" instead. Despite its name, it also works for 32-bit
systems (and you probably have to/want to build PS Move API as 32-bit
library on Windows, anyway. This is also what we use, both for cross-
compiling it on Linux, and for building it directly on Windows.
-> The build has been successfully tested on Windows XP, Windows 7,
and Windows 8 using MinGW-w64 version 4.9.1. To get it, you can either
A) use the online installer or B) download the archive directly for
manual setup:
A) Get the online installer at http://sourceforge.net/projects/mingw-w64/
Run the installer using these setup settings:
Version: 4.9.1
Architecture: i686 or x86_64
Threads: posix
Exception: sjlj or seh
Build revision: 1
B) For 64-bit Windows, get the archive at
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.1/threads-posix/sjlj/
For 32-bit Windows, get the archive at
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.1/threads-posix/sjlj/
Extract the archive (using 7-Zip) and add the path to its "bin" subdirectory to the
PATH environment variable like so, for instance:
set PATH=C:\mingw32\bin;%PATH%
NOTE: If you want to use the CL Eye Driver (for PS Eye camera) you *must*
build everything as 32-bit binaries. The driver is, as of writing,
only available in a 32-bit version that will not work together with
64-bit builds of OpenCV and the PS Move API. The easiest way to
achieve this is to install the i686 version of MinGW-w64 (see above)
for the following build steps.
1. Clone the PS Move API repository
git clone --recursive git://github.com/thp/psmoveapi.git
cd psmoveapi
2. Clone the OpenCV repository
Since OpenCV binary distributions typically do not come with
MinGW builds, we build our own. First, get version 2.4.10 from
the OpenCV repository.
git clone --depth 1 --branch 2.4.10 git://github.com/Itseez/opencv.git
cd opencv
3. Configure the OpenCV build to produce static libs
mkdir build
cd build
cmake .. -G "MinGW Makefiles" -DBUILD_DOCS=0 -DBUILD_PACKAGE=0 -DBUILD_PERF_TESTS=0 -DBUILD_SHARED_LIBS=0 -DBUILD_TESTS=0 -DBUILD_opencv_apps=0 -DBUILD_opencv_calib3d=0 -DBUILD_opencv_contrib=0 -DBUILD_opencv_features2d=0 -DBUILD_opencv_flann=0 -DBUILD_opencv_gpu=0 -DBUILD_opencv_java=0 -DBUILD_opencv_legacy=0 -DBUILD_opencv_ml=0 -DBUILD_opencv_nonfree=0 -DBUILD_opencv_objdetect=0 -DBUILD_opencv_ocl=0 -DBUILD_opencv_photo=0 -DBUILD_opencv_python=0 -DBUILD_opencv_stitching=0 -DBUILD_opencv_superres=0 -DBUILD_opencv_ts=0 -DBUILD_opencv_video=0 -DBUILD_opencv_videostab=0 -DBUILD_opencv_world=0 -DWITH_FFMPEG=0 -DWITH_JASPER=0 -DWITH_OPENEXR=0 -DWITH_TIFF=0
4. Build and install OpenCV
It will install to psmoveapi's opencv/build/install subdirectory.
mingw32-make
mingw32-make install
5. Configure the PS Move API build
Switch back to the psmoveapi root directory.
cd ..\..
mkdir build
cd build
cmake .. -G "MinGW Makefiles" -DPSMOVE_USE_LOCAL_OPENCV=1
Alternatively, if you want to use the CL Eye SDK:
cmake .. -G "MinGW Makefiles" -DPSMOVE_USE_LOCAL_OPENCV=1 -DPSMOVE_USE_CL_EYE_SDK=1
6. Finally build the PS Move API
mingw32-make
7. Pair the controller to the host
Using the controllers' Bluetooth capabilities requires you to pair the
controller to the host computer first. That is what the psmovepair utility
is for. It is automatically built as part of the PS Move API.
Make sure that Bluetooth is enabled on your computer, then connect a Move
controller via USB and run
psmovepair.exe
to store the host's Bluetooth device address in the Move and register the
controller. Follow the instructions on the screen until the Move's red
status LED eventually remains lit to indicate a working Bluetooth
connection.
Note that the pairing step is necessary only once per controller. From that
point on you can enable the Bluetooth connection simply by pressing the
PS button. Only if you switched to a different Bluetooth adapter or deleted
the controller from the list of Bluetooth devices you need to run
psmovepair again for that controller.
8. Start one of the desired test applications
If you previously chose to build the example applications (which is the
default), you can then run
example.exe
for a basic example.
For questions, please read the archives of the PS Move Mailing List. If you
cannot find an answer to your question in the archives, send an e-mail:
https://groups.google.com/forum/#!aboutgroup/psmove