From d67b83c58ee17ce1fd15cf3aa5bb49eb4b958080 Mon Sep 17 00:00:00 2001 From: Glenn Hope Date: Fri, 29 Nov 2024 22:32:49 +0800 Subject: [PATCH] Installer fixes --- TODO | 4 ++++ scripts/decktricks_install.desktop | 2 +- scripts/decktricks_install.sh | 11 +++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 681229c..49b28df 100644 --- a/TODO +++ b/TODO @@ -8,6 +8,7 @@ Prerequisites: [] flatpak [] systemctl +[] make decktricks stable installer point to discord or reddit, and beta point to github? [] make "decktricks gui" default to godot, run "decktricks-gui" [] cargo clippy in CI [] make Dockerfile pull 'latest' instead of main @@ -219,6 +220,9 @@ Notes from running in container: cp in /usr/lib/libcrypto.so.3 and /usr/lib/libssl.so.3 systemctl is not accessible, and most relevant binaries probably won't be +Potentially popular "support me and" features: +[] "launch in nested desktop" + Tips: * Use STEAM+Rstick to move mouse, STEAM+R2/R1/L2/L1 to click diff --git a/scripts/decktricks_install.desktop b/scripts/decktricks_install.desktop index 4e22ad7..cfc534d 100755 --- a/scripts/decktricks_install.desktop +++ b/scripts/decktricks_install.desktop @@ -1,7 +1,7 @@ #!/usr/bin/env xdg-open [Desktop Entry] Name=Install Decktricks -Exec=bash -xc '( DTDIR="$HOME/.local/share/decktricks" && mkdir -p "$DTDIR" && cd "$DTDIR" && curl -S -s -L -O --output-dir /tmp --connect-timeout 60 "https://github.com/MrAwesome/decktricks/releases/download/stable/decktricks.tar.gz" && tar xvf /tmp/decktricks.tar.gz && ./decktricks_post_install.sh ) || ( echo "Something went wrong. Are you connected to the Internet? If this looks like a bug, please report it at: https://github.com/MrAwesome/decktricks/issues"; read )' +Exec=bash -xc '( curl -fL --connect-timeout 60 "https://github.com/MrAwesome/decktricks/releases/download/stable/decktricks_install.sh" | bash -x ) || ( set +x; echo "======="; echo; echo "[ERROR] Failed to install decktricks! Are you connected to the Internet? If this looks like a bug, please report it at: https://github.com/MrAwesome/decktricks/issues"; read )' Icon=steamdeck-gaming-return Terminal=true Type=Application diff --git a/scripts/decktricks_install.sh b/scripts/decktricks_install.sh index 7a693aa..8e5c2ee 100755 --- a/scripts/decktricks_install.sh +++ b/scripts/decktricks_install.sh @@ -1,3 +1,14 @@ #!/bin/bash +set -euxo pipefail +DTDIR="$HOME/.local/share/decktricks" +mkdir -p "$DTDIR" +cd "$DTDIR" +curl -L -O --progress-bar --output-dir /tmp --connect-timeout 60 "https://github.com/MrAwesome/decktricks/releases/download/stable/decktricks.tar.gz" +tar xvf /tmp/decktricks.tar.gz + +mkdir -p "$HOME"/Desktop +ln -sf "$DTDIR"/decktricks.desktop "$HOME"/Desktop/ + +# TODO: Add to steam here!