Skip to content

Instantly share code, notes, and snippets.

@justincjahn
Last active December 19, 2015 00:29
Show Gist options
  • Select an option

  • Save justincjahn/5869433 to your computer and use it in GitHub Desktop.

Select an option

Save justincjahn/5869433 to your computer and use it in GitHub Desktop.
OSX Technic Launcher App
#!/bin/bash
#
# generate.sh
# Create a basic OSX Application package directory structure,
# placing the Technic Launcher and shell script inside.
APP="TechnicLauncher.app/Contents/MacOS"
mkdir -p $APP
mv TechnicLauncher.jar $APP
mv TechnicLauncher $APP
# Make sure the shell script is executable otherwise it won't launch
chmod a+x $APP/TechnicLauncher
#!/bin/bash
#
# TechnicLauncher
# Launches the TechnicLauncher.jar using Java 6.
# Get the current script directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Set the Java version to 1.6 otherwise Minecraft will crash when launched with Technic
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/
# Run the Technic Launcher, assuming it is in the same directory as our script.
java -jar $DIR/TechnicLauncher.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment