2016-07-24 04:39:24 +08:00
|
|
|
cask 'qz-tray' do
|
2016-09-25 17:43:35 +08:00
|
|
|
version '2.0.1'
|
|
|
|
sha256 '2a76a6a40bad325f021c0c1aec98fbe35371174f4d0405a6775d465e7880ed4a'
|
2016-07-24 04:39:24 +08:00
|
|
|
|
|
|
|
# github.com/qzind/tray was verified as official when first introduced to the cask
|
|
|
|
url "https://github.com/qzind/tray/releases/download/v#{version}/qz-tray-#{version}.pkg"
|
|
|
|
appcast 'https://github.com/qzind/tray/releases.atom',
|
2016-09-25 17:43:35 +08:00
|
|
|
checkpoint: '33433b9469834be02d4297aaf6fe079bb5bbcd96fa86f914dd92848fdf0ab1b3'
|
2016-07-24 04:39:24 +08:00
|
|
|
name 'QZ Tray'
|
|
|
|
homepage 'https://qz.io/'
|
|
|
|
|
|
|
|
container type: :naked
|
|
|
|
|
|
|
|
app 'QZ Tray.app'
|
|
|
|
|
|
|
|
preflight do
|
|
|
|
# app needs to be extracted as the installer would automatically open it
|
|
|
|
FileUtils.cd staged_path do
|
|
|
|
FileUtils.mkdir_p 'QZ Tray.app'
|
2016-11-18 23:51:50 +08:00
|
|
|
system_command '/usr/bin/xar', args: ['-xf', "qz-tray-#{version}.pkg", 'Payload']
|
|
|
|
system_command '/usr/bin/tar', args: ['-xf', 'Payload', '-C', 'QZ Tray.app']
|
2016-07-24 04:39:24 +08:00
|
|
|
FileUtils.rm_rf ["qz-tray-#{version}.pkg", 'Payload']
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
uninstall login_item: 'QZ Tray'
|
|
|
|
|
|
|
|
zap delete: [
|
|
|
|
'~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/:no-bundle:qz t.sfl',
|
|
|
|
'~/Library/Application Support/qz',
|
|
|
|
]
|
|
|
|
end
|