Chameleon

Chameleon Commit Details

Date:2011-09-23 09:21:35 (12 years 7 months ago)
Author:blackosx
Commit:1561
Parents: 1560
Message:Mirror some changes from Azi's package branch.
Changes:
M/branches/blackosx/package/buildpkg.sh
M/branches/blackosx/package/Scripts/Install/WriteChameleonStage0.sh
M/branches/blackosx/package/Scripts/Standard/postinstall
M/branches/blackosx/package/Scripts/EFI/postinstall

File differences

branches/blackosx/package/Scripts/Standard/postinstall
4545
4646
4747
48
4849
4950
5051
......
144145
145146
146147
147
148
148149
149150
150151
targetDiskRaw=${targetDisk/disk/rdisk}
targetSlice=${targetDevice#*disk*s}
targetResources="${targetVolume}/usr/local/bin/"
echo "==============================================="
echo "DEBUG: display script variables"
echo "Diskupdate = true, so the stage 0 loader can be written to the MBR"
# Write the stage 0 loader to the MBR
"$scriptDir"WriteChameleonStage0.sh "${diskSigCheck}" "${stage0Loader}" "${stage0LoaderDualBoot}" "${targetDisk}" "${targetVolume}" "${scriptDir}"
"$scriptDir"WriteChameleonStage0.sh "${diskSigCheck}" "${stage0Loader}" "${stage0LoaderDualBoot}" "${targetDisk}" "${targetResources}" "${targetVolume}" "${scriptDir}"
else
echo "Diskupdate = false, so didn't write the stage 0 loader to the MBR."
"$scriptDir"InstallLog.sh "${targetVolume}" "Stage 0 loader not written to ${targetDisk}."
branches/blackosx/package/Scripts/EFI/postinstall
4646
4747
4848
49
4950
50
5151
5252
5353
......
6565
6666
6767
68
6869
6970
7071
......
144145
145146
146147
147
148
148149
149150
150151
targetDiskRaw=${targetDisk/disk/rdisk}
targetSlice=${targetDevice#*disk*s}
targetResources="${targetVolumeChosenByUser}/usr/local/bin/"
echo "==============================================="
echo "DEBUG: display script variables"
echo "***************************"
echo "DEBUG: targetDisk: Disk device is ${targetDisk}"
echo "DEBUG: targetDiskRaw: Disk raw device is ${targetDiskRaw}"
echo "DEBUG: targetSlice: Volume slice is ${targetSlice}"
echo "DEBUG: targetResources: Boot Resources is ${targetResources}"
echo "-----------------------------------------------"
echo ""
#echo "Diskupdate = true, so the stage 0 loader can be written to the MBR"
# Write the stage 0 loader to the MBR
"$scriptDir"WriteChameleonStage0.sh "${diskSigCheck}" "${stage0Loader}" "${stage0LoaderDualBoot}" "${targetDisk}" "${targetVolumeChosenByUser}" "${scriptDir}"
"$scriptDir"WriteChameleonStage0.sh "${diskSigCheck}" "${stage0Loader}" "${stage0LoaderDualBoot}" "${targetDisk}" "${targetResources}" "${targetVolumeChosenByUser}" "${scriptDir}"
else
#echo "Diskupdate = false, so didn't write the stage 0 loader to the MBR."
"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Stage 0 loader not written to ${targetDisk}."
branches/blackosx/package/Scripts/Install/WriteChameleonStage0.sh
1010
1111
1212
13
1314
1415
1516
1617
17
18
1819
1920
2021
2122
22
23
23
24
25
2426
2527
2628
2729
30
2831
2932
3033
......
3639
3740
3841
39
40
41
42
43
44
4245
4346
4447
45
46
47
48
49
50
4851
4952
5053
# Receives stage0Loader: for example, boot0
# Receives stage0Loaderdualboot: for example, boot0md
# Receives targetDisk: for example, /dev/disk3
# Receives targetResources: location of fdisk440
# Receives targetVolume: for example, /Volumes/USB
# Receives scriptDir: The location of the main script dir.
if [ "$#" -eq 6 ]; then
if [ "$#" -eq 7 ]; then
disksignature="$1"
stage0Loader="$2"
stage0Loaderdualboot="$3"
targetDisk="$4"
targetVolume="$5"
scriptDir="$6"
targetResources="$5"
targetVolume="$6"
scriptDir="$7"
echo "DEBUG: passed argument for disksignature = $disksignature"
echo "DEBUG: passed argument for stage0Loader = $stage0Loader"
echo "DEBUG: passed argument for stage0Loaderdualboot = $stage0Loaderdualboot"
echo "DEBUG: passed argument for targetDisk = $targetDisk"
echo "DEBUG: passed argument for targetResources = $targetResources"
echo "DEBUG: passed argument for targetVolume = $targetVolume"
echo "DEBUG: passed argument for scriptDir = $scriptDir"
else
if [ ${disksignature} = "0" ]; then
echo "Executing command: fdisk440 -u -f /usr/standalone/i386/${stage0Loader} -y ${targetDisk}"
"${scriptDir}"/Tools/fdisk440 -u -f "${targetVolume}"/usr/standalone/i386/${stage0Loader} -y ${targetDisk}
"$scriptDir"InstallLog.sh "${targetVolume}" "Written ${stage0Loader to ${targetDisk}."
echo "Executing command: ${targetResources}fdisk440 -u -f /usr/standalone/i386/${stage0Loader} -y ${targetDisk}"
"${targetResources}"fdisk440 -u -f "${targetVolume}"/usr/standalone/i386/${stage0Loader} -y ${targetDisk}
"$scriptDir"InstallLog.sh "${targetVolume}" "Written ${stage0Loader} to ${targetDisk}."
else
# Windows is also installed on the HDD so we need to write boot0md
echo "Executing command: /fdisk440 -u -f /usr/standalone/i386/${stage0Loaderdualboot} -y ${targetDisk}"
"${scriptDir}"/Tools/fdisk440 -u -f "${targetVolume}"/usr/standalone/i386/${stage0Loaderdualboot} -y ${targetDisk}
"$scriptDir"InstallLog.sh "${targetVolume}" "Written ${stage0Loaderdualboot} to ${targetDisk}."
echo "Executing command: ${targetResources}fdisk440 -u -f /usr/standalone/i386/${stage0Loaderdualboot} -y ${targetDisk}"
"${targetResources}"fdisk440 -u -f "${targetVolume}"/usr/standalone/i386/${stage0Loaderdualboot} -y ${targetDisk}
"$scriptDir"InstallLog.sh "${targetVolume}" "Written ${stage0Loaderdualboot} to ${targetDisk}."
fi
branches/blackosx/package/buildpkg.sh
5858
5959
6060
61
6261
6362
6463
6564
6665
67
6866
6967
7068
7169
7270
7371
74
75
76
72
73
7774
7875
7976
......
320317
321318
322319
320
321
323322
324
325
323
324
326325
327326
328327
329
330
331
332
333
334
335
336
328
329
330
337331
338
339332
340333
341334
echo "================= Core ================="
((xmlindent++))
packagesidentity="org.chameleon.core"
mkdir -p ${1}/Core/Root/usr/sbin
mkdir -p ${1}/Core/Root/usr/local/bin
mkdir -p ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot0md ${1}/Core/Root/usr/standalone/i386
#ditto --noextattr --noqtn ${1%/*}/i386/boot0hf ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot1hp ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/cdboot ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/chain0 ${1}/Core/Root/usr/standalone/i386
# fixperms "${1}/Core/Root/"
ditto --noextattr --noqtn ${1%/*}/i386/fdisk440 ${1}/Core/Root/usr/sbin
ditto --noextattr --noqtn ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin
ditto --noextattr --noqtn ${1%/*}/i386/fdisk440 ${1}/Core/Root/usr/local/bin
ditto --noextattr --noqtn ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/local/bin
local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )
echo "[BUILD] i386 "
buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
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++))
# Using themes section from Azi's/package branch.
packagesidentity="org.chameleon.themes"
artwork="${1%/*}"
themes=($( find "${artwork%/*}/artwork/themes" -type d -depth 1 -not -name '.svn' ))
artwork="${1%/sym/package}/artwork/themes"
themes=($( find "${artwork}" -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}/${themes[$i]##*/}/Root/"
rsync -r --exclude=.svn "${themes[$i]}/" "${1}/${themes[$i]##*/}/Root/${theme}"
# #### Comment out thx meklort
# 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 {} \+
echo "[BUILD] ${themes[$i]##*/} "
mkdir -p "${1}/${theme}/Root/"
rsync -r --exclude=.svn "${themes[$i]}/" "${1}/${theme}/Root/${theme}"
echo "[BUILD] ${theme}"
buildpackage "${1}/${theme}" "/Extra/Themes" "" "start_selected=\"false\"" >/dev/null 2>&1
rm -R -f "${1}/${i##*/}"
done
((xmlindent--))

Archive Download the corresponding diff file

Revision: 1561