Skip to content

Instantly share code, notes, and snippets.

@bfontaine
Last active August 29, 2015 14:10
Show Gist options
  • Save bfontaine/dc9404872ac932755859 to your computer and use it in GitHub Desktop.
Save bfontaine/dc9404872ac932755859 to your computer and use it in GitHub Desktop.
Install Pixel Dungeon as a Mac .app
#! /usr/bin/env bash
#
# Usage:
# curl -sL http://bit.ly/pixeldungeon2app-sh | bash -e
#
echo "Creating a temporary directory..."
mkdir -p pd_tmp
cd pd_tmp
echo "Downloading a JDK build..."
curl -L# -o jdk.zip https://bitbucket.org/alexkasko/openjdk-unofficial-builds/downloads/openjdk-1.7.0-u60-unofficial-macosx-x86_64-image.zip
echo "Downloading the game..."
curl -L# -o pd.jar http://commondatastorage.googleapis.com/itchio/upload/13075/desktop-1.7.2a-1.jar
echo "Downloading the packaging app..."
curl -L# -o packr.jar http://libgdx.badlogicgames.com/packr/packr.jar
echo "Packaging..."
java -jar packr.jar \
-platform mac \
-jdk jdk.zip \
-executable "Pixel Dungeon" \
-appjar pd.jar \
-mainclass "com/watabou/pd/desktop/DesktopLauncher" \
-vmargs "-Xmx1G" \
-outdir "Pixel Dungeon.app"
mv "Pixel Dungeon.app" ../
cd ..
echo "Removing the temporary directory..."
rm -rf pd_tmp
echo "Visit the official website for more info, to donate & more!"
echo " http://pixeldungeon.watabou.ru/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment