For Top Speed always try to get a valid download link.

This commit is contained in:
Storm Dragon
2026-04-13 19:16:42 -04:00
parent 2ecc0240f9
commit ae37f1a71f
3 changed files with 22 additions and 2 deletions

View File

@@ -1,7 +1,24 @@
#!/usr/bin/env bash
# shellcheck disable=SC2154 # set by linux-game-manager.sh
check_architecture x86_64
download "https://github.com/diamondStar35/top_speed/releases/download/release-build/TopSpeed-linux-x64-Release-v-2026.4.13.1.zip"
releaseMetadataFile="TopSpeed-release-build.json"
releaseMetadataPath="${cache}/${releaseMetadataFile}"
releaseMetadataUrl="https://api.github.com/repos/diamondStar35/top_speed/releases/tags/release-build"
assetPattern='^TopSpeed-linux-x64-Release-v-.*\.zip$'
rm -f "${releaseMetadataPath}"
download_named "${releaseMetadataFile}" "${releaseMetadataUrl}"
assetName="$(jq -r --arg assetPattern "${assetPattern}" '.assets[] | select(.name | test($assetPattern)) | .name' "${releaseMetadataPath}" | head -n 1)"
assetUrl="$(jq -r --arg assetPattern "${assetPattern}" '.assets[] | select(.name | test($assetPattern)) | .browser_download_url' "${releaseMetadataPath}" | head -n 1)"
if [[ -z "${assetName}" ]] || [[ -z "${assetUrl}" ]] || [[ "${assetName}" == "null" ]] || [[ "${assetUrl}" == "null" ]]; then
ui_msgbox "Linux Game Manager" "Linux Game Manager" "Unable to find the latest Top Speed Linux download in the GitHub release metadata."
exit 1
fi
download_named "${assetName}" "${assetUrl}"
mkdir -p "${installPath}/TopSpeed"
unzip -o -d "${installPath}/TopSpeed" "${cache}/TopSpeed-linux-x64-Release-v-2026.4.13.1.zip"
unzip -o -d "${installPath}/TopSpeed" "${cache}/${assetName}"
chmod +x "${installPath}/TopSpeed/TopSpeed"

View File

@@ -7,6 +7,8 @@ Installer and launcher for accessible to the blind games that run natively in Li
As the project grows, more dependencies will most likely be added. When LGM is launched, it will check to make sure it has the required dependencies for it to do the work of downloading and extracting the game. Note that because every distro has a different package manager, dependencies for games themselves will not be resolved. Please consult the game's documentation to find out what is needed for the game to run.
Current base dependencies checked on launch: `7z`, `curl`, `dialog`, `jq`, `yad`, and `unzip`.
## Disabling game entries
To disable a game entry without deleting its script, set the first line of the script to start with `#//`.

View File

@@ -946,6 +946,7 @@ requiredPackages=(
"7z"
"curl"
"dialog"
"jq"
"yad"
"unzip"
)