excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / w / winzip.rb
blobf01760d33d0da4ad4f4757a44166289151a5288b
1 cask "winzip" do
2   version "12.0.7282"
3   sha256 "b30418309c9969d39398c7286a0aab682dea2f42bc7dc67ebc1610fe181585c6"
5   url "https://download.winzip.com/winzipmacedition#{version.major}.dmg"
6   name "WinZip"
7   desc "File archiving tool"
8   homepage "https://www.winzip.com/mac/en/winzip.html"
10   livecheck do
11     url "https://www.winzip.com/en/download/"
12     regex(/href=.*?winzipmacedition[._-]?v?(\d+)\.dmg/i)
13     strategy :page_match do |page, regex|
14       major_version = page[regex, 1]
15       next if major_version.blank?
17       cask = CaskLoader.load(__FILE__)
18       download_url = "https://download.winzip.com/winzipmacedition#{major_version}.dmg"
19       Homebrew::Livecheck::Strategy::ExtractPlist.find_versions(cask:, url: download_url)[:matches].values
20     end
21   end
23   depends_on macos: ">= :sierra"
25   app "WinZip.app"
27   zap trash: [
28     "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.winzip.winzip-mac.sfl*",
29     "~/Library/Caches/com.apple.helpd/Generated/WinZip Help*",
30     "~/Library/Caches/com.winzip.WinZip-Mac",
31     "~/Library/Logs/WinZip-Mac.log",
32     "~/Library/Preferences/com.winzip.WinZip-Mac.plist",
33     "~/Library/Saved Application State/com.winzip.WinZip-Mac.savedState",
34     "~/Library/Services/Winzip*.workflow",
35     "~/Library/WebKit/com.winzip.WinZip-Mac",
36   ]
37 end