excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / s / sioyek.rb
blobaa71bdc879ec243588f9e92b64dfbb4323d864d6
1 cask "sioyek" do
2   version "2.0.0"
3   sha256 "0f81831d4fa0d57e7e7e56a40ab6fa6488950b7d6a944aa29918be42cfc46b8a"
5   url "https://github.com/ahrm/sioyek/releases/download/v#{version}/sioyek-release-mac.zip",
6       verified: "github.com/ahrm/sioyek/"
7   name "Sioyek"
8   desc "PDF viewer designed for reading research papers and technical books"
9   homepage "https://sioyek.info/"
11   livecheck do
12     url :url
13     strategy :github_latest
14   end
16   container nested: "build/sioyek.dmg"
18   app "sioyek.app"
19   # shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
20   shimscript = "#{staged_path}/sioyek.wrapper.sh"
21   binary shimscript, target: "sioyek"
23   preflight do
24     File.write shimscript, <<~EOS
25       #!/bin/sh
26       exec '#{appdir}/sioyek.app/Contents/MacOS/sioyek' "$@"
27     EOS
28   end
30   zap trash: [
31     "~/Library/Application Support/sioyek",
32     "~/Library/Saved Application State/com.yourcompany.sioyek.savedState",
33   ]
35   caveats do
36     requires_rosetta
37   end
38 end