Commit 43b882b
feat: vendor libusb 1.0.29 + UsbDk runtime integration
* Add `libusb-sys` workspace crate with libusb v1.0.29 vendored as a
submodule under `crates/libusb-sys/vendor/libusb`. On Windows it
builds libusb statically via `cc-rs` (libusb has no upstream
CMakeLists.txt in this version range); on Linux/macOS it probes the
system copy via `pkg-config` (≥ 1.0.20). Exposes location via
`cargo:include` / `cargo:lib` / `cargo:lib_name` metadata, picked
up by direct dependents through `DEP_USB_1.0_*` env vars (note: the
literal `.` in the env-var name is preserved by Cargo's `links`
translation — only `-` becomes `_`).
* Switch `freenect-sys` and `freenect2-sys` to consume libusb-sys as
a direct dependency, removing their per-crate vcpkg / pkg-config
fallback dance. Each build script now reads `DEP_USB_1.0_*` and
feeds the values straight into the bundled libfreenect[2] cmake
invocations.
* In-tree patch on `freenect-sys`: idempotently inject
`libusb_set_option(LIBUSB_OPTION_USE_USBDK)` after `libusb_init`
in `vendor/libfreenect/src/usb_libusb10.c`, mirroring what
libfreenect2 already does upstream. Open PR
OpenKinect/libfreenect#701 — once merged the marker check makes
this a no-op. With the patch + the runtime probe (next commit), a
Windows user with the UsbDk filter installed can reach the Kinect
v1 without going through Zadig.
* Wrap `freenect_open_device`'s rc into `OpenFailureCode` with a
Display impl that decodes the most common libusb errors
(-3/-4/-5/-6/-12) into actionable hints, so error -12 surfaces
the UsbDk install instructions directly.
* Bundle UsbDk into Windows release ZIPs: a new
`tools/windows-release/install-drivers.cmd` (UAC-aware msiexec
wrapper) ships next to the plugin binary, alongside
`UsbDk_1.0.22_x64.msi` fetched from Daynix's GitHub release at
CI time. README updated with the bundled-installer flow in both
English and French sections.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 61be7e1 commit 43b882b
15 files changed
Lines changed: 1235 additions & 171 deletions
File tree
- .github/workflows
- crates
- freenect-sys
- freenect2-sys
- freenect/src
- libusb-sys
- src
- vendor
- tools/windows-release
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
213 | 245 | | |
214 | 246 | | |
215 | 247 | | |
| |||
222 | 254 | | |
223 | 255 | | |
224 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
225 | 264 | | |
226 | 265 | | |
227 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments