cask "hoptodesk" do os macos: "HopToDesk", linux: "hoptodesk" url_end = on_system_conditional macos: "dmg", linux: "AppImage" version "1.46.64" sha256 arm: "e3c197c5d78f12c12d0c35b3e81c1e860b933b2a08927a036162dbcdd51b0812", intel: "e3c197c5d78f12c12d0c35b3e81c1e860b933b2a08927a036162dbcdd51b0812", x86_64_linux: "e67067fe5723b0c00ec2c15e4445a34e8be0fd01a6aa67fb07439a1b8fc353a5" on_macos do app "HopToDesk.app" uninstall launchctl: [ "com.hoptodesk.HopToDesk_server", "com.hoptodesk.HopToDesk_service", ], quit: "com.hoptodesk.hoptodesk" zap trash: [ "/Library/LaunchAgents/com.hoptodesk.HopToDesk_server.plist", "/Library/LaunchDaemons/com.hoptodesk.HopToDesk_service.plist", "~/Library/Logs/HopToDesk", "~/Library/Preferences/com.hoptodesk.HopToDesk", "~/Library/Saved Application State/com.hoptodesk.hoptodesk.savedState", ] end on_linux do depends_on arch: :x86_64 app_image "hoptodesk.AppImage", target: "HopToDesk.AppImage" end url "https://dl.hoptodesk.com/releases/#{version}/#{os}.#{url_end}" name "HopToDesk" desc "Remote desktop and remote support tool with end-to-end encryption" homepage "https://www.hoptodesk.com/" livecheck do url "https://dl.hoptodesk.com/latest.json" strategy :json do |json| json.dig("files", "#{os}.#{url_end}", "version") end end end