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

Windows Support for CLI interface #2165

Open
wants to merge 112 commits into
base: master
Choose a base branch
from

Conversation

kangcliff
Copy link

Implements the underlying device IO interface for Windows in hidapi submodule, as I wasn't able to get the devices working with #1971. For now only the CLI interface is working as getting GTK to work on Windows requires the mingw environment. Devices I tested:

  • MX Master 3 for Business
  • MX Keys for Business

(with both Bolt receiver and Bluetooth)
Note: Requires building cython-hidapi dependency from source as I also pushed there for the missing bus_type field, changes not on pip yet.

@pfps
Copy link
Collaborator

pfps commented Nov 4, 2023

This is going to require some investigation.

@pfps
Copy link
Collaborator

pfps commented Nov 4, 2023

Have to talked to @markopy about hidapi?

@pfps
Copy link
Collaborator

pfps commented Nov 4, 2023

The style checks appear to have failed. Can you look into this? Ideally you should run the style checks locally as part of your local commit process.

kangcliff and others added 4 commits November 27, 2023 01:03
* Add support for macOS via hidapi

* Style fixes

* Ignore keyboard and mouse input devices

* Don't require pyudev on mac and windows

* Fix debug log format error

* More logging for failed hidpp checks

* Don't try to load hid_darwin_set_open_exclusive on windows

* Bring back button for rule editor since some rules will work

---------

Co-authored-by: markopy <(none)>
Co-authored-by: Peter F. Patel-Schneider <[email protected]>
@pfps
Copy link
Collaborator

pfps commented Nov 28, 2023

@kangcliff PR #1971 was merged. Can you update this PR to work off the current master?

@kangcliff
Copy link
Author

@pfps I rebased it on current master, thinking now with the mac support MR being merged, it seems like a better idea to rework that to be based on cython_hidapi? That would be easier to read through than relying on ctypes loading the hidapi C library.

@pfps
Copy link
Collaborator

pfps commented Nov 29, 2023

It looks as if a style check failed.

Can you also try to get the MacOS commits removed so that it is easy to see the changes you made?

Your change sounds reasonable. Give it a try.

MattHag and others added 19 commits February 18, 2024 06:10
Introduces unit tests for Solaar.

Related pwr-Solaar#1097
device: move some imports to top of modules

device: break up imports loop with device descriptors

device: break up imports loop by moving a function from notifications.py to setting_templates.py

device: break import loop between device.py and diversion.py by using device to access method
ui: move imports in about.py to top of file

ui: move imports to top of notify.py

ui: move imports to top of window.py

ui: reorder imports at beginning of __init__.py

ui: move imports to top of tray.py

ui: move common code out of __init__.py to common.py

ui: move imports to top of __init___.py
solaar: move imports to top of files

solaar: move more imports to top of files

solaar: guard Gtk, etc imports with correct version
device: move imports of ui modules to beginning of files

logitech_receiver: remove imports from __init__.py
* Show pytest coverage in GitHub CI tests

Related pwr-Solaar#1097

* Extend Makefile with installation and test targets

Refactor setup steps to unify commands between Linux and macOS.
Move bash commands into Makefile for consistency and enable local
execution of GitHub CI commands corresponding Makefile targets.

Install on Ubuntu:
make install_ubuntu

Install on Ubuntu for development:
make install_ubuntu PIP_ARGS=."[test]"

Fixes pwr-Solaar#2303

* Improve name of GitHub test actions

Related pwr-Solaar#2303
* Show pytest coverage in GitHub CI tests

Related pwr-Solaar#1097

* Extend Makefile with installation and test targets

Refactor setup steps to unify commands between Linux and macOS.
Move bash commands into Makefile for consistency and enable local
execution of GitHub CI commands corresponding Makefile targets.

Install on Ubuntu:
make install_ubuntu

Install on Ubuntu for development:
make install_ubuntu PIP_ARGS=."[test]"

Fixes pwr-Solaar#2303

* Improve name of GitHub test actions

Related pwr-Solaar#2303

* Upgrade GitHub actions to Node.js 20

Replaces deprecated Node.js 16 actions.

Related pwr-Solaar#2256, pwr-Solaar#2284
@pfps
Copy link
Collaborator

pfps commented Feb 20, 2024

@kangcliff There are some updates that are needed for this to fit with the current version of Solaar.

@kangcliff
Copy link
Author

how to use cli version for windows? thx

I haven't tried out the cli, I was using this as an API for my personal project.

@pfps
Copy link
Collaborator

pfps commented Feb 20, 2024

Thanks, except that this PR now has a lot of PRs that have been merged into Solaar. I'm not sure how this happened.

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.

9 participants