Chameleon Applications

Chameleon Applications Commit Details

Date:2010-09-23 22:25:47 (13 years 6 months ago)
Author:blackosx
Commit:126
Parents: 125
Message:Adding files from Scrax's package r_011
Changes:
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/wrench.png
A/trunk/PackageBuilder/Configuration/SMBIOSDefault/smbios.plist
A/trunk/PackageBuilder/doc/BootHelp.txt
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/French.lproj/Chameleon.strings
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/German.lproj/Chameleon.strings
A/trunk/PackageBuilder/doc
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/chamsmall.png
A/trunk/PackageBuilder/com.apple.Boot.plist
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/Scripts/main.scpt
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Italian.lproj/Chameleon.strings
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/MacOS
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources
A/trunk/PackageBuilder/Configuration/EFIMounter
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj/Chameleon.strings
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/background.png
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/name.png
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/French.lproj/Localizable.strings
A/trunk/PackageBuilder/fdisk440
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/German.lproj/Localizable.strings
A/trunk/PackageBuilder/fdisk
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Spanish.lproj/Chameleon.strings
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/disk.png
A/trunk/PackageBuilder/buildpkgTEST
A/trunk/PackageBuilder/doc/README
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Italian.lproj/Localizable.strings
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Chameleon.icns
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj/Localizable.strings
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CDROM.png
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/getDevProp.sh
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/French.lproj
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/plug.png
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/cham.png
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CREDITS
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/German.lproj
A/trunk/PackageBuilder/Configuration/PrefPanel
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/applet.rsrc
A/trunk/PackageBuilder/smbios.plist
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Spanish.lproj/Localizable.strings
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/cdBootCreator.sh
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Italian.lproj
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/chip.png
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CHANGES
A/trunk/PackageBuilder/buildpkg
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Windows.png
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/MacOSX.png
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/MacOS/applet
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Chameleon.tiff
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/MacOS/Chameleon
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/applet.icns
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/version
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/PkgInfo
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/advanced.png
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents
A/trunk/PackageBuilder/doc/Users_Guide0.5.pdf
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Spanish.lproj
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/flag.png
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/French.lproj/Chameleon.nib
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/README
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/German.lproj/Chameleon.nib
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/TODO
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Italian.lproj/Chameleon.nib
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Info.plist
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj/InfoPlist.strings
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/Info.plist
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj/Chameleon.nib
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/footer.png
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Linux.png
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/gfxutil
A/trunk/PackageBuilder/Configuration
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/description.rtfd
A/trunk/PackageBuilder/Configuration/SMBIOSDefault
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/MacOS
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/Scripts
A/trunk/PackageBuilder/Distribution
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Spanish.lproj/Chameleon.nib
A/trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/description.rtfd/TXT.rtf
A/trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/syringe.png

File differences

