forked from Homebrew/homebrew-cask
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd2dcd7
commit 12536d9
Showing
1 changed file
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
cask "virtualbox@beta" do | ||
arch arm: "macOSArm64", intel: "OSX" | ||
|
||
on_arm do | ||
version "7.0.17_BETA4-162969" | ||
sha256 "5e64b43f9ebc32626e2b2497af82dd7232f3aacc35a57cc5739115381726e72a" | ||
end | ||
on_intel do | ||
version "7.0.17-162969" | ||
sha256 "cec4000c9bf842eb781be279811f64ad875f678cdc1c3f41e2d66cc9e109f8f3" | ||
end | ||
|
||
url "https://www.virtualbox.org/download/testcase/VirtualBox-#{version}-#{arch}.dmg" | ||
name "Oracle VirtualBox" | ||
desc "Virtualizer for x86 and arm64 hardware" | ||
homepage "https://www.virtualbox.org/wiki/Testbuilds" | ||
|
||
livecheck do | ||
url :homepage | ||
regex(/href=.*?VirtualBox[._-]v?(\d+(?:[.-]\d+)+.*?)[._-]#{arch}\.dmg(?!.+?development)/i) | ||
end | ||
|
||
conflicts_with cask: "virtualbox" | ||
depends_on macos: ">= :catalina" | ||
|
||
pkg "VirtualBox.pkg", | ||
choices: [ | ||
{ | ||
"choiceIdentifier" => "choiceVBoxKEXTs", | ||
"choiceAttribute" => "selected", | ||
"attributeSetting" => 1, | ||
}, | ||
{ | ||
"choiceIdentifier" => "choiceVBox", | ||
"choiceAttribute" => "selected", | ||
"attributeSetting" => 1, | ||
}, | ||
{ | ||
"choiceIdentifier" => "choiceVBoxCLI", | ||
"choiceAttribute" => "selected", | ||
"attributeSetting" => 1, | ||
}, | ||
{ | ||
"choiceIdentifier" => "choiceOSXFuseCore", | ||
"choiceAttribute" => "selected", | ||
"attributeSetting" => 0, | ||
}, | ||
] | ||
|
||
postflight do | ||
# If VirtualBox is installed before `/usr/local/lib/pkgconfig` is created by Homebrew, | ||
# it creates it itself with incorrect permissions that break other packages. | ||
# See https://github.com/Homebrew/homebrew-cask/issues/68730#issuecomment-534363026 | ||
set_ownership "/usr/local/lib/pkgconfig" | ||
end | ||
|
||
uninstall script: { | ||
executable: "VirtualBox_Uninstall.tool", | ||
args: ["--unattended"], | ||
sudo: true, | ||
}, | ||
pkgutil: "org.virtualbox.pkg.*", | ||
delete: "/usr/local/bin/vboximg-mount" | ||
|
||
zap trash: [ | ||
"/Library/Application Support/VirtualBox", | ||
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.virtualbox.app.virtualbox.sfl*", | ||
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.virtualbox.app.virtualboxvm.sfl*", | ||
"~/Library/Preferences/org.virtualbox.app.VirtualBox.plist", | ||
"~/Library/Preferences/org.virtualbox.app.VirtualBoxVM.plist", | ||
"~/Library/Saved Application State/org.virtualbox.app.VirtualBox.savedState", | ||
"~/Library/Saved Application State/org.virtualbox.app.VirtualBoxVM.savedState", | ||
"~/Library/VirtualBox", | ||
], | ||
rmdir: "~/VirtualBox VMs" | ||
|
||
caveats do | ||
kext | ||
end | ||
end |