excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / v / virtual-ii.rb
blob03b98e69f2d951d0e41963350c9090319767fc6c
1 cask "virtual-ii" do
2   version "12.1.1"
3   sha256 :no_check
5   url "https://virtualii.com/VirtualII.dmg"
6   name "Virtual ]["
7   desc "Apple II Emulator"
8   homepage "https://virtualii.com/"
10   livecheck do
11     url "https://virtualii.com/versionlist.xml"
12     strategy :xml do |xml|
13       version = xml.elements["//key[text()='VirtualII']"]&.next_element&.text
14       next if version.blank?
16       version.strip
17     end
18   end
20   depends_on macos: ">= :monterey"
22   suite "Virtual ]["
24   preflight do
25     # There is no sub-folder in the DMG; the root *is* the folder
26     FileUtils.mv(staged_path.children, staged_path.join("Virtual ][").tap(&:mkpath))
27   end
29   zap trash: [
30     "~/Library/Application Support/Virtual ][",
31     "~/Library/Caches/SentryCrash/Virtual ][",
32     "~/Library/Application Scripts/nl.xs4all.gp.virtualii.VIIDiskViewerQLExtension",
33     "~/Library/Application Scripts/nl.xs4all.gp.virtualii.VIISavedStateViewerExtension",
34     "~/Library/Caches/nl.xs4all.gp.virtualii",
35     "~/Library/Containers/nl.xs4all.gp.virtualii.VIIDiskViewerQLExtension",
36     "~/Library/Containers/nl.xs4all.gp.virtualii.VIISavedStateViewerExtension",
37     "~/Library/HTTPStorages/nl.xs4all.gp.virtualii",
38     "~/Library/Preferences/nl.xs4all.gp.virtualii.plist",
39     "~/Library/Saved Application State/nl.xs4all.gp.virtualii.savedState",
40   ]
42   caveats <<~EOS
43     This app requires a ROM image, which must be downloaded and installed
44     separately. See #{homepage}VirtualIIHelp/virtual_II_help.html#ROMImage
45     for more info.
46   EOS
47 end