dscalzi / HeliosLauncher

☀ Custom launcher for modded minecraft written in Electron and Node.js
MIT License
838 stars 1.73k forks source link

(Apple Silicon) aarch64 OpenJDK detect and install #273

Closed r1tsuu closed 1 year ago

r1tsuu commented 1 year ago

On macOS with Apple Silicon processors ARM OpenJDK has ~100% perfomance boost over AMD64.

On the computer with ARM processor:

  1. Added auto detect installation path of ARM type OpenJDK and changed to ARM type detection only.
  2. Changed Amazon Corretta url resolving from amd64 to aarch version
GeekCornerGH commented 1 year ago

Linking this pr to the old one if someone came across the old but not the new: #272

dscalzi commented 1 year ago

@r1tsuu I revised the logic a bit, look okay to you? I put in a note since I have to rewrite this as part of the assetguard 2 effort. I don't want to go too crazy on v1 and this seems like it would probably work. I don't have an m1 mac so I can't test.

If you're good with it I'll merge.

dscalzi commented 1 year ago

A little preview of some of the improvements we'll get from the rewritten code. https://github.com/dscalzi/helios-core/blob/40c568a6a9683b3f11815d9202375a0fa32f5623/lib/java/JavaGuard.ts#L315 Much better parsing of -XshowSettings with typings around the properties.