Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the use of CM108 for PTT on Mac #500

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

mfncooper
Copy link

These changes implement support for PTT using CM108 on a Mac. A few notes:

  • The actual code is exactly the same as for Windows, using the hidapi API, so the changes are little more than updated #if conditions.

  • The CMake changes are slightly complicated by the Windows build using a local copy of some hidapi files, for some reason, instead of using the library itself. The Mac version uses hidapi in the same way as other libraries.

  • In the CMake files, it is unclear to me whether "elseif (NOT WIN32 AND NOT CYGWIN)" means the same thing as "elseif (APPLE)", so they are treated separately in order to avoid breaking other build types.

  • The generic config file has been simplified slightly, since the section on using CM108 for PTT is now common to all of Linux, Windows and Mac.

  • The README has been updated to include a build section for Mac.

These changes have been verified on macOS Ventura 13.6 (Apple M2 silicon) and macOS High Sierra 10.13.6 (Intel), as well as on Linux Mint 20.3 to verify that nothing was broken. I do not have a Windows system to test with.

Support for CM108-based PTT on Mac is provided using the hidapi library
in the same way as on Windows. As such, the code changes are limited
almost entirely to updated #if conditions, treating Windows and Mac in
the same way.
The CMake changes are slightly complicated by the Windows build using
a local copy of some hidapi files, for some reason, instead of using
the hidapi library itself. The Mac version uses hidapi in the same way
as other libraries.

In the CMake files, it is unclear to me whether "elseif (NOT WIN32 AND
NOT CYGWIN)" means the same thing as "elseif (APPLE)", so they are
treated separately in order to avoid breaking other build types.
The generic config file can now be simplified slightly, since the
section on using CM108 for PTT is now common to all of Linux, Windows
and Mac.
Since building on Mac using Homebrew is straightforward, include this
information in a new section of the README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant