homebrew-cask/Casks/xquartz.rb

23 lines
945 B
Ruby
Raw Normal View History

class Xquartz < Cask
2014-05-19 20:17:08 +08:00
url 'http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.6.dmg'
homepage 'http://xquartz.macosforge.org/'
2014-06-14 19:50:18 +08:00
appcast 'http://xquartz-dl.macosforge.org/sparkle/release.xml'
2014-05-19 20:17:08 +08:00
version '2.7.6'
sha256 '02aa3268af0bd7dcd5dfbc10d673f5c6834bba6371a928d2a3fc44a8039b194e'
2013-06-20 05:34:55 +08:00
install 'XQuartz.pkg'
after_install do
Pathname.new(Dir.home).join('Library', 'Logs').mkpath
# Set default path to X11 = avoid the need of manual setup
system '/usr/bin/defaults', 'write', 'com.apple.applescript', 'ApplicationMap', '-dict-add', 'X11', 'file://localhost/Applications/Utilities/XQuartz.app/'
# Load & start XServer = avoid the need of relogin
system '/bin/launchctl', 'load', '/Library/LaunchAgents/org.macosforge.xquartz.startx.plist'
end
2013-12-10 12:52:34 +08:00
uninstall :quit => 'org.macosforge.xquartz.X11',
:launchctl => 'org.macosforge.xquartz.startx',
2013-12-10 12:52:34 +08:00
:pkgutil => 'org.macosforge.xquartz.pkg'
end