Boomaa23 / open-ds

A reverse-engineered lightweight cross-platform FRC Driver Station
https://boomaa23.github.io/open-ds/
Other
42 stars 8 forks source link

Compatibility with ARM on Windows #24

Open Anthony2be opened 4 months ago

Anthony2be commented 4 months ago

When trying to run the file it gives this error

PS C:\Users\adubo\Downloads> java -jar open-ds-v0.2.4.jar
Exception in thread "main" com.boomaa.opends.util.NativeSystemError: Unsupported architecture aarch64
        at com.boomaa.opends.util.Architecture.getCurrent(Architecture.java:22)
        at com.boomaa.opends.util.Libraries.init(Libraries.java:18)
        at com.boomaa.opends.display.DisplayEndpoint.main(DisplayEndpoint.java:64)
Boomaa23 commented 4 months ago

There's a small bug that broke aarch64 support with v0.2.4. Using the latest commit in the master branch should resolve this issue. Here's the commit that fixes the issue: https://github.com/Boomaa23/open-ds/commit/1638bb121c1a36452a3a04d82503e07c80cd5010.

You can either build it yourself or download it from here (if you're in the US): https://opends.aptapus.net/builds/a796a01.jar

Boomaa23 commented 4 months ago

That being said I don't have an aarch64 windows computer so it may have issues with not being able to find the native function bindings. Please let me know if this is the case; and if so there may be something you can provide to fix it for the whole repo as well.

Anthony2be commented 4 months ago

That being said I don't have an aarch64 windows computer so it may have issues with not being able to find the native function bindings. Please let me know if this is the case; and if so there may be something you can provide to fix it for the whole repo as well.

yep this is the case, currently it displays this error on start

PS C:\Users\adubo\Downloads> java -jar a796a01.jar
2024-07-10T23:21:31.342 [INFO]: Starting OpenDS
Exception in thread "main" com.boomaa.opends.util.NativeSystemError: Could not find native file (invalid system configuration): opends-lib-win32-aarch64.dll
        at com.boomaa.opends.util.Libraries.init(Libraries.java:32)
        at com.boomaa.opends.display.DisplayEndpoint.main(DisplayEndpoint.java:75)

What should I do to get the native bindings?

Anthony2be commented 4 months ago

I tried building the bindings myself but I unfortunately have no idea how cmake works and I couldn’t get it to run the file

Anthony2be commented 4 months ago

okay finally got the native bindings and got it to build but now its giving this error when I try to run it

PS C:\Users\adubo\source\repos\open-ds\target> java -jar open-ds-v0.2.4-SNAPSHOT-jar-with-dependencies.jar
2024-07-12T01:10:37.776 [INFO]: Starting OpenDS
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to extract the native library /com/github/kwhat/jnativehook/lib/windows/arm64/JNativeHook.dll!

        at com.github.kwhat.jnativehook.GlobalScreen.<clinit>(GlobalScreen.java:91)
        at com.boomaa.opends.display.frames.MainFrame.listenerInit(MainFrame.java:169)
        at com.boomaa.opends.display.frames.MainFrame.display(MainFrame.java:71)
        at com.boomaa.opends.display.DisplayEndpoint.main(DisplayEndpoint.java:80)
Boomaa23 commented 4 months ago

Ah it looks like the library I use for global input capturing doesn't support aarch64 Windows, sorry (source). I haven't had a chance to write my own version of that library but it is on the potential improvements list.