homebrew-cask/Casks/p/playdate-simulator.rb

37 lines
1.0 KiB
Ruby

cask "playdate-simulator" do
version "2.4.1"
sha256 "5186a96e77fd9f18e6b9bde11623d38667b796f088b9457fbe5eb0547f014017"
url "https://download-cdn.panic.com/playdate_sdk/PlaydateSDK-#{version}.zip",
verified: "download-cdn.panic.com/playdate_sdk/"
name "Playdate SDK"
desc "Playdate Lua and C APIs, docs and Simulator for local development"
homepage "https://play.date/dev/"
livecheck do
url "https://download.panic.com/playdate_sdk/PlaydateSDK-latest.zip"
strategy :header_match
end
depends_on macos: ">= :catalina"
pkg "PlaydateSDK.pkg"
uninstall_preflight do
Pathname("/usr/local/bin").glob("arm-*").each do |exec|
Utils.gain_permissions_remove(exec) if exec.exist? && exec.readlink.to_s.include?("playdate")
end
end
uninstall pkgutil: "date.play.sdk",
delete: "/usr/local/playdate",
trash: "~/Developer/PlaydateSDK",
rmdir: "~/Developer"
zap trash: "~/.Playdate"
caveats do
license "https://play.date/dev/sdk-license"
end
end