Guest User

Untitled

a guest
Sep 10th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on open theApp
  2.    
  3.     set appPath to POSIX path of theApp as text
  4.     if (appPath ends with ".app/") then
  5.         set infoPath to appPath & "Contents/Info"
  6.         set appPathRetina to appPath
  7.         set appPathRetina to text 1 thru ((appPathRetina's length) - 5) of appPathRetina as text
  8.         set appPathRetina to appPathRetina & "_retina.app/"
  9.         set plutilCmd to "plutil -convert xml1 " & quoted form of infoPath & ".plist"
  10.         set defaultsCmd to "defaults write " & quoted form of infoPath & " NSHighResolutionCapable true"
  11.         --do shell script plutilCmd with administrator privileges
  12.         --do shell script defaultsCmd with administrator privileges
  13.         --do shell script plutilCmd with administrator privileges
  14.         set appPath to (POSIX file appPath) as string
  15.         set appPathRetina to (POSIX file appPathRetina) as string
  16.         --duplicate item (POSIX file infoPath & ".plist") to (path to desktop as Unicode text) with replacing
  17.         --do shell script "cp " & appPath & " " & appPathRetina
  18.         display dialog defaultsCmd
  19.     else
  20.         display dialog "Eine Applikation auf das Icon ziehen"
  21.     end if
  22.    
  23. end open
  24.  
  25. -- defaults read filename ohne plist
  26. -- NSHighResolutionCapable
  27. --defaults write /Users/fabio/Desktop/Chrome.app/Contents/Info NSHighResolutionCapable true
  28.  
  29. --plutil -convert xml1 /Users/fabio/Desktop/Chrome.app/Contents/Info.plist
Add Comment
Please, Sign In to add comment