/
Distribution
80 lines (66 loc) · 2.46 KB
/
Distribution
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0"?>
<installer-gui-script minSpecVersion='1'>
<options hostArchitectures='i386' allow-external-scripts="no"/>
<domains enable_anywhere="true"/>
<welcome file='Welcome.html'/>
<license file="License.rtf" sla="EA0401"/>
<readme file='Description.html'/>
<conclusion file="Conclusion.html"/>
<background file='background.tiff' alignment='topleft' scaling='tofit'/>
<title>Chameleon_Package_Title</title>
<script>
var bootPlist = null;
if (my.target) {
var boot_plist_filenames = new Array( 'org.chameleon.Boot.plist', 'com.apple.Boot.plist' );
for ( var i = 0; i < boot_plist_filenames.length; i++ ) {
bootPlist = system.files.plistAtPath( my.target.mountpoint + '/Extra/' + boot_plist_filenames[i] );
if (bootPlist)
break;
}
}
function installCheckScript() {
var obj = system.ioregistry.matchingClass("AppleSMC");
if (obj) {
system.log('installCheckScript: Found AppleSMC');
my.result.message = system.localizedStringWithFormat('Intel_Mac_message');
my.result.type = 'Fatal';
return false;
}
system.log('installCheckScript: Failed.');
return false;
}
function volCheckScript() {
system.log('volCheckScript: Failed.');
return true;
}
function systemHasGPT() {
var obj = system.ioregistry.matchingName("EFI System Partition");
if (obj)
return true;
return false;
}
function chameleon_boot_plist_exists() {
return bootPlist ? true : false;
}
function check_chameleon_bool_option(key, value) {
if ( bootPlist && bootPlist[ key ] )
// check if the first letter (in lowercase) is the same
return bootPlist[ key ].charAt(0).toLowerCase() == value.charAt(0).toLowerCase();
return false;
}
function check_chameleon_text_option(key, value) {
if ( bootPlist && bootPlist[ key ] )
return bootPlist[ key ] == value; // check if the strings are equal
return false;
}
function check_chameleon_list_option(key, value) {
if ( bootPlist && bootPlist[ key ] ) {
var items = bootPlist[ key ].split(" ");
for ( var i = 0; i < items.length; i++ ) {
if (items[i] == value)
return true;
}
}
return false;
}
</script>