1 cask "logitech-g-hub" do
2 version "2024.8.641856"
5 url "https://download01.logi.com/web/ftp/pub/techsupport/gaming/lghub_installer.zip",
6 verified: "download01.logi.com/"
8 desc "Support for Logitech G gear"
9 homepage "https://www.logitechg.com/en-us/innovation/g-hub.html"
12 url "https://support.logi.com/api/v2/help_center/en-us/articles.json?label_names=webcontent=productdownload,websoftware=eee3033c-8e0b-11e9-8db1-d7e925481d4d"
13 regex(/Software\s+Version:.*?(\d+(?:\.\d+)+)/i)
14 strategy :json do |json, regex|
15 json["articles"]&.map do |article|
16 match = article["body"]&.match(regex)
27 executable: "lghub_installer.app/Contents/MacOS/lghub_installer",
33 set_ownership ["#{appdir}/lghub.app", "/Users/Shared/LGHUB"]
34 set_permissions "#{appdir}/lghub.app", "0755"
38 executable: "/Applications/lghub.app/Contents/MacOS/lghub_updater.app/Contents/MacOS/lghub_updater",
39 args: ["--uninstall"],
42 delete: "/Applications/lghub.app",
43 trash: "/Users/Shared/LGHUB"
46 "~/Library/Application Support/lghub",
47 "~/Library/Caches/com.logi.ghub.installer",
48 "~/Library/Preferences/com.logi.ghub.plist",
49 "~/Library/Saved Application State/com.logi.ghub.savedState",