Skip to content

[Tech] Download helper binaries instead of storing them in the repo #3849

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

Merged
merged 5 commits into from
Jul 21, 2024

Conversation

CommandMC
Copy link
Collaborator

@CommandMC CommandMC commented Jul 3, 2024

Storing Legendary, gogdl, and Nile in this repo directly meant that updating them increases the size of our .git folder substantially. This is not a sustainable solution.
Instead, we now download them from GitHub, using nightly.link as a middle-man (to avoid authenticating). Subsequently, the current binaries were deleted.

Where exactly the binaries come from is tracked using a run ID stored in the update script (meta/downloadHelperBinaries.ts). Thus, changing this is as easy as changing that ID & re-running pnpm download-helper-binaries.

The current workflow run IDs point to the latest ones available in their respective repositories. As such, this PR updates Legendary and gogdl (resolving issues with EA app detection and repeated "Galaxy Common Redistributables" downloads).

You will have to run pnpm download-helper-binaries manually when testing this PR / after it's merged, as well as every time the run ID changes. I opted for not doing this automatically to lessen the load on nightly.link, as the script currently does not check whether the binaries have actually changed (a follow-up PR might change this). Binaries are also automatically re-downloaded when checking out branches, provided they changed

Heroic will now also use different binaries depending on your CPU architecture (with x86_64 and arm64 being the supported options). Currently the only platform with arm64 binaries is macOS, but Windows and Linux binaries can be easily added in the future

Closes #3846
Closes #3833


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@CommandMC CommandMC requested review from a team, arielj, flavioislima, Etaash-mathamsetty, Nocccer and imLinguin and removed request for a team July 3, 2024 19:17
@CommandMC CommandMC self-assigned this Jul 3, 2024
@CommandMC CommandMC added the pr:ready-for-review Feature-complete, ready for the grind! :P label Jul 3, 2024
@CommandMC CommandMC force-pushed the tech/binary-download branch from 80a60ea to 5d19d50 Compare July 3, 2024 19:26
@Etaash-mathamsetty Etaash-mathamsetty mentioned this pull request Jul 11, 2024
4 tasks
Copy link
Collaborator

@arielj arielj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I tested it on my intel mac and if fixes the nile error I was seeing too.

Added a few comments but not blockers

We can simply tell it to unpack everything in the `bin` folder, since we already
only include the binaries we need
We can also use glob patters for the `files` option to include binaries
for all architectures. Ideally we should figure out a way to only include the
files for the arch we're building, but I don't think EB has an option for that
@CommandMC CommandMC force-pushed the tech/binary-download branch from 17f7103 to 5061abe Compare July 15, 2024 22:05
@imLinguin imLinguin added this to the 2.15.0 milestone Jul 18, 2024
Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
If possible add the fallback for ARM64 > x64, otherwise do it in another PR.

@CommandMC CommandMC merged commit 6eecf22 into main Jul 21, 2024
9 checks passed
@CommandMC CommandMC deleted the tech/binary-download branch July 21, 2024 15:27
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators Jul 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
4 participants