trunk/PackageBuilder/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
<?xml version="1.0"?>
<installer-gui-script minSpecVersion='1'>
<options
hostArchitectures='i386'
/>
<domains enable_anywhere="true"/>
<welcome file='Welcome.rtfd'/>
<license file="License.rtf" sla="EA0401"/>
<readme file='Description.html'/>
<conclusion file="Conclusion.rtfd"/>
<background file='background.tiff' alignment='topleft' scaling='proportional'/>
<title>Chameleon_title</title>
<script>
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: Passed.');
return false;
}
function volCheckScript()
{
system.log('volCheckScript: Passed.');
return true;
}
function upgrade_allowed(){
var upgradable = true;
var upgradeAction = my.choice.packageUpgradeAction;
if((upgradeAction == "downgrade") || (upgradeAction == "mixed")){
my.choice.tooltip = system.localizedString('Newer_Package_Installed_message');
upgradable = false;
}
return upgradable;
}
function systemHasGPT(){
var obj = system.ioregistry.matchingName("EFI System Partition");
if (obj)
return true;
return false;
}
function exclusive(toggle){
toggle.selected = ( my.choice.selected != "false" ? "false" : "true" );
return ( toggle.selected != false ? false : true );
}
</script>
trunk/PackageBuilder/buildpkg
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
#!/bin/bash
# $1 Path to store built package
packagesidentity="org.chameleon"
packagename="Chameleon"
pkgroot="${0%/*}"
#version=$( grep I386BOOT_CHAMELEONVERSION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )
version=$( cat version )
stage=${version##*-}
revision=$( grep I386BOOT_CHAMELEONREVISION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )
builddate=$( grep I386BOOT_BUILDDATE sym/i386/vers.h | awk '{ print $3,$4 }' | tr -d '\"' )
timestamp=$( date -j -f "%Y-%m-%d %H:%M:%S" "${builddate}" "+%s" )
distributioncount=0
xmlindent=0
indent[0]="\t"
indent[1]="\t\t"
indent[2]="\t\t\t"
indent[3]="\t\t\t\t"
main ()
{
# clean up the destination path
rm -R -f "${1}"
echo "Building $packagename Install Package v${version%%-*} $stage r$revision $builddate"
outline[$((outlinecount++))]="${indent[$xmlindent]}<choices-outline>"
# build core package
((xmlindent++))
packagesidentity="org.chameleon"
mkdir -p ${1}/Core/Root/usr/sbin
#mkdir -p ${1}/Core/Root/usr/local/bin
mkdir -p ${1}/Core/Root/usr/standalone/i386
#mkdir -p ${1}/Core/Root/Extra
cp -f ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot0hfs ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1hp ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/cdboot ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/chain0 ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin
fixperms "${1}/Core/Root/"
#cp -Rf ${pkgroot}/Configuration/Chameleon.prefPane ${1}/Core/Root/Library/PreferencePanes
#cp -f ${pkgroot}/Configuration/smbios.plist ${1}/Core/Root/Extra
cp -f ${pkgroot}/fdisk440 ${1}/Core/Root/usr/sbin
local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )
buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\""
# build Chameleon package
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Chameleon\">"
choices[$((choicescount++))]="<choice\n\tid=\"Chameleon\"\n\ttitle=\"Chameleon_title\"\n\tdescription=\"Chameleon_description\"\n>\n</choice>\n"
# build standard package
mkdir -p ${1}/Standard/Root
mkdir -p ${1}/Standard/Scripts/Tools
cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts
ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile
buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EnhancedHFS']) &amp;&amp; exclusive(choices['Standardhfs']) &amp;&amp; exclusive(choices['EnhancedFAT'])\""
# build standard package with boot0hfs
mkdir -p ${1}/Standardhfs/Root
mkdir -p ${1}/Standardhfs/Scripts/Tools
cp -f ${pkgroot}/Scripts/Standardhfs/* ${1}/Standardhfs/Scripts
ditto --arch i386 `which SetFile` ${1}/Standardhfs/Scripts/Tools/SetFile
buildpackage "${1}/Standardhfs" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"false\" selected=\"exclusive(choices['EnhancedHFS']) &amp;&amp; exclusive(choices['Standard']) &amp;&amp; exclusive(choices['EnhancedFAT'])\""
# build efi fat32 package
mkdir -p ${1}/EnhancedFAT/Root
mkdir -p ${1}/EnhancedFAT/Scripts/Tools
cp -f ${pkgroot}/Scripts/FAT/* ${1}/EnhancedFAT/Scripts
ditto --arch i386 `which SetFile` ${1}/EnhancedFAT/Scripts/Tools/SetFile
buildpackage "${1}/EnhancedFAT" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['Standardhfs']) &amp;&amp; exclusive(choices['EnhancedHFS'])\""
# build efi hfs package
mkdir -p ${1}/EnhancedHFS/Root
mkdir -p ${1}/EnhancedHFS/Scripts/Tools
cp -f ${pkgroot}/Scripts/HFS/* ${1}/EnhancedHFS/Scripts
ditto --arch i386 `which SetFile` ${1}/EnhancedHFS/Scripts/Tools/SetFile
buildpackage "${1}/EnhancedHFS" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['Standardhfs']) &amp;&amp; exclusive(choices['EnhancedFAT'])\""
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# build PrefPanel package
#mkdir -p ${1}/PrefPanel/Root
#mkdir -p ${1}/PrefPanel/Root/Library/PreferencePanes
#cp -Rf ${pkgroot}/Configuration/Chameleon.prefPane ${1}/PrefPanel/Root/Library/PreferencePanes
#buildpackage "${1}/PrefPanel" "/" "${coresize}" "start_visible=\"true\" start_selected=\"false\""
# build utility package
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Utility\">"
choices[$((choicescount++))]="<choice\n\tid=\"Utility\"\n\ttitle=\"Utility_title\"\n\tdescription=\"Utility_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon"
# build package for bdmesg
#mkdir -p "${1}/bdmesg/Root"
#ditto --noextattr --noqtn "${1%/*}/i386/bdmesg" "${1}/bdmesg/Root"
#echo "Building bdmesg package"
#buildpackage "${1}/bdmesg" "/usr/sbin" "" "start_selected=\"false\""
# End build package for bdmesg
# build package for Chameleon PrefPanel
mkdir -p "${1}/PrefPanel/Root/"
ditto --noextattr --noqtn "${pkgroot}/Configuration/PrefPanel/Chameleon.prefPane" "${1}/PrefPanel/Root"
echo "Building Chameleon Preference Panel package"
buildpackage "${1}/PrefPanel" "/Library/PreferencePanes/Chameleon.prefPane" "" "start_selected=\"false\""
# End build package for Chameleon PrefPanel
# build package for SMBIOSDefault
mkdir -p "${1}/SMBIOSDefault/Root/"
ditto --noextattr --noqtn "${pkgroot}/Configuration/SMBIOSDefault/smbios.plist" "${1}/SMBIOSDefault/Root"
echo "Building SMBIOSDefault package"
buildpackage "${1}/SMBIOSDefault" "/Extra/Example" "" "start_selected=\"false\""
# End build package for SMBIOSDefault
# build package for EFIMounter
mkdir -p "${1}/EFIMounter/Root/"
ditto --noextattr --noqtn "${pkgroot}/Configuration/EFIMounter/EFI Mounter.app" "${1}/EFIMounter/Root"
echo "Building EFIMounter package"
buildpackage "${1}/EFIMounter" "/Applications/EFI Mounter.app" "" "start_selected=\"false\""
# End build package for EFIMounter
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End utility package
# build Documentation package
#outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Documentation\">"
#choices[$((choicescount++))]="<choice\n\tid=\"Documentation\"\n\ttitle=\"Documentation_title\"\n\tdescription=\"Documentation_description\"\n>\n</choice>\n"
#((xmlindent++))
#packagesidentity="org.chameleon"
# build package for Documentation
#mkdir -p "${1}/Documentation/Root"
#cp -f ${pkgroot}/doc/BootHelp.txt ${1}/Documentation/Root
#cp -f ${pkgroot}/doc/README ${1}/Documentation/Root
#cp -f ${pkgroot}/doc/Users_Guide0.5.pdf ${1}/Documentation/Root
#echo "Building Documentation package"
#buildpackage "${1}/Documentation" "/Documentation/Chameleon2RC5" "" "start_selected=\"false\""
# End build package for bdmesg
#((xmlindent--))
#outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End utility package
ß# build options packages
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Options\">"
choices[$((choicescount++))]="<choice\n\tid=\"Options\"\n\ttitle=\"Options_title\"\n\tdescription=\"Options_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon"
options=($( find "${pkgroot}/Scripts/Options" -type d -depth 1 -not -name '.svn' ))
for (( i = 0 ; i < ${#options[@]} ; i++ ))
do
mkdir -p "${1}/${options[$i]##*/}/Root"
mkdir -p "${1}/${options[$i]##*/}/Scripts"
ditto --noextattr --noqtn "${options[$i]}/postinstall" "${1}/${options[$i]##*/}/Scripts/postinstall"
buildpackage "${1}/${options[$i]##*/}" "/" "" "start_selected=\"false\""
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# build resolution packages
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Resolution\">"
choices[$((choicescount++))]="<choice\n\tid=\"Resolution\"\n\ttitle=\"Resolution_title\"\n\tdescription=\"Resolution_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.resolution"
resolutions=($( find "${pkgroot}/Scripts/Resolutions" -type d -depth 1 -not -name '.svn' ))
for (( i = 0 ; i < ${#resolutions[@]} ; i++ ))
do
mkdir -p "${1}/${resolutions[$i]##*/}/Root/"
mkdir -p "${1}/${resolutions[$i]##*/}/Scripts/"
ditto --noextattr --noqtn "${resolutions[$i]}/postinstall" "${1}/${resolutions[$i]##*/}/Scripts/postinstall"
buildpackage "${1}/${resolutions[$i]##*/}" "/" "" "start_selected=\"false\""
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# build theme packages
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Themes\">"
choices[$((choicescount++))]="<choice\n\tid=\"Themes\"\n\ttitle=\"Themes_title\"\n\tdescription=\"Themes_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.theme"
artwork="${1%/*}"
themes=($( find "${artwork%/*}/artwork/themes" -type d -depth 1 -not -name '.svn' ))
for (( i = 0 ; i < ${#themes[@]} ; i++ ))
do
theme=$( echo ${themes[$i]##*/} | awk 'BEGIN{OFS=FS=""}{$1=toupper($1);print}' )
mkdir -p "${1}/${theme}/Root/"
ditto --noextattr --noqtn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}"
find "${1}/${themes[$i]##*/}" -name '.DS_Store' -or -name '.svn' -exec rm -R {} \+
find "${1}/${themes[$i]##*/}" -type f -exec chmod 644 {} \+
buildpackage "${1}/${theme}" "/.Chameleon/Extra/Themes" "" "start_selected=\"false\""
rm -R -f "${1}/${i##*/}"
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Extras\">"
choices[$((choicescount++))]="<choice\n\tid=\"Extras\"\n\ttitle=\"Extras_title\"\n\tdescription=\"Extras_description\"\n>\n</choice>\n"
((xmlindent++))
# build kext packages
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Kexts\">"
choices[$((choicescount++))]="<choice\n\tid=\"Kexts\"\n\ttitle=\"Kexts_title\"\n\tdescription=\"Kexts_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon"
kexts=($( find "${pkgroot}/Kexts" -type d -name '*.kext' -depth 1 ))
for (( i = 0 ; i < ${#kexts[@]} ; i++ ))
do
filename="${kexts[$i]##*/}"
mkdir -p "${1}/${filename%.kext}/Root/"
ditto --noextattr --noqtn --arch i386 "${kexts[$i]}" "${1}/${filename%.kext}/Root/${filename}"
find "${1}/${filename%.kext}" -name '.DS_Store' -or -name '.svn' -exec rm -R -f {} \; 2>/dev/null
fixperms "${1}/${filename%.kext}/Root/"
chown 501:20 "${1}/${filename%.kext}/Root/"
buildpackage "${1}/${filename%.kext}" "/.Chameleon/Extra/Extensions" "" "start_selected=\"false\""
rm -R -f "${1}/${filename%.kext}"
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# build post install package
mkdir -p ${1}/Post/Root
mkdir -p ${1}/Post/Scripts
cp -f ${pkgroot}/Scripts/Post/* ${1}/Post/Scripts
buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\""
outline[$((outlinecount++))]="${indent[$xmlindent]}</choices-outline>"
# build meta package
makedistribution "${1}" "${2}" "${3}" "${4}" "${5}"
# clean up
rm -R -f "${1}"
}
fixperms ()
{
# $1 path
find "${1}" -type f -exec chmod 644 {} \;
find "${1}" -type d -exec chmod 755 {} \;
chown -R 0:0 "${1}"
}
buildpackage ()
{
# $1 Path to package to build containing Root and or Scripts
# $2 Install Location
# $3 Size
# $4 Options
if [ -d "${1}/Root" ] && [ "${1}/Scripts" ]; then
local packagename="${1##*/}"
local identifier=$( echo ${packagesidentity}.${packagename//_/.} | tr [:upper:] [:lower:] )
find "${1}" -name '.DS_Store' -delete
local filecount=$( find "${1}/Root" | wc -l )
if [ "${3}" ]; then
local installedsize="${3}"
else
local installedsize=$( du -hkc "${1}/Root" | tail -n1 | awk {'print $1'} )
fi
local header="<?xml version=\"1.0\"?>\n<pkg-info format-version=\"2\" "
#[ "${3}" == "relocatable" ] && header+="relocatable=\"true\" "
header+="identifier=\"${identifier}\" "
header+="version=\"${version}\" "
[ "${2}" != "relocatable" ] && header+="install-location=\"${2}\" "
header+="auth=\"root\">\n"
header+="\t<payload installKBytes=\"${installedsize##* }\" numberOfFiles=\"${filecount##* }\"/>\n"
rm -R -f "${1}/Temp"
[ -d "${1}/Temp" ] || mkdir -m 777 "${1}/Temp"
[ -d "${1}/Root" ] && mkbom "${1}/Root" "${1}/Temp/Bom"
if [ -d "${1}/Scripts" ]; then
header+="\t<scripts>\n"
for script in $( find "${1}/Scripts" -type f \( -name 'pre*' -or -name 'post*' \) )
do
header+="\t\t<${script##*/} file=\"./${script##*/}\"/>\n"
done
header+="\t</scripts>\n"
chown -R 0:0 "${1}/Scripts"
pushd "${1}/Scripts" >/dev/null
find . -print | cpio -o -z -H cpio > "../Temp/Scripts"
popd >/dev/null
fi
header+="</pkg-info>"
echo -e "${header}" > "${1}/Temp/PackageInfo"
pushd "${1}/Root" >/dev/null
find . -print | cpio -o -z -H cpio > "../Temp/Payload"
popd >/dev/null
pushd "${1}/Temp" >/dev/null
xar -c -f "${1%/*}/${packagename// /}.pkg" --compression none .
popd >/dev/null
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${packagename// /}\"/>"
if [ "${4}" ]; then
local choiceoptions="${indent[$xmlindent]}${4}\n"
fi
choices[$((choicescount++))]="<choice\n\tid=\"${packagename// /}\"\n\ttitle=\"${packagename}_title\"\n\tdescription=\"${packagename}_description\"\n${choiceoptions}>\n\t<pkg-ref id=\"${identifier}\" installKBytes='${installedsize}' version='${version}.0.0.${timestamp}' auth='root'>#${packagename// /}.pkg</pkg-ref>\n</choice>\n"
rm -R -f "${1}"
fi
}
makedistribution ()
{
rm -f "${1%/*}/${packagename// /}"*.pkg
find "${1}" -type f -name '*.pkg' -depth 1 | while read component
do
mkdir -p "${1}/${packagename}/${component##*/}"
pushd "${1}/${packagename}/${component##*/}" >/dev/null
xar -x -f "${1%}/${component##*/}"
popd >/dev/null
done
ditto --noextattr --noqtn "${pkgroot}/Distribution" "${1}/${packagename}/Distribution"
ditto --noextattr --noqtn "${pkgroot}/Resources" "${1}/${packagename}/Resources"
find "${1}/${packagename}/Resources" -type d -name '.svn' -exec rm -R -f {} \; 2>/dev/null
for (( i=0; i < ${#outline[*]} ; i++));
do
echo -e "${outline[$i]}" >> "${1}/${packagename}/Distribution"
done
for (( i=0; i < ${#choices[*]} ; i++));
do
echo -e "${choices[$i]}" >> "${1}/${packagename}/Distribution"
done
echo "</installer-gui-script>" >> "${1}/${packagename}/Distribution"
perl -i -p -e "s/%CHAMELEONVERSION%/${version%%-*}/g" `find "${1}/${packagename}/Resources" -type f`
perl -i -p -e "s/%CHAMELEONREVISION%/${revision}/g" `find "${1}/${packagename}/Resources" -type f`
stage=${stage/RC/Release Candidate }
stage=${stage/FINAL/2.0 Final}
perl -i -p -e "s/%CHAMELEONSTAGE%/${stage}/g" `find "${1}/${packagename}/Resources" -type f`
find "${1}/${packagename}" -name '.DS_Store' -delete
pushd "${1}/${packagename}" >/dev/null
xar -c -f "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" --compression none .
popd >/dev/null
md5=$( md5 "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" | awk {'print $4'} )
echo "MD5 (${packagename// /}-${version}-r${revision}.pkg) = ${md5}" > "${1%/*}/${packagename// /}-${version}-r${revision}.pkg.md5"
}
main "${1}" "${2}" "${3}" "${4}" "${5}"
trunk/PackageBuilder/buildpkgTEST
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
#!/bin/bash
# $1 Path to store built package
packagesidentity="org.chameleon"
packagename="Chameleon"
pkgroot="${0%/*}"
#version=$( grep I386BOOT_CHAMELEONVERSION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )
version=$( cat version )
stage=${version##*-}
revision=$( grep I386BOOT_CHAMELEONREVISION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )
builddate=$( grep I386BOOT_BUILDDATE sym/i386/vers.h | awk '{ print $3,$4 }' | tr -d '\"' )
timestamp=$( date -j -f "%Y-%m-%d %H:%M:%S" "${builddate}" "+%s" )
distributioncount=0
xmlindent=0
indent[0]="\t"
indent[1]="\t\t"
indent[2]="\t\t\t"
indent[3]="\t\t\t\t"
main ()
{
# clean up the destination path
rm -R -f "${1}"
echo "Building $packagename Install Package v${version%%-*} $stage r$revision $builddate"
outline[$((outlinecount++))]="${indent[$xmlindent]}<choices-outline>"
# build core package
((xmlindent++))
packagesidentity="org.chameleon"
mkdir -p ${1}/Core/Root/usr/sbin
#mkdir -p ${1}/Core/Root/usr/local/bin
mkdir -p ${1}/Core/Root/usr/standalone/i386
#mkdir -p ${1}/Core/Root/Extra
cp -f ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot0hfs ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/boot1hp ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/cdboot ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/chain0 ${1}/Core/Root/usr/standalone/i386
cp -f ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin
fixperms "${1}/Core/Root/"
#cp -Rf ${pkgroot}/Configuration/Chameleon.prefPane ${1}/Core/Root/Library/PreferencePanes
#cp -f ${pkgroot}/Configuration/smbios.plist ${1}/Core/Root/Extra
cp -f ${pkgroot}/fdisk440 ${1}/Core/Root/usr/sbin
local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )
buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\""
# build Chameleon package
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Chameleon\">"
choices[$((choicescount++))]="<choice\n\tid=\"Chameleon\"\n\ttitle=\"Chameleon_title\"\n\tdescription=\"Chameleon_description\"\n>\n</choice>\n"
# build standard package
mkdir -p ${1}/Standard/Root
mkdir -p ${1}/Standard/Scripts/Tools
cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts
ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile
buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EnhancedHFS']) &amp;&amp; exclusive(choices['Standardhfs']) &amp;&amp; exclusive(choices['EnhancedFAT'])\""
# build standard package with boot0hfs
mkdir -p ${1}/Standardhfs/Root
mkdir -p ${1}/Standardhfs/Scripts/Tools
cp -f ${pkgroot}/Scripts/Standardhfs/* ${1}/Standardhfs/Scripts
ditto --arch i386 `which SetFile` ${1}/Standardhfs/Scripts/Tools/SetFile
buildpackage "${1}/Standardhfs" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"false\" selected=\"exclusive(choices['EnhancedHFS']) &amp;&amp; exclusive(choices['Standard']) &amp;&amp; exclusive(choices['EnhancedFAT'])\""
# build efi fat32 package
mkdir -p ${1}/EnhancedFAT/Root
mkdir -p ${1}/EnhancedFAT/Scripts/Tools
cp -f ${pkgroot}/Scripts/FAT/* ${1}/EnhancedFAT/Scripts
ditto --arch i386 `which SetFile` ${1}/EnhancedFAT/Scripts/Tools/SetFile
buildpackage "${1}/EnhancedFAT" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['Standardhfs']) &amp;&amp; exclusive(choices['EnhancedHFS'])\""
# build efi hfs package
mkdir -p ${1}/EnhancedHFS/Root
mkdir -p ${1}/EnhancedHFS/Scripts/Tools
cp -f ${pkgroot}/Scripts/HFS/* ${1}/EnhancedHFS/Scripts
ditto --arch i386 `which SetFile` ${1}/EnhancedHFS/Scripts/Tools/SetFile
buildpackage "${1}/EnhancedHFS" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['Standardhfs']) &amp;&amp; exclusive(choices['EnhancedFAT'])\""
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# build PrefPanel package
#mkdir -p ${1}/PrefPanel/Root
#mkdir -p ${1}/PrefPanel/Root/Library/PreferencePanes
#cp -Rf ${pkgroot}/Configuration/Chameleon.prefPane ${1}/PrefPanel/Root/Library/PreferencePanes
#buildpackage "${1}/PrefPanel" "/" "${coresize}" "start_visible=\"true\" start_selected=\"false\""
# build utility package
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Utility\">"
choices[$((choicescount++))]="<choice\n\tid=\"Utility\"\n\ttitle=\"Utility_title\"\n\tdescription=\"Utility_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon"
# build package for bdmesg
#mkdir -p "${1}/bdmesg/Root"
#ditto --noextattr --noqtn "${1%/*}/i386/bdmesg" "${1}/bdmesg/Root"
#echo "Building bdmesg package"
#buildpackage "${1}/bdmesg" "/usr/sbin" "" "start_selected=\"false\""
# End build package for bdmesg
# build package for Chameleon PrefPanel
mkdir -p "${1}/PrefPanel/Root/"
ditto --noextattr --noqtn "${pkgroot}/Configuration/PrefPanel/Chameleon.prefPane" "${1}/PrefPanel/Root"
echo "Building Chameleon Preference Panel package"
buildpackage "${1}/PrefPanel" "/Library/PreferencePanes/Chameleon.prefPane" "" "start_selected=\"false\""
# End build package for Chameleon PrefPanel
# build package for SMBIOSDefault
mkdir -p "${1}/SMBIOSDefault/Root/"
ditto --noextattr --noqtn "${pkgroot}/Configuration/SMBIOSDefault/smbios.plist" "${1}/SMBIOSDefault/Root"
echo "Building SMBIOSDefault package"
buildpackage "${1}/SMBIOSDefault" "/Extra/Example" "" "start_selected=\"false\""
# End build package for SMBIOSDefault
# build package for EFIMounter
mkdir -p "${1}/EFIMounter/Root/"
ditto --noextattr --noqtn "${pkgroot}/Configuration/EFIMounter/EFI Mounter.app" "${1}/EFIMounter/Root"
echo "Building EFIMounter package"
buildpackage "${1}/EFIMounter" "/Applications/EFI Mounter.app" "" "start_selected=\"false\""
# End build package for EFIMounter
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End utility package
# build Documentation package
#outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Documentation\">"
#choices[$((choicescount++))]="<choice\n\tid=\"Documentation\"\n\ttitle=\"Documentation_title\"\n\tdescription=\"Documentation_description\"\n>\n</choice>\n"
#((xmlindent++))
#packagesidentity="org.chameleon"
# build package for Documentation
#mkdir -p "${1}/Documentation/Root"
#cp -f ${pkgroot}/doc/BootHelp.txt ${1}/Documentation/Root
#cp -f ${pkgroot}/doc/README ${1}/Documentation/Root
#cp -f ${pkgroot}/doc/Users_Guide0.5.pdf ${1}/Documentation/Root
#echo "Building Documentation package"
#buildpackage "${1}/Documentation" "/Documentation/Chameleon2RC5" "" "start_selected=\"false\""
# End build package for bdmesg
#((xmlindent--))
#outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End utility package
# build options packages
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Options\">"
choices[$((choicescount++))]="<choice\n\tid=\"Options\"\n\ttitle=\"Options_title\"\n\tdescription=\"Options_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.options"
options=($( find "${pkgroot}/Scripts/Options" -type d -depth 1 -not -name '.svn' ))
for (( i = 0 ; i < ${#options[@]} ; i++))
do
packagesidentity="org.chameleon.${#options[@]}"
flagname=($( find "${options[$i]}" -type d -depth 1 -not -name '.svn' ))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${options[$i]##*/}\">"
choices[$((choicescount++))]="<choice\n\tid=\"${options[$i]##*/}\"\n\ttitle=\"${options[$i]##*/}\"\n\tdescription=\"${options[$i]##*/}_description\"\n>\n</choice>\n"
((xmlindent++))
for (( j = 0 ; j < ${#flagname[@]} ; j++))
do
packagesidentity="org.chameleon.${#flagname[@]}"
# outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${options[$i]##*/}${flagname[$j]##*/}\">"
choices[$((choicescount++))]="<choice\n\tid=\"${options[$i]##*/}${flagname[$j]##*/}\"\n\ttitle=\"${options[$i]##*/}${flagname[$j]##*/}_title\"\n\tdescription=\"${options[$i]##*/}${flagname[$j]##*/}_description\"\n>\n</choice>\n"
((xmlindent++))
mkdir -p "${1}/${options[$i]##*/}${flagname[$j]##*/}/Root"
mkdir -p "${1}/${options[$i]##*/}${flagname[$j]##*/}/Scripts"
cp -f "${flagname[$j]}/postinstall" "${1}/${options[$i]##*/}${flagname[$j]##*/}/Scripts"
echo "Building ${options[$i]##*/}${flagname[$j]##*/} package"
buildpackage "${1}/${options[$i]##*/}${flagname[$j]##*/}" "/" "" "start_selected=\"false\""
rm -R -f "${1}/${j##*/}"
((xmlindent--))
# outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
echo "Building ${options[$i]##*/} package"
buildpackage "${1}/${options[$i]##*/}" "/" "" "start_selected=\"false\""
rm -R -f "${1}/${i##*/}"
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build options packages
# build options packages
#outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Options\">"
#choices[$((choicescount++))]="<choice\n\tid=\"Options\"\n\ttitle=\"Options_title\"\n\tdescription=\"Options_description\"\n>\n</choice>\n"
#((xmlindent++))
#packagesidentity="org.chameleon"
#options=($( find "${pkgroot}/Scripts/Options" -type d -depth 1 -not -name '.svn' ))
#for (( i = 0 ; i < ${#options[@]} ; i++ ))
#do
#mkdir -p "${1}/${options[$i]##*/}/Root"
#mkdir -p "${1}/${options[$i]##*/}/Scripts"
#
#ditto --noextattr --noqtn "${options[$i]}/postinstall" "${1}/${options[$i]##*/}/Scripts/postinstall"
#buildpackage "${1}/${options[$i]##*/}" "/" "" "start_selected=\"false\""
#done
#((xmlindent--))
#outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# build resolution packages
#outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Resolution\">"
#choices[$((choicescount++))]="<choice\n\tid=\"Resolution\"\n\ttitle=\"Resolution_title\"\n\tdescription=\"Resolution_description\"\n>\n</choice>\n"
#((xmlindent++))
#packagesidentity="org.chameleon.resolution"
#resolutions=($( find "${pkgroot}/Scripts/Resolutions" -type d -depth 1 -not -name '.svn' ))
#for (( i = 0 ; i < ${#resolutions[@]} ; i++ ))
#do
#mkdir -p "${1}/${resolutions[$i]##*/}/Root/"
#mkdir -p "${1}/${resolutions[$i]##*/}/Scripts/"
#ditto --noextattr --noqtn "${resolutions[$i]}/postinstall" "${1}/${resolutions[$i]##*/}/Scripts/postinstall"
#buildpackage "${1}/${resolutions[$i]##*/}" "/" "" "start_selected=\"false\""
#done
#((xmlindent--))
#outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# build theme packages
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Themes\">"
choices[$((choicescount++))]="<choice\n\tid=\"Themes\"\n\ttitle=\"Themes_title\"\n\tdescription=\"Themes_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.theme"
artwork="${1%/*}"
themes=($( find "${artwork%/*}/artwork/themes" -type d -depth 1 -not -name '.svn' ))
for (( i = 0 ; i < ${#themes[@]} ; i++ ))
do
theme=$( echo ${themes[$i]##*/} | awk 'BEGIN{OFS=FS=""}{$1=toupper($1);print}' )
mkdir -p "${1}/${theme}/Root/"
ditto --noextattr --noqtn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}"
find "${1}/${themes[$i]##*/}" -name '.DS_Store' -or -name '.svn' -exec rm -R {} \+
find "${1}/${themes[$i]##*/}" -type f -exec chmod 644 {} \+
buildpackage "${1}/${theme}" "/.Chameleon/Extra/Themes" "" "start_selected=\"false\""
rm -R -f "${1}/${i##*/}"
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Extras\">"
choices[$((choicescount++))]="<choice\n\tid=\"Extras\"\n\ttitle=\"Extras_title\"\n\tdescription=\"Extras_description\"\n>\n</choice>\n"
((xmlindent++))
# build kext packages
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Kexts\">"
choices[$((choicescount++))]="<choice\n\tid=\"Kexts\"\n\ttitle=\"Kexts_title\"\n\tdescription=\"Kexts_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon"
kexts=($( find "${pkgroot}/Kexts" -type d -name '*.kext' -depth 1 ))
for (( i = 0 ; i < ${#kexts[@]} ; i++ ))
do
filename="${kexts[$i]##*/}"
mkdir -p "${1}/${filename%.kext}/Root/"
ditto --noextattr --noqtn --arch i386 "${kexts[$i]}" "${1}/${filename%.kext}/Root/${filename}"
find "${1}/${filename%.kext}" -name '.DS_Store' -or -name '.svn' -exec rm -R -f {} \; 2>/dev/null
fixperms "${1}/${filename%.kext}/Root/"
chown 501:20 "${1}/${filename%.kext}/Root/"
buildpackage "${1}/${filename%.kext}" "/.Chameleon/Extra/Extensions" "" "start_selected=\"false\""
rm -R -f "${1}/${filename%.kext}"
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# build post install package
mkdir -p ${1}/Post/Root
mkdir -p ${1}/Post/Scripts
cp -f ${pkgroot}/Scripts/Post/* ${1}/Post/Scripts
buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\""
outline[$((outlinecount++))]="${indent[$xmlindent]}</choices-outline>"
# build meta package
makedistribution "${1}" "${2}" "${3}" "${4}" "${5}"
# clean up
rm -R -f "${1}"
}
fixperms ()
{
# $1 path
find "${1}" -type f -exec chmod 644 {} \;
find "${1}" -type d -exec chmod 755 {} \;
chown -R 0:0 "${1}"
}
buildpackage ()
{
# $1 Path to package to build containing Root and or Scripts
# $2 Install Location
# $3 Size
# $4 Options
if [ -d "${1}/Root" ] && [ "${1}/Scripts" ]; then
local packagename="${1##*/}"
local identifier=$( echo ${packagesidentity}.${packagename//_/.} | tr [:upper:] [:lower:] )
find "${1}" -name '.DS_Store' -delete
local filecount=$( find "${1}/Root" | wc -l )
if [ "${3}" ]; then
local installedsize="${3}"
else
local installedsize=$( du -hkc "${1}/Root" | tail -n1 | awk {'print $1'} )
fi
local header="<?xml version=\"1.0\"?>\n<pkg-info format-version=\"2\" "
#[ "${3}" == "relocatable" ] && header+="relocatable=\"true\" "
header+="identifier=\"${identifier}\" "
header+="version=\"${version}\" "
[ "${2}" != "relocatable" ] && header+="install-location=\"${2}\" "
header+="auth=\"root\">\n"
header+="\t<payload installKBytes=\"${installedsize##* }\" numberOfFiles=\"${filecount##* }\"/>\n"
rm -R -f "${1}/Temp"
[ -d "${1}/Temp" ] || mkdir -m 777 "${1}/Temp"
[ -d "${1}/Root" ] && mkbom "${1}/Root" "${1}/Temp/Bom"
if [ -d "${1}/Scripts" ]; then
header+="\t<scripts>\n"
for script in $( find "${1}/Scripts" -type f \( -name 'pre*' -or -name 'post*' \) )
do
header+="\t\t<${script##*/} file=\"./${script##*/}\"/>\n"
done
header+="\t</scripts>\n"
chown -R 0:0 "${1}/Scripts"
pushd "${1}/Scripts" >/dev/null
find . -print | cpio -o -z -H cpio > "../Temp/Scripts"
popd >/dev/null
fi
header+="</pkg-info>"
echo -e "${header}" > "${1}/Temp/PackageInfo"
pushd "${1}/Root" >/dev/null
find . -print | cpio -o -z -H cpio > "../Temp/Payload"
popd >/dev/null
pushd "${1}/Temp" >/dev/null
xar -c -f "${1%/*}/${packagename// /}.pkg" --compression none .
popd >/dev/null
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${packagename// /}\"/>"
if [ "${4}" ]; then
local choiceoptions="${indent[$xmlindent]}${4}\n"
fi
choices[$((choicescount++))]="<choice\n\tid=\"${packagename// /}\"\n\ttitle=\"${packagename}_title\"\n\tdescription=\"${packagename}_description\"\n${choiceoptions}>\n\t<pkg-ref id=\"${identifier}\" installKBytes='${installedsize}' version='${version}.0.0.${timestamp}' auth='root'>#${packagename// /}.pkg</pkg-ref>\n</choice>\n"
rm -R -f "${1}"
fi
}
makedistribution ()
{
rm -f "${1%/*}/${packagename// /}"*.pkg
find "${1}" -type f -name '*.pkg' -depth 1 | while read component
do
mkdir -p "${1}/${packagename}/${component##*/}"
pushd "${1}/${packagename}/${component##*/}" >/dev/null
xar -x -f "${1%}/${component##*/}"
popd >/dev/null
done
ditto --noextattr --noqtn "${pkgroot}/Distribution" "${1}/${packagename}/Distribution"
ditto --noextattr --noqtn "${pkgroot}/Resources" "${1}/${packagename}/Resources"
find "${1}/${packagename}/Resources" -type d -name '.svn' -exec rm -R -f {} \; 2>/dev/null
for (( i=0; i < ${#outline[*]} ; i++));
do
echo -e "${outline[$i]}" >> "${1}/${packagename}/Distribution"
done
for (( i=0; i < ${#choices[*]} ; i++));
do
echo -e "${choices[$i]}" >> "${1}/${packagename}/Distribution"
done
echo "</installer-gui-script>" >> "${1}/${packagename}/Distribution"
perl -i -p -e "s/%CHAMELEONVERSION%/${version%%-*}/g" `find "${1}/${packagename}/Resources" -type f`
perl -i -p -e "s/%CHAMELEONREVISION%/${revision}/g" `find "${1}/${packagename}/Resources" -type f`
stage=${stage/RC/Release Candidate }
stage=${stage/FINAL/2.0 Final}
perl -i -p -e "s/%CHAMELEONSTAGE%/${stage}/g" `find "${1}/${packagename}/Resources" -type f`
find "${1}/${packagename}" -name '.DS_Store' -delete
pushd "${1}/${packagename}" >/dev/null
xar -c -f "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" --compression none .
popd >/dev/null
md5=$( md5 "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" | awk {'print $4'} )
echo "MD5 (${packagename// /}-${version}-r${revision}.pkg) = ${md5}" > "${1%/*}/${packagename// /}-${version}-r${revision}.pkg.md5"
}
main "${1}" "${2}" "${3}" "${4}" "${5}"
trunk/PackageBuilder/doc/BootHelp.txt
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
The boot: prompt waits for you to type advanced startup options.
If you don't type anything, the computer continues starting up normally. It
uses the kernel and configuration files on the startup device, which it also
uses as the root device.
Advanced startup options use the following syntax:
[device]<kernel> [arguments]
Example arguments include
device: rd=<BSD device name> (e.g. rd=disk0s2)
rd=*<IODeviceTree path> (e.g. rd=*/PCI0@0/CHN0@0/@0:1)
kernel: kernel name (e.g. "mach_kernel" - must be in "/" )
flags: -v (verbose) -s (single user mode)
-x (safe mode) -f (ignore caches)
-F (ignore "Kernel Flags" specified in boot configuration file)
"Graphics Mode"="WIDTHxHEIGHTxDEPTH" (e.g. "1024x768x32")
kernel flags (e.g. debug=0x144)
io=0xffffffff (defined in IOKit/IOKitDebug.h)
Example: mach_kernel rd=disk0s1 -v "Graphics Mode"="1920x1200x32"
If the computer won't start up properly, you may be able to start it up
using safe mode. Type -x to start up in safe mode, which ignores all
cached driver files.
Special booter hotkeys:
F5 Rescans optical drive.
F10 Scans and displays all BIOS accessible drives.
Special booter commands:
?memory Displays information about the computer's memory.
?video Displays VESA video modes supported by the computer's BIOS.
?norescan Leaves optical drive rescan mode.
Additional useful command-line options:
config=<file> Use an alternate Boot.plist file.
Options useful in the com.apple.Boot.plist file:
Wait=Yes|No Prompt for a key press before starting the kernel.
"Quiet Boot"=Yes|No Use quiet boot mode (no messages or prompt).
Timeout=8 Number of seconds to pause at the boot: prompt.
"Instant Menu"=Yes Force displaying the partition selection menu.
"Default Partition" Sets the default boot partition,
=hd(x,y)|UUID|"Label" Specified as a disk/partition pair, an UUID, or a
label enclosed in quotes.
"Hide Partition" Remove unwanted partition(s) from the boot menu.
=partition Specified, possibly multiple times, as hd(x,y), an
[;partition2 ...] UUID or label enclosed in quotes.
"Rename Partition" Rename partition(s) for the boot menu.
=partition <alias> Where partition is hd(x,y), UUID or label enclosed
[;partition2 <alias2> in quotes. The alias can optionally be quoted too.
...]
GUI=No Disable the GUI (enabled by default).
"Boot Banner"=Yes|No Show boot banner in GUI mode (enabled by default).
"Legacy Logo"=Yes|No Use the legacy grey apple logo (disabled by default).
PciRoot=<value> Use an alternate value for PciRoot (default value 0).
GraphicsEnabler=Yes|No Automatic device-properties generation for gfx cards.
UseAtiROM=Yes|No Use an alternate Ati ROM image
(path: /Extra/<vendorid>_<devid>.rom)
UseNvidiaROM=Yes|No Use an alternate Nvidia ROM image
(path: /Extra/<vendorid>_<devid>.rom)
VBIOS=Yes|No Inject VBIOS to device-properties.
EthernetBuiltIn=Yes|No Automatic "built-in"=yes device-properties generation
for ethernet interfaces.
USBBusFix=Yes Enable all USB fixes below:
EHCIacquire=Yes Enable the EHCI fix (disabled by default).
UHCIreset=Yes Enable the UHCI fix (disabled by default).
USBLegacyOff=Yes Enable the USB Legacy fix (disabled by default).
ForceHPET=Yes|No Force Enable HPET.
Wake=No Disable wake up after hibernation (default: enabled).
ForceWake=Yes Force using the sleepimage (disabled by default).
WakeImage=<file> Use an alternate sleepimage file.
(default path is /private/var/vm/sleepimage).
DropSSDT=Yes Skip the SSDT tables while relocating the ACPI tables.
DSDT=<file> Use an alternate DSDT.aml file
(default path: /DSDT.aml /Extra/DSDT.aml bt(0,0)/Extra/DSDT.aml).
SMBIOS=<file> Use an alternate SMBIOS.plist file
(default path: /Extra/SMBIOS.plist bt(0,0)/Extra/SMBIOS.plist).
SMBIOSdefaults=No Don't use the Default values for SMBIOS overriding
if smbios.plist doesn't exist, factory
values are kept.
"Scan Single Drive" Scan the drive only where the booter got loaded from.
=Yes|No Fix rescan pbs when using a DVD reader in AHCI mode.
Rescan=Yes Enable CD-ROM rescan mode.
"Rescan Prompt"=Yes Prompts for enable CD-ROM rescan mode.
SystemId=<UUID> Set manually the system id UUID,
SMUUID in smbios config (reserved field) isn't used.
SystemType=<n> Set the system type where n is between 0..6
(default =1 (Desktop)
md0=<file> Load raw img file into memory for use as XNU's md0
ramdisk. /Extra/Postboot.img is used otherwise.
trunk/PackageBuilder/doc/README
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
Chameleon Boot Loader
=====================
What is it?
-----------
Chameleon is combination of various boot loader components. It is based
on David Elliott's fake EFI implementation added to Apple's boot-132
project. Chameleon is extended with the following key features:
Features
--------
- Device Property Injection via device-properties string in com.apple.Boot.plist
- hybrid boot0+boot1h loaders for both MBR and GPT partitioned disks.
- automatic FSB detection code even for recent AMD CPUs.
- Apple Software RAID support.
- stage2 loader (boot) can be placed as a regular file in the boot
partition's root folder.
Installation
============
Normal Install (non-RAID):
--------------------------
Suppose that your installation is on /dev/disk0s2
- Install boot0 to the MBR:
sudo ./fdisk440 -f boot0 -u -y /dev/rdisk0
- Install boot1h to the partition's bootsector:
sudo dd if=boot1h of=/dev/rdisk0s2
- Install boot to the partition's root directory:
sudo cp boot /
No need to use startupfiletool anymore!
RAID Install:
-------------
Suppose that your installation is on /dev/disk3, which is either a mirror- or a
stripeset consisting of /dev/disk0 and /dev/disk1
Mac OS X creates a small helper partition at the end of each RAID member disk,
namely /dev/disk0s3 and /dev/disk1s3
- Install boot0 to the MBR of both disks:
sudo ./fdisk440 -f boot0 -u -y /dev/rdisk0
sudo ./fdisk440 -f boot0 -u -y /dev/rdisk1
- Install boot1h to the bootsector of each boot partition:
sudo dd if=boot1h of=/dev/rdisk0s3
sudo dd if=boot1h of=/dev/rdisk1s3
- Install boot to both helper partition's root directories.
diskutil mount disk0s3
cp boot /Volumes/Boot\ OSX
diskutil unmount disk0s3
diskutil mount disk1s3
cp boot /Volumes/Boot\ OSX
diskutil unmount disk1s3
Support:
--------
If you have any questions, issues etc. feel free to join us
at irc.voodooprojects.org #chameleon
Source Code
-----------
For downloading the source code please visit the project page at
http://chameleon.osx86.hu
Licensing
---------
Chameleon is released under the terms and conditions of
Apple Public Source License (see APPLE_LICENSE).
trunk/PackageBuilder/smbios.plist
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SMbiosversion</key>
<string>MP31.88Z.00C1.B00.0802091544</string>
<key>SMmanufacter</key>
<string>Apple Inc.</string>
<key>SMproductname</key>
<string>MacPro3,1</string>
<key>SMsystemversion</key>
<string>1.0</string>
<key>SMserial</key>
<string>W87234JHYA4</string>
<key>SMexternalclock</key>
<string>333</string>
<key>SMmaximalclock</key>
<string>3000</string>
<key>SMmemtype</key>
<string>19</string>
<key>SMmemspeed</key>
<string>800</string>
<key>SMmemmanufacter_1</key>
<string>0xAD00000000000000</string>
<key>SMmemserial_1</key>
<string>0x00001020</string>
<key>SMmempart_1</key>
<string>0x48594D503131325336344350362D59352020</string>
<key>SMmemmanufacter_2</key>
<string>0xAD00000000000000</string>
<key>SMmemserial_2</key>
<string>0x00003021</string>
<key>SMmempart_2</key>
<string>0x48594D503131325336344350362D59352020</string>
<key>SMmemmanufacter_3</key>
<string>0xAD00000000000000</string>
<key>SMmemserial_3</key>
<string>0x00003021</string>
<key>SMmempart_3</key>
<string>0x48594D503131325336344350362D59352020</string>
<key>SMmemmanufacter_4</key>
<string>0xAD00000000000000</string>
<key>SMmemserial_4</key>
<string>0x00003021</string>
<key>SMmempart_4</key>
<string>0x48594D503131325336344350362D59352020</string>
</dict>
</plist>
trunk/PackageBuilder/Configuration/SMBIOSDefault/smbios.plist
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SMbiosdate</key>
<string>20/08/2008</string>
<key>SMbiosversion</key>
<string>IM71.88Z.007A.B03.0803051705</string>
<key>SMcputype</key>
<string>1281</string>
<key>SMexternalclock</key>
<string>1,33</string>
<key>SMfamily</key>
<string>iMac</string>
<key>SMmanufacter</key>
<string>Apple Inc. Mac-F2268CC8</string>
<key>SMmaximalclock</key>
<string>2,50</string>
<key>SMmemmanufacter_1</key>
<string>Team Elite</string>
<key>SMmemmanufacter_2</key>
<string>Team Elite</string>
<key>SMmempart_1</key>
<string>50M3P4R7</string>
<key>SMmempart_2</key>
<string>50M3P4R7</string>
<key>SMmemserial_1</key>
<string>50M353R14L</string>
<key>SMmemserial_2</key>
<string>50M353R14L</string>
<key>SMproductname</key>
<string>iMac7,1</string>
<key>SMserial</key>
<string>YM90295599X</string>
<key>SMsystemversion</key>
<string>1.0</string>
</dict>
</plist>
trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Info.plist
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string></string>
<key>CFBundleExecutable</key>
<string>Chameleon</string>
<key>CFBundleIconFile</key>
<string>Chameleon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.chameleon.Chameleon</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Chameleon</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.0.0 RC4</string>
<key>NSMainNibFile</key>
<string>Chameleon</string>
<key>NSPrefPaneIconFile</key>
<string>Chameleon.icns</string>
<key>NSPrefPaneIconLabel</key>
<string>Chameleon</string>
<key>NSPrincipalClass</key>
<string>ChameleonPrefPane</string>
</dict>
</plist>
trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/version
1
2.0-RC4
trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/getDevProp.sh
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
#!/bin/sh
# getDevProp.sh
# smbios-cham
#
# Created by ronan & thomas on 12/08/09.
# Copyright 2009 org.darwinx86.app. All rights reserved.
# adapted for Chameleon control panel use by Rekursor
#
# Directories
cdir=`dirname $0`
tmpDir=/tmp/Chameleon
dmpdir=${tmpDir}/devprop
# Create a dump directory
if [[ ! -d $dmpdir ]];then
mkdir -p $dmpdir
fi
if [[ ! -d $tmpDir ]];then
mkdir -p $tmpDir
fi
# Dump Device properties
ioreg -lw0 -p IODeviceTree -n efi -r -x |grep device-properties | sed 's/.*<//;s/>.*//;' | cat > $dmpdir/chameleon-devprop.hex
$cdir/gfxutil -s -n -i hex -o xml $dmpdir/chameleon-devprop.hex $dmpdir/chameleon-devprop.plist
# Splash the result up !!
open $dmpdir/chameleon-devprop.plist
if [[ ! -d $dmpdir ]];then
rm -r $dmpdir
fi
if [[ ! -d $tmpDir ]];then
rm -r $tmpDir
fi
#end
#echo $?
trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/README
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
-----------------------------------
Chameleon System Preferences panel
by rekursor 1/17/2010
-----------------------------------
How to Install:
Double click on the panel file to install the resource
Configuration:
The persistent configuration file is a all users level preferences property list
located in In /Library/Preferences/com.chameleon.prefPane.plist.
The swap disk fix option might be use if your disk order from chameleon is different
from what diskutil list returns.
Ideally we should not need this fix, but as for now, I don't know another way to do it
In /Library/Preferences/com.chameleon.prefPane.plist:
you can insert a 'forceBootConfigPath' key with your com.apple.Boot,plist file path:
So if automatic detection does not work, then force your com.apple.Boot.plist path here.
Freeze Partitions (lock the partition list and prevent autodetection to happen)
You can also decide to freeze the partitions to prevent automatic detection,
if disk order is not matching after the boot or if you don't want the list to change
each time that a usb key is inserted, then use this feature.
For it to work, you will need first to click on:
Settings/Boot Selector Fixes/Inject Parts In Freeze File
Then all your automatically detected current partitions are injected in the pref. file,
all you need to do is to manually edit them to change their disk id/partition id
(2 first parameters in the pref. file under the partitionList key)
Troubleshooting
If the panel sees your com.apple.boot.plist in the status box, but the boot selection
seem to have no effect, it might be that you have more than one bootConfig file
and that the chameleon booter does not load the one that the panel selected,
see upper to force the bootConfig to match the one loaded by the chameleon booter.
trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CREDITS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Initial Conception & Design:
---------------------------
Rekursor
Crew Members
----------
Rekursor, DieBuche
Contributors & Testers:
---------------------
BlackOSX, MasterChief, digital_dreamer, smith@@, scrax, quinielascom
Chameleon also reuses:
---------------------
Courtesy of Ronan (Lizard):
Existing scripts and gfxutil tool from Lizard available at:
http://code.google.com/p/lizard-app/
trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/cdBootCreator.sh
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
#!/bin/sh
# Copyright 2009 org.darwinx86.app. All rights reserved.
# Directories
extra=/tmp/isodir
mydir=`dirname $0`
tempDir=/tmp
finaldir=~/Desktop
isodir=/tmp/newiso
extradir=/tmp/newiso/Extra
preDir=/tmp/newiso/Extra/Preboot/
prebootDir=/tmp/newiso/Extra/Preboot/Extra
backDir=~/Desktop/Lizard
bkpdir=~/Desktop/Lizard/Previous-dmg
echo "Starting script..."
#errors
if ([ ! -f $extra/Extensions.mkext ] && [ ! -d $extra/Extensions ]);then
echo "- Error: no Extensions.mkext or Extensions folder. One of them is required"
echo " ------------------------"
exit
fi
if [ ! -f $extra/com.apple.Boot.plist ];then
echo "- Error: no com.apple.boot.plist found. File required"
echo " ------------------------"
exit
fi
if [ ! -f $extra/cdboot ];then
echo "- Error: no cdboot found. File required"
echo " ------------------------"
exit
fi
# Create a work directory
echo " - temps folders created"
echo " - Checking files"
#copy Extra files to temp directory
if [ -f $extra/cdboot ];then
cp -R $extra/cdboot $isodir
fi
if [ -f $extra/dsdt.aml ];then
cp -R $extra/dsdt.aml $prebootDir
fi
if [ -f $extra/DSDT.aml ];then
cp -R $extra/DSDT.aml $prebootDir
fi
if [ -f $extra/NVIDIA.ROM ];then
cp -R $extra/NVIDIA.ROM $prebootDir
fi
if [ -f $extra/smbios.plist ];then
cp -R $extra/smbios.plist $prebootDir
fi
if [ -f $extra/Extensions.mkext ];then
cp -R $extra/Extensions.mkext $prebootDir
fi
if [ -d $extra/Extensions ];then
cp -Rp $extra/Extensions $prebootDir
fi
if [ -f $extra/com.apple.Boot.plist ];then
cp -R $extra/com.apple.Boot.plist $prebootDir
fi
if [ -f $tempDir/com.apple.Boot.plist ];then
cp -R $tempDir/com.apple.Boot.plist $extradir
fi
echo "- Files copied in temp folder"
# ramdisk creator
hdiutil create -srcfolder $preDir/ -layout GPTSPUD -fs HFS+ -format UDRW -volname Preboot $extradir/Preboot.dmg
rm -R $preDir
echo " - ram disk created"
# boot cd creator
hdiutil makehybrid -o BootCD.iso $isodir/ -iso -hfs -joliet -eltorito-boot $isodir/cdboot -no-emul-boot -hfs-volume-name "Boot CD" -joliet-volume-name "Boot CD"
echo " - hybrid image created"
# Create output and backup directories
if [ -f $finaldir/BootCD.iso ];then
if [ ! -d $bkpdir ];then
mkdir $backDir
mkdir $bkpdir
echo " - backup folder created"
fi
mv -f $finaldir/BootCD.iso $bkpdir/BootCd-$(date +"%d-%y-%Hh%M").iso
echo " - previous ISO moved into backup folder"
fi
mv BootCD.iso $finaldir
echo " - ISO moved on desktop"
# cleanup
echo " - Perform cleaning"
echo " - ISO created succefully"
echo " ------------------------"
exit 0
trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/TODO
1
2
3
4
5
6
7
8
9
10
11
12
Future version (codename: Gandalf) Plans
----------------------------------------
Implement most if not all of the Chameleon bootConfig parameters in the table view of the current prefpane : let the Magic happening !
Current versions todo list
--------------------------
- Graphical Design (icons and other graphical matter..) management -> DieBuche
- Add WebView in About Panel for nicer Kredits.
- Localization -> DieBuche, get someone to have a look over German, Italian, Spanish loc. Add Portuguese (thiagomorales ?)
- Don't filter out soft-raids, which only have a disk identifier & no partition number
- Try to investigate if there is a better way to get the partition list
(currently done with diskutil list) probably with Chameleon booter RC6.
trunk/PackageBuilder/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CHANGES
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
- Added About Dialog, made the displayed version numbers all rely on the info.plist file
- Fixed refresh and on checked associated button state, made sure the string is disabled if value is 0
- Fixed crash when using swap hd 0<->2
- Added a new option type (OptionFileString) that features an open dialog box to open files
- Added few Combo boxes to simplify text inputs
- Added Missing ForceHPET option and Theme options
- Added a new SMBIOS panel only opening a file (in construction)
- Added new EFI Injection panel
- Added PciRoot, GUI boot options
- Added scrax to credits: thx for testing the Chameleon PrefPane!
- Create a makebin script (to enhance) that creates zip archives and sets a version
in the bin dir
- Fixed default value to Yes not included in the boot config would not be checked
by default in interface
- Added RestartFix boot option
- Added forceBootConfigPath to the tabview panel for quicker setup, so now no
need to edit the preferences file manually.
- Added SystemId
- Added full bootOptions loading into the interface with no custom code needed,
all loading features are implemented in base class PreferencesControllerBase,
with the automatic parser engine.
- Implemented the bootOption automatic and generic parsing engine.
Now any option is parsed from bootFile automatically (incl. defaults)
thanks to the underlying engine based on a dynamically constructed
id to desc map and also to the group panel registration init process
- Fixed dmg archives would appear in dynamic partition listing
- Added FREEZE (lock) features, see README.
- Refined cosmetics for the GUI
- Added images icon on the first column of each partition entries
- Added APSL and README for instructions
- Added swap disk (01 and 02) fixes
- Added Rename and Hide display from bootConfig
- Fixed 10.5 and 10.6 would crash because of memory references erased
- Added more bootConfig paths and an option to force it
(i.e:if not found automatically)
- Added new paths for bootConfig search now looking in this order:
"/",
"/Extra/",
"/Volumes/EFI/Extra/",
"/Volumes/Cham/Extra/",
"/Volumes/BootLoaders/Extra/",
"/Library/Preferences/SystemConfiguration/",
- Change the restart by replacing the internal reboot shell cmd by an applescript
eq. to the AppleMenu/Restart command
- Fixed nib file loading and initialization problem, possibly fixes the lock pb as well?
- Added Apple_Free filter to filter these free partitions
trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/Info.plist
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>applet</string>
<key>CFBundleIconFile</key>
<string>applet</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>EFI - Mount</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>aplt</string>
<key>LSRequiresCarbon</key>
<true/>
<key>WindowState</key>
<dict>
<key>name</key>
<string>ScriptWindowState</string>
<key>positionOfDivider</key>
<real>524</real>
<key>savedFrame</key>
<string>9 152 833 726 0 0 1440 878 </string>
<key>selectedTabView</key>
<string>result</string>
</dict>
</dict>
</plist>
trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/description.rtfd/TXT.rtf
1
2
3
4
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
{\fonttbl}
{\colortbl;\red255\green255\blue255;}
}
trunk/PackageBuilder/Configuration/EFIMounter/EFI Mounter.app/Contents/PkgInfo
1
APPLaplt
trunk/PackageBuilder/com.apple.Boot.plist
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" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kernel</key>
<string>mach_kernel</string>
<key>Kernel Flags</key>
<string>cpus=4 blacklist=0 busratio=20 -v -f</string>
<key>arch</key>
<string>i386</string>
<key>PciRoot</key>
<string>0</string>
<key>Graphics Mode</key>
<string>1920x1080x32</string>
<key>GraphicsEnabler</key>
<string>No</string>
<key>UseNvidiaROM</key>
<string>Yes</string>
<key>UseAtiROM</key>
<string>Yes</string>
<key>VBIOS</key>
<string>Yes</string>
<key>GUI</key>
<string>Yes</string>
<key>Theme</key>
<string>Default</string>
<key>Legacy Logo</key>
<string>No</string>
<key>Boot Banner</key>
<string>Yes</string>
<key>Default Partition</key>
<string>hd(0,2)</string>
<key>Hide Partition</key>
<string></string>
<key>DropSSDT</key>
<string>Yes</string>
<key>GenerateCStates</key>
<string>Yes</string>
<key>GeneratePStates</key>
<string>Yes</string>
<key>Rescan</key>
<string>No</string>
<key>DSDT</key>
<string>/Extra/dsdt.aml</string>
<key>SMBIOS</key>
<string>/Extra/smbios.plist</string>
<key>SMBIOSdefaults</key>
<string>No</string>
<key>SystemId</key>
<string>uuid here</string>
<key>SystemType</key>
<string>1</string>
<key>Instant Menu</key>
<string>No</string>
<key>Quiet Boot</key>
<string>No</string>
<key>Timeout</key>
<string>2</string>
<key>EthernetBuiltIn</key>
<string>Yes</string>
<key>RestartFix</key>
<string>Yes</string>
<key>forceHPET</key>
<string>No</string>
<key>EHCIacquire</key>
<string>No</string>
<key>UHCIreset</key>
<string>No</string>
<key>USBBusFix</key>
<string>No</string>
<key>Wait</key>
<string>No</string>
<key>Wake</key>
<string>No</string>
<key>ForceWake</key>
<string>No</string>
<key>device-properties</key>
<string></string>
</dict>
</plist>

Archive Download the corresponding diff file

Revision: 126