ra4king / CircuitSim

Basic Circuit Simulator
https://ra4king.github.io/CircuitSim
BSD 3-Clause "New" or "Revised" License
76 stars 27 forks source link

Support amd64 and aarch64 in one jar #93

Open ausbin opened 1 year ago

ausbin commented 1 year ago

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 commented 1 year ago

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

brandonvu99 commented 1 year ago

Agreed 👍

ausbin commented 1 year ago

Tested with the following systems:

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 commented 1 year ago

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