Skip to content
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

[Experimental] Automatic installation of known winetricks fixes #3335

Merged
merged 10 commits into from Jan 2, 2024

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Dec 20, 2023

This PR adds an experimental feature to install known winetricks fixes for games when the Prefix is created. This is waaaay less complete than #2176 but it was really simple to implement and we can have this working while the other more complete solution is implemented.

For my library, this PR makes more than 30 games work out of the box.

I added a bunch of known fixes from my tests in https://github.com/arielj/test-appname-winetricks (temporarily while we test things, then I plan to move it into the heroic org). We can update things over time adding more known winetricks fixes (I have more fixes to add but it's late already).

The way this works is:

  • when a game is installed, we try to download the corresponding appName-store.json file from the repository that holds that info in parallel and store it
  • when a prefix is updated, if the experimental feature is toggled on and one of those files is stored matching appName and store, we install the winetricks packages from the json one by one

You can see the list of games I added fixes for in https://github.com/arielj/test-appname-winetricks?tab=readme-ov-file#fixes-in-the-repo, you should be able to install and run any of those out of the box now (you can try with and without the experimental feature and clearing the prefix to compare)

For games that are already installed, you can download the corresponding file from the repo and put it in <heroic-config-path>/fixes/<appName>-<store>.json.


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)

@arielj arielj added the pr:testing This PR is in testing, don't merge. label Dec 20, 2023
@arielj arielj requested review from a team, flavioislima, CommandMC, Etaash-mathamsetty, Nocccer and imLinguin and removed request for a team December 20, 2023 04:49
@Etaash-mathamsetty
Copy link
Member

Etaash-mathamsetty commented Dec 23, 2023

I think legendary supports the game's setup scripts, I think some games can be fixed if we run those rather than creating a long list of winetricks fixes (fall guys for example would be fixed)
This PR is still useful, but maybe we can clump the functionalities together into one PR?

@arielj
Copy link
Collaborator Author

arielj commented Dec 23, 2023

I think legendary supports the game's setup scripts, I think some games can be fixed if we run those rather than creating a long list of winetricks fixes (fall guys for example would be fixed) This PR is still useful, but maybe we can clump the functionalities together into one PR?

I'd rather keep 2 different functionalities in 2 different PRs, they are not really connected to need them together, that would just delay this PR that works independently and it's already implemented and functional

@Etaash-mathamsetty
Copy link
Member

Etaash-mathamsetty commented Dec 24, 2023

maybe we can add a eos overlay thingy as well into the list for winetricks, for games that need it installed. you would need special logic to look for it, but I think that should be added as well

@arielj
Copy link
Collaborator Author

arielj commented Dec 24, 2023

I insist, other features can be added in another PR, I don't see the point of blocking this on something extra that I have to investigate how to do with new logic that is unrelated to what's implemented here

there's a more complex solution that aims to solve multiple cases of workarounds that are not winetricks related in commandmc's PR, check that PR, it has specs to solve a lot of other types of workarounds

@arielj arielj added the pr:ready-for-review Feature-complete, ready for the grind! :P label Dec 26, 2023
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 but I could not find the code that avoids rendering the option on Windows so would be good to double-check.

@arielj
Copy link
Collaborator Author

arielj commented Jan 1, 2024

I'll do 3 things later today:

  • fix conflicts
  • hide the experimental flag on windows
  • transfer the repo from my account to Heroic

@arielj arielj merged commit 9bf746e into main Jan 2, 2024
9 checks passed
@arielj arielj deleted the automatic-winetricks branch January 2, 2024 00:11
@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 pr:testing This PR is in testing, don't merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants