Chameleon Applications

Chameleon Applications Commit Details

Date:2010-10-18 05:23:16 (13 years 6 months ago)
Author:ErmaC
Commit:188
Parents: 187
Message:mach official trunk i386(580) delete the Icon.icns now is a folder icon edit buildpkg/dumpkg/advanced Update Polish and German edit postinstall for Standard boot0/boot0hfs with pre/post flight edit postinstall script for post.pkg
Changes:
D/branches/iFabio/trunk/package/Scripts/Standard/postinstall
D/branches/iFabio/trunk/package/Scripts/Standardhfs/postinstall
D/branches/iFabio/trunk/package/Icon.icns
A/branches/iFabio/trunk/package/Icon
A/branches/iFabio/trunk/package/Resources/Greek.lproj
A/branches/iFabio/trunk/package/Resources/Greek.lproj/Localizable.strings
A/branches/iFabio/trunk/package/Scripts/Standard/postflight
A/branches/iFabio/trunk/package/Scripts/Standardhfs/postflight
A/branches/iFabio/trunk/package/Scripts/Standard/preflight
A/branches/iFabio/trunk/package/Scripts/Standardhfs/preflight
A/branches/iFabio/trunk/package/Resources/Greek.lproj/Description.html
M/branches/iFabio/trunk/package/dumpkg
M/branches/iFabio/trunk/package/Scripts/Post/postinstall
M/branches/iFabio/trunk/package/buildpkg
M/branches/iFabio/trunk/revision
M/branches/iFabio/trunk/package/advanced
M/branches/iFabio/trunk/package/Resources/Polish.lproj/Localizable.strings
M/branches/iFabio/trunk/i386/libsaio/nvidia.c
M/branches/iFabio/trunk/package/Resources/German.lproj/Localizable.strings
M/branches/iFabio/trunk/package/Resources/Polish.lproj/Description.html

File differences

