Merge pull request #198803 from Homebrew/bump-wizcli-0.69.0
[Homebrew/homebrew-cask.git] / Casks / s / sys-pc-tool.rb
blobffa8f527fa57e2f3accd59d74c9365eb93dffb8b
1 cask "sys-pc-tool" do
2   version "6.33"
3   sha256 "509e6b833c7fc907c3c0989704b941acba6f9d13abe5f0c20834ee4d77eb0c4f"
5   url "https://www.syride.com/downloads/SYS_PC_Tool_setup_mac-#{version}.pkg"
6   name "SYS PC Tool"
7   desc "Software for Syride instruments"
8   homepage "https://www.syride.com/"
10   livecheck do
11     url "https://www.syride.com/downloads/SYS_PC_Tool/webconfig-para4.xml"
12     regex(/SYS[._-]PC[._-]Tool[._-]setup[._-]mac[._-]v?(\d+(?:[.-]\d+)+)\.pkg/i)
13     strategy :xml do |xml, regex|
14       url = xml.elements["//sysui_config[@machine='mac']/file"]&.text&.strip
15       match = url.match(regex) if url
16       next if match.blank?
18       match[1]
19     end
20   end
22   auto_updates true
23   depends_on macos: ">= :sierra"
25   pkg "SYS_PC_TOOL_setup_mac-#{version}.pkg"
27   uninstall pkgutil: "com.syride.syspctool",
28             delete:  "/Applications/SYS-PC-Tool.app"
30   zap trash: [
31     "~/.syride",
32     "~/Library/Saved Application State/Syride.SYS-PC-Tool.savedState",
33     "~/syride",
34   ]
35 end