Skip to content

Commit

Permalink
Adding script that allows Java-based apps to look good on retina disp…
Browse files Browse the repository at this point in the history
…lays
  • Loading branch information
eriwen committed Jul 3, 2012
1 parent 390a98e commit e1ebd04
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .scripts/retinafy.sh
@@ -0,0 +1,21 @@
#!/bin/bash

APP=$1

if [ -z $APP ]
then
echo "Usage: ${0} /Applications/MyApp.app"
exit 0
fi

read -p "Please make sure ${1} is closed. Press [Enter] to continue."

cp -R $APP $APP.bak
awk '/<dict>/{if (M==""){sub("<dict>","<dict><key>NSHighResolutionCapable<\/key><true\/>");M=1}}{print}' ${APP}.bak/Contents/Info.plist > ${APP}.bak/Contents/Info.plist.new
mv ${APP}.bak/Contents/Info.plist{.new,}

# Clear application caches
rm -rf $APP
mv $APP.bak $APP

echo "Done!"

0 comments on commit e1ebd04

Please sign in to comment.