Advertisement
gormster

ATLauncherEnableYosemite

Jan 4th, 2015
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.26 KB | None | 0 0
  1. echo "This assumes you have ATLauncher installed at /Applications/ATLauncher.app"
  2.  
  3. cat << 'EOF' > /Applications/ATLauncher.app/Contents/MacOS/ATLauncher
  4.  
  5. #!/bin/sh
  6.  
  7. PRG=$0
  8.  
  9. while [ -h "$PRG" ]; do
  10.     ls=`ls -ld "$PRG"`
  11.     link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
  12.     if expr "$link" : '^/' 2> /dev/null >/dev/null; then
  13.         PRG="$link"
  14.     else
  15.         PRG="`dirname "$PRG"`/$link"
  16.     fi
  17. done
  18.  
  19. progdir=`dirname "$PRG"`
  20.  
  21. if [ -n "$JAVA_HOME" ]; then
  22.   JAVACMD="$JAVA_HOME/bin/java"
  23. elif [ -x /usr/libexec/java_home ]; then
  24.   JAVACMD="`/usr/libexec/java_home`/bin/java"
  25. else
  26.   JAVACMD="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java"
  27. fi
  28.  
  29. cd "$progdir/../Resources/Java"
  30.  
  31. exec "$JAVACMD" -classpath "$progdir/../Resources/Java/*" \
  32.        -Dapple.laf.useScreenMenuBar=true \
  33.            com.atlauncher.App
  34.  
  35. EOF
  36.  
  37. chmod a+x /Applications/ATLauncher.app/Contents/MacOS/ATLauncher
  38.  
  39. rm /Applications/ATLauncher.app/Contents/MacOS/JavaApplicationStub
  40.  
  41. xattr -d com.apple.quarantine /Applications/ATLauncher.app/
  42.  
  43. defaults delete /Applications/ATLauncher.app/Contents/Info.plist Java
  44. defaults write /Applications/ATLauncher.app/Contents/Info.plist CFBundleExecutable ATLauncher
  45.  
  46. echo "ATLauncher has been patched"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement