Skip to content

[Feat] Auto Download Wine if no version was found in the system #2706

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 10 commits into from
May 30, 2023

Conversation

flavioislima
Copy link
Member

@flavioislima flavioislima commented May 15, 2023

Description

This is the first feature I get from HyperPlay, this is the original PR:
HyperPlay-Gaming/hyperplay-desktop-client#317

It basically checks if there is any Wine/Proton/Crossover available, or at least that it could found, if none was found it downloads the latest Wine-GE on Linux or the latest Wine-Crossover on macOS.
We wanted to implement this in Heroic but I decided to do it first in HyperPlay to check how we could get features and fixes from the fork.

The download happens during startup just like DXVK or when launching a game.
Since most version are around 80 to 100MB I think that should be fine for most people for now, but we can improve this after getting more feedback.

I also think this won't affect anyone on the Steam Deck or that uses Steam on linux to play.
It will affect more people on macOS that does not know what Wine or Crossover are and wants to just download and play a Windows game there.

It also fixes an issue on macOS that was causing games to fail to launch due to not finding the wine prefix.
Also changes the name of the Wine Manager to Compatibility Layer, since it also covers Proton that is not Wine itself.
Might also be a more friendly name.

How to Test

To test this just make sure you rename all folders that have wine on your system like .steam, lutris folder, heroic/tools folder, etc. And check if Heroic will download the correct version on Startup and show it on the Compatibility layer screen.


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)

* i18n: replace wine with compatiility layer

* feat: download recommended wine version if none was found

* i18n: updated keys

* other: show message if no wine version was found on settings

* chore: decoupled download wine method

* feat: download wine if none was found on startup

* fix: wineprefix on macOS not being set

* i18n: use only Compatibility Layer label

* fix: do not download LoL version of wine on linux
@flavioislima flavioislima changed the title [Feat] Auto Download Wine if no version was found in the system (#317) [Feat] Auto Download Wine if no version was found in the system May 15, 2023
@flavioislima flavioislima added the pr:ready-for-review Feature-complete, ready for the grind! :P label May 15, 2023
@CommandMC
Copy link
Collaborator

Also changes the name of the Wine Manager to Compatibility Layer, since it also covers Proton that is not Wine itself.

I'm not a huge fan of this, since "Compatibility" could mean anything (for example, https://github.com/luxtorpeda-dev/luxtorpeda and https://github.com/dreamer/boxtron are also "Compatibility tools").
Yes, Proton isn't Wine, but if you'd want to be correct about this everywhere, you'd have to rename a bunch of other things as well ("Wine Version" -> "Compatibility Tool Version" (?), "Wineprefix", etc.)

@imLinguin
Copy link
Member

we might use Luxtorpeda eventually though

@flavioislima
Copy link
Member Author

Also changes the name of the Wine Manager to Compatibility Layer, since it also covers Proton that is not Wine itself.

I'm not a huge fan of this, since "Compatibility" could mean anything (for example, https://github.com/luxtorpeda-dev/luxtorpeda and https://github.com/dreamer/boxtron are also "Compatibility tools"). Yes, Proton isn't Wine, but if you'd want to be correct about this everywhere, you'd have to rename a bunch of other things as well ("Wine Version" -> "Compatibility Tool Version" (?), "Wineprefix", etc.)

Yes, the thing is that we can also add more stuff there in the future like @imLinguin said.
I did not want to change everywhere at first but I can change other places now if you think its better. For me I am good with it

@CommandMC
Copy link
Collaborator

CommandMC commented May 15, 2023

We can of course add other compatibility layers later, that wasn't what I was saying.
I see two potential issues with "Compatibility Layer":

  • Users unfamiliar with Heroic don't immediately know what it does (with Wine Manger, you could at least Google Search for Wine & you'd know what it is)
  • Users familiar with Heroic might expect this "new" Compatibility Layer tab to be able to do more than just manage Wine(/Proton/CrossOver), which it of course currently can't

If we do ever end up adding something like Luxtorpeda, then I'd say Compatibility Layer is a fine name. For now, it's IMO just imprecise for no reason

@CommandMC
Copy link
Collaborator

Sidenote: The name itself is also a little confusing. With it being named "Compatibility Layer", you'd think you can configure one Compatibility Layer, but instead you can install/update/remove different ones. IMO a "Manager" should be in there somewhere (but "Compatibility Layer Manager" is a little long)

@arielj
Copy link
Collaborator

arielj commented May 15, 2023

what do you think if we just do Wine/Proton on linux and Wine/Crossover on mac as the term?

Like Use default Wine/Proton settings Wine/Proton Manager, etc. It makes it super obvious and it's in length between wine and compatibility layer.

I do feel that we should add more content at the top of that section to explain it a bit more, maybe link to some wiki page for example. I think that it doesn't matter that much which name we pick if we allow users to easily find what it does when they enter that section.

@arielj
Copy link
Collaborator

arielj commented May 15, 2023

One thing to add also is that there's another PR turning the Wine Manager section into a Tools Manager section that also would cover things like DXVK/VKD3D. Maybe Tools manager is more generic.

@flavioislima
Copy link
Member Author

Ok, since this discussion can take too long and we don't have any type of metric to use to decide, I will just revert the naming change.
Take a look at the rest of the PR once you guys have the time.

@flavioislima flavioislima requested a review from CommandMC May 29, 2023 09:25
Copy link
Collaborator

@CommandMC CommandMC left a comment

Choose a reason for hiding this comment

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

LGTM from the code, but I haven't had the time to properly test this yet

@flavioislima flavioislima merged commit 8eb4203 into main May 30, 2023
@flavioislima flavioislima deleted the other/hp_changes branch May 30, 2023 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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