Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parallels@15: migrate #172766

Merged
merged 1 commit into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions Casks/p/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
cask "parallels@15" do
version "15.1.5-47309"
sha256 "94df473f7bddfd1371f78fd32d7f7bb16e5c9a1d1b39751bed77c992b6d3013e"

url "https://download.parallels.com/desktop/v#{version.major}/#{version}/ParallelsDesktop-#{version}.dmg"
name "Parallels Desktop"
desc "Desktop virtualization software"
homepage "https://www.parallels.com/products/desktop/"

livecheck do
url "https://kb.parallels.com/124724"
regex(/(\d+(?:\.\d+)+)(?:\s*| )\((\d+)\)/i)
strategy :page_match do |page, regex|
page.scan(regex).map { |match| "#{match[0]}-#{match[1]}" }
end
end

auto_updates true
conflicts_with cask: [
"parallels",
"parallels@12",
"parallels@13",
"parallels@14",
"parallels@16",
"parallels@17",
"parallels@18",
]
depends_on macos: ">= :sierra"

app "Parallels Desktop.app"

preflight do
system_command "chflags",
args: ["nohidden", "#{staged_path}/Parallels Desktop.app"]
system_command "xattr",
args: ["-d", "com.apple.FinderInfo", "#{staged_path}/Parallels Desktop.app"]
end

postflight do
system_command "#{appdir}/Parallels Desktop.app/Contents/MacOS/inittool",
args: ["init"],
sudo: true
end

uninstall_preflight do
set_ownership "#{appdir}/Parallels Desktop.app"
end

uninstall signal: ["TERM", "com.parallels.desktop.console"],
delete: [
"/usr/local/bin/prl_convert",
"/usr/local/bin/prl_disk_tool",
"/usr/local/bin/prl_perf_ctl",
"/usr/local/bin/prlcore2dmp",
"/usr/local/bin/prlctl",
"/usr/local/bin/prlexec",
"/usr/local/bin/prlsrvctl",
]

zap trash: [
"~/.parallels_settings",
"~/Library/Caches/com.apple.helpd/Generated/com.parallels.desktop.console.help*",
"~/Library/Caches/com.parallels.desktop.console",
"~/Library/Caches/Parallels Software/Parallels Desktop",
"~/Library/Logs/parallels.log",
"~/Library/Parallels/Parallels Desktop",
"~/Library/Preferences/com.parallels.desktop.console.LSSharedFileList.plist",
"~/Library/Preferences/com.parallels.desktop.console.plist",
"~/Library/Preferences/com.parallels.Parallels Desktop Events.plist",
"~/Library/Preferences/com.parallels.Parallels Desktop Statistics.plist",
"~/Library/Preferences/com.parallels.Parallels Desktop.plist",
"~/Library/Preferences/com.parallels.Parallels.plist",
"~/Library/Preferences/com.parallels.PDInfo.plist",
]
end