summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile16
-rw-r--r--icons/runescape-16x16.pngbin0 -> 333 bytes
-rw-r--r--icons/runescape-24x24.pngbin0 -> 1676 bytes
-rw-r--r--icons/runescape-256x256.pngbin0 -> 13361 bytes
-rw-r--r--icons/runescape-32x32.pngbin0 -> 697 bytes
-rw-r--r--icons/runescape-48x48.pngbin0 -> 2595 bytes
-rw-r--r--icons/runescape-512x512.pngbin0 -> 34839 bytes
-rw-r--r--icons/runescape-64x64.pngbin0 -> 1582 bytes
-rwxr-xr-xrunescape-launcher-launcher42
-rw-r--r--runescape-launcher-launcher.desktop12
10 files changed, 70 insertions, 0 deletions
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
--- /dev/null
+++ b/icons/runescape-16x16.png
Binary files differ
diff --git a/icons/runescape-24x24.png b/icons/runescape-24x24.png
new file mode 100644
index 0000000..b61f6bd
--- /dev/null
+++ b/icons/runescape-24x24.png
Binary files differ
diff --git a/icons/runescape-256x256.png b/icons/runescape-256x256.png
new file mode 100644
index 0000000..225d017
--- /dev/null
+++ b/icons/runescape-256x256.png
Binary files differ
diff --git a/icons/runescape-32x32.png b/icons/runescape-32x32.png
new file mode 100644
index 0000000..afe09f0
--- /dev/null
+++ b/icons/runescape-32x32.png
Binary files differ
diff --git a/icons/runescape-48x48.png b/icons/runescape-48x48.png
new file mode 100644
index 0000000..ce2c0eb
--- /dev/null
+++ b/icons/runescape-48x48.png
Binary files differ
diff --git a/icons/runescape-512x512.png b/icons/runescape-512x512.png
new file mode 100644
index 0000000..5a09a82
--- /dev/null
+++ b/icons/runescape-512x512.png
Binary files differ
diff --git a/icons/runescape-64x64.png b/icons/runescape-64x64.png
new file mode 100644
index 0000000..ccdebeb
--- /dev/null
+++ b/icons/runescape-64x64.png
Binary files 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
+