excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / r / roblox.rb
blob998851ff424dab9fb5f7b8fa0ccb3d961ed3d76c
1 cask "roblox" do
2   arch arm: "arm64/"
4   version "0.652.0.6520764,90d7033e4a6a40a9"
5   sha256 arm:   "adb99e8fe5c2e47cdd9faf65194a01d4f1acb77475496a3a92bfb34332a1b4ea",
6          intel: "344b22a72b92f2cd997661c2e5f2c310bc2b4b1db081e3be6d1b4859699ef145"
8   url "https://setup.rbxcdn.com/mac/#{arch}version-#{version.csv.second}-RobloxPlayer.zip",
9       verified: "setup.rbxcdn.com/"
10   name "Roblox"
11   desc "Online multiplayer game platform"
12   homepage "https://www.roblox.com/"
14   livecheck do
15     url "https://clientsettingscdn.roblox.com/v1/client-version/MacPlayer"
16     strategy :json do |json|
17       version = json["version"]
18       client_version = json["clientVersionUpload"]&.split("-")&.second
19       next if version.blank? || client_version.blank?
21       "#{version},#{client_version}"
22     end
23   end
25   auto_updates true
26   depends_on macos: ">= :high_sierra"
28   # The default installer installs the application as `Roblox.app` - so do the same for consistency
29   app "RobloxPlayer.app", target: "Roblox.app"
31   uninstall quit: "com.roblox.RobloxPlayer"
33   zap trash: [
34     "~/Library/Preferences/com.Roblox.Roblox.plist",
35     "~/Library/Preferences/com.roblox.RobloxPlayer.plist",
36     "~/Library/Preferences/com.roblox.RobloxPlayerChannel.plist",
37   ]
38 end