Skip to content

[Feat] Support Epic's launch-able addons/DLCs #3317

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 4 commits into from
Jan 2, 2024
Merged

Conversation

CommandMC
Copy link
Collaborator

This PR adds support for launch-able DLCs (for Epic/Legendary), used for the recent Fortnite "Experiences" and the Unreal Editor for Fortnite

I can't test this that well, as I don't have a Windows system with Fortnite installed, but it appears to be working. Further tests from people on our Discord might be coming soon


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)

This also factors out the actual reading & parsing of the file into a
new function (which will be required by the next commit)
This de-couples the shape of "launchArguments" from this option, which
allows us to encode more detailed information in it (which will happen
in the next commit)
The backend is now responsible for providing launch options. For GOG
this required no changes, Amazon and sideloaded Games don't support
launch options at all (so they just return an empty array).
Legendary was a little more difficult: Other than the options listed in
the game's metadata, launch options can also be added by the following:
- If a DLC has an executable set, that DLC is also launch-able through
  Legendary
- If a DLC has the "AdditionalCommandLine" attribute set, launching the
  game with the parameters specified is supposed to launch the DLC
The latter is rather easy to implement, while the former requires
re-thinking how we do launch arguments:

"LaunchOption" is now an object with a type & type-specific properties.
Its former shape is preserved in "BaseLaunchOption", which is still the
only available option for anything non-Legendary.
"DLCLaunchOption" is new, and holds the AppName of a DLC to launch
instead of the main game.

With this done, Legendary's "launch" function can simply replace the
AppName passed to Legendary if a DLC launch option is passed to it.
@CommandMC CommandMC added the pr:testing This PR is in testing, don't merge. label Dec 13, 2023
@CommandMC CommandMC self-assigned this Dec 13, 2023
@flavioislima
Copy link
Member

flavioislima commented Dec 13, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@CommandMC
Copy link
Collaborator Author

I have read the CLA Document and I hereby sign the CLA

@arielj
Copy link
Collaborator

arielj commented Dec 14, 2023

Code looks good to me, but I have no way to test this.

This is only for Fortnite, right?

@CommandMC
Copy link
Collaborator Author

Yes

@CommandMC CommandMC added pr:ready-for-review Feature-complete, ready for the grind! :P and removed pr:testing This PR is in testing, don't merge. labels Dec 14, 2023
@Etaash-mathamsetty
Copy link
Member

could you update the legendary binaries to the latest release?

@CommandMC
Copy link
Collaborator Author

Latest release's binaries don't alter this functionality (we'd have to use anything after 1841da5 for that), so I'd prefer doing that in a separate PR

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.

LGTM although I cannot test the feature itself.

@CommandMC CommandMC merged commit 747523b into main Jan 2, 2024
@CommandMC CommandMC deleted the feat/dlc-launch branch January 2, 2024 14:29
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators Jan 2, 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
Development

Successfully merging this pull request may close these issues.

4 participants