excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / r / realforce.rb
blob4804e341677ffd762479b827a49174446ad00db7
1 cask "realforce" do
2   version "3.3.0"
3   sha256 "85c6a76425933c88070d6c61d61224c534e067addeaa99f5f93d973bd4c7d2b7"
5   url "https://www.realforce.co.jp/support/download/software/mac/files/REALFORCE%20CONNECT%20Software_#{version.dots_to_hyphens}.pkg"
6   name "REALFORCE for Mac"
7   desc "Software for Realforce keyboards and mice"
8   homepage "https://www.realforce.co.jp/"
10   livecheck do
11     url "https://www.realforce.co.jp/support/download/software/"
12     regex(%r{href=.*?/REALFORCE\s*?CONNECT\s*?Software[._-](\d+(?:-\d+)+)\.pkg}i)
13     strategy :page_match do |page, regex|
14       page.scan(regex).map { |match| match[0].tr("-", ".") }
15     end
16   end
18   depends_on macos: ">= :catalina"
20   pkg "REALFORCE CONNECT Software_#{version.dots_to_hyphens}.pkg"
22   uninstall pkgutil: "com.topre.installpkg.realforce"
24   zap trash: [
25     "~/Library/Preferences/com.topre.RFRApplication.plist",
26     "~/Library/Preferences/com.topre.RFSoftwareR3.plist",
27     "~/Library/Saved Application State/com.topre.RFRApplication.savedState",
28     "~/Library/Saved Application State/com.topre.RFSoftwareR3.savedState",
29   ], rmdir: "~/Documents/Topre"
30 end