CircuitSim icon indicating copy to clipboard operation
CircuitSim copied to clipboard

Support amd64 and aarch64 in one jar

Open ausbin opened this issue 1 year ago • 4 comments

I wrote a long comment in the diff explaining how this works.

The main downside for this is that we write the native libraries to the same directory as the jar (especially considering running multiple copies of CircuitSim).

Hopefully we can use this as a starting point. Right now I don't like the idea of dumping a bunch of .dylibs on a poor M1 student's desktop, even if it does make CircuitSim run without strange third-party java builds

ausbin avatar Sep 02 '23 10:09 ausbin

Scoured the JavaFX source and uploaded a new revision that puts the libraries in a temporary directory

ausbin avatar Sep 03 '23 00:09 ausbin

Agreed 👍

brandonvu99 avatar Sep 03 '23 01:09 brandonvu99

Tested with the following systems:

  • Headless Ubuntu 20.04 aarch64
  • Debian bookworm x86_64
  • Windows x86_64
  • macOS x86_64. This revealed the problem fixed by e2a9bee45365081de330887d3a07592c2092b0fb
  • macOS aarch64

Merged this into the 2110 fork and released our own 1.9.2b release. Releasing it to students soon, we'll see how it goes!

ausbin avatar Sep 04 '23 20:09 ausbin

Pushed up a couple of tweaks we're deploying in the 2110 fork and autograders:

  1. Don't dump the full stack trace when we can't delete the temporary directory for some reason. This was getting thrown for every invocation on Windows and looked scary when running autograders
  2. Simply turn off all the tricks in this PR for Windows. This means macOS/Linux users get the benefit of amd64+aarch64 support, but Windows users don't have their disks silently filled up with .dlls. More details in code comments

ausbin avatar Sep 09 '23 05:09 ausbin