diff --git a/README.md b/README.md index 2a6026d..7b2cdd4 100644 --- a/README.md +++ b/README.md @@ -3,36 +3,13 @@ ## Install/Update -In **Steam Deck**'s desktop mode, open *Konsole*. +Open this page in the browser in **Steam Deck**'s desktop mode. -Execute command: +Download [Update File](https://github.com/kmicki/SteamDeckGyroDSU/releases/latest/download/update-sdgyrodsu.desktop), save it to Desktop and run it by touching or double-clicking *Update GyroDSU*. - bash <(curl -sL https://raw.githubusercontent.com/kmicki/SteamDeckGyroDSU/master/pkg/update.sh) - -Above command will download the binary package and install it. It can be also used to update to the newest version at any time. - -When **SteamDeckGyroDSU** is already installed, it can also be updated by running following command: - - $HOME/sdgyrodsu/update.sh - -To uninstall: - - $HOME/sdgyrodsu/uninstall.sh - -### Remarks about update from version 1.* - -Versions **1.\*** of **SteamDeckGyroDSU** required superuser access to be installed. - -Versions **2.0** and above don't need it. - -Still, after update from **1.\*** to **2.0** or higher, the changes done with superuser access will be left in the system. -Uninstall script will not remove them anymore since version **2.0**. - -Reverting those changes is not necessary but can be done by executing following command (requires superuser access): - - $HOME/sdgyrodsu/v1cleanup.sh +This Desktop shortcut may be used also to update the *SteamDeckGyroDSU* to the most recent version. -after version **2.0** or above is installed. +To uninstall, run *Uninstall GyroDSU* from Desktop by touching or double-clicking. ## Usage diff --git a/pkg/install.sh b/pkg/install.sh index 475b271..f4fab5f 100755 --- a/pkg/install.sh +++ b/pkg/install.sh @@ -64,4 +64,14 @@ if systemctl --user -q enable --now sdgyrodsu.service >/dev/null; then else echo -e "\e[1mFailed enabling the service.\e[0m" exit 28 +fi + +echo "Setting up desktop shortcuts..." +cp update-sdgyrodsu.desktop $HOME/Desktop/ >/dev/null +if chmod +x $HOME/Desktop/update-sdgyrodsu.desktop >/dev/null; then + echo "Update shortcut copied." +fi +cp uninstall-sdgyrodsu.desktop $HOME/Desktop/ >/dev/null +if chmod +x $HOME/Desktop/uninstall-sdgyrodsu.desktop >/dev/null; then + echo "Uninstall shortcut copied." fi \ No newline at end of file diff --git a/pkg/uninstall-sdgyrodsu.desktop b/pkg/uninstall-sdgyrodsu.desktop new file mode 100755 index 0000000..382acb0 --- /dev/null +++ b/pkg/uninstall-sdgyrodsu.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Exec=~/sdgyrodsu/uninstall.sh +Icon=delete +Name[en_US]=Uninstall GyroDSU +Name=Uninstall GyroDSU +StartupNotify=false +Terminal=true +Type=Application diff --git a/pkg/uninstall.sh b/pkg/uninstall.sh index 5e2ed2a..487d6a1 100755 --- a/pkg/uninstall.sh +++ b/pkg/uninstall.sh @@ -11,7 +11,10 @@ rm $HOME/sdgyrodsu/update.sh >/dev/null 2>&1 rm $HOME/sdgyrodsu/uninstall.sh >/dev/null 2>&1 rm $HOME/sdgyrodsu/v1cleanup.sh >/dev/null 2>&1 rm $HOME/sdgyrodsu/logcurrentrun.sh >/dev/null 2>&1 +rm $HOME/Desktop/uninstall-sdgyrodsu.desktop >/dev/null 2>&1 rm -d $HOME/sdgyrodsu >/dev/null 2>&1 echo "Uninstalling complete." +read -n 1 -s -r -p "Finished. Press any key to exit." +echo " " diff --git a/pkg/update-sdgyrodsu.desktop b/pkg/update-sdgyrodsu.desktop new file mode 100755 index 0000000..2c9a77b --- /dev/null +++ b/pkg/update-sdgyrodsu.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Exec=bash <(curl -sL https://raw.githubusercontent.com/kmicki/SteamDeckGyroDSU/master/pkg/update.sh) +Icon=keyboard-caps-disabled +Name[en_US]=Update GyroDSU +Name=Update GyroDSU +StartupNotify=false +Terminal=true +Type=Application