From 883e7e12808219d5ca47ecb78902c3a21ca30914 Mon Sep 17 00:00:00 2001 From: Thomas Mittet Date: Fri, 25 Sep 2026 14:38:06 +0200 Subject: [PATCH] Update licenses; add Huddly and add a THIRD-PARTY-NOTICES.md to comply with LGPL-2.1. --- LICENSE | 1 + README.md | 12 ++++- THIRD-PARTY-NOTICES.md | 51 +++++++++++++++++++ UsbDotNet.sln | 1 + .../UsbDotNet.LibUsbNative.csproj | 3 ++ 5 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 THIRD-PARTY-NOTICES.md diff --git a/LICENSE b/LICENSE index 3fa62817..da0f2817 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ MIT License Copyright (c) 2026 Thomas Mittet +Copyright (c) 2026 Huddly AS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 2a987205..4bd0df1b 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,12 @@ A modern, cross platform C# binding for [libusb](https://libusb.info/). Copyright (c) 2026 Thomas Mittet, project URL: https://github.com/tmittet/UsbDotNet/. +Copyright (c) 2026 Huddly AS, fork URL: https://github.com/Huddly/UsbDotNet/. -NuGet packages: https://www.nuget.org/packages/UsbDotNet/. +This is the Huddly fork of UsbDotNet. It bundles a modified build of libusb for Windows, see +[Third-Party libraries](#third-party-libraries) and `/THIRD-PARTY-NOTICES.md`. + +NuGet packages: https://www.nuget.org/packages/Huddly.UsbDotNet/. ## License @@ -17,11 +21,17 @@ included in compliance with LGPL. - The libusb-1.0 library is bundled with this project for convenience - libusb-1.0 is part of the [libusb project](https://github.com/libusb/) and is licensed under [LGPL-2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) +- The `win-x64` and `win-arm64` binaries are a **modified build** of libusb-1.0, built from the + [Huddly libusb fork](https://github.com/Huddly/libusb); the exact branch, commit and CI build + are listed in `/THIRD-PARTY-NOTICES.md` +- All other bundled binaries are unmodified builds of upstream libusb - Precompiled binaries are included in `/src/UsbDotNet.LibUsbNative/runtimes/` - You may replace the binaries with any LGPL-compliant versions ### Licensing Notes - The full LGPL-2.1 license text is provided in `/LICENSE.libusb` +- Third-party notices, including the source location of the modified libusb build, are + provided in `/THIRD-PARTY-NOTICES.md` - Use of libusb doesn’t imply endorsement from the libusb project - If you modify or redistribute the libusb binaries, you must follow the [LGPL-2.1 terms](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md new file mode 100644 index 00000000..d3fca72a --- /dev/null +++ b/THIRD-PARTY-NOTICES.md @@ -0,0 +1,51 @@ +# Third-Party Notices + +This is the Huddly fork of UsbDotNet. The original UsbDotNet project by Thomas Mittet is +licensed under the MIT License: https://github.com/tmittet/UsbDotNet. The C# code in this +repository remains under the MIT License (see `LICENSE`). + +## libusb-1.0 (LGPL-2.1) + +The `Huddly.UsbDotNet.LibUsbNative` package bundles precompiled binaries of +[libusb-1.0](https://libusb.info/), which is licensed under the GNU Lesser General Public +License, version 2.1 (LGPL-2.1). The full license text is provided in `LICENSE.libusb` +(packaged as `licenses/LICENSE.libusb`). Use of libusb does not imply endorsement by the +libusb project. + +### Modified build (Windows x64 and arm64) + +The `win-x64` and `win-arm64` binaries are a **modified** build of libusb-1.0, built from the +Huddly fork of libusb: + +- Repository: https://github.com/Huddly/libusb +- Branch: `libusb-v1.0.30` +- Commit: `2ab95bfd7f9cdfb129e867e2240001772a0f3a8e` +- Reported libusb version: `1.0.30.62037` + +The modifications are limited to the Windows (WinUSB) backend and are documented as change +notices in the fork's commit history, as required by LGPL-2.1 section 2(b). Compared to +upstream libusb 1.0.30, the fork opens the WinUSB device handle lazily on first use instead of +on `libusb_open`, and no longer clears endpoint data before an interface claim has succeeded. + +The binaries were built from the commit above by the "Build libusb (Windows)" GitHub Actions +workflow in this repository (`.github/workflows/build_libusb_windows.yml`): +https://github.com/Huddly/UsbDotNet/actions/runs/36128292544 + +### Unmodified builds + +All other bundled binaries (`win-x86`, `osx-x64`, `osx-arm64`, `maccatalyst-x64`, +`maccatalyst-arm64`) are unmodified builds of upstream libusb: +https://github.com/libusb/libusb. No binary is bundled for Linux; the system-installed +libusb-1.0 is used. + +### Replacing the binaries + +libusb is dynamically linked. The binaries are located in +`src/UsbDotNet.LibUsbNative/runtimes//native/` in this repository and under +`runtimes//native/` in the NuGet package. You may replace them with any compatible +libusb-1.0 build, as permitted by LGPL-2.1 section 6. + +### Maintenance + +Update the branch, commit, version and workflow run above on every release that changes the +bundled libusb binaries. diff --git a/UsbDotNet.sln b/UsbDotNet.sln index cd40099e..41b81f50 100644 --- a/UsbDotNet.sln +++ b/UsbDotNet.sln @@ -17,6 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution LICENSE.libusb = LICENSE.libusb nuget.config = nuget.config README.md = README.md + THIRD-PARTY-NOTICES.md = THIRD-PARTY-NOTICES.md EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{9D23C15C-5ADC-4D24-9206-198A26113684}" diff --git a/src/UsbDotNet.LibUsbNative/UsbDotNet.LibUsbNative.csproj b/src/UsbDotNet.LibUsbNative/UsbDotNet.LibUsbNative.csproj index 285f2243..6a577119 100644 --- a/src/UsbDotNet.LibUsbNative/UsbDotNet.LibUsbNative.csproj +++ b/src/UsbDotNet.LibUsbNative/UsbDotNet.LibUsbNative.csproj @@ -27,6 +27,9 @@ PreserveNewest + + PreserveNewest +