Always get the latest winetricks release

This commit is contained in:
the-sane
2025-10-09 15:33:08 -04:00
parent cd8e7315b5
commit eedd58fb68

View File

@@ -183,11 +183,6 @@ lug_wiki_nixos="https://wiki.starcitizen-lug.org/Tips-and-Tricks#nixos"
rsi_installer_base_url="https://install.robertsspaceindustries.com/rel/2"
rsi_installer_latest_yml="${rsi_installer_base_url}/latest.yml"
# Winetricks download url
winetricks_version="20250102"
winetricks_url="https://raw.githubusercontent.com/Winetricks/winetricks/refs/tags/${winetricks_version}/src/winetricks"
winetricks_next_url="https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"
# Github repo and script version info
repo="starcitizen-lug/lug-helper"
releases_url="https://github.com/${repo}/releases"
@@ -2833,6 +2828,9 @@ download_wine() {
# Download winetricks to a temporary file
# Accepts an optional string argument "next" to download the latest -next version instead of the stable release
download_winetricks() {
# Set variables for the latest winetricks urls
set_latest_winetricks
if [ "$1" = "next" ]; then
# Download the -next version
download_file "$winetricks_next_url" "winetricks" "winetricks"
@@ -2936,6 +2934,13 @@ set_latest_default_runner() {
default_runner_source=0
}
set_latest_winetricks() {
# Winetricks download url
winetricks_version="$(get_latest_release Winetricks/winetricks)"
winetricks_url="https://raw.githubusercontent.com/Winetricks/winetricks/refs/tags/${winetricks_version}/src/winetricks"
winetricks_next_url="https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"
}
# MARK: get_latest_release()
# Get the latest release version of a repo. Expects "user/repo_name" as input
# Credits for this go to https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c