Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
BUILD_XML="<?xml version=\"1.0\" encoding=\"UTF-8\"?><project name=\"Minecraft\" default=\"default\" basedir=\".\"><taskdef name=\"bundleapp\" classname=\"com.oracle.appbundler.AppBundlerTask\" classpath=\"appbundler-1.0.jar\" /><target name=\"bundle-Minecraft\"><bundleapp outputdirectory=\".\" name=\"Minecraft\" displayname=\"Minecraft\" identifier=\"net.minecraft\" mainclassname=\"net.minecraft.bootstrap.Bootstrap\"><classpath file=\"Minecraft.jar\" /></bundleapp></target></project>"
curl https://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar -o Minecraft.jar
curl https://java.net/downloads/appbundler/appbundler-1.0.jar -o appbundler-1.0.jar
echo "$BUILD_XML" > build.xml
ant bundle-Minecraft
mkdir Minecraft && unzip -d Minecraft Minecraft.jar
sips -s format icns Minecraft/favicon.png --out favicon.icns
mv -f favicon.icns Minecraft.app/Contents/Resources/GenericApp.icns
rm -rf appbundler-1.0.jar build.xml Minecraft Minecraft.jar minecraft.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.