You are on page 1of 3

<?xml version="1.0" encoding="utf-8" standalone="yes"?

>
<installer-gui-script minSpecVersion="2">
<title>Andy_title</title>
<options customize="never" allow-external-scripts="yes" rootVolumeOnly="true"
hostArchitectures="x86_64"/>
<domains enable_anywhere="false" enable_currentUserHome="false"
enable_localSystem="true"/>
<welcome file="Welcome.rtf" mime-type="text/rtf" uti="public.rtf"/>
<license file="License.rtf" mime-type="text/rtf" uti="public.rtf"/>
<background file="background.tif" alignment="topleft" scaling="none"/>
<installation-check script="checkPrerequisite()"/>
<script>
//<![CDATA[
/* js:pkmk:start */
function checkPrerequisite()
{
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
{
test = system.version['ProductVersion'];
system.log("OS version detected: " + test);
result = (system.compareVersions(test, '10.6') >= 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
{
/* 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>
<volume-check>
<allowed-os-versions>
<os-version min="10.8"/>
</allowed-os-versions>
</volume-check>
<choices-outline>
<line choice="default">
<line choice="org.virtualbox.pkg.virtualboxcli"/>
<line choice="org.virtualbox.pkg.vboxkexts"/>
<line choice="net.andyroid.andy.player.osx"/>
</line>
</choices-outline>
<choice id="default"/>
<choice id="org.virtualbox.pkg.virtualboxcli" visible="false">
<pkg-ref id="org.virtualbox.pkg.virtualboxcli"/>
</choice>
<choice id="org.virtualbox.pkg.vboxkexts" visible="false">
<pkg-ref id="org.virtualbox.pkg.vboxkexts"/>
</choice>
<choice id="net.andyroid.andy.player.osx" visible="false">
<pkg-ref id="net.andyroid.andy.player.osx"/>
</choice>
<pkg-ref id="org.virtualbox.pkg.virtualboxcli">
<bundle-version>
<bundle CFBundleShortVersionString="4.3.20" CFBundleVersion="4.3.20"
id="org.virtualbox.app.VirtualBox" path="VirtualBox.app"/>
</bundle-version>
</pkg-ref>
<pkg-ref id="org.virtualbox.pkg.virtualboxcli" auth="Root" version="4.3.20"
onConclusion="none" packageIdentifier="org.virtualbox.pkg.virtualbox"
installKBytes="242834">#VirtualBox.pkg</pkg-ref>
<pkg-ref id="org.virtualbox.pkg.vboxkexts">
<bundle-version>
<bundle CFBundleShortVersionString="4.3.20" CFBundleVersion="4.3.20"
id="org.virtualbox.kext.VBoxNetAdp" path="VBoxNetAdp.kext"/>
<bundle CFBundleShortVersionString="4.3.20" CFBundleVersion="4.3.20"
id="org.virtualbox.kext.VBoxDrv" path="VBoxDrv.kext"/>
<bundle CFBundleShortVersionString="4.3.20" CFBundleVersion="4.3.20"
id="org.virtualbox.kext.VBoxNetFlt" path="VBoxNetFlt.kext"/>
<bundle CFBundleShortVersionString="4.3.20" CFBundleVersion="4.3.20"
id="org.virtualbox.kext.VBoxUSB" path="VBoxUSB.kext"/>
</bundle-version>
</pkg-ref>
<pkg-ref id="org.virtualbox.pkg.vboxkexts" auth="Root" version="4.3.20"
onConclusion="none" installKBytes="957">#VBoxKEXTs.pkg</pkg-ref>
<pkg-ref id="net.andyroid.andy.player.osx">
<bundle-version>
<bundle CFBundleShortVersionString="5.4" CFBundleVersion="5.4.0"
id="org.qt-project.QtCore" path="Contents/Frameworks/QtCore.framework"/>
<bundle CFBundleShortVersionString="5.4" CFBundleVersion="5.4.0"
id="org.qt-project.QtSvg" path="Contents/Frameworks/QtSvg.framework"/>
<bundle CFBundleShortVersionString="5.4" CFBundleVersion="5.4.0"
id="org.qt-project.QtPrintSupport"
path="Contents/Frameworks/QtPrintSupport.framework"/>
<bundle CFBundleShortVersionString="5.4" CFBundleVersion="5.4.0"
id="org.qt-project.QtMultimedia"
path="Contents/Frameworks/QtMultimedia.framework"/>
<bundle CFBundleShortVersionString="5.4" CFBundleVersion="5.4.0"
id="org.qt-project.QtWidgets" path="Contents/Frameworks/QtWidgets.framework"/>
<bundle CFBundleShortVersionString="5.4" CFBundleVersion="5.4.0"
id="org.qt-project.QtOpenGL" path="Contents/Frameworks/QtOpenGL.framework"/>
<bundle CFBundleShortVersionString="5.4" CFBundleVersion="5.4.0"
id="org.qt-project.QtNetwork" path="Contents/Frameworks/QtNetwork.framework"/>
<bundle CFBundleShortVersionString="5.4" CFBundleVersion="5.4.0"
id="org.qt-project.QtGui" path="Contents/Frameworks/QtGui.framework"/>
</bundle-version>
</pkg-ref>
<pkg-ref id="net.andyroid.andy.player.osx" auth="Root" version="0.43"
onConclusion="none" installKBytes="519077">#Andy.pkg</pkg-ref>
<product version="0.43"/>
</installer-gui-script>

You might also like