homebrew-cask/Casks/vlc.rb

36 lines
1.3 KiB
Ruby

cask 'vlc' do
version '2.2.8'
sha256 '4406e025c566c5703ab11e53070d3e399680ddfb8994b60cb753079dffd2a027'
url "https://get.videolan.org/vlc/#{version}/macosx/vlc-#{version}.dmg"
appcast 'http://update.videolan.org/vlc/sparkle/vlc-intel64.xml',
checkpoint: '2e8debe5851a85536ff4ef24cff5bbff2cbce7c17bc3902eeccbbf1636c4dc67'
name 'VLC media player'
homepage 'https://www.videolan.org/vlc/'
gpg "#{url}.asc", key_id: '65f7c6b4206bd057a7eb73787180713be58d1adc'
auto_updates true
app 'VLC.app'
# shim script (https://github.com/caskroom/homebrew-cask/issues/18809)
shimscript = "#{staged_path}/vlc.wrapper.sh"
binary shimscript, target: 'vlc'
preflight do
IO.write shimscript, <<~EOS
#!/bin/sh
'#{appdir}/VLC.app/Contents/MacOS/VLC' "$@"
EOS
end
zap trash: [
'~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.videolan.vlc.sfl*',
'~/Library/Application Support/org.videolan.vlc',
'~/Library/Application Support/VLC',
'~/Library/Preferences/org.videolan.vlc',
'~/Library/Preferences/org.videolan.vlc.plist',
'~/Library/Saved Application State/org.videolan.vlc.savedState',
'~/Library/Caches/org.videolan.vlc',
]
end