excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / s / slicer.rb
blobcb80d606d8f408ce987fab985f8ae70bdbc630a0
1 cask "slicer" do
2   version "5.6.2,660fa2e930e435b0e355f67c"
3   sha256 "1b2f8700607f40b03973ad35ce5d2195b931907c6ed0d5ec71a9b24f5447584b"
5   url "https://slicer-packages.kitware.com/api/v1/item/#{version.csv.second}/download",
6       verified: "slicer-packages.kitware.com/"
7   name "3D Slicer"
8   desc "Medical image processing and visualization system"
9   homepage "https://www.slicer.org/"
11   livecheck do
12     url "https://download.slicer.org"
13     regex(%r{href=.*?/bitstream/(\h+)["' >].+?["']header["'][^>]*?>\s*v?(\d+(?:\.\d+)+)}im)
14     strategy :page_match do |page, regex|
15       match = page.scan(regex)
16       next if match.length < 2
18       "#{match[1][1]},#{match[1][0]}"
19     end
20   end
22   conflicts_with cask: "slicer@preview"
24   app "Slicer.app"
26   zap trash: [
27     "~/.config/www.na-mic.org",
28     "~/Library/Application Support/NA-MIC",
29     "~/Library/Preferences/org.slicer.slicer.plist",
30     "~/Library/Preferences/Slicer.plist",
31     "~/Library/Saved Application State/org.slicer.slicer.savedState",
32   ]
34   caveats do
35     requires_rosetta
36   end
37 end