diff options
| author | AAGaming <aagaming@riseup.net> | 2026-10-17 18:47:46 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-17 18:47:46 -0400 |
| commit | 8f7658963d06ba68a77fdcdea83591cbd6d6c508 (patch) | |
| tree | b25b751764e58d22260a8af6a77189ab4ba02dac | |
| parent | 9b4e29d2a33b969da11114cce18422a87425f60e (diff) | |
| parent | 2b903e6057e9081158a6573e0399912f06d6ba36 (diff) | |
| download | decky-installer-8f7658963d06ba68a77fdcdea83591cbd6d6c508.tar.gz decky-installer-8f7658963d06ba68a77fdcdea83591cbd6d6c508.zip | |
Merge pull request #29 from virtudude/arm64-installer-support
feat: select release asset by CPU architecture
| -rw-r--r-- | cli/install_prerelease.sh | 17 | ||||
| -rw-r--r-- | cli/install_release.sh | 17 | ||||
| -rw-r--r-- | gui/user_install_script.sh | 16 |
3 files changed, 41 insertions, 9 deletions
diff --git a/cli/install_prerelease.sh b/cli/install_prerelease.sh index b232906..b389776 100644 --- a/cli/install_prerelease.sh +++ b/cli/install_prerelease.sh @@ -30,17 +30,28 @@ USER_DIR="$(getent passwd $SUDO_USER | cut -d: -f6)" HOMEBREW_FOLDER="${USER_DIR}/homebrew" # Create folder structure -rm -rf "${HOMEBREW_FOLDER}/services" -sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/services" sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/plugins" sudo -u $SUDO_USER touch "${USER_DIR}/.steam/steam/.cef-enable-remote-debugging" # if installed as flatpak, put .cef-enable-remote-debugging there [ -d "${USER_DIR}/.var/app/com.valvesoftware.Steam/data/Steam/" ] && sudo -u $SUDO_USER touch "${USER_DIR}/.var/app/com.valvesoftware.Steam/data/Steam/.cef-enable-remote-debugging" +# Release assets are per CPU architecture; the installed binary is always PluginLoader +case "$(uname -m)" in + aarch64|arm64) ASSET="PluginLoader-arm64" ;; + *) ASSET="PluginLoader" ;; +esac + # Download latest release and install it RELEASE=$(curl -s 'https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases' | jq -r "first(.[] | select(.prerelease == "true"))") VERSION=$(jq -r '.tag_name' <<< ${RELEASE} ) -DOWNLOADURL=$(jq -r '.assets[].browser_download_url | select(endswith("PluginLoader"))' <<< ${RELEASE}) +DOWNLOADURL=$(jq -r --arg asset "$ASSET" '.assets[] | select(.name == $asset) | .browser_download_url' <<< ${RELEASE}) +# Only replace the existing install once there is something to download +if [ -z "$DOWNLOADURL" ]; then + echo "No Decky Loader pre-release with a $ASSET build was found, or GitHub could not be reached." + exit 1 +fi +rm -rf "${HOMEBREW_FOLDER}/services" +sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/services" printf "Installing version %s...\n" "${VERSION}" curl -L $DOWNLOADURL --output ${HOMEBREW_FOLDER}/services/PluginLoader diff --git a/cli/install_release.sh b/cli/install_release.sh index 6077a58..d98df0e 100644 --- a/cli/install_release.sh +++ b/cli/install_release.sh @@ -30,17 +30,28 @@ USER_DIR="$(getent passwd $SUDO_USER | cut -d: -f6)" HOMEBREW_FOLDER="${USER_DIR}/homebrew" # Create folder structure -rm -rf "${HOMEBREW_FOLDER}/services" -sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/services" sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/plugins" sudo -u $SUDO_USER touch "${USER_DIR}/.steam/steam/.cef-enable-remote-debugging" # if installed as flatpak, put .cef-enable-remote-debugging there [ -d "${USER_DIR}/.var/app/com.valvesoftware.Steam/data/Steam/" ] && sudo -u $SUDO_USER touch "${USER_DIR}/.var/app/com.valvesoftware.Steam/data/Steam/.cef-enable-remote-debugging" +# Release assets are per CPU architecture; the installed binary is always PluginLoader +case "$(uname -m)" in + aarch64|arm64) ASSET="PluginLoader-arm64" ;; + *) ASSET="PluginLoader" ;; +esac + # Download latest release and install it RELEASE=$(curl -s 'https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases' | jq -r "first(.[] | select(.prerelease == "false"))") VERSION=$(jq -r '.tag_name' <<< ${RELEASE} ) -DOWNLOADURL=$(jq -r '.assets[].browser_download_url | select(endswith("PluginLoader"))' <<< ${RELEASE}) +DOWNLOADURL=$(jq -r --arg asset "$ASSET" '.assets[] | select(.name == $asset) | .browser_download_url' <<< ${RELEASE}) +# Only replace the existing install once there is something to download +if [ -z "$DOWNLOADURL" ]; then + echo "No Decky Loader release with a $ASSET build was found, or GitHub could not be reached." + exit 1 +fi +rm -rf "${HOMEBREW_FOLDER}/services" +sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/services" printf "Installing version %s...\n" "${VERSION}" curl -L $DOWNLOADURL --output ${HOMEBREW_FOLDER}/services/PluginLoader diff --git a/gui/user_install_script.sh b/gui/user_install_script.sh index 216ccdf..ed32814 100644 --- a/gui/user_install_script.sh +++ b/gui/user_install_script.sh @@ -127,21 +127,31 @@ fi ( echo "15" ; echo "# Creating file structure" ; -rm -rf "${HOMEBREW_FOLDER}/services" -sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/services" sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/plugins" sudo -u $SUDO_USER touch "${USER_DIR}/.steam/steam/.cef-enable-remote-debugging" # if installed as flatpak, put .cef-enable-remote-debugging there [ -d "${USER_DIR}/.var/app/com.valvesoftware.Steam/data/Steam/" ] && sudo -u $SUDO_USER touch "${USER_DIR}/.var/app/com.valvesoftware.Steam/data/Steam/.cef-enable-remote-debugging" echo "30" ; echo "# Finding latest $BRANCH"; +# Release assets are per CPU architecture; the installed binary is always PluginLoader +case "$(uname -m)" in + aarch64|arm64) ASSET="PluginLoader-arm64" ;; + *) ASSET="PluginLoader" ;; +esac if [ "$BRANCH" = 'prerelease' ] ; then RELEASE=$(curl -s 'https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases' | jq -r "first(.[] | select(.prerelease == "true"))") else RELEASE=$(curl -s 'https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases' | jq -r "first(.[] | select(.prerelease == "false"))") fi VERSION=$(jq -r '.tag_name' <<< ${RELEASE} ) -DOWNLOADURL=$(jq -r '.assets[].browser_download_url | select(endswith("PluginLoader"))' <<< ${RELEASE}) +DOWNLOADURL=$(jq -r --arg asset "$ASSET" '.assets[] | select(.name == $asset) | .browser_download_url' <<< ${RELEASE}) +# Only replace the existing install once there is something to download +if [ -z "$DOWNLOADURL" ]; then + zen_nospam --title="Decky Installer" --width=300 --height=100 --error --text "No Decky Loader $BRANCH with a $ASSET build was found, or GitHub could not be reached." + exit 1 +fi +rm -rf "${HOMEBREW_FOLDER}/services" +sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/services" echo "45" ; echo "# Installing version $VERSION" ; # make another zenity prompt while downloading the PluginLoader file, I do not know how this works |
