Skip to content

[Fix] Filter out -LoL build when installing wine at boot #3512

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 1 commit into from
Feb 3, 2024

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Feb 3, 2024

When Heroic is opened for the first time, if no wine is found it auto installs the latest available Wine-GE.

This was not filtering out the LoL builds.

You can test this behavior if you have other wines installed by going to main.ts and commenting out the if at:

  setTimeout(async () => {
    // Will download Wine if none was found
    const availableWine = await GlobalConfig.get().getAlternativeWine()
    DXVK.getLatest()
    Winetricks.download()
    if (!availableWine.length) {
      downloadDefaultWine()
    }
  }, 2500)

like:

  setTimeout(async () => {
    // Will download Wine if none was found
    DXVK.getLatest()
    Winetricks.download()
    downloadDefaultWine()
  }, 2500)

Fixes #3511


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:ready-for-review Feature-complete, ready for the grind! :P label Feb 3, 2024
@arielj arielj requested review from a team, flavioislima, CommandMC, Etaash-mathamsetty, Nocccer and imLinguin and removed request for a team February 3, 2024 13:26
Copy link
Member

@imLinguin imLinguin left a comment

Choose a reason for hiding this comment

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

tested, works as expected

@arielj arielj merged commit 5c5e0fc into main Feb 3, 2024
@arielj arielj deleted the ignore-LoL-for-auto-wine-install branch February 3, 2024 14:45
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators Feb 3, 2024
@Nocccer
Copy link
Collaborator

Nocccer commented Feb 3, 2024

Wierd. It means my filtering does not work here:

// sort out specific versions like LoL or diablo wine
const latest =
releases.find((release) => /\d+-\d+$/.test(release.version)) ??

Actually i would adapt this isntead adding a filter on top!

Update:
Ok it still works. Wonder why it still downloads LoL and not the first wine-ge in the list of available wine-ge?
image

@arielj
Copy link
Collaborator Author

arielj commented Feb 3, 2024

Wierd. It means my filtering does not work here:

// sort out specific versions like LoL or diablo wine
const latest =
releases.find((release) => /\d+-\d+$/.test(release.version)) ??

Actually i would adapt this isntead adding a filter on top!

Update: Ok it still works. Wonder why it still downloads LoL and not the first wine-ge in the list of available wine-ge? image

this is unrelated to installing wine-ge-latest, it's a different code path

wine-ge-latest is indeed the last one that is not -LoL

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.

Heroic will automatically install the -LoL version if it is the latest released Wine-GE version.
3 participants