Skip to content

Commit

Permalink
Added HIDAPI library and preparation for HID support
Browse files Browse the repository at this point in the history
  • Loading branch information
mauer committed Jun 6, 2024
1 parent 9cb65fb commit 9958bf4
Show file tree
Hide file tree
Showing 227 changed files with 38,856 additions and 105 deletions.
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
cmake-build-lin/
cmake-build-mac/
cmake-build-win/
cmake-build-debug/
cmake-build-release/
cmake-build*/
.idea/
.vscode/
package/
Expand Down
2 changes: 1 addition & 1 deletion docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* [Outbound Mappings](outbound_mapping.md)
* [Constant](outbound_mapping_constant.md)
* [Datarefs](outbound_mapping_dataref.md)
* [Sliders](outbound_mapping_sliders.md)
* [Sliders](outbound_mapping_slider.md)

* **MIDI Devices**
* [Behringer X-Touch Mini](behringer_xtouch_mini.md)
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
## VERSION 1.14
+ Fixed parameter default_encoder_mode, as there was a spelling mistake
+ Internal refactoring
+ Added HIDAPI as external library and started preparations for HID support

-----------------------------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>xmidictrl</title>
<meta name="description" content="Documentation for XMidiCtrl">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple-dark.css">
</head>
<body>
<div id="app"></div>
Expand Down
6 changes: 5 additions & 1 deletion external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ if (WIN32)
endif()

add_subdirectory(rtmidi)


# Add HID Api
#set(BUILD_SHARED_LIBS OFF)
add_subdirectory(hidapi)

# Add the X-Plane SDK
include(${CMAKE_CURRENT_LIST_DIR}/xpsdk.cmake)

Expand Down
31 changes: 31 additions & 0 deletions external/hidapi/.appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
environment:
matrix:
- BUILD_ENV: msbuild
arch: x64
- BUILD_ENV: msbuild
arch: Win32
- BUILD_ENV: cygwin

for:
-
matrix:
only:
- BUILD_ENV: msbuild

os: Visual Studio 2015

build_script:
- cmd: msbuild .\windows\hidapi.sln /p:Configuration=Release /p:Platform=%arch% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

-
matrix:
only:
- BUILD_ENV: cygwin

os: Visual Studio 2022

install:
- cmd: C:\cygwin64\setup-x86_64.exe --quiet-mode --no-shortcuts --upgrade-also --packages autoconf,automake

build_script:
- cmd: C:\cygwin64\bin\bash -exlc "cd $APPVEYOR_BUILD_FOLDER; ./bootstrap; ./configure; make"
34 changes: 34 additions & 0 deletions external/hidapi/.builds/freebsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
image: freebsd/latest
packages:
- autoconf
- automake
- gmake
- libiconv
- libtool
- pkgconf
- cmake
- ninja
sources:
- https://github.com/libusb/hidapi
tasks:
- configure: |
cd hidapi
echo Configure Autotools build
./bootstrap
./configure
echo Configure CMake build
mkdir -p build install_cmake
cmake -GNinja -B build -S . -DCMAKE_INSTALL_PREFIX=install_cmake
- build-autotools: |
cd hidapi
make
make DESTDIR=$PWD/root install
make clean
- build-cmake: |
cd hidapi/build
ninja
ninja install
ninja clean
- build-manual: |
cd hidapi/libusb
gmake -f Makefile-manual
18 changes: 18 additions & 0 deletions external/hidapi/.builds/netbsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
image: netbsd/latest
packages:
- cmake
- pkgconf
- libusb1
- libiconv
sources:
- https://github.com/libusb/hidapi
tasks:
- configure: |
cd hidapi
mkdir -p build install
cmake -B build -S . -DCMAKE_INSTALL_PREFIX=install
- build: |
cd hidapi/build
make
make install
make clean
19 changes: 19 additions & 0 deletions external/hidapi/.builds/openbsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
image: openbsd/latest
packages:
- cmake
- pkgconf
- libusb1--
- libiconv
- ninja
sources:
- https://github.com/libusb/hidapi
tasks:
- configure: |
cd hidapi
mkdir -p build install
cmake -GNinja -B build -S . -DCMAKE_INSTALL_PREFIX=install
- build: |
cd hidapi/build
ninja
ninja install
ninja clean
33 changes: 33 additions & 0 deletions external/hidapi/.cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
alpine_task:
container:
image: alpine:latest
install_script: apk add autoconf automake g++ gcc libusb-dev libtool linux-headers eudev-dev make musl-dev
script:
- ./bootstrap
- ./configure || { cat config.log; exit 1; }
- make
- make install

freebsd11_task:
freebsd_instance:
image: freebsd-11-2-release-amd64
install_script:
- pkg install -y
autoconf automake libiconv libtool pkgconf
script:
- ./bootstrap
- ./configure || { cat config.log; exit 1; }
- make
- make install

freebsd12_task:
freebsd_instance:
image: freebsd-12-1-release-amd64
install_script:
- pkg install -y
autoconf automake libiconv libtool pkgconf
script:
- ./bootstrap
- ./configure || { cat config.log; exit 1; }
- make
- make install
7 changes: 7 additions & 0 deletions external/hidapi/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* text=auto

*.sln text eol=crlf
*.vcproj text eol=crlf

bootstrap text eol=lf
configure.ac text eol=lf
Loading

0 comments on commit 9958bf4

Please sign in to comment.