branches/iFabio/trunk/i386/libsaio/nvidia.c
347347
348348
349349
350
350351
351352
352353
......
355356
356357
357358
359
358360
359361
360362
361363
364
362365
363366
364367
......
449452
450453
451454
455
452456
453457
454458
{ 0x10DE0A20, "GeForce GT220" },
{ 0x10DE0A23, "GeForce 210" },
{ 0x10DE0A28, "GeForce GT 230M" },
{ 0x10DE0A29, "GeForce GT 330M" },
{ 0x10DE0A2A, "GeForce GT 230M" },
{ 0x10DE0A34, "GeForce GT 240M" },
{ 0x10DE0A60, "GeForce G210" },
{ 0x10DE0A65, "GeForce 210" },
{ 0x10DE0A66, "GeForce 310" },
{ 0x10DE0A74, "GeForce G210M" },
{ 0x10DE0A75, "GeForce G310M" },
{ 0x10DE0A78, "Quadro FX 380 LP" },
{ 0x10DE0CA3, "GeForce GT 240" },
{ 0x10DE0CA8, "GeForce GTS 260M" },
{ 0x10DE0CA9, "GeForce GTS 250M" },
{ 0x10DE0CB1, "GeForce GTS 360M" },
{ 0x10DE0CA3, "GeForce GT240" },
{ 0x10DE0E22, "GeForce GTX 460" },
{ 0x10DE0E24, "GeForce GTX 460" },
return PATCH_ROM_FAILED;
}
} else {
printf("ERROR: dcbtable_version is 0x%X\n", dcbtable_version);
return PATCH_ROM_FAILED;
}
branches/iFabio/trunk/package/buildpkg
350350
351351
352352
353
353
354354
355355
356356
popd >/dev/null
done
ditto --noextattr --noqtn "${pkgroot}/Icon.icns" "${1%/*}/${packagename// /}-${version}-r${revision}-Standard.pkg"
ditto --noextattr --noqtn "${pkgroot}/Icon" "${1%/*}/${packagename// /}-${version}-r${revision}-Standard.pkg"
ditto --noextattr --noqtn "${pkgroot}/Distribution" "${1}/${packagename}/Distribution"
ditto --noextattr --noqtn "${pkgroot}/Resources" "${1}/${packagename}/Resources"
branches/iFabio/trunk/package/advanced
290290
291291
292292
293
293294
294295
295
296
296297
297298
298299
popd >/dev/null
done
ditto --noextattr --noqtn "${pkgroot}/Icon" "${1%/*}/${packagename// /}-${version}-r${revision}-Advanced.pkg"
ditto --noextattr --noqtn "${pkgroot}/Distribution" "${1}/${packagename}/Distribution"
ditto --noextattr --noqtn "${pkgroot}/Resources" "${1}/${packagename}/Resources"
ditto --noextattr --noqtn "${pkgroot}/Chameleon.icns" "${1%/*}/${packagename// /}-${version}-r${revision}-Advanced.pkg"
echo "Building Resources..."
find "${1}/${packagename}/Resources" -type d -name '.svn' -exec rm -R -f {} \; 2>/dev/null
branches/iFabio/trunk/package/Scripts/Standard/postinstall
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#!/bin/bash
diskloader="boot0"
partitionloader="boot1h"
filesystemloader="boot"
diskmicrocodetype[1]="GRUB,47525542"
diskmicrocodetype[2]="LILO,4c494c4f"
start ()
{
# 1 volume
bootvolume="${@}"
bootresources="${0%/*}"
if [ -z "${bootvolume}" ]; then
echo
echo "Cannot find the volume. Exiting."
echo
exit
fi
bootdev=$( df "${bootvolume}" | sed -n '2p' | awk '{print $1}' )
bootrdev=${bootdev/disk/rdisk}
if [ "${bootdev}" = "${bootdev#*disk*s}" ]; then
echo
echo "ERROR Volume does not use slices."
echo
exit
fi
bootdisk=${bootdev%s*}
bootrdisk=${bootdisk/disk/rdisk}
bootslice=${bootdev#*disk*s}
echo "Volume is ${bootvolume}"
echo "Volume device is ${bootdev}"
echo "Volume raw device is ${bootrdev}"
echo "Volume slice is ${bootslice}"
echo "Disk device is ${bootdisk}"
echo "Disk raw device is ${bootrdisk}"
echo "Disk loader is ${diskloader}"
echo "Partition loader is ${partitionloader}"
echo "Filesystem loader is ${filesystemloader}"
echo "Boot Resources is ${bootresources}"
}
checkdiskmicrocodetype ()
{
diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
diskmicrocodetypecounter=0
while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
fi
done
}
checkdiskmicrocode ()
{
# 1 action ( check or set )
diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
diskmicrocodemd5=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | md5 )
if [ $( echo "${diskmicrocode}" | awk -F0 '{print NF-1}' ) = 874 ]; then
if [ "${1}" = "set" ]; then
echo "No disk microcode found. Updating."
diskupdate=true
else
echo "No disk microcode found."
fi
else
if [ ${1} = set ]; then
echo "Disk microcode found. Preserving."
else
echo "Disk microcode found."
fi
echo "Disk microcode MD5 is ${diskmicrocodemd5}"
fi
}
checkdisksignature ()
{
disksignature=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ $( echo "${disksignature}" | awk -F0 '{print NF-1}' ) = 8 ]; then
echo "No disk signature found."
else
echo "Disk signature found."
echo "Disk signature is 0x${disksignature}"
fi
}
checkpartitionbootcode ()
{
# 1 action ( check or set )
partitionbootcode=$( dd if=${bootrdev} count=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
partitionbootcodeextended=$( dd if=${bootrdev} count=1 skip=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ $( echo "${partitionbootcode}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
if [ "${1}" = "set" ]; then
echo "No partition bootcode found. Updating."
else
echo "No partition bootcode found."
fi
else
if [ "${1}" = "set" ]; then
echo "Partition bootcode found. Overwriting."
else
echo "Partition bootcode found."
fi
if [ $( echo "${partitionbootcodeextended}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=1 | md5 )
else
partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=2 | md5 )
echo "Partition bootcode is dual sector."
fi
echo "Partition bootcode MD5 is ${partitionbootcodemd5}"
fi
}
checkpartitionactive ()
{
partitionactive=$( fdisk -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')
if [ -n "${partitionactive}" ]; then
echo "Partition flagged active is ${partitionactive}"
else
echo "No partition flagged active."
fi
}
start ${3}
#partitiontable=$( diskutil list ${bootdisk} | sed -n '3p' | awk '{print $2}' )
#[ "${partitiontable}" = "GUID_partition_scheme" ] && echo "GPT found."
#[ "${partitiontable}" = "FDisk_partition_scheme" ] && echo "MBR found."
#[ "${partitiontable}" = "Apple_partition_scheme" ] && echo "APT found." && exit
partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 skip=1 | dd 2>/dev/null count=8 bs=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ "${partitiontable:0:16}" == "4546492050415254" ]; then
partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=64 bs=1 skip=446 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ "${partitiontable:8:2}" == "ee" ]; then
if [ "${partitiontable:40:2}" == "00" ] && [ "${partitiontable:72:2}" == "00" ] && [ "${partitiontable:104:2}" == "00" ]; then
partitiontable="GPT"
else
partitiontable="GPT/MBR"
fi
fi
else
partitiontable="MBR"
fi
echo "${partitiontable} found."
diskupdate=false
checkdiskmicrocodetype
checkdiskmicrocode set
checkdisksignature
checkpartitionbootcode set
checkpartitionactive
if ${diskupdate}; then
echo "Executing command: fdisk -u -f /usr/standalone/i386/${diskloader} -y ${bootdisk}"
fdisk -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}
fi
echo "Executing command: dd if=/usr/standalone/i386/${partitionloader} of=${bootrdev}"
dd if="${bootvolume}/usr/standalone/i386/${partitionloader}" of=${bootrdev}
echo "Executing command: cp /usr/standalone/i386/${filesystemloader} ${bootvolume}"
cp "${bootvolume}/usr/standalone/i386/${filesystemloader}" "${bootvolume}"
echo "Executing command: ${bootresources}/Tools/SetFile -a V ${bootvolume}/${filesystemloader}"
"${bootresources}/Tools/SetFile" -a V "${bootvolume}/${filesystemloader}"
# If table is GPT make the first partition active (BadAxe compatibility).
[ "${partitiontable}" = "GPT" ] && bootslice=1
fdisk -e ${bootdisk} <<-MAKEACTIVE
print
flag ${bootslice}
write
y
quit
MAKEACTIVE
checkdiskmicrocode check
checkdisksignature
checkpartitionbootcode check
checkpartitionactive
if ! [ -d "${bootvolume}/Extra/Extensions" ]; then
echo "Executing command: mkdir -p ${bootvolume}/Extra/Extensions"
mkdir -p "${bootvolume}/Extra/Extensions"
fi
# unpack any existing Extensions.mkext already on the booter volume
if [ -f "${2}/Extra/Extensions.mkext" ]; then
echo "Executing command: mkextunpack -d ${2}/Extra/Extensions ${2}/Extra/Extensions.mkext"
mkextunpack -d "${2}/Extra/Extensions" "${2}/Extra/Extensions.mkext"
echo "Executing command: rm -R -f ${2}/Extra/Extensions.mkext"
rm -R -f "${2}/Extra/Extensions.mkext"
fi
# setup link for extras
[ -h "${2}/.Chameleon" ] && unlink "${2}/.Chameleon"
echo "Executing command: ln -s . ${2}/.Chameleon"
ln -s "." "${2}/.Chameleon"
exit
branches/iFabio/trunk/package/Scripts/Standard/postflight
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
#!/usr/bin/perl
$destino = $ARGV[1];
$destino =~ s/ /\\ /g;
$volume = $ARGV[2];
my %mapa;
open (MOUNT, "mount|");
while (<MOUNT>) {
chomp;
$line = $_;
if ($line =~ /^([^ ]+) on ([^(]+) \([^)]*\)$/) {
$mapa{$2}=$1;
}
}
close (MOUNT);
if ($mapa{$volume}) {
if ($mapa{$volume} =~ /^\/dev\/(disk\d)s(\d)$/) {
$disk = $1;
$partition = $2;
$volume =~ s/ /\\ /g;
system ($destino."/fdisk440 -f ".$destino."/boot0 -u -y /dev/r".$disk);
system ("dd if=".$destino."/boot1h of=/dev/r".$disk."s".$partition);
system ("cp ".$destino."/boot ".$volume);
open (PIPE, "|fdisk -e /dev/".$disk."|");
print PIPE "f ".$partition."\n";
print PIPE "write\n";
print PIPE "y\n";
print PIPE "exit\n";
}
}
branches/iFabio/trunk/package/Scripts/Standard/preflight
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
#!/bin/bash
# $3 is the installation volume passed from the installer.
# It DOES NOT contain the trailing slash
# /Volume/xxxx
if [ "$3" == "/" ]; then
# If installing to root (/) don't add extra slash (//)
# Always refer to files as ${targetVol}usr/sbin/... no slash after end curly brace
targetVol="$3"
else
# If installing to (/Volumes/xxxx) add extra slash (/Volumes/xxxx/)
# Always refer to files as ${targetVol}usr/sbin/... no slash after end curly brace
targetVol="$3/"
fi
backupDirExtension=`date '+%Y%m%d-%H%M%S'`
backupDir="${targetVol}ChameleonInstallerBackup.${backupDirExtension}/"
echo "${backupDirExtension}" > "${targetVol}ChameleonInstallerBackup.txt"
mkdir "${backupDir}"
# backup directory has extension .YYYYMMDD-HHMMSS year month day-hour minute second
if [ -e "${targetVol}usr/sbin/fdisk" ] ; then
mkdir -p "${backupDir}usr/sbin"
cp -fp "${targetVol}usr/sbin/fdisk" "${backupDir}usr/sbin/fdisk"
fi
if [ -d "${targetVol}usr/standalone/i386" ] ; then
mkdir -p "${backupDir}usr/standalone/i386"
cp -Rfp "${targetVol}usr/standalone/i386" "${backupDir}usr/standalone"
fi
if [ -d "${targetVol}Extra" ] ; then
mkdir -p "${backupDir}Extra"
#cp -Rfp "${targetVol}Extra" "${backupDir}"
# Use a move to avoid possibility of mixing incompatible files.
mv -f "${targetVol}Extra" "${backupDir}"
fi
if [ -e "${targetVol}boot" ] ; then
cp -fp "${targetVol}boot" "${backupDir}boot"
fi
chown -R 0:0 "${backupDir}"
exit 0
branches/iFabio/trunk/package/Scripts/Standardhfs/postinstall
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#!/bin/bash
diskloader="boot0hfs"
partitionloader="boot1h"
filesystemloader="boot"
diskmicrocodetype[1]="GRUB,47525542"
diskmicrocodetype[2]="LILO,4c494c4f"
start ()
{
# 1 volume
bootvolume="${@}"
bootresources="${0%/*}"
if [ -z "${bootvolume}" ]; then
echo
echo "Cannot find the volume. Exiting."
echo
exit
fi
bootdev=$( df "${bootvolume}" | sed -n '2p' | awk '{print $1}' )
bootrdev=${bootdev/disk/rdisk}
if [ "${bootdev}" = "${bootdev#*disk*s}" ]; then
echo
echo "ERROR Volume does not use slices."
echo
exit
fi
bootdisk=${bootdev%s*}
bootrdisk=${bootdisk/disk/rdisk}
bootslice=${bootdev#*disk*s}
echo "Volume is ${bootvolume}"
echo "Volume device is ${bootdev}"
echo "Volume raw device is ${bootrdev}"
echo "Volume slice is ${bootslice}"
echo "Disk device is ${bootdisk}"
echo "Disk raw device is ${bootrdisk}"
echo "Disk loader is ${diskloader}"
echo "Partition loader is ${partitionloader}"
echo "Filesystem loader is ${filesystemloader}"
echo "Boot Resources is ${bootresources}"
}
checkdiskmicrocodetype ()
{
diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
diskmicrocodetypecounter=0
while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
fi
done
}
checkdiskmicrocode ()
{
# 1 action ( check or set )
diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
diskmicrocodemd5=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | md5 )
if [ $( echo "${diskmicrocode}" | awk -F0 '{print NF-1}' ) = 874 ]; then
if [ "${1}" = "set" ]; then
echo "No disk microcode found. Updating."
diskupdate=true
else
echo "No disk microcode found."
fi
else
if [ ${1} = set ]; then
echo "Disk microcode found. Preserving."
else
echo "Disk microcode found."
fi
echo "Disk microcode MD5 is ${diskmicrocodemd5}"
fi
}
checkdisksignature ()
{
disksignature=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ $( echo "${disksignature}" | awk -F0 '{print NF-1}' ) = 8 ]; then
echo "No disk signature found."
else
echo "Disk signature found."
echo "Disk signature is 0x${disksignature}"
fi
}
checkpartitionbootcode ()
{
# 1 action ( check or set )
partitionbootcode=$( dd if=${bootrdev} count=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
partitionbootcodeextended=$( dd if=${bootrdev} count=1 skip=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ $( echo "${partitionbootcode}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
if [ "${1}" = "set" ]; then
echo "No partition bootcode found. Updating."
else
echo "No partition bootcode found."
fi
else
if [ "${1}" = "set" ]; then
echo "Partition bootcode found. Overwriting."
else
echo "Partition bootcode found."
fi
if [ $( echo "${partitionbootcodeextended}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=1 | md5 )
else
partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=2 | md5 )
echo "Partition bootcode is dual sector."
fi
echo "Partition bootcode MD5 is ${partitionbootcodemd5}"
fi
}
checkpartitionactive ()
{
partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')
if [ -n "${partitionactive}" ]; then
echo "Partition flagged active is ${partitionactive}"
else
echo "No partition flagged active."
fi
}
start ${3}
#partitiontable=$( diskutil list ${bootdisk} | sed -n '3p' | awk '{print $2}' )
#[ "${partitiontable}" = "GUID_partition_scheme" ] && echo "GPT found."
#[ "${partitiontable}" = "FDisk_partition_scheme" ] && echo "MBR found."
#[ "${partitiontable}" = "Apple_partition_scheme" ] && echo "APT found." && exit
partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 skip=1 | dd 2>/dev/null count=8 bs=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ "${partitiontable:0:16}" == "4546492050415254" ]; then
partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=64 bs=1 skip=446 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ "${partitiontable:8:2}" == "ee" ]; then
if [ "${partitiontable:40:2}" == "00" ] && [ "${partitiontable:72:2}" == "00" ] && [ "${partitiontable:104:2}" == "00" ]; then
partitiontable="GPT"
else
partitiontable="GPT/MBR"
fi
fi
else
partitiontable="MBR"
fi
echo "${partitiontable} found."
diskupdate=false
checkdiskmicrocodetype
checkdiskmicrocode set
checkdisksignature
checkpartitionbootcode set
checkpartitionactive
if ${diskupdate}; then
echo "Executing command: fdisk440 -u -f /usr/standalone/i386/${diskloader} -y ${bootdisk}"
fdisk440 -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}
fi
echo "Executing command: dd if=/usr/standalone/i386/${partitionloader} of=${bootrdev}"
dd if="${bootvolume}/usr/standalone/i386/${partitionloader}" of=${bootrdev}
echo "Executing command: cp /usr/standalone/i386/${filesystemloader} ${bootvolume}"
cp "${bootvolume}/usr/standalone/i386/${filesystemloader}" "${bootvolume}"
echo "Executing command: ${bootresources}/Tools/SetFile -a V ${bootvolume}/${filesystemloader}"
"${bootresources}/Tools/SetFile" -a V "${bootvolume}/${filesystemloader}"
# If table is GPT make the first partition active (BadAxe compatibility).
[ "${partitiontable}" = "GPT" ] && bootslice=1
fdisk440 -e ${bootdisk} <<-MAKEACTIVE
print
flag ${bootslice}
write
y
quit
MAKEACTIVE
checkdiskmicrocode check
checkdisksignature
checkpartitionbootcode check
checkpartitionactive
if ! [ -d "${bootvolume}/Extra/Extensions" ]; then
echo "Executing command: mkdir -p ${bootvolume}/Extra/Extensions"
mkdir -p "${bootvolume}/Extra/Extensions"
fi
# unpack any existing Extensions.mkext already on the booter volume
if [ -f "${2}/Extra/Extensions.mkext" ]; then
echo "Executing command: mkextunpack -d ${2}/Extra/Extensions ${2}/Extra/Extensions.mkext"
mkextunpack -d "${2}/Extra/Extensions" "${2}/Extra/Extensions.mkext"
echo "Executing command: rm -R -f ${2}/Extra/Extensions.mkext"
rm -R -f "${2}/Extra/Extensions.mkext"
fi
# setup link for extras
[ -h "${2}/.Chameleon" ] && unlink "${2}/.Chameleon"
echo "Executing command: ln -s . ${2}/.Chameleon"
ln -s "." "${2}/.Chameleon"
exit
branches/iFabio/trunk/package/Scripts/Standardhfs/postflight
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
#!/usr/bin/perl
$destino = $ARGV[1];
$destino =~ s/ /\\ /g;
$volume = $ARGV[2];
my %mapa;
open (MOUNT, "mount|");
while (<MOUNT>) {
chomp;
$line = $_;
if ($line =~ /^([^ ]+) on ([^(]+) \([^)]*\)$/) {
$mapa{$2}=$1;
}
}
close (MOUNT);
if ($mapa{$volume}) {
if ($mapa{$volume} =~ /^\/dev\/(disk\d)s(\d)$/) {
$disk = $1;
$partition = $2;
$volume =~ s/ /\\ /g;
system ($destino."/fdisk440 -f ".$destino."/boot0hfs -u -y /dev/r".$disk);
system ("dd if=".$destino."/boot1h of=/dev/r".$disk."s".$partition);
system ("cp ".$destino."/boot ".$volume);
}
}
branches/iFabio/trunk/package/Scripts/Standardhfs/preflight
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
#!/bin/bash
# $3 is the installation volume passed from the installer.
# It DOES NOT contain the trailing slash
# /Volume/xxxx
if [ "$3" == "/" ]; then
# If installing to root (/) don't add extra slash (//)
# Always refer to files as ${targetVol}usr/sbin/... no slash after end curly brace
targetVol="$3"
else
# If installing to (/Volumes/xxxx) add extra slash (/Volumes/xxxx/)
# Always refer to files as ${targetVol}usr/sbin/... no slash after end curly brace
targetVol="$3/"
fi
backupDirExtension=`date '+%Y%m%d-%H%M%S'`
backupDir="${targetVol}ChameleonInstallerBackup.${backupDirExtension}/"
echo "${backupDirExtension}" > "${targetVol}ChameleonInstallerBackup.txt"
mkdir "${backupDir}"
# backup directory has extension .YYYYMMDD-HHMMSS year month day-hour minute second
if [ -e "${targetVol}usr/sbin/fdisk" ] ; then
mkdir -p "${backupDir}usr/sbin"
cp -fp "${targetVol}usr/sbin/fdisk" "${backupDir}usr/sbin/fdisk"
fi
if [ -d "${targetVol}usr/standalone/i386" ] ; then
mkdir -p "${backupDir}usr/standalone/i386"
cp -Rfp "${targetVol}usr/standalone/i386" "${backupDir}usr/standalone"
fi
if [ -d "${targetVol}Extra" ] ; then
mkdir -p "${backupDir}Extra"
#cp -Rfp "${targetVol}Extra" "${backupDir}"
# Use a move to avoid possibility of mixing incompatible files.
mv -f "${targetVol}Extra" "${backupDir}"
fi
if [ -e "${targetVol}boot" ] ; then
cp -fp "${targetVol}boot" "${backupDir}boot"
fi
chown -R 0:0 "${backupDir}"
exit 0
branches/iFabio/trunk/package/Scripts/Post/postinstall
11
22
3
3
4
5
6
7
8
9
10
11
12
13
414
515
6
16
717
8
18
919
1020
1121
12
13
14
15
22
1623
17
18
19
20
21
22
23
24
25
26
27
24
25
26
27
2828
29
30
29
30
31
32
3133
32
33
34
35
36
37
3438
35
36
37
38
39
40
41
3942
4043
41
42
44
45
46
47
48
4349
50
51
52
53
54
55
56
4457
#!/bin/bash
temp="/private/tmp/Chameleon"
# $3 is the installation volume passed from the installer.
# It DOES NOT contain the trailing slash
# /Volume/xxxx
if [ "$3" == "/" ]; then
# If installing to root (/) don't add extra slash (//)
# Always refer to files as ${targetVol}usr/sbin/... no slash after end curly brace
targetVol="$3"
else
# If installing to (/Volumes/xxxx) add extra slash (/Volumes/xxxx/)
# Always refer to files as ${targetVol}usr/sbin/... no slash after end curly brace
targetVol="$3/"
#source com.apple.boot.plist
if ! [ -f "${2}/.Chameleon/Extra/com.apple.Boot.plist" ]; then
if ! [ -f "${2}/Extra/com.apple.Boot.plist" ]; then
if [ -f "${2}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" ]; then
cp -f "${2}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" "${2}/.Chameleon/Extra"
cp -f "${2}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" "${2}/Extra"
fi
fi
# fix kext permissions
find "${2}/.Chameleon/Extra/Extensions" -type f -exec chmod 644 {} \;
find "${2}/.Chameleon/Extra/Extensions" -type d -exec chmod 755 {} \;
chown -R 0:0 "${2}/.Chameleon/Extra/Extensions"
sleep 2
# build mkext for extras
[ -d "${temp}" ] && rm -R -f "${temp}"
mkdir -p "${temp}/Extensions"
ditto --noextattr --noqtn --arch i386 "${2}/.Chameleon/Extra/Extensions" "${temp}/Extensions"
find "${temp}" -type f -exec chmod 644 {} \;
find "${temp}" -type d -exec chmod 755 {} \;
chown -R 0:0 "${temp}"
kextcache -m "${temp}/Extensions.mkext" "${temp}/Extensions"
cp -f "${temp}/Extensions.mkext" "${2}/.Chameleon/Extra"
#cp -f "${temp}/Extensions.mkext" "${2}/Extra"
rm -f -R "${temp}"
ls -ld "${targetVol}." | grep "unknown"
if [ $? -eq 0 ] ; then
chown 0:0 "${targetVol}."
fi
# Check efi partition
if [ -d /Volumes/EFI ]; then
ls -ld "${targetVol}.Spotlight-V100" | grep "unknown"
if [ $? -eq 0 ] ; then
chown -R 0:0 "${targetVol}.Spotlight-V100"
fi
# remove link for extras install
#unlink -r "${2}/.Chameleon"
ls -ld "${targetVol}.Trashes" | grep "unknown"
if [ $? -eq 0 ] ; then
chown -R 0:0 "${targetVol}.Trashes"
fi
cp -R -f "${2}/.Chameleon/Extra" /Volumes/EFI/
umount -f /Volumes/EFI
rm -R -f /Volumes/EFI
rm -R -f "${2}/.Chameleon"
ls -ld "${targetVol}.fseventsd" | grep "unknown"
if [ $? -eq 0 ] ; then
chown -R 0:0 "${targetVol}.fseventsd"
fi
cp -R -f "${2}/.Chameleon/Extra" "${2}/"
rm -R -f "${2}/.Chameleon"
# Rebuild mkext
echo "Rebuilding /Extra/Extensions.mkext"
echo "Executing \"${targetVol}usr/sbin/kextcache\" -m \"${targetVol}Extra/Extensions.mkext\" \"${targetVol}Extra/Extensions\""
"${targetVol}usr/sbin/kextcache" -m "${targetVol}Extra/Extensions.mkext" "${targetVol}Extra/Extensions"
#kextcache -m "${targetVol}Extra/Extensions.mkext" "${targetVol}Extra/Extensions"
#mv -f "${targetVol}Extra/Extensions.mkext" "${targetVol}Extra"
echo "Fixing permissions on /Extra/Extensions.mkext"
echo "Executing chown 0:0 \"${targetVol}Extra/Extensions.mkext\""
chown 0:0 "${targetVol}Extra/Extensions.mkext"
echo "Executing chmod 0644 \"${targetVol}Extra/Extensions.mkext\""
chmod 0644 "${targetVol}Extra/Extensions.mkext"
exit 0
branches/iFabio/trunk/package/dumpkg
286286
287287
288288
289
289
290290
291291
292292
popd >/dev/null
done
ditto --noextattr --noqtn "${pkgroot}/Icon.icns" "${1%/*}/${packagename// /}-${version}-r${revision}-Dummy.pkg"
ditto --noextattr --noqtn "${pkgroot}/Icon" "${1%/*}/${packagename// /}-${version}-r${revision}-Dummy.pkg"
ditto --noextattr --noqtn "${pkgroot}/Distribution" "${1}/${packagename}/Distribution"
ditto --noextattr --noqtn "${pkgroot}/Resources" "${1}/${packagename}/Resources"
#ditto --noextattr --noqtn "${pkgroot}/Icon.icns" "${1%}/${packagename}/.Icon"
branches/iFabio/trunk/package/Resources/Greek.lproj/Description.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Lucida Grande;}
</style>
</head>
<body>
<p class="p1">Chameleon is combination of various boot loader components.<br />It is based on David Elliott's fake EFI implementation added to Apple's boot-132 project.<br />Chameleon is extended with the following key features:</p>
<br />
<p class="p1">New features in Chameleon 2.0</p>
<br>
<p class="p1"> - Fully customizable GUI to bring some color to the Darwin Bootloader.</p>
<p class="p1"> - Booting retail DVDs by directly loading a ramdisk image without help of additional programs.</p>
<p class="p1"> - Hibernation. Enjoy resuming your Mac OS X with a preview image.</p>
<p class="p1"> - SMBIOS override to modify the factory SMBIOS values.</p>
<p class="p1"> - DSDT override to use a modified fixed DSDT which can solve several issues.</p>
<br>
<p class="p1"> - Device Property Injection via device-properties string.</p>
<p class="p1"> - hybrid boot0 / boot1h for MBR and GPT partitioned disks.</p>
<p class="p1"> - automatic FSB detection code even for recent AMD CPUs.</p>
<p class="p1"> - Apple Software RAID support.</p>
<br />
<p class="p1">For detailed information, visit : <a href="http://chameleon.osx86.hu">http://chameleon.osx86.hu</a></p>
</body>
</html>
branches/iFabio/trunk/package/Resources/Polish.lproj/Description.html
1515
1616
1717
18
18
1919
2020
2121
2222
23
23
2424
2525
2626
<br>
<p class="p1"> - Całkowicie konfigurowalne GUI by dodać trochę koloru do Bootloadera Darwin.</p>
<p class="p1"> - Uruchamianie płyt Retail DVD przez bezpośrednie ładowanie obrazu ramdisk bez pomocy dodatkowych programów.</p>
<p class="p1"> - Hiberacja. Ciesz się przywracaniem Twojego systemu Mac OS X z obrazu podglądu.</p>
<p class="p1"> - Hibernacja. Ciesz się przywracaniem Twojego systemu Mac OS X z obrazu podglądu.</p>
<p class="p1"> - Zastąpienie SMBIOS by zmodyfikować fabryczne wartości SMBIOSu.</p>
<p class="p1"> - Zastąpienie DSDT by móc używać zmodyfikowanego, poprawionego DSDT, który może rozwiązać parę problemów.</p>
<br>
<p class="p1"> - Wstrzykiwanie ustawień urządzeń (Device Property Injection) przez łańcuch device-properties.</p>
<p class="p1"> - Hybrydowe boot0 / boot1h dla dysków w ukłądzie partycji MBR i GPT.</p>
<p class="p1"> - Hybrydowe boot0 / boot1h dla dysków w układzie partycji MBR i GPT.</p>
<p class="p1"> - Automatyczne wykrywanie FSB nawet dla najnowszych procesorów AMD.</p>
<p class="p1"> - Obsługa Apple Software RAID.</p>
<br />
branches/iFabio/trunk/revision
1
1
184:186
187

Archive Download the corresponding diff file

Revision: 188