summaryrefslogtreecommitdiffstats
path: root/src/VBox/Installer/darwin/VirtualBox
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 03:01:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 03:01:46 +0000
commitf8fe689a81f906d1b91bb3220acde2a4ecb14c5b (patch)
tree26484e9d7e2c67806c2d1760196ff01aaa858e8c /src/VBox/Installer/darwin/VirtualBox
parentInitial commit. (diff)
downloadvirtualbox-upstream.tar.xz
virtualbox-upstream.zip
Adding upstream version 6.0.4-dfsg.upstream/6.0.4-dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/VBox/Installer/darwin/VirtualBox/PkgBuildComponent.plist17
-rwxr-xr-xsrc/VBox/Installer/darwin/VirtualBox/VBoxAutostartDarwin.sh61
-rw-r--r--src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxautostart.plist19
-rw-r--r--src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxballoonctrl.plist14
-rw-r--r--src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxwebsrv.plist26
-rwxr-xr-xsrc/VBox/Installer/darwin/VirtualBox/postflight99
-rwxr-xr-xsrc/VBox/Installer/darwin/VirtualBox/preflight31
-rw-r--r--src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.html7
-rw-r--r--src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.rtf9
-rw-r--r--src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings23
-rw-r--r--src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.html12
-rw-r--r--src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.rtf13
-rw-r--r--src/VBox/Installer/darwin/VirtualBox_mpkg/background.tifbin0 -> 206064 bytes
-rw-r--r--src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist130
14 files changed, 461 insertions, 0 deletions
diff --git a/src/VBox/Installer/darwin/VirtualBox/PkgBuildComponent.plist b/src/VBox/Installer/darwin/VirtualBox/PkgBuildComponent.plist
new file mode 100644
index 00000000..a67ae42c
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox/PkgBuildComponent.plist
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<array>
+ <dict>
+ <key>RootRelativeBundlePath</key> <string>VirtualBox.app</string>
+ <key>BundleIsRelocatable</key> <false/>
+ <key>BundleIsVersionChecked</key> <false/>
+ <key>BundleHasStrictIdentifier</key> <false/>
+ <key>BundleOverwriteAction</key> <string>upgrade</string>
+ <key>BundlePreInstallScriptPath</key> <string>preflight</string>
+ <key>BundlePostInstallScriptPath</key> <string>postflight</string>
+ </dict>
+</array>
+</plist>
+
+
diff --git a/src/VBox/Installer/darwin/VirtualBox/VBoxAutostartDarwin.sh b/src/VBox/Installer/darwin/VirtualBox/VBoxAutostartDarwin.sh
new file mode 100755
index 00000000..e6370b2b
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox/VBoxAutostartDarwin.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+#
+# Copyright (C) 2012-2019 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+#
+# Wrapper for the per user autostart daemon. Gets a list of all users
+# and starts the VMs.
+#
+
+function vboxStartStopAllUserVms()
+{
+ # Go through the list and filter out all users without a shell and a
+ # non existing home.
+ for user in `dscl . -list /Users`
+ do
+ HOMEDIR=`dscl . -read /Users/${user} | grep NFSHomeDirectory | sed 's/NFSHomeDirectory: //g'`
+ USERSHELL=`dscl . -read /Users/${user} | grep UserShell | sed 's/UserShell: //g'`
+
+ # Check for known home directories and shells for daemons
+ if [[ "${HOMEDIR}" == "/var/empty" || "${HOMEDIR}" == "/dev/null" || "${HOMEDIR}" == "/var/root"
+ || "${USERSHELL}" == "/usr/bin/false" || "${USERSHELL}" == "/dev/null" || "${USERSHELL}" == "/usr/sbin/uucico" ]]
+ then
+ continue
+ fi
+
+ case "${1}" in
+ start)
+ # Start the daemon
+ su ${user} -c "/Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart --quiet --start --background --config ${CONFIG}"
+ ;;
+ stop)
+ # Start the daemon
+ su ${user} -c "/Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart --quiet --stop --config ${CONFIG}"
+ ;;
+ *)
+ echo "Usage: start|stop"
+ exit 1
+ esac
+ done
+}
+
+function vboxStopAllUserVms()
+{
+ vboxStartStopAllUserVms "stop"
+}
+
+CONFIG=${1}
+vboxStartStopAllUserVms "start"
+trap vboxStopAllUserVms HUP KILL TERM
+
+
diff --git a/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxautostart.plist b/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxautostart.plist
new file mode 100644
index 00000000..ca0b770e
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxautostart.plist
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Disabled</key>
+ <true/>
+ <key>Label</key>
+ <string>org.virtualbox.vboxautostart</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/Applications/VirtualBox.app/Contents/MacOS/VBoxAutostartDarwin.sh</string>
+ <string>/etc/vbox/autostart.cfg</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+ <key>LaunchOnlyOnce</key>
+ <true/>
+</dict>
+</plist>
diff --git a/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxballoonctrl.plist b/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxballoonctrl.plist
new file mode 100644
index 00000000..f70805f0
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxballoonctrl.plist
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Disabled</key>
+ <true/>
+ <key>KeepAlive</key>
+ <false/>
+ <key>Label</key>
+ <string>org.virtualbox.vboxballoonctrl</string>
+ <key>Program</key>
+ <string>/Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl</string>
+</dict>
+</plist>
diff --git a/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxwebsrv.plist b/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxwebsrv.plist
new file mode 100644
index 00000000..95cbf994
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxwebsrv.plist
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Disabled</key>
+ <true/>
+ <key>KeepAlive</key>
+ <false/>
+ <key>Label</key>
+ <string>org.virtualbox.vboxwebsvc</string>
+ <key>Program</key>
+ <string>/Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv</string>
+ <key>Sockets</key>
+ <dict>
+ <key>Listeners</key>
+ <dict>
+ <key>SockServiceName</key>
+ <string>18083</string>
+ <key>SockType</key>
+ <string>stream</string>
+ <key>SockFamily</key>
+ <string>IPv4</string>
+ </dict>
+ </dict>
+</dict>
+</plist>
diff --git a/src/VBox/Installer/darwin/VirtualBox/postflight b/src/VBox/Installer/darwin/VirtualBox/postflight
new file mode 100755
index 00000000..e9132a69
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox/postflight
@@ -0,0 +1,99 @@
+#!/bin/sh
+# $Id: postflight $
+## @file
+# Post installation script.
+#
+
+#
+# Copyright (C) 2007-2019 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+CP="/bin/cp -f"
+CPDIR="${CP} -R"
+
+
+#
+# Install the Python bindings
+#
+VBOX_INSTALL_PATH=/Applications/VirtualBox.app/Contents/MacOS
+PYTHON="python python2.3 python2.5 python2.6 python2.7"
+if [ -e "${VBOX_INSTALL_PATH}/sdk/installer/vboxapisetup.py" ]; then
+ for p in $PYTHON; do
+ # Install the python bindings if python is in the path
+ if [ "`\${p} -c 'print "test"' 2> /dev/null`" = "test" ]; then
+ echo 1>&2 "Python found: ${p}, installing bindings..."
+ # Pass install path via environment
+ export VBOX_INSTALL_PATH
+ /bin/sh -c "cd $VBOX_INSTALL_PATH/sdk/installer && ${p} vboxapisetup.py install"
+ /bin/sh -c "cd $VBOX_INSTALL_PATH/sdk/installer && ${p} vboxapisetup.py clean --all"
+ fi
+ done
+fi
+
+#
+# Install the vboxweb service file for launchd
+#
+VBOXWEBSRV="${VBOX_INSTALL_PATH}/org.virtualbox.vboxwebsrv.plist"
+VBOXWEBSRV_TRG="${HOME}/Library/LaunchAgents"
+if [[ -e "${VBOXWEBSRV}" && -e "${VBOXWEBSRV_TRG}" ]]; then
+ echo "Installing vboxwebsrv launchd file to ${VBOXWEBSRV_TRG}"
+ ${CP} "${VBOXWEBSRV}" "${VBOXWEBSRV_TRG}/"
+ [ "x" != "x${USER}" ] && /usr/sbin/chown "${USER}" "${VBOXWEBSRV_TRG}/org.virtualbox.vboxwebsrv.plist"
+fi
+
+#
+# Install any custom files
+#
+DATAPATH="`/usr/bin/dirname "${0}"`/../../../../../.."
+if [ -d "${DATAPATH}/.custom" ]; then
+ echo 1>&2 "Copy ${DATAPATH}/.custom to ${VBOX_INSTALL_PATH}...";
+ ${CPDIR} "${DATAPATH}/.custom/" "${VBOX_INSTALL_PATH}/custom"
+fi
+
+#
+# Register our file extensions
+#
+LSREGISTER=/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
+if [[ -e "${LSREGISTER}" && "x" != "x${USER}" ]]; then
+ echo "Register file extensions for \"${USER}\""
+ /usr/bin/sudo -u "${USER}" ${LSREGISTER} -f /Applications/VirtualBox.app
+ /usr/bin/sudo -u "${USER}" ${LSREGISTER} -f /Applications/VirtualBox.app/Contents/Resources/vmstarter.app
+fi
+
+# Check environment.
+if [ "${INSTALLER_TEMP}x" == "x" ]; then
+ echo "Required environment variable INSTALLER_TEMP is missing. Aborting installation."
+ exit 1;
+fi
+
+# Restore previously installed Extension Packs (if any)
+if [ -d "${INSTALLER_TEMP}/ExtensionPacks" ]; then
+ cp -r "${INSTALLER_TEMP}/ExtensionPacks" "${VBOX_INSTALL_PATH}"
+ rm -rf "${INSTALLER_TEMP}/ExtensionPacks"
+fi
+
+#
+# Correct the ownership of the directories in case there
+# was an existing installation.
+#
+chown -R root:admin /Applications/VirtualBox.app
+
+#
+# Workaround for 10.11 beta 6 in which the above chown strips the set-uid-to-root bit.
+#
+SET_UID_BINARIES="VBoxNetAdpCtl"
+SET_UID_BINARIES="${SET_UID_BINARIES} VBoxHeadless VirtualBoxVM VBoxNetDHCP VBoxNetNAT" # WITH_HARDENING
+for bin in ${SET_UID_BINARIES}; do
+ chmod u+s "/Applications/VirtualBox.app/Contents/MacOS/${bin}"
+done
+
+exit 0;
+
diff --git a/src/VBox/Installer/darwin/VirtualBox/preflight b/src/VBox/Installer/darwin/VirtualBox/preflight
new file mode 100755
index 00000000..95f10fbe
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox/preflight
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+#
+# Copyright (C) 2007-2019 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+set -e
+
+# Check environment.
+if [ "${INSTALLER_TEMP}x" == "x" ]; then
+ echo "Required environment variable INSTALLER_TEMP is missing. Aborting installation."
+ exit 1;
+fi
+
+# Backup previously installed Extension Packs before
+# installation process will completely remove previously installed
+# VirtualBox distribution.
+EXTPACKS_ROOT_PATH="/Applications/VirtualBox.app/Contents/MacOS/ExtensionPacks"
+if [ -d "${EXTPACKS_ROOT_PATH}" ]; then
+ cp -r "${EXTPACKS_ROOT_PATH}" "${INSTALLER_TEMP}"
+fi
+
+exit 0;
diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.html b/src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.html
new file mode 100644
index 00000000..780149a6
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.html
@@ -0,0 +1,7 @@
+<font face="sans-serif">
+
+<p>To start VirtualBox, go to your Applications folder and double click on the
+VirtualBox icon.</p>
+
+</font>
+
diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.rtf b/src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.rtf
new file mode 100644
index 00000000..09d3de53
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.rtf
@@ -0,0 +1,9 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\vieww10800\viewh8400\viewkind0
+\deftab720
+\pard\pardeftab720\sa240
+
+\f0\fs24 \cf0 To start VirtualBox, go to your Applications folder and double click on the VirtualBox icon.\
+} \ No newline at end of file
diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings b/src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings
new file mode 100644
index 00000000..b3cd4b3e
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings
@@ -0,0 +1,23 @@
+'VirtualBox_title' = '@VBOX_PRODUCT@';
+
+'choiceVBoxKEXTs_title' = '@VBOX_PRODUCT@ Kernel Extensions';
+'choiceVBoxKEXTs_msg' = 'Installs the @VBOX_PRODUCT@ Kernel Extensions into /Library/Application Support/VirtualBox.';
+
+'choiceVBox_title' = '@VBOX_PRODUCT@';
+'choiceVBox_msg' = 'Installs the @VBOX_PRODUCT@ application into /Applications.';
+
+'choiceVBoxCLI_title' = '@VBOX_PRODUCT@ Command Line Utilities';
+'choiceVBoxCLI_msg' = 'Installs the @VBOX_PRODUCT@ command line utilities into /usr/bin.';
+
+'choiceOSXFuseCore_title' = 'FUSE for macOS core package';
+'choiceOSXFuseCore_msg' = 'Installs the FUSE for macOS core package for the image mounter.';
+
+'RUNNING_VMS_TLE' = "Running VirtualBox virtual machines detected!";
+'RUNNING_VMS_MSG' = "The installer has detected running virtual machines. Please shut down all running VirtualBox machines and then restart the installation.";
+
+'UNSUPPORTED_HW_MACHINE_TLE' = "Unsupported hardware architecture detected!";
+'UNSUPPORTED_HW_MACHINE_MSG' = "The installer has detected an unsupported architecture. VirtualBox only runs on the amd64 architecture.";
+
+'UNSUPPORTED_OS_TLE' = "Unsupported OS version detected!";
+'UNSUPPORTED_OS_MSG' = "The installer has detected an unsupported operation system. VirtualBox requires Mac OS X 10.9 or later.";
+
diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.html b/src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.html
new file mode 100644
index 00000000..956c2504
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.html
@@ -0,0 +1,12 @@
+<font face="sans-serif">
+<h2>@VBOX_PRODUCT@ for macOS</h2>
+
+<p>Welcome to @VBOX_PRODUCT@
+@VBOX_VERSION_MAJOR@.@VBOX_VERSION_MINOR@.@VBOX_VERSION_BUILD@ for macOS!
+This installer will guide you through the installation process. In a minute
+from now, you will be able to execute virtual machines running different
+operating systems on your desktop. You will find that VirtualBox delivers a
+great feature set and excellent performance.</p>
+
+</font>
+
diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.rtf b/src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.rtf
new file mode 100644
index 00000000..4a8bbaf3
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.rtf
@@ -0,0 +1,13 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\vieww10800\viewh8400\viewkind0
+\deftab720
+\pard\pardeftab720\sa280
+
+\f0\b\fs36 \cf0 @VBOX_PRODUCT@ for macOS
+\b0 \
+\pard\pardeftab720\sa240
+
+\fs24 \cf0 Welcome to @VBOX_PRODUCT@ @VBOX_VERSION_MAJOR@.@VBOX_VERSION_MINOR@.@VBOX_VERSION_BUILD@ for macOS! This installer will guide you through the installation process. In a minute from now, you will be able to execute virtual machines running different operating systems on your desktop. You will find that VirtualBox delivers a great feature set and excellent performance.\
+}
diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/background.tif b/src/VBox/Installer/darwin/VirtualBox_mpkg/background.tif
new file mode 100644
index 00000000..9b99f142
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/background.tif
Binary files differ
diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist b/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist
new file mode 100644
index 00000000..3d5d59d5
--- /dev/null
+++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+#
+# Copyright (C) 2008-2015 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+-->
+<installer-gui-script minSpecVersion="1.0">
+ <title>VirtualBox_title</title>
+ <options customize="allow" allow-external-scripts="yes" rootVolumeOnly="true" hostArchitectures="i386"/>
+ <installation-check script="checkPrerequisite()"></installation-check>
+ <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
+ <script>
+//<![CDATA[
+ /* js:pkmk:start */
+ function checkPrerequisite()
+ {
+ try
+ {
+ test = system.version['ProductVersion'];
+ system.log("OS version detected: " + test);
+ result = (system.compareVersions(test, '10.9') >= 0);
+ } catch (e) { system.log(e); result = false; }
+
+ if (!result)
+ {
+ my.result.type = 'Fatal';
+ my.result.title = system.localizedString('UNSUPPORTED_OS_TLE');
+ my.result.message = system.localizedString('UNSUPPORTED_OS_MSG');
+ return result;
+ }
+
+ try
+ {
+ test = system.sysctl('hw.machine');
+ system.log("Hardware architecture detected: " + test);
+ result = (test == 'x86_64');
+ } catch (e) { system.log(e); result = false; }
+
+ if (!result)
+ {
+ my.result.type = 'Fatal';
+ my.result.title = system.localizedString('UNSUPPORTED_HW_MACHINE_TLE');
+ my.result.message = system.localizedString('UNSUPPORTED_HW_MACHINE_MSG');
+ return result;
+ }
+
+ try
+ {
+ /* The following shell script uses tools which were added in 10.8
+ (Mountain Lion) and later, in particular pgrep and pkill. */
+ if (system.compareVersions(system.version['ProductVersion'], '10.8') >= 0)
+ {
+ /* Embedded scripts are not available here. So, just do a
+ command line checking if any VBoxXPCOMIPCD has more than one
+ client, and if there are none, kill all the usual suspects to
+ get a clean slate. This is done because the VirtualBox event
+ handling had a bug which allowed no longer present passive
+ event listeners to block VBoxSVC processes from exiting until
+ the waiting time was elapsed. In the extreme case this was
+ infinitely long, blocking updates. */
+ system.run('/bin/sh', '-c', 'pids=`/usr/bin/pgrep VBoxXPCOMIPCD` rc=0; [ -z "$pids" ] && rc=1; for i in $pids; do c=`/usr/sbin/lsof -p $i | /usr/bin/grep -E \'^[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +unix\' | wc -l`; [ $c -le 2 ] || rc=1; done; if [ $rc -eq 0 ]; then /usr/bin/pkill -KILL \'^(VirtualBox)|(VBoxNetDHCP)|(VBoxNetNAT)|(VBoxHeadless)|(VBoxXPCOMIPCD)|(VBoxSVC)$\'; sleep 1; fi');
+ }
+ } catch (e) { system.log(e); }
+
+ try
+ {
+ /* Embedded scripts are not available here. So, just do a command
+ line checking for running VMs instead. */
+ rcScript = system.run('/bin/sh', '-c', '/bin/ps -e | /usr/bin/grep -E \'[V]irtualBox.*startvm|[V]BoxNetDHCP|[V]BoxNetNAT|[V]BoxHeadless|[V]BoxSVC\'');
+ result = (rcScript != 0);
+ system.log("system.run /bin/sh .. returned: " + rcScript + " result=" + result);
+ } catch (e) { system.log(e); result = false; }
+
+ if (!result)
+ {
+ /* Temporary instrumentation for finding out with some probability
+ * who keeps VBoxSVC busy (unix socket to VBoxXPCOMIPCD open). Needs
+ * very little time (unlike a full lsof) and causes bearable amount
+ * of messages to install.log so that it can stay in for a while. */
+ try
+ {
+ system.run('/usr/sbin/lsof', '-l', '-U');
+ } catch (e) { system.log(e); }
+
+ my.result.type = 'Fatal';
+ my.result.title = system.localizedString('RUNNING_VMS_TLE');
+ my.result.message = system.localizedString('RUNNING_VMS_MSG');
+ return result;
+ }
+
+ system.log("result:" + result);
+ return result;
+ }
+ /* js:pkmk:end */
+//]]>
+ </script>
+ <background file="background.tif" alignment="topleft" scaling="none"/>
+ <welcome file="Welcome.rtf" mime-type="text/rtf" uti="public.rtf"/>
+ <choices-outline>
+ <line choice="choiceVBoxKEXTs"></line>
+ <line choice="choiceVBox"></line>
+ <line choice="choiceVBoxCLI"></line>
+ <line choice="choiceOSXFuseCore"></line>
+ </choices-outline>
+ <choice id="choiceVBoxKEXTs" title="choiceVBoxKEXTs_title" description="choiceVBoxKEXTs_msg" start_selected="true" start_enabled="false" start_visible="true">
+ <pkg-ref id="org.virtualbox.pkg.vboxkexts"></pkg-ref>
+ </choice>
+ <choice id="choiceVBox" title="choiceVBox_title" description="choiceVBox_msg" start_selected="true" start_enabled="false" start_visible="true">
+ <pkg-ref id="org.virtualbox.pkg.virtualbox"></pkg-ref>
+ </choice>
+ <choice id="choiceVBoxCLI" title="choiceVBoxCLI_title" description="choiceVBoxCLI_msg" start_selected="true" start_enabled="true" start_visible="true">
+ <pkg-ref id="org.virtualbox.pkg.virtualboxcli"></pkg-ref>
+ </choice>
+ <choice id="choiceOSXFuseCore" title="choiceOSXFuseCore_title" description="choiceOSXFuseCore_msg" start_selected="true" start_enabled="true" start_visible="true">
+ <pkg-ref id="com.github.osxfuse.pkg.Core"></pkg-ref>
+ </choice>
+ <pkg-ref id="org.virtualbox.pkg.vboxkexts" auth="Root">file:./Contents/Packages/VBoxKEXTs.pkg</pkg-ref>
+ <pkg-ref id="org.virtualbox.pkg.virtualbox" auth="Root">file:./Contents/Packages/VirtualBox.pkg</pkg-ref>
+ <pkg-ref id="org.virtualbox.pkg.virtualboxcli" auth="Root">file:./Contents/Packages/VirtualBoxCLI.pkg</pkg-ref>
+ <pkg-ref id="com.github.osxfuse.pkg.Core" auth="Root">file:./Contents/Packages/OSXFuseCore.pkg</pkg-ref>
+</installer-gui-script>
+