Add rare/legendary installers

This commit is contained in:
Josh.5
2022-01-16 05:40:41 +13:00
parent 96f4476069
commit 8d90694712
9 changed files with 81 additions and 4 deletions

View File

@@ -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"

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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

View File

@@ -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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB