VirtualBox

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

Last change on this file since 95297 was 95297, checked in by vboxsync, 2 years ago

removed system.run from macos installer #10234

  • Property svn:keywords set to Id Revision
File size: 4.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3#
4# Copyright (C) 2008-2022 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" rootVolumeOnly="true" hostArchitectures="@VBOX_ARCH_LIST@"/>
18 <installation-check script="checkPrerequisite()"></installation-check>
19 <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
20 <script>
21//<![CDATA[
22 /* js:pkmk:start */
23 function checkPrerequisite()
24 {
25 try
26 {
27 test = system.version['ProductVersion'];
28 system.log("OS version detected: " + test);
29 result = (system.compareVersions(test, '10.9') >= 0);
30 } catch (e) { system.log(e); result = false; }
31
32 if (!result)
33 {
34 my.result.type = 'Fatal';
35 my.result.title = system.localizedString('UNSUPPORTED_OS_TLE');
36 my.result.message = system.localizedString('UNSUPPORTED_OS_MSG');
37 return result;
38 }
39
40 try
41 {
42 test = system.sysctl('hw.machine');
43 system.log("Hardware architecture detected: " + test);
44 result = (test == '@VBOX_TARGET_ARCH@');
45 } catch (e) { system.log(e); result = false; }
46
47 if (!result)
48 {
49 my.result.type = 'Fatal';
50 my.result.title = system.localizedString('UNSUPPORTED_HW_MACHINE_TLE');
51 my.result.message = system.localizedString('UNSUPPORTED_HW_MACHINE_MSG');
52 return result;
53 }
54
55 try
56 {
57 /* Embedded scripts are not available here. Instead, run command to check for running VMs or running VBOX instance */
58 runAppArr = system.applications.all()
59 for (let i = 0; i < runAppArr.length; i++)
60 {
61 if (runAppArr[i]["FileCreator"] == "VBOX" || runAppArr[i]["FileCreator"] == "VBVM")
62 {
63 result = false;
64 }
65 }
66 system.log("system.applications check => result=" + result);
67 } catch (e) { system.log(e); result = false; }
68
69 if (!result)
70 {
71
72 my.result.type = 'Fatal';
73 my.result.title = system.localizedString('RUNNING_VMS_TLE');
74 my.result.message = system.localizedString('RUNNING_VMS_MSG');
75 return result;
76 }
77
78 system.log("result:" + result);
79 return result;
80 }
81 /* js:pkmk:end */
82//]]>
83 </script>
84 <background file="background.tif" alignment="topleft" scaling="none"/>
85 <welcome file="Welcome.rtf" mime-type="text/rtf" uti="public.rtf"/>
86 <choices-outline>
87 <line choice="choiceVBoxKEXTs"></line>
88 <line choice="choiceVBox"></line>
89 <line choice="choiceVBoxCLI"></line>
90 <line choice="choiceOSXFuseCore"></line>
91 </choices-outline>
92 <choice id="choiceVBoxKEXTs" title="choiceVBoxKEXTs_title" description="choiceVBoxKEXTs_msg" start_selected="true" start_enabled="true" start_visible="true">
93 <pkg-ref id="org.virtualbox.pkg.vboxkexts"></pkg-ref>
94 </choice>
95 <choice id="choiceVBox" title="choiceVBox_title" description="choiceVBox_msg" start_selected="true" start_enabled="false" start_visible="true">
96 <pkg-ref id="org.virtualbox.pkg.virtualbox"></pkg-ref>
97 </choice>
98 <choice id="choiceVBoxCLI" title="choiceVBoxCLI_title" description="choiceVBoxCLI_msg" start_selected="true" start_enabled="true" start_visible="true">
99 <pkg-ref id="org.virtualbox.pkg.virtualboxcli"></pkg-ref>
100 </choice>
101 <choice id="choiceOSXFuseCore" title="choiceOSXFuseCore_title" description="choiceOSXFuseCore_msg" start_selected="true" start_enabled="true" start_visible="true">
102 <pkg-ref id="com.github.osxfuse.pkg.Core"></pkg-ref>
103 </choice>
104 <pkg-ref id="org.virtualbox.pkg.vboxkexts" auth="Root">file:./Contents/Packages/VBoxKEXTs.pkg</pkg-ref>
105 <pkg-ref id="org.virtualbox.pkg.virtualbox" auth="Root">file:./Contents/Packages/VirtualBox.pkg</pkg-ref>
106 <pkg-ref id="org.virtualbox.pkg.virtualboxcli" auth="Root">file:./Contents/Packages/VirtualBoxCLI.pkg</pkg-ref>
107 <pkg-ref id="com.github.osxfuse.pkg.Core" auth="Root">file:./Contents/Packages/OSXFuseCore.pkg</pkg-ref>
108</installer-gui-script>
109
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use