Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo "This assumes you have ATLauncher installed at /Applications/ATLauncher.app"
- cat << 'EOF' > /Applications/ATLauncher.app/Contents/MacOS/ATLauncher
- #!/bin/sh
- PRG=$0
- while [ -h "$PRG" ]; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
- if expr "$link" : '^/' 2> /dev/null >/dev/null; then
- PRG="$link"
- else
- PRG="`dirname "$PRG"`/$link"
- fi
- done
- progdir=`dirname "$PRG"`
- if [ -n "$JAVA_HOME" ]; then
- JAVACMD="$JAVA_HOME/bin/java"
- elif [ -x /usr/libexec/java_home ]; then
- JAVACMD="`/usr/libexec/java_home`/bin/java"
- else
- JAVACMD="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java"
- fi
- cd "$progdir/../Resources/Java"
- exec "$JAVACMD" -classpath "$progdir/../Resources/Java/*" \
- -Dapple.laf.useScreenMenuBar=true \
- com.atlauncher.App
- EOF
- chmod a+x /Applications/ATLauncher.app/Contents/MacOS/ATLauncher
- rm /Applications/ATLauncher.app/Contents/MacOS/JavaApplicationStub
- xattr -d com.apple.quarantine /Applications/ATLauncher.app/
- defaults delete /Applications/ATLauncher.app/Contents/Info.plist Java
- defaults write /Applications/ATLauncher.app/Contents/Info.plist CFBundleExecutable ATLauncher
- echo "ATLauncher has been patched"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement