excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / z / zoom.rb
blob89dd05e7c266faa573d08aa16215913530a48240
1 cask "zoom" do
2   arch arm: "arm64/"
3   livecheck_folder = on_arch_conditional arm: "?archType=arm64"
5   version "6.2.11.43613"
6   sha256 arm:   "dd6d28853eb6be7eaf7731aae1855c68cd6411ef6847158e6af18fffed5f8597",
7          intel: "3679d8df57e3d019750cb12085a8dfd5b1f6fdb09ec33cd66463f86ef22fbf29"
9   url "https://cdn.zoom.us/prod/#{version}/#{arch}zoomusInstallerFull.pkg"
10   name "Zoom"
11   desc "Video communication and virtual meeting platform"
12   homepage "https://www.zoom.us/"
14   livecheck do
15     url "https://www.zoom.us/client/latest/zoomusInstallerFull.pkg#{livecheck_folder}"
16     strategy :header_match
17   end
19   auto_updates true
20   conflicts_with cask: "zoom-for-it-admins"
22   pkg "zoomusInstallerFull.pkg"
24   postflight do
25     # Description: Ensure console variant of postinstall is non-interactive.
26     # This is because `open "$APP_PATH"&` is called from the postinstall
27     # script of the package and we don't want any user intervention there.
28     retries ||= 3
29     ohai "The Zoom package postinstall script launches the Zoom app" if retries >= 3
30     ohai "Attempting to close zoom.us.app to avoid unwanted user intervention" if retries >= 3
31     return unless system_command "/usr/bin/pkill", args: ["-f", "/Applications/zoom.us.app"]
32   rescue RuntimeError
33     sleep 1
34     retry unless (retries -= 1).zero?
35     opoo "Unable to forcibly close zoom.us.app"
36   end
38   uninstall launchctl: "us.zoom.ZoomDaemon",
39             signal:    ["KILL", "us.zoom.xos"],
40             pkgutil:   "us.zoom.pkg.videomeeting",
41             delete:    [
42               "/Applications/zoom.us.app",
43               "/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin",
44               "/Library/Logs/DiagnosticReports/zoom.us*",
45               "/Library/PrivilegedHelperTools/us.zoom.ZoomDaemon",
46             ]
48   zap trash: [
49     "~/.zoomus",
50     "~/Desktop/Zoom",
51     "~/Documents/Zoom",
52     "~/Library/Application Scripts/*.ZoomClient3rd",
53     "~/Library/Application Support/CloudDocs/session/containers/iCloud.us.zoom.videomeetings",
54     "~/Library/Application Support/CloudDocs/session/containers/iCloud.us.zoom.videomeetings.plist",
55     "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/us.zoom*.sfl*",
56     "~/Library/Application Support/CrashReporter/zoom.us*",
57     "~/Library/Application Support/zoom.us",
58     "~/Library/Caches/us.zoom.xos",
59     "~/Library/Cookies/us.zoom.xos.binarycookies",
60     "~/Library/Group Containers/*.ZoomClient3rd",
61     "~/Library/HTTPStorages/us.zoom.xos",
62     "~/Library/HTTPStorages/us.zoom.xos.binarycookies",
63     "~/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin",
64     "~/Library/Logs/zoom.us",
65     "~/Library/Logs/zoominstall.log",
66     "~/Library/Logs/ZoomPhone",
67     "~/Library/Preferences/us.zoom.airhost.plist",
68     "~/Library/Preferences/us.zoom.caphost.plist",
69     "~/Library/Preferences/us.zoom.Transcode.plist",
70     "~/Library/Preferences/us.zoom.xos.Hotkey.plist",
71     "~/Library/Preferences/us.zoom.xos.plist",
72     "~/Library/Preferences/us.zoom.ZoomAutoUpdater.plist",
73     "~/Library/Preferences/us.zoom.ZoomClips.plist",
74     "~/Library/Preferences/ZoomChat.plist",
75     "~/Library/Saved Application State/us.zoom.xos.savedState",
76     "~/Library/WebKit/us.zoom.xos",
77   ]
78 end