VirtualBox

source: vbox/trunk/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist@ 47880

Last change on this file since 47880 was 47880, checked in by vboxsync, 11 years ago

Installer\darwin: added VBoxNetLwipNAT (not tested).

File size: 4.6 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3#
4# Copyright (C) 2008-2012 Oracle Corporation
5#
6# This file is part of VirtualBox Open Source Edition (OSE), as
7# available from http://www.virtualbox.org. This file is free software;
8# you can redistribute it and/or modify it under the terms of the GNU
9# General Public License (GPL) as published by the Free Software
10# Foundation, in version 2 as it comes in the "COPYING" file of the
11# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
12# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
13#
14-->
15<installer-gui-script minSpecVersion="1.0">
16 <title>VirtualBox_title</title>
17 <options customize="allow" allow-external-scripts="yes" rootVolumeOnly="true" hostArchitectures="i386"/>
18 <installation-check script="checkPrerequisite()"></installation-check>
19 <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
20 <script>
21 /* js:pkmk:start */
22 function checkPrerequisite()
23 {
24 try
25 {
26 test = system.sysctl('hw.machine');
27 system.log("Hardware architecture detected: " + test);
28 result = (test == 'i386' || test == 'x86_64');
29 } catch (e) { system.log(e); result = false; }
30
31 if (!result)
32 {
33 my.result.type = 'Fatal';
34 my.result.title = system.localizedString('UNSUPPORTED_HW_MACHINE_TLE');
35 my.result.message = system.localizedString('UNSUPPORTED_HW_MACHINE_MSG');
36 return result;
37 }
38
39 try
40 {
41 test = system.version['ProductVersion'];
42 system.log("OS version detected: " + test);
43 result = (system.compareVersions(test, '10.6') >= 0);
44 } catch (e) { system.log(e); result = false; }
45
46 if (!result)
47 {
48 my.result.type = 'Fatal';
49 my.result.title = system.localizedString('UNSUPPORTED_OS_TLE');
50 my.result.message = system.localizedString('UNSUPPORTED_OS_MSG');
51 return result;
52 }
53
54 try
55 {
56 /* Embedded scripts are not available here. So, just do a command
57 line checking for running VMs instead. */
58 rcScript = system.run('/bin/sh', '-c', '/bin/ps -e | /usr/bin/grep -E "VirtualBoxVM.*startvm|VBoxNetDHCP|VBoxNetLwipNAT" | /usr/bin/grep -qv grep');
59 result = (rcScript != 0);
60 system.log("system.run /bin/sh .. returned: " + rcScript + " result=" + result);
61 } catch (e) { system.log(e); result = false; }
62
63 if (!result)
64 {
65 my.result.type = 'Fatal';
66 my.result.title = system.localizedString('RUNNING_VMS_TLE');
67 my.result.message = system.localizedString('RUNNING_VMS_MSG');
68 return result;
69 }
70
71 system.log("result:" + result);
72 return result;
73 }
74 /* js:pkmk:end */
75 </script>
76 <background file="background.tif" alignment="topleft" scaling="none"/>
77 <welcome file="Welcome.rtf" mime-type="text/rtf" uti="public.rtf"/>
78 <choices-outline>
79 <line choice="choiceVBoxKEXTs"></line>
80 <line choice="choiceVBoxStartup"></line>
81 <line choice="choiceVBox"></line>
82 <line choice="choiceVBoxCLI"></line>
83 </choices-outline>
84 <choice id="choiceVBoxKEXTs" title="choiceVBoxKEXTs_title" description="choiceVBoxKEXTs_msg" start_selected="true" start_enabled="false" start_visible="true">
85 <pkg-ref id="org.virtualbox.pkg.vboxkexts"></pkg-ref>
86 </choice>
87 <choice id="choiceVBoxStartup" title="choiceVBoxStartup_title" description="choiceVBoxStartup_msg" start_selected="true" start_enabled="false" start_visible="true">
88 <pkg-ref id="org.virtualbox.pkg.vboxstartupitems"></pkg-ref>
89 </choice>
90 <choice id="choiceVBox" title="choiceVBox_title" description="choiceVBox_msg" start_selected="true" start_enabled="false" start_visible="true">
91 <pkg-ref id="org.virtualbox.pkg.virtualbox"></pkg-ref>
92 </choice>
93 <choice id="choiceVBoxCLI" title="choiceVBoxCLI_title" description="choiceVBoxCLI_msg" start_selected="true" start_enabled="true" start_visible="true">
94 <pkg-ref id="org.virtualbox.pkg.virtualboxcli"></pkg-ref>
95 </choice>
96 <pkg-ref id="org.virtualbox.pkg.vboxkexts" auth="Root">file:./Contents/Packages/VBoxKEXTs.pkg</pkg-ref>
97 <pkg-ref id="org.virtualbox.pkg.vboxstartupitems" auth="Root">file:./Contents/Packages/VBoxStartupItems.pkg</pkg-ref>
98 <pkg-ref id="org.virtualbox.pkg.virtualbox" auth="Root">file:./Contents/Packages/VirtualBox.pkg</pkg-ref>
99 <pkg-ref id="org.virtualbox.pkg.virtualboxcli" auth="Root">file:./Contents/Packages/VirtualBoxCLI.pkg</pkg-ref>
100</installer-gui-script>
101
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette