From ce78a64e158559902f835a643f5d95af5c664651 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Wed, 13 Apr 2022 11:57:09 -0400 Subject: Initial commit --- Makefile | 16 ++++++++++++++ icons/runescape-16x16.png | Bin 0 -> 333 bytes icons/runescape-24x24.png | Bin 0 -> 1676 bytes icons/runescape-256x256.png | Bin 0 -> 13361 bytes icons/runescape-32x32.png | Bin 0 -> 697 bytes icons/runescape-48x48.png | Bin 0 -> 2595 bytes icons/runescape-512x512.png | Bin 0 -> 34839 bytes icons/runescape-64x64.png | Bin 0 -> 1582 bytes runescape-launcher-launcher | 42 ++++++++++++++++++++++++++++++++++++ runescape-launcher-launcher.desktop | 12 +++++++++++ 10 files changed, 70 insertions(+) create mode 100644 Makefile create mode 100644 icons/runescape-16x16.png create mode 100644 icons/runescape-24x24.png create mode 100644 icons/runescape-256x256.png create mode 100644 icons/runescape-32x32.png create mode 100644 icons/runescape-48x48.png create mode 100644 icons/runescape-512x512.png create mode 100644 icons/runescape-64x64.png create mode 100755 runescape-launcher-launcher create mode 100644 runescape-launcher-launcher.desktop diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cb04e79 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +prefix := /usr/local +bindir := $(prefix)/bin +datarootdir := $(prefix)/share + +all: + +install: + install -Dm755 runescape-launcher-launcher $(DESTDIR)$(bindir)/runescape-launcher-launcher + install -Dm644 runescape-launcher-launcher.desktop $(DESTDIR)$(datarootdir)/runescape-launcher-launcher.desktop + install -Dm644 icons/runescape-16x16.png $(DESTDIR)$(datarootdir)/icons/hicolor/16x16/apps/runescape.png + install -Dm644 icons/runescape-24x24.png $(DESTDIR)$(datarootdir)/icons/hicolor/24x24/apps/runescape.png + install -Dm644 icons/runescape-32x32.png $(DESTDIR)$(datarootdir)/icons/hicolor/32x32/apps/runescape.png + install -Dm644 icons/runescape-48x48.png $(DESTDIR)$(datarootdir)/icons/hicolor/48x48/apps/runescape.png + install -Dm644 icons/runescape-64x64.png $(DESTDIR)$(datarootdir)/icons/hicolor/64x64/apps/runescape.png + install -Dm644 icons/runescape-256x256.png $(DESTDIR)$(datarootdir)/icons/hicolor/256x256/apps/runescape.png + install -Dm644 icons/runescape-512x512.png $(DESTDIR)$(datarootdir)/icons/hicolor/512x512/apps/runescape.png diff --git a/icons/runescape-16x16.png b/icons/runescape-16x16.png new file mode 100644 index 0000000..1f0bc0b Binary files /dev/null and b/icons/runescape-16x16.png differ diff --git a/icons/runescape-24x24.png b/icons/runescape-24x24.png new file mode 100644 index 0000000..b61f6bd Binary files /dev/null and b/icons/runescape-24x24.png differ diff --git a/icons/runescape-256x256.png b/icons/runescape-256x256.png new file mode 100644 index 0000000..225d017 Binary files /dev/null and b/icons/runescape-256x256.png differ diff --git a/icons/runescape-32x32.png b/icons/runescape-32x32.png new file mode 100644 index 0000000..afe09f0 Binary files /dev/null and b/icons/runescape-32x32.png differ diff --git a/icons/runescape-48x48.png b/icons/runescape-48x48.png new file mode 100644 index 0000000..ce2c0eb Binary files /dev/null and b/icons/runescape-48x48.png differ diff --git a/icons/runescape-512x512.png b/icons/runescape-512x512.png new file mode 100644 index 0000000..5a09a82 Binary files /dev/null and b/icons/runescape-512x512.png differ diff --git a/icons/runescape-64x64.png b/icons/runescape-64x64.png new file mode 100644 index 0000000..ccdebeb Binary files /dev/null and b/icons/runescape-64x64.png differ diff --git a/runescape-launcher-launcher b/runescape-launcher-launcher new file mode 100755 index 0000000..369b992 --- /dev/null +++ b/runescape-launcher-launcher @@ -0,0 +1,42 @@ +#!/bin/sh + +set -e +xdg_data_home=${XDG_DATA_HOME:-$HOME/.local/share} +rll=$xdg_data_home/runescape-launcher-launcher +tmpdir=$(mktemp -dt runescape-launcher-launcher.XXXXXXXXXX) +trap 'echo "cleaning up temporary directory..." >&2; rm -rf "$tmpdir"' INT TERM QUIT EXIT +if [ -f "$rll/Packages" ]; then + echo "checking for runescape-launcher updates..." +else + echo "downloading runescape-launcher to $rll..." +fi +curl --compressed -sSLo "$tmpdir/Packages" https://content.runescape.com/downloads/ubuntu/dists/trusty/non-free/binary-amd64/Packages +if ! cmp "$rll/Packages" "$tmpdir/Packages" 2>/dev/null; then + ver=$(awk '$1=="Version:"{print $2}' "$tmpdir/Packages") + if [ -f "$rll/Packages" ]; then + echo "updating runescape-launcher..." >&2 + fi + curl --compressed -sSLo "$tmpdir/runescape-launcher_${ver}_amd64.deb" https://content.runescape.com/downloads/ubuntu/pool/non-free/r/runescape-launcher/runescape-launcher_${ver}_amd64.deb + sha256=$(awk '$1=="SHA256:"{print $2}' "$tmpdir/Packages") + echo "$sha256 *$tmpdir/runescape-launcher_${ver}_amd64.deb" | sha256sum -c + if bsdtar=$(command -v bsdtar 2>/dev/null); then + "$bsdtar" -C "$tmpdir" -xf "$tmpdir/runescape-launcher_${ver}_amd64.deb" data.tar.xz + elif ar=$(command -v ar 2>/dev/null); then + "$ar" x --output "$tmpdir" "$tmpdir/runescape-launcher_${ver}_amd64.deb" data.tar.xz + else + echo "bsdtar or ar must be installed to extract runescape-launcher" >&2 + exit 1 + fi + tar -C "$tmpdir" -xf "$tmpdir/data.tar.xz" ./usr/bin/runescape-launcher ./usr/share/games/runescape-launcher/runescape + sed -e 's#/usr/share/games/runescape-launcher/#${0%/*}/#' "$tmpdir/usr/bin/runescape-launcher" > "$tmpdir/runescape-launcher" + cat + install -Dm644 "$tmpdir/Packages" "$rll/Packages" + install -m755 "$tmpdir/runescape-launcher" "$tmpdir/usr/share/games/runescape-launcher/runescape" "$rll/" +else + echo "no updates available for runescape-launcher." >&2 +fi +trap '' INT TERM QUIT EXIT +rm -rf "$tmpdir" +echo "starting runescape-launcher..." >&2 +set -x +exec "$rll/runescape-launcher" "$@" diff --git a/runescape-launcher-launcher.desktop b/runescape-launcher-launcher.desktop new file mode 100644 index 0000000..8f47773 --- /dev/null +++ b/runescape-launcher-launcher.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=RuneScape +GenericName=RuneScape +Comment=RuneScape - A Free MMORPG from Jagex Ltd. +Icon=runescape +Terminal=false +Exec=/usr/bin/runescape-launcher-launcher %u +Categories=Game; +MimeType=x-scheme-handler/rs-launch;x-scheme-handler/rs-launchs + -- cgit v1.2.3-70-g09d2