3 sha256 "feec904968013103f556f161b7792ae2a110775118c9630a0df7dcf719b69c69"
5 url "https://download.z.weixin.qq.com/app/mac/#{version.csv.first}/WeTypeInstaller_#{version.csv.first}_#{version.csv.second}.zip"
8 desc "Text input app from WeChat team for Chinese users"
9 homepage "https://z.weixin.qq.com/"
12 url "https://z.weixin.qq.com/web/api/app_info"
13 regex(/WeTypeInstaller[._-]v?(\d+(?:.\d+)+)[._-](\d+)\.zip/i)
14 strategy :json do |json, regex|
15 match = json.dig("data", "mac", "download_link")&.match(regex)
18 "#{match[1]},#{match[2]}"
23 depends_on macos: ">= :catalina"
25 installer manual: "WeTypeInstaller_#{version.csv.first}_#{version.csv.second}.app"
27 uninstall delete: "/Library/Input Methods/WeType.app"
30 "~/Library/Application Support/WeType",
31 "~/Library/Caches/com.tencent.inputmethod.wetype",
32 "~/Library/Caches/WeType",
33 "~/Library/HTTPStorages/com.tencent.inputmethod.wetype",
34 "~/Library/Preferences/com.tencent.inputmethod.wetype.plist",