Merge pull request #200213 from Homebrew/bump-tidelift-1.14.0
[Homebrew/homebrew-cask.git] / Casks / r / roblox.rb
blob14cbb229f0957f0a245b59b3a77a11b5f4745156
1 cask "roblox" do
2   arch arm: "arm64/"
4   version "0.658.0.6580461,4c01fa4a41074574"
5   sha256 arm:   "084da0801c5d2ec444a64996e440014bde2c44398caf4a51b98ffcb929a150ab",
6          intel: "335e9f4aee53027dad323e05248ce6ea4d40af4d4a0f706509356dbab7b819f0"
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