homebrew-cask/Casks/cutter.rb

39 lines
1.1 KiB
Ruby

cask "cutter" do
version "2.0.4"
sha256 "030762bfbcac52e3e06c3a2bd98d221b063c716efb154c45ecb672e826c356f8"
url "https://github.com/rizinorg/cutter/releases/download/v#{version}/Cutter-v#{version}-x64.macOS.dmg",
verified: "github.com/rizinorg/cutter/"
name "Cutter"
desc "Reverse engineering platform powered by Rizin"
homepage "https://cutter.re/"
livecheck do
url :url
strategy :github_latest
end
depends_on macos: ">= :sierra"
app "Cutter.app"
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
shimscript = "#{staged_path}/cutter.wrapper.sh"
binary shimscript, target: "cutter"
preflight do
File.write shimscript, <<~EOS
#!/bin/sh
'#{appdir}/Cutter.app/Contents/MacOS/Cutter' "$@"
EOS
end
zap trash: [
"~/.config/rizin",
"~/.local/share/rizin",
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/re.rizin.cutter.sfl*",
"~/Library/Application Support/rizin",
"~/Library/Preferences/re.rizin.cutter.plist",
"~/Library/Saved Application State/re.rizin.cutter.savedState",
]
end