Vortex: Gate Pre-Release Installation Behind Checkbox #802
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Currently SteamTinkerLaunch always defaults to downloading the latest Vortex release, even if that is a pre-release. This may not be desirable for any number of reasons, including stability, and that I believe it defaults users to the "Beta" release channel (which is not a good idea under Wine).
There was a checkbox existing already on the Global Menu to use Vortex pre-releases, but this checkbox does nothing. In fact, the tooltip was not even properly displayed as the variable used to set the description was incorrect (missing an underscore in
DESC_USEVORTEXPRERELEASE
).This PR adds functionality to this checkbox. We check if this checkbox is enabled and if it is, we pass a new optional parameter to
getLatestGitHubExeVer
. This parameter controls the URL that we send towget
in order togrep
for the latest tag.Implementation
When we're fetching the latest regardless of whether it's stable or pre-release, we grep the
https://github.com/orguser/project/releases/tags
URL and get the first link on this page which matches a set tags regex, which in the case of MO2, Vortex, and HMM, points to the latest release.This PR changes the logic so that if we want the latest stable, we
wget
the urlhttps://github.com/orguser/project/releases/latest
, which will always point to the latest stable tagged release. For Vortex, currently1.8.1
is the latest stable and1.8.2
is the latest pre-release. Thereleases/latest
page will point to1.8.1
, but thereleases/tags
URL will have a list of all release tags in descending order, including pre-release tags. The regex we use to get the first matching URL that has a release version works for thereleases/tags
andreleases/latest
page, so we only need to change the value ofTAGSURL
based on whetherEXCLUDEPRERELEASES
(the checkbox value) is true (1
) or not. The rest ofgetLatestGitHubExeVer
should remain unchanged. And since this is an optional parameter, there should be no breaking changes to this function as a result of this PR.This will not retroactively impact Vortex installations, it will only apply to fresh installations.
Adjacent Work
This PR is the beginning of some work to try and improve stability under Vortex, given the recent breakage under Wine requiring newer GE installations. There are two pieces of future work that will add to the usefulness of this PR:
setVortSet "settings.update.channel=\"\\\"$NEXUPDATECHANNEL\\\"\""
, which should allow users to stay on the current stable release that they install. If this option is disabled, Vortex should default to pre-release if the checkbox option from this PR is enabled, and otherwise revert to stable.TODO:
steamtinkerlaunch vortex download