homebrew-cask/Casks/qq.rb

40 lines
1.3 KiB
Ruby

cask "qq" do
version "6.9.10-9733,27abc38b"
sha256 "b9857cff21d12378ba2744871b52bba6092dd27f8b5615bc076b4a2a88ecbea2"
url "https://dldir1.qq.com/qqfile/qq/QQNT/#{version.csv.second}/QQ_v#{version.csv.first}.dmg"
name "QQ"
desc "Instant messaging tool"
homepage "https://im.qq.com/macqq/index.shtml"
livecheck do
url "https://im.qq.com/rainbow/ntQQDownload/"
regex(%r{QQNT/([a-z0-9]+)/QQ[._-]v?(\d+(?:\.\d+)+-\d+)\.dmg}i)
strategy :page_match do |page, regex|
page.scan(regex).map do |match|
"#{match[1]},#{match[0]}"
end
end
end
auto_updates true
app "QQ.app"
uninstall quit: "com.tencent.qq"
zap trash: [
"~/Library/Application Scripts/com.tencent.qq",
"~/Library/Application Scripts/FN2V63AD2J.com.tencent.localserver2",
"~/Library/Application Scripts/FN2V63AD2J.com.tencent.ScreenCapture2",
"~/Library/Caches/com.tencent.qq",
"~/Library/Containers/com.tencent.qq",
"~/Library/Containers/FN2V63AD2J.com.tencent.localserver2",
"~/Library/Containers/FN2V63AD2J.com.tencent.ScreenCapture2",
"~/Library/Group Containers/FN2V63AD2J.com.tencent",
"~/Library/Preferences/com.tencent.qq.plist",
"~/Library/Saved Application State/com.tencent.qq.savedState",
"~/Library/WebKit/com.tencent.qq",
]
end