cask "qq" do version "6.9.19.16736,af983ded" sha256 "eaacecb63d94b7451f3fc86b0bc50390ce3687dc03742ad9f084ea17a3e1eef9" 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