diff --git a/overlay/opt/scripts/install_legendary.sh b/overlay/opt/scripts/install_legendary.sh new file mode 100644 index 0000000..a02de73 --- /dev/null +++ b/overlay/opt/scripts/install_legendary.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +### +# File: install_legendary.sh +# Project: scripts +# File Created: Thursday, 1st January 1970 12:00:00 pm +# Author: Console and webGui login account (jsunnex@gmail.com) +# ----- +# Last Modified: Sunday, 16th January 2022 4:54:27 am +# Modified By: Console and webGui login account (jsunnex@gmail.com) +### + +pkg=legendary +script_path=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ); +script_name=$( basename "${BASH_SOURCE[0]}" ) + +github_get_all_release() { + REPO="${1}"; + curl --silent "https://api.github.com/repos/${REPO}/releases" \ + | grep '"tag_name":' \ + | sed -E 's/.*"([^"]+)".*/\1/'; +} + +install() { + if ! command -v ${pkg} >/dev/null; then + # Download/install the latest legendary binary + latest_release=$(github_get_all_release derrod/legendary | head -n1) + download_url="https://github.com/derrod/legendary/releases/download/${latest_release}/legendary" + wget -O "/tmp/legendary-${latest_release}" "${download_url}" + chmod +x /tmp/legendary-${latest_release} + cp -f /tmp/legendary-${latest_release} /usr/bin/legendary-${latest_release} + rm -f /usr/bin/legendary + ln -s /usr/bin/legendary-${latest_release} /usr/bin/legendary + fi + + if ! command -v rare >/dev/null; then + # Install rare for a gui + python3 -m pip install Rare + fi + + if ! command -v steam-legendary-wrapper >/dev/null; then + # Download/install the steam-legendary-wrapper script + wget -O "/tmp/steam-legendary-wrapper.sh" \ + "https://raw.githubusercontent.com/toalex77/steam-legendary-wrapper/main/steam-legendary-wrapper.sh" + chmod +x /tmp/steam-legendary-wrapper.sh + rm -f /usr/bin/steam-legendary-wrapper + cp -f /tmp/steam-legendary-wrapper.sh /usr/bin/steam-legendary-wrapper + fi + + # Remove installer shortcut + rm -f /usr/share/applications/install.legendary.desktop +} + + +#INSTALLER: +source "${script_path}/installer.sh" diff --git a/overlay/opt/scripts/install_lutris.sh b/overlay/opt/scripts/install_lutris.sh index 1f242ca..ab909a0 100755 --- a/overlay/opt/scripts/install_lutris.sh +++ b/overlay/opt/scripts/install_lutris.sh @@ -5,7 +5,7 @@ # File Created: Thursday, 1st January 1970 12:45:00 pm # Author: Console and webGui login account (jsunnex@gmail.com) # ----- -# Last Modified: Sunday, 16th January 2022 2:17:37 am +# Last Modified: Sunday, 16th January 2022 4:54:11 am # Modified By: Console and webGui login account (jsunnex@gmail.com) ### @@ -25,6 +25,9 @@ install() { sed -i '/Exec=lutris %U/c\Exec=/usr/games/lutris %U' /usr/share/applications/net.lutris.Lutris.desktop fi + + # Remove installer shortcut + rm -f /usr/share/applications/install.lutris.desktop } diff --git a/overlay/opt/scripts/install_protonup.sh b/overlay/opt/scripts/install_protonup.sh index 748031c..411d1fe 100644 --- a/overlay/opt/scripts/install_protonup.sh +++ b/overlay/opt/scripts/install_protonup.sh @@ -5,7 +5,7 @@ # File Created: Thursday, 1st January 1970 12:45:00 pm # Author: Console and webGui login account (jsunnex@gmail.com) # ----- -# Last Modified: Sunday, 16th January 2022 2:17:35 am +# Last Modified: Sunday, 16th January 2022 4:55:12 am # Modified By: Console and webGui login account (jsunnex@gmail.com) ### @@ -24,8 +24,9 @@ install() { # Update to the latest version on startup using the users Downloads directory su ${USER} -c "${pkg} -y -o '/home/${USER}/Downloads/'" & fi - # Make sure the desktop icon is removed - rm -f /usr/share/applications/protonup.desktop + + # Remove installer shortcut + rm -f /usr/share/applications/install.protonup.desktop } diff --git a/overlay/usr/share/applications/install.legendary.desktop b/overlay/usr/share/applications/install.legendary.desktop new file mode 100644 index 0000000..59184eb --- /dev/null +++ b/overlay/usr/share/applications/install.legendary.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Installer - Rare/Legendary (Epic Games Commandline Launcher) +Categories=Game; +Exec=/opt/scripts/install_legendary.sh %U +Icon=installsoftware +Terminal=true +Type=Application diff --git a/overlay/usr/share/applications/net.lutris.Lutris.desktop b/overlay/usr/share/applications/install.lutris.desktop similarity index 100% rename from overlay/usr/share/applications/net.lutris.Lutris.desktop rename to overlay/usr/share/applications/install.lutris.desktop diff --git a/overlay/usr/share/applications/protonup.desktop b/overlay/usr/share/applications/install.protonup.desktop similarity index 100% rename from overlay/usr/share/applications/protonup.desktop rename to overlay/usr/share/applications/install.protonup.desktop diff --git a/overlay/usr/share/applications/rare.desktop b/overlay/usr/share/applications/rare.desktop new file mode 100644 index 0000000..3bbdd38 --- /dev/null +++ b/overlay/usr/share/applications/rare.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Rare - (Epic Games Store) +Comment=A frontend for legendary, the open source Epic Games Store alternative +GenericName=Rare - (Epic Games Store) +X-GNOME-FullName=Rare - (Epic Games Store) +Exec=/usr/local/bin/rare %u +Terminal=false +X-MultipleArgs=false +Type=Application +Icon=rare +Categories=Game; diff --git a/overlay/usr/share/pixmaps/legendary.png b/overlay/usr/share/pixmaps/legendary.png new file mode 100644 index 0000000..92241d1 Binary files /dev/null and b/overlay/usr/share/pixmaps/legendary.png differ diff --git a/overlay/usr/share/pixmaps/rare.png b/overlay/usr/share/pixmaps/rare.png new file mode 100644 index 0000000..2d3d4bb Binary files /dev/null and b/overlay/usr/share/pixmaps/rare.png differ