Skip to content

Commit bcd1800

Browse files
committed
Update installation documentation for MSVC
1 parent 2794f3c commit bcd1800

File tree

2 files changed

+76
-10
lines changed

2 files changed

+76
-10
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,25 @@ Install the libusbK backend driver for libusbx:
3939
5. Click the Replace Driver button. Click yes on the warning about replacing a system driver. (This is because it is a composite parent.)
4040
6. Done.
4141

42+
Refer to `depends/README.depends.txt` for instructions of the following three steps:
43+
* Install CMake, OpenCV, TurboJPEG, Intel OpenCL SDK (if Intel GPU)
44+
* Build or install libusbx
45+
* Build GLFW
46+
47+
Building libfreenect2 in a cmd.exe with Visual Studio:
48+
49+
````
50+
cd example/protonect
51+
mkdir build && cd build
52+
cmake .. -G "Visual Studio 12 2013 Win64" -DOpenCV_DIR=%cd%\..\..\..\depends\opencv\build -DCMAKE_INSTALL_PREFIX=%cd%\..\..\..\install
53+
cmake --build . --config Release --target install
54+
cd ..\..\..\install
55+
set PATH=%PATH%;%cd%\lib;%cd%\..\depends\libusb\lib;%cd%\..\depends\opencv\build\x64\vc12\bin
56+
.\bin\Protonect.exe
57+
````
58+
59+
#### Uninstalling libusbK and restoring to the official SDK
60+
4261
To uninstall the libusbK driver (and get back the official SDK driver, if installed):
4362

4463
1. Open Device Manager

depends/README.depends.txt

Lines changed: 57 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,63 @@ Dependencies:
44
---
55

66
= Windows
7-
libusbx-winiso
8-
libusbx post-1.0.17 + winiso
9-
winiso = Windows isochronous modifications by Joshua Blake <[email protected]>
10-
11-
1. Download pre-built binaries libusbx-winiso.zip from https://www.dropbox.com/s/madoye1ayaoajet/libusbx-winiso.zip
12-
2. Unzip into the depends folder such that the resulting folder structure ends up looking like:
13-
./depends/libusbx/
14-
./depends/libusbx/include/
15-
./depends/libusbx/MS64/
16-
3. Done
7+
8+
CMake
9+
=====
10+
1. Download cmake-3.2.2-win32-x86.exe (or newer) from http://www.cmake.org/download/
11+
2. Install it to system
12+
13+
OpenCV
14+
======
15+
1. Download opencv-2.4.11.exe (or newer) from http://sourceforge.net/projects/opencvlibrary/files/opencv-win/
16+
2. Extract it to `depends/opencv`
17+
18+
TurboJPEG
19+
=========
20+
1. Download libjpeg-turbo-1.4.0-vc64.exe (or newer) from http://sourceforge.net/projects/libjpeg-turbo/files/
21+
2. Extract it as `depends/libjpeg_turbo`
22+
23+
Intel OpenCL SDK (for Intel HD Graphics)
24+
========================================
25+
1. Download intel_sdk_for_ocl_applications_2014_x64_setup.msi from http://www.softpedia.com/get/Programming/SDK-DDK/Intel-SDK-for-OpenCL-Applications.shtml
26+
2. Install it to system
27+
3. Verify `INTELOCLSDKROOT` is a environment variable
28+
29+
libusbx
30+
=======
31+
1. Download libusbx-winiso.zip from https://github.com/JoshBlake/libusbx/archive/winiso.zip
32+
2. Extract it to `depends/libusb_src`
33+
3. Open `depends/libusb_src/libusbx_2012.sln` with Visual Studio 2012 or newer
34+
4. Build "libusb-1.0 (dll)"; you may set the profile to "Release x64"
35+
5. Copy `depends/libusb_src/x64/Release/dll/*` to `depends/libusb/lib/`
36+
6. Copy `depends/libusb_src/libusb/libusb.h` to `depends/libusb/include/libusb-1.0/libusb.h`
37+
38+
Alternatively
39+
1. Download pre-built binaries libusbx-winiso.zip from https://www.dropbox.com/s/madoye1ayaoaj
40+
et/libusbx-winiso.zip
41+
2. Extract the content to places as above.
42+
43+
GLFW
44+
====
45+
1. Download glfw-3.0.4.zip from https://github.com/glfw/glfw/archive/3.0.4.zip
46+
2. Extract it to `depends/glfw_src`
47+
3. `cd depends/glfw_src; mkdir build && cd build`
48+
4. `cmake .. -G "Visual Studio 12 2013 Win64" -DCMAKE_INSTALL_PREFIX=%cd%\..\..\glfw -DBUILD_SHARED_LIBS=TRUE`
49+
5. `cmake --build . --config Release --target install`
50+
51+
Protonect
52+
=========
53+
1. `cd example/protonect`
54+
2. `mkdir build && cd build`
55+
3. `cmake .. -G "Visual Studio 12 2013 Win64" -DOpenCV_DIR=%cd%\..\..\..\depends\opencv\build -DCMAKE_INSTALL_PREFIX=%cd%\..\..\..\install`
56+
4. `cmake --build . --config Release --target install`
57+
58+
59+
````
60+
cd ..\..\..\install
61+
set PATH=%PATH%;%cd%\lib;%cd%\..\depends\libusb\lib;%cd%\..\depends\opencv\build\x64\vc12\bin
62+
.\bin\Protonect.exe
63+
````
1764

1865
= Ubuntu
1966
kernel 3.10+

0 commit comments

Comments
 (0)