excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / a / atok.rb
blob82924adcf79edd8ae7a57cf2b59c28500480f808
1 cask "atok" do
2   version "34.1"
3   sha256 "7c5013c03d8ff8f788d158ac80d39ca4aae00d52fd520f81723ecd99fd733fee"
5   url "https://gate.justsystems.com/download/atok/ut/mac/at#{version.dots_to_underscores}.dmg"
6   name "ATOK"
7   desc "Japanese input method editor (IME) produced by JustSystems"
8   homepage "https://www.justsystems.com/jp/products/atokmac/"
10   livecheck do
11     url "https://mypassport.atok.com/install/install_mac.html"
12     regex(/href=.*at[._-]?v?(\d+(?:[._]\d+)+)\.dmg/i)
13     strategy :page_match do |page, regex|
14       page.scan(regex).map { |match| match[0].tr("_", ".") }
15     end
16   end
18   pkg "ATOK インストーラ.pkg"
20   uninstall launchctl: [
21               "com.justsystems.atok#{version.major}.enabler",
22               "com.justsystems.inputmethod.atok#{version.major}",
23               "com.justsystems.launchd.Atok#{version.major}.AlBg",
24               "com.justsystems.launchd.jslmad",
25               "com.justsystems.launchd.jslmaUI",
26               "com.justsystems.launchd.UpdateChecker",
27               "com.justsystems.OnlineUpdate",
28             ],
29             quit:      "com.justsystems.UpdateChecker",
30             pkgutil:   [
31               "com.justsystems.atok#{version.major}.doc.pkg",
32               "com.justsystems.atok#{version.major}.pkg",
33               "com.justsystems.atok#{version.major}.quicklook.pkg",
34               "com.justsystems.atok#{version.major}.sync.pkg",
35               "com.justsystems.JustOnlineUpdate.pkg",
36               "com.justsystems.pkg.lma",
37             ]
39   zap delete: [
40         "/Library/Application Support/JustSystems",
41         "/Library/Application Support/Preferences/JustSystems",
42         "/Library/JustSystems",
43         "/Library/Preferences/com.justsystems.*.plist",
44         "/Library/Preferences/JustSystems",
45       ],
46       trash:  [
47         "~/Library/Caches/com.justsystems.OnlineUpdate",
48         "~/Library/HTTPStorages/com.justsystems.OnlineUpdate",
49         "~/Library/Preferences/com.justsystems.OnlineUpdate.plist",
50         "~/Library/Saved Application State/com.justsystems.OnlineUpdate.savedState",
51       ]
52 end