homebrew-cask/Casks/vlc.rb

35 lines
1.2 KiB
Ruby

cask 'vlc' do
version '3.0.11'
sha256 '78250cc817f4f3befe958ae8d882f1c6721c51d2bdeed030822c00ab92fe1486'
url "https://get.videolan.org/vlc/#{version}/macosx/vlc-#{version}.dmg"
appcast 'https://www.videolan.org/vlc/download-macosx.html'
name 'VLC media player'
homepage 'https://www.videolan.org/vlc/'
auto_updates true
conflicts_with cask: 'vlc-nightly'
app 'VLC.app'
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
shimscript = "#{staged_path}/vlc.wrapper.sh"
binary shimscript, target: 'vlc'
preflight do
IO.write shimscript, <<~EOS
#!/bin/sh
exec '#{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/Caches/org.videolan.vlc',
'~/Library/Preferences/org.videolan.vlc',
'~/Library/Preferences/org.videolan.vlc.plist',
'~/Library/Saved Application State/org.videolan.vlc.savedState',
]
end