homebrew-cask/Casks/p/prosys-opc-ua-browser.rb

36 lines
1.2 KiB
Ruby

cask "prosys-opc-ua-browser" do
arch arm: "aarch64", intel: "x64"
version "5.0.0,173"
sha256 arm: "0d8a9c1f08acdfc73a796b590324c0f346af6d5014dc164f3677e529bcaeb255",
intel: "54c6523c7c48056a31906f5d53b3380aa20923c520cb8371f74a5661a372b10c"
url "https://downloads.prosysopc.com/opcua/apps/UaBrowser/dist/#{version.csv.first}-#{version.csv.second}/prosys-opc-ua-browser-mac-#{arch}-#{version.csv.first}-#{version.csv.second}.dmg"
name "Prosys OPC UA Browser"
desc "Browse and visualise data from OPC UA servers"
homepage "https://prosysopc.com/products/opc-ua-browser/"
livecheck do
url "https://downloads.prosysopc.com/opc-ua-browser-downloads.php"
regex(/href=.*?prosys[._-]opc[._-]ua[._-]browser[._-]mac[._-]#{arch}[._-]v?(\d+(?:\.\d+)+)[._-](\d+)\.dmg/i)
strategy :page_match do |page|
match = page.match(regex)
next if match.blank?
"#{match[1]},#{match[2]}"
end
end
installer script: {
executable: "Prosys OPC UA Browser Installer.app/Contents/MacOS/JavaApplicationStub",
args: ["-q"],
}
uninstall delete: "/Applications/Prosys OPC UA Browser.app"
zap trash: [
"~/.prosysopc",
"~/Desktop/Prosys OPC UA Browser",
]
end