distribution.dist revision 629429ccab75e7f0d7d6a8991294e305819bf31a
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync<?xml version="1.0" encoding="UTF-8"?>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync<!--
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync#
a9ceb1b76f2372385c1477c4bbdc5ceeb45f1d2cvboxsync# Copyright (C) 2008-2012 Oracle Corporation
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync#
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# available from http://www.virtualbox.org. This file is free software;
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# you can redistribute it and/or modify it under the terms of the GNU
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# General Public License (GPL) as published by the Free Software
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync#
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync-->
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync<installer-gui-script minSpecVersion="1.0">
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <title>VirtualBox_title</title>
a9ceb1b76f2372385c1477c4bbdc5ceeb45f1d2cvboxsync <options customize="allow" allow-external-scripts="yes" rootVolumeOnly="true" hostArchitectures="i386"/>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <installation-check script="checkPrerequisite()"></installation-check>
a9ceb1b76f2372385c1477c4bbdc5ceeb45f1d2cvboxsync <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <script>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync /* js:pkmk:start */
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync function checkPrerequisite()
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync {
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync try
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync {
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync test = system.sysctl('hw.machine');
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync system.log("Hardware architecture detected: " + test);
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync result = (test == 'i386' || test == 'x86_64');
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync } catch (e) { system.log(e); result = false; }
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync if (!result)
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync {
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync my.result.type = 'Fatal';
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync my.result.title = system.localizedString('UNSUPPORTED_HW_MACHINE_TLE');
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync my.result.message = system.localizedString('UNSUPPORTED_HW_MACHINE_MSG');
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync return result;
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync }
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync try
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync {
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync test = system.version['ProductVersion'];
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync system.log("OS version detected: " + test);
629429ccab75e7f0d7d6a8991294e305819bf31avboxsync result = (system.compareVersions(test, '10.6') >= 0);
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync } catch (e) { system.log(e); result = false; }
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync if (!result)
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync {
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync my.result.type = 'Fatal';
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync my.result.title = system.localizedString('UNSUPPORTED_OS_TLE');
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync my.result.message = system.localizedString('UNSUPPORTED_OS_MSG');
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync return result;
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync }
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync try
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync {
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync /* Embedded scripts are not available here. So, just do a command
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync line checking for running VMs instead. */
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync rcScript = system.run('/bin/sh', '-c', '/bin/ps -e | /usr/bin/grep -E "VirtualBoxVM.*startvm|VBoxNetDHCP" | /usr/bin/grep -qv grep');
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync result = (rcScript != 0);
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync system.log("system.run /bin/sh .. returned: " + rcScript + " result=" + result);
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync } catch (e) { system.log(e); result = false; }
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync if (!result)
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync {
9c75fb45ee506229edd8f431ea22ac401dd29b9bvboxsync my.result.type = 'Fatal';
9c75fb45ee506229edd8f431ea22ac401dd29b9bvboxsync my.result.title = system.localizedString('RUNNING_VMS_TLE');
9c75fb45ee506229edd8f431ea22ac401dd29b9bvboxsync my.result.message = system.localizedString('RUNNING_VMS_MSG');
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync return result;
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync }
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync
e521c29e0b5c1e5d6adab4a0c61b4ed4479e5cfavboxsync system.log("result:" + result);
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync return result;
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync }
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync /* js:pkmk:end */
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync </script>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <background file="background.tif" alignment="topleft" scaling="none"/>
a9ceb1b76f2372385c1477c4bbdc5ceeb45f1d2cvboxsync <welcome file="Welcome.rtf" mime-type="text/rtf" uti="public.rtf"/>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <choices-outline>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <line choice="choiceVBoxKEXTs"></line>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <line choice="choiceVBoxStartup"></line>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <line choice="choiceVBox"></line>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <line choice="choiceVBoxCLI"></line>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync </choices-outline>
a9ceb1b76f2372385c1477c4bbdc5ceeb45f1d2cvboxsync <choice id="choiceVBoxKEXTs" title="choiceVBoxKEXTs_title" description="choiceVBoxKEXTs_msg" start_selected="true" start_enabled="false" start_visible="true">
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <pkg-ref id="org.virtualbox.pkg.vboxkexts"></pkg-ref>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync </choice>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <choice id="choiceVBoxStartup" title="choiceVBoxStartup_title" description="choiceVBoxStartup_msg" start_selected="true" start_enabled="false" start_visible="true">
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <pkg-ref id="org.virtualbox.pkg.vboxstartupitems"></pkg-ref>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync </choice>
a9ceb1b76f2372385c1477c4bbdc5ceeb45f1d2cvboxsync <choice id="choiceVBox" title="choiceVBox_title" description="choiceVBox_msg" start_selected="true" start_enabled="false" start_visible="true">
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <pkg-ref id="org.virtualbox.pkg.virtualbox"></pkg-ref>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync </choice>
a9ceb1b76f2372385c1477c4bbdc5ceeb45f1d2cvboxsync <choice id="choiceVBoxCLI" title="choiceVBoxCLI_title" description="choiceVBoxCLI_msg" start_selected="true" start_enabled="true" start_visible="true">
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <pkg-ref id="org.virtualbox.pkg.virtualboxcli"></pkg-ref>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync </choice>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <pkg-ref id="org.virtualbox.pkg.vboxkexts" auth="Root">file:/Contents/Packages/VBoxKEXTs.pkg</pkg-ref>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <pkg-ref id="org.virtualbox.pkg.vboxstartupitems" auth="Root">file:/Contents/Packages/VBoxStartupItems.pkg</pkg-ref>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <pkg-ref id="org.virtualbox.pkg.virtualbox" auth="Root">file:/Contents/Packages/VirtualBox.pkg</pkg-ref>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync <pkg-ref id="org.virtualbox.pkg.virtualboxcli" auth="Root">file:/Contents/Packages/VirtualBoxCLI.pkg</pkg-ref>
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync</installer-gui-script>
a9ceb1b76f2372385c1477c4bbdc5ceeb45f1d2cvboxsync