excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / l / logitech-camera-settings.rb
blob214b9905e0c9637c10cd6ba98d1cb1484b220513
1 cask "logitech-camera-settings" do
2   version "3.0.23"
3   sha256 "ff8ce22aab2ef7a4e63044585e34497cffd8edb0cc077902ca0da3dbb40f5ea2"
5   url "https://download01.logi.com/web/ftp/pub/techsupport/cameras/Webcams/LogiCameraSettings_#{version}.pkg"
6   name "Logitech Camera Settings"
7   desc "Provides access to camera controls"
8   homepage "https://support.logi.com/hc/en-us/articles/360049055854"
10   livecheck do
11     url "https://support.logi.com/api/v2/help_center/en-us/articles.json?label_names=webcontent=productdownload,websoftware=9bf6fc93-8e0b-11e9-a62b-cb4c7fb3c2e2"
12     regex(/href=.*?LogiCameraSettings[._-]v?(\d+(?:\.\d+)+)\.pkg/i)
13     strategy :json do |json, regex|
14       json["articles"]&.map do |article|
15         match = article["body"]&.match(regex)
16         next if match.blank?
18         match[1]
19       end
20     end
21   end
23   depends_on macos: ">= :high_sierra"
25   pkg "LogiCameraSettings_#{version}.pkg"
27   uninstall signal:     ["TERM", "com.logitech.vc.LogiVCCoreService"],
28             login_item: "Background Replace",
29             pkgutil:    [
30               "com.logitech.vc.CameraSettings.pkg",
31               "com.logitech.vc.LogiVCCoreService.app.pkg",
32               "com.logitech.vc.LogiVCCoreService.launchd.pkg",
33             ]
35   zap trash: [
36     "~/Library/Application Support/Logitech/com.logitech.vc.camerasettings",
37     "~/Library/Logs/LogiCameraSettings",
38     "~/Library/Preferences/com.logitech.CameraSettingsApp2.0.plist",
39   ]
40 end