homebrew-cask/Casks/tiled.rb

30 lines
776 B
Ruby

cask "tiled" do
version "1.9.2"
sha256 "ff1600a192b0ebff2f2394ff93db36c4273aed7c398ad7c5854b2a1249c469d9"
url "https://github.com/mapeditor/tiled/releases/download/v#{version}/Tiled-#{version}_macOS-10.13+.zip",
verified: "github.com/mapeditor/tiled/"
name "Tiled"
desc "Flexible level editor"
homepage "https://www.mapeditor.org/"
livecheck do
url :url
strategy :github_latest
end
depends_on macos: ">= :high_sierra"
app "Tiled.app"
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
shimscript = "#{staged_path}/tiled.wrapper.sh"
binary shimscript, target: "tiled"
preflight do
File.write shimscript, <<~EOS
#!/bin/bash
exec '#{appdir}/Tiled.app/Contents/MacOS/Tiled' "$@"
EOS
end
end