-
Notifications
You must be signed in to change notification settings - Fork 2
Fixed an issue with jinput native binary on Apple Silicon #7
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
base: master
Are you sure you want to change the base?
Conversation
|
Thanks. What platforms and matlab versions did you test the output with? |
|
Tested with macOS 15.4.1 on M1 Pro and Matlab R2025a |
|
Just tested on Windows 11 x64 + Matlab R2025a - the previous commit resulted in Java runtime errors. Namely, the newer Jinput version 2.0.10 (which added macOS Apple Silicon support) was compiled with release flag for JRE version 17. Update in the newest commit solves the issue by recompiling Jinput during mvn package for JRE version 8. Now it is tested working on both macOS 15.4.1 and Windows 11. |
|
I hate when that happens. The ecosystem has largely moved beyond Java 8, but we'll need to support it for MATLAB indefinitely. Do the native sources need to get compiled as well? If so, does CI need to setup specific compilers? |
|
The native sources remain precompiled, only the Java classes need to be rebuilt (both "core" and platform-specific plugins). |
|
I haven't forgotten about this, but I'd like to run my own tests on different platforms and probably won't be able to get to this until next week. Sorry for the delay. |
|
No problem, thank you for the project and for verifying the changes! Please let me know if I can assist you with something. |
src/main/assembly/release.xml
Outdated
| <!-- Copy libjinput-osx.jnilib from natives and rename to libjinput-osx.dylib --> | ||
| <file> | ||
| <source>${project.build.directory}/natives/libjinput-osx.jnilib</source> | ||
| <outputDirectory>/matlab/lib/</outputDirectory> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Causes errors on Windows
[INFO] --- assembly:3.0.0:single (make-assembly) @ input ---
[WARNING] Parameter 'finalName' is read-only, must not be used in configuration
[INFO] Reading assembly descriptor: src/main/assembly/release.xml
[ERROR] OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /matlab/lib/
[INFO] Building zip: E:\HEBI\MatlabInput-fork\target\matlab-input-1.2.2.zip
[ERROR] OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /matlab/lib/
[INFO] Building tar: E:\HEBI\MatlabInput-fork\target\matlab-input-1.2.2.tar.gz
[ERROR] OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /matlab/lib/
[INFO] Copying files to E:\HEBI\MatlabInput-fork\target\matlab-input-1.2.2
[WARNING] Assembly file: E:\HEBI\MatlabInput-fork\target\matlab-input-1.2.2 is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment.change to <outputDirectory>matlab/lib/</outputDirectory> without the leading slash
|
When running [INFO] --- assembly:3.0.0:single (make-assembly) @ input ---
[WARNING] Parameter 'finalName' is read-only, must not be used in configuration
[INFO] Reading assembly descriptor: src/main/assembly/release.xml
[ERROR] OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /matlab/lib/
[INFO] Building zip: E:\HEBI\MatlabInput-fork\target\matlab-input-1.2.2.zip
[ERROR] OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /matlab/lib/
[INFO] Building tar: E:\HEBI\MatlabInput-fork\target\matlab-input-1.2.2.tar.gz
[ERROR] OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /matlab/lib/
[INFO] Copying files to E:\HEBI\MatlabInput-fork\target\matlab-input-1.2.2
[WARNING] Assembly file: E:\HEBI\MatlabInput-fork\target\matlab-input-1.2.2 is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment.after fixing that I get a I don't have a physical joystick here at the moment, so I can't test that part. |
|
Apologies for the late response. The newest commit solves this problem; apparently, the newer version of jinput requires including awt-plugin dependency explicitly in the pom.xml file. Now, both HebiKeyboard and HebiJoystick appear to work correctly. Tested on Windows 11 x64 + Matlab R2025a, I will run another test on macOS this week. |
Fixes the following jinput issue: jinput/jinput#325