cask 'parallels-desktop11' do version '11.2.2-32651' sha256 'f0af6eafb8fd468f84a7ce6dd21d7465589901d2215766f2989add5d5a61ca12' url "https://download.parallels.com/desktop/v#{version.major}/#{version}/ParallelsDesktop-#{version}.dmg" name 'Parallels Desktop' homepage 'https://www.parallels.com/products/desktop/' app 'Parallels Desktop.app' postflight do # Unhide the application system '/usr/bin/sudo', '-E', '--', 'chflags', 'nohidden', "#{appdir}/Parallels Desktop.app" # Run the initialization script system '/usr/bin/sudo', '-E', '--', "#{appdir}/Parallels Desktop.app/Contents/MacOS/inittool", 'init', '-b', "#{appdir}/Parallels Desktop.app" end uninstall_preflight do set_ownership "#{appdir}/Parallels Desktop.app" end uninstall delete: [ '/usr/bin/prl_convert', '/usr/bin/prl_disk_tool', '/usr/bin/prl_perf_ctl', '/usr/bin/prlctl', '/usr/bin/prlsrvctl', ] zap delete: [ '~/.parallels_settings', '~/Library/Caches/com.parallels.desktop.console', '~/Library/Preferences/com.parallels.desktop.console.LSSharedFileList.plist', '~/Library/Preferences/com.parallels.desktop.console.plist', '~/Library/Preferences/com.parallels.Parallels Desktop Statistics.plist', '~/Library/Preferences/com.parallels.Parallels Desktop.plist', '~/Library/Preferences/com.parallels.Parallels.plist', ] end