Chameleon

Chameleon Commit Details

Date:2011-09-24 21:09:04 (8 years 21 days ago)
Author:blackosx
Commit:1566
Parents: 1565
Message:Fix location of Extra folder and it's contents when EFI system partition installation is chosen.
Changes:
M/branches/blackosx/package/Scripts/Install/UnMountEFIvolumes.sh
M/branches/blackosx/package/Scripts/Resolutions/1280x768x32/postinstall
M/branches/blackosx/package/Scripts/Advanced/UseNvidiaROM/postinstall
M/branches/blackosx/package/Scripts/BaseOptions/RestartFix/postinstall
M/branches/blackosx/package/Scripts/Post/postinstall
M/branches/blackosx/package/Scripts/Resolutions/1024x600x32/postinstall
M/branches/blackosx/package/Scripts/Advanced/EHCIacquire/postinstall
M/branches/blackosx/package/Scripts/Advanced/VBIOS/postinstall
M/branches/blackosx/package/Scripts/Advanced/SMBIOSdefaults/postinstall
M/branches/blackosx/package/Scripts/Advanced/LegacyLogo/postinstall
M/branches/blackosx/package/Scripts/Advanced/Wake/postinstall
M/branches/blackosx/package/Scripts/Resolutions/1280x800x32/postinstall
M/branches/blackosx/package/Scripts/Advanced/UHCIreset/postinstall
M/branches/blackosx/package/Scripts/Advanced/ShowInfo/postinstall
M/branches/blackosx/package/Scripts/EFI/postinstall
M/branches/blackosx/package/Scripts/BaseOptions/EnableC3State/postinstall
M/branches/blackosx/package/Scripts/BaseOptions/GenerateCStates/postinstall
M/branches/blackosx/package/buildpkg.sh
M/branches/blackosx/package/Scripts/Resolutions/1920x1200x32/postinstall
M/branches/blackosx/package/Scripts/Advanced/Wait/postinstall
M/branches/blackosx/package/Scripts/Keymaps/postinstall
M/branches/blackosx/package/Scripts/Advanced/ForceWake/postinstall
M/branches/blackosx/package/Scripts/Resolutions/1280x1024x32/postinstall
M/branches/blackosx/package/Scripts/Advanced/UseAtiROM/postinstall
M/branches/blackosx/package/Scripts/Resolutions/1920x1080x32/postinstall
M/branches/blackosx/package/Scripts/Resolutions/1680x1050x32/postinstall
M/branches/blackosx/package/Scripts/BaseOptions/GraphicsEnabler/postinstall
M/branches/blackosx/package/Scripts/Advanced/QuietBoot/postinstall
M/branches/blackosx/package/Scripts/BaseOptions/CSTUsingSystemIO/postinstall
M/branches/blackosx/package/Scripts/Install/CheckProceed.sh
M/branches/blackosx/package/Scripts/Advanced/ForceHPET/postinstall
M/branches/blackosx/package/Scripts/BaseOptions/GeneratePStates/postinstall
M/branches/blackosx/package/Scripts/Advanced/UseKernelCache/postinstall
M/branches/blackosx/package/Scripts/BaseOptions/DropSSDT/postinstall
M/branches/blackosx/package/Scripts/Advanced/UseMemDetect/postinstall
M/branches/blackosx/package/Scripts/Advanced/GUI/postinstall
M/branches/blackosx/package/Scripts/Resolutions/1600x900x32/postinstall
M/branches/blackosx/package/Scripts/BaseOptions/InstantMenu/postinstall
M/branches/blackosx/package/Scripts/BaseOptions/EthernetBuiltIn/postinstall
M/branches/blackosx/package/Scripts/Resolutions/1440x900x32/postinstall
M/branches/blackosx/package/Scripts/Advanced/BootBanner/postinstall
M/branches/blackosx/package/Scripts/Advanced/Npci/postinstall
M/branches/blackosx/package/Scripts/Standard/postinstall
M/branches/blackosx/package/Scripts/BaseOptions/EnableC2State/postinstall
M/branches/blackosx/package/Scripts/BaseOptions/arch/postinstall
M/branches/blackosx/package/Scripts/Resolutions/1280x960x32/postinstall
M/branches/blackosx/package/Scripts/BaseOptions/EnableC4State/postinstall
M/branches/blackosx/package/Scripts/Resolutions/1024x768x32/postinstall

File differences

branches/blackosx/package/Scripts/Standard/postinstall
144144
145145
146146
147
147
148148
149149
150150
......
161161
162162
163163
164
164
165165
166166
167167
else
# Continue if the selected device is not a FAT16 format device
# Append a link break to the installer log
# Append a line break to the installer log
"$scriptDir"InstallLog.sh "${targetVolume}" "Line Break"
if [ ${diskupdate} = "0" ]; then
# Write the stage 2 loader to the root of the selected partition
"$scriptDir"WriteChameleonStage2.sh "${espformat}" "${stage2Loader}" "${3}" "${targetDevice}" "${targetVolume}" "${scriptDir}"
# Append a link break to the installer log
# Append a line break to the installer log
"$scriptDir"InstallLog.sh "${targetVolume}" "Line Break"
# Set the active partition ONLY if Windows is not installed
branches/blackosx/package/Scripts/EFI/postinstall
7373
7474
7575
76
76
7777
7878
7979
......
8787
8888
8989
90
90
9191
9292
9393
......
144144
145145
146146
147
148
149
147150
148151
149152
......
160163
161164
162165
166
167
168
163169
164170
165171
# Write some information to the Install Log
versionNumber=`cat "${scriptDir}"/Resources/version`
revisionNumber=`cat "${scriptDir}"/Resources/revision`
"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Chameleon installer version: ${versionNumber} ${revisionNumber}"
"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Installer version: ${versionNumber} ${revisionNumber}"
"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Running EFI postinstall script
Target volume selected by user = ${targetVolumeChosenByUser}
Target volume = ${targetVolume}"
if [ ${partitiontable} = "GUID_partition_scheme" ]; then
echo "Confirm this is a GPT partitioned disk."
# Double check we can see the selected partition, it's of the right type and /Volumes/EFI exists.
# Double check we can see the selected partition, it's of the right type and /Volumes/TempChamESP exists.
"$scriptDir"CheckProceed.sh "${targetVolume}" "${targetDeviceChosenByUser}" "${targetVolumeChosenByUser}" "${scriptDir}"
returnValue=$?
if [ ${returnValue} = 0 ]; then
# OK to proceed
# Append a line break to the installer log
"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Line Break"
if [ ${diskupdate} = "0" ]; then
#echo "Diskupdate = true, so the stage 0 loader can be written to the MBR"
# Write the stage 2 loader to the root of the selected partition
"$scriptDir"WriteChameleonStage2.sh "${espformat}" "${stage2Loader}" "${targetVolume}" "${targetDevice}" "${targetVolumeChosenByUser}" "${scriptDir}"
# Append a line break to the installer log
"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Line Break"
# Set the active partition ONLY if Windows is not installed
"$scriptDir"SetActivePartition.sh "${espformat}" "${diskSigCheck}" "${targetDiskRaw}" "${targetSlice}" "${targetVolumeChosenByUser}" "${scriptDir}"
fi
branches/blackosx/package/Scripts/Advanced/ForceHPET/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/UseKernelCache/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/EHCIacquire/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/VBIOS/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/GUI/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/SMBIOSdefaults/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/UseMemDetect/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/LegacyLogo/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/Wake/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/BootBanner/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/Npci/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/UHCIreset/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/ShowInfo/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/Wait/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/UseNvidiaROM/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/ForceWake/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/UseAtiROM/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Advanced/QuietBoot/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Post/postinstall
1717
1818
1919
20
20
2121
2222
2323
24
24
2525
2626
2727
......
3333
3434
3535
36
37
36
37
38
39
40
41
42
43
3844
39
40
41
42
43
44
45
45
46
47
48
49
50
51
4652
47
48
53
54
55
4956
5057
5158
5259
60
5361
5462
5563
5664
57
65
5866
5967
6068
echo "preinstall: Path to dest volume..... $3"
echo "preinstall: Root of system folder... $4"
set -x
#set -x # Useful for echoing everything the script does to the installer log!!
if [ ! -e "$3" ]
then
echo "destination volume does not exist!"
echo "$3 volume does not exist!"
exit 1
fi
dest_vol="$3"
fi
# check to see if EFI system partition install option was chosen.
# if so, unmount /Volumes/EFI
# Extra folder now resides in /tmpcham.
# Copy /tmpcham/Extra to correct location.
if [ ! -f "$dest_vol"/.ChameleonEFI ]; then
echo "Copying $dest_vol/tmpcham/Extra/* $dest_vol/Extra"
cp -R "$dest_vol"/tmpcham/Extra/* "$dest_vol"/Extra
else
echo "Copying $dest_vol/tmpcham/Extra/* $dest_vol/Volumes/EFI/Extra"
cp -R "$dest_vol"/tmpcham/Extra/* /Volumes/EFI/Extra
if [ -f "$dest_vol"/.ChameleonEFI ]; then
attempts=1
while [ "$( df | grep EFI )" ] && [ "${attempts}" -lt 5 ]; do
echo "Unmounting $( df | grep EFI | awk '{print $1}' )"
umount -f $( df | grep EFI | awk '{print $1}' )
attempts=$(( ${attempts} + 1 ))
done
# unmount /Volumes/EFI
attempts=1
while [ "$( df | grep EFI )" ] && [ "${attempts}" -lt 5 ]; do
echo "Unmounting $( df | grep EFI | awk '{print $1}' )"
umount -f $( df | grep EFI | awk '{print $1}' )
attempts=$(( ${attempts} + 1 ))
done
# Remove /.ChameleonEFI file
rm "$dest_vol"/.ChameleonEFI
# Remove /.ChameleonEFI file
echo "Removing /.ChameleonEFI file"
rm "$dest_vol"/.ChameleonEFI
fi
# Remove /.ChameleonLogFlag file
if [ -f "$dest_vol"/.ChameleonLogFlag ]; then
echo "Removing /.ChameleonLogFlag file"
rm "$dest_vol"/.ChameleonLogFlag
fi
# delete the temporary Chameleon folder
echo "Removing $dest_vol/tmpcham file"
rm -rf "$dest_vol/tmpcham"
branches/blackosx/package/Scripts/BaseOptions/GenerateCStates/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/BaseOptions/DropSSDT/postinstall
1717
1818
1919
20
21
22
23
2024
2125
22
2326
2427
2528
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
branches/blackosx/package/Scripts/BaseOptions/EthernetBuiltIn/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/BaseOptions/InstantMenu/postinstall
1818
1919
2020
21
22
23
24
2125
2226
2327
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/BaseOptions/GraphicsEnabler/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/BaseOptions/RestartFix/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/BaseOptions/CSTUsingSystemIO/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/BaseOptions/EnableC2State/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/BaseOptions/EnableC3State/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/BaseOptions/arch/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/BaseOptions/EnableC4State/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/BaseOptions/GeneratePStates/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Install/CheckProceed.sh
66
77
88
9
9
1010
1111
1212
# Checks the selected volume is present and the disk is partitioned.
# Receives targetVolume: Volume to install to (Will be '/Volumes/EFI' if EFI install)
# Receives targetVolume: Volume to install to (will be '/Volumes/EFI' if EFI install)
# Receives targetDevice: Stores device number, for example /dev/disk2s1.
# Receives installerVolume: Volume to write the installer log to.
# Receives scriptDir: The location of the main script dir.
branches/blackosx/package/Scripts/Install/UnMountEFIvolumes.sh
44
55
66
7
7
88
99
1010
......
2727
2828
2929
30
30
3131
32
32
3333
3434
3535
echo "Unmount all volumes named EFI"
echo "*****************************"
# loop through and un-mount ALL mounted EFI system partitions - Thanks kizwan
# loop through and un-mount ALL mounted 'EFI' system partitions - Thanks kizwan
# Receives scriptDir: The location of the main script dir.
# Receives targetVolumeTemp: Stores original target if EFI install selected.
attempts=$(( ${attempts} + 1 ))
done
if [ ${attempts} = 5 ]; then
echo "failed to unmount EFI System Partition."
echo "failed to unmount 'EFI' System Partition."
echo "-----------------------------------------------"
"$scriptDir"InstallLog.sh "${targetVolumeTemp}" "Failed to unmount EFI System Partition."
"$scriptDir"InstallLog.sh "${targetVolumeTemp}" "Failed to unmount 'EFI' System Partition."
echo ""
echo ""
echo ""
branches/blackosx/package/Scripts/Resolutions/1024x768x32/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Resolutions/1024x600x32/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Resolutions/1920x1200x32/postinstall
1717
1818
1919
20
21
22
23
2024
2125
22
2326
2427
2528
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
branches/blackosx/package/Scripts/Resolutions/1280x768x32/postinstall
66
77
88
9
10
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
1127
1228
1329
import shutil
vol = str(sys.argv[3])
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
# Check for .ChameleonEFI file at root of target volume
# to indicate user wants to install to EFI system partition.
espfile = "/.ChameleonEFI"
espvol = vol + espfile
if os.path.exists(espvol):
if not os.path.exists('/Volumes/EFI/Extra'):
os.makedirs('/Volumes/EFI/Extra')
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
branches/blackosx/package/Scripts/Resolutions/1600x900x32/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Resolutions/1280x1024x32/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Resolutions/1440x900x32/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Resolutions/1280x800x32/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Resolutions/1680x1050x32/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Resolutions/1920x1080x32/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Resolutions/1280x960x32/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/Scripts/Keymaps/postinstall
1717
1818
1919
20
21
22
23
2024
2125
2226
plist = "/Volumes/EFI/Extra/org.chameleon.Boot.plist"
else:
extrafolder = vol + "/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
branches/blackosx/package/buildpkg.sh
9898
9999
100100
101
102
101
102
103103
104104
105105
......
132132
133133
134134
135
135
136136
137137
138138
......
141141
142142
143143
144
144
145145
146146
147147
148148
149149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164164
165165
166166
......
172172
173173
174174
175
175
176176
177177
178178
......
189189
190190
191191
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
231192
232193
233194
......
262223
263224
264225
265
226
227
266228
267229
268230
......
281243
282244
283245
284
246
247
285248
286249
287250
......
311274
312275
313276
314
315277
316278
317279
......
330292
331293
332294
333
295
296
334297
335298
336299
......
356319
357320
358321
359
322
360323
361324
362325
......
397360
398361
399362
400
363
401364
402365
403366
......
416379
417380
418381
382
419383
420384
421385
......
433397
434398
435399
436
400
437401
438402
439403
cp -f ${pkgroot}/Scripts/EFI/* ${1}/EFI/Scripts
cp -f ${pkgroot}/Scripts/Install/* ${1}/EFI/Scripts
ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Resources/SetFile
ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/Standard/Scripts/Resources/revision
ditto --noextattr --noqtn ${1%/*/*}/version ${1}/Standard/Scripts/Resources/version
ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/EFI/Scripts/Resources/revision
ditto --noextattr --noqtn ${1%/*/*}/version ${1}/EFI/Scripts/Resources/version
echo "[BUILD] EFI "
buildpackage "${1}/EFI" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1
# End build efi package
mkdir -p ${1}/klibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/klibc/Root
echo "[BUILD] klibc "
buildpackage "${1}/klibc" "/Extra/modules" "" "start_selected=\"true\"" >/dev/null 2>&1
buildpackage "${1}/klibc" "/tmpcham/Extra/modules" "" "start_selected=\"true\"" >/dev/null 2>&1 #blackosx = add tmpcham to path
}
fi
# -
mkdir -p ${1}/AutoReso/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/Resolution.dylib ${1}/AutoReso/Root
echo "[BUILD] Resolution "
buildpackage "${1}/AutoReso" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
buildpackage "${1}/AutoReso" "/tmpcham/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1 #blackosx = add tmpcham to path
}
fi
# -
if [ -e ${1%/*}/i386/modules/Keylayout.dylib ]; then
{
mkdir -p ${1}/Keylayout/Root/Extra/{modules,Keymaps}
mkdir -p ${1}/Keylayout/Root/usr/bin
layout_src_dir="${1%/sym/*}/i386/modules/Keylayout/layouts/layouts-src"
if [ -d "$layout_src_dir" ];then
# Create a tar.gz from layout sources
(cd "$layout_src_dir"; \
tar czf "${1}/Keylayout/Root/Extra/Keymaps/layouts-src.tar.gz" README *.slt)
fi
# Adding module
ditto --noextattr --noqtn ${1%/*}/i386/modules/Keylayout.dylib ${1}/Keylayout/Root/Extra/modules
# Adding Keymaps
ditto --noextattr --noqtn ${1%/sym/*}/Keymaps ${1}/Keylayout/Root/Extra/Keymaps
# Adding tools
ditto --noextattr --noqtn ${1%/*}/i386/cham-mklayout ${1}/Keylayout/Root/usr/bin
mkdir -p ${1}/Keylayout/Root/tmpcham/Extra/{modules,Keymaps} #blackosx = add tmpcham to path
mkdir -p ${1}/Keylayout/Root/usr/bin
layout_src_dir="${1%/sym/*}/i386/modules/Keylayout/layouts/layouts-src"
if [ -d "$layout_src_dir" ];then
# Create a tar.gz from layout sources
(cd "$layout_src_dir"; \
tar czf "${1}/Keylayout/Root/tmpcham/Extra/Keymaps/layouts-src.tar.gz" README *.slt) #blackosx = add tmpcham to path
fi
# Adding module
ditto --noextattr --noqtn ${1%/*}/i386/modules/Keylayout.dylib ${1}/Keylayout/Root/tmpcham/Extra/modules #blackosx = add tmpcham to path
# Adding Keymaps
ditto --noextattr --noqtn ${1%/sym/*}/Keymaps ${1}/Keylayout/Root/tmpcham/Extra/Keymaps #blackosx = add tmpcham to path
# Adding tools
ditto --noextattr --noqtn ${1%/*}/i386/cham-mklayout ${1}/Keylayout/Root/usr/bin
echo "[BUILD] Keylayout "
buildpackage "${1}/Keylayout" "/" "" "start_selected=\"true\"" >/dev/null 2>&1
}
ditto --noextattr --noqtn ${1%/*}/i386/modules/uClibcxx.dylib ${1}/uClibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/uClibc/Root
echo "[BUILD] uClibc++ "
buildpackage "${1}/uClibc" "/Extra/modules" "" "start_selected=\"true\"" >/dev/null 2>&1
buildpackage "${1}/uClibc" "/tmpcham/Extra/modules" "" "start_selected=\"true\"" >/dev/null 2>&1 #blackosx = add tmpcham to path
}
fi
((xmlindent--))
# End build Chameleon package
# build Extras package
#echo "================= Extras ================="
#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++))
#packagesidentity="org.chameleon.extras"
# 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.utilities"
## build package for Chameleon PrefPanel
#mkdir -p "${1}/PrefPanel/Root"
#ditto --noextattr --noqtn "${pkgroot}/Configuration/PrefPanel/Chameleon.prefPane" "${1}/PrefPanel/Root"
#echo "[BUILD] Chameleon Preference Panel "
#buildpackage "${1}/PrefPanel" "/Library/PreferencePanes/Chameleon.prefPane" "" "start_selected=\"false\"" >/dev/null 2>&1
## 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 "[BUILD] SMBIOSDefault "
#buildpackage "${1}/SMBIOSDefault" "/Extra/Example" "" "start_selected=\"false\"" >/dev/null 2>&1
## End build package for SMBIOSDefault
## 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 "[BUILD] Documentation "
#buildpackage "${1}/Documentation" "/Library/Documentation/Chameleon2" "" "start_selected=\"false\"" >/dev/null 2>&1
## End build package for Documentation
#((xmlindent--))
#outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End utility package
# build options packages
echo "================= Options ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Options\">"
sed "s/@@KEYMAP@@/${keymaps[$i]}/g" "${pkgroot}/Scripts/Keymaps/postinstall" > "${1}/${keymaps[$i]}/Scripts/postinstall" && \
chmod +rx "${1}/${keymaps[$i]}/Scripts/postinstall"
echo "[BUILD] ${keymaps[$i]} "
buildpackage "${1}/${keymaps[$i]}" "/tmpcham" "" "start_selected=\"false\"" >/dev/null 2>&1
#blackosx = why use install location /tmpcham for this ? changing to root
buildpackage "${1}/${keymaps[$i]}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
mkdir -p "${1}/${resolutions[$i]##*/}/Scripts/"
ditto --noextattr --noqtn "${resolutions[$i]}/postinstall" "${1}/${resolutions[$i]##*/}/Scripts/postinstall"
echo "[BUILD] ${resolutions[$i]##*/} "
buildpackage "${1}/${resolutions[$i]##*/}" "/tmpcham" "" "start_selected=\"false\"" >/dev/null 2>&1
#blackosx = why use install location /tmpcham for this ? changing to root
buildpackage "${1}/${resolutions[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
done
((xmlindent--))
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build options packages
# build theme packages
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
#blackosx = maybe use install location /tmpcham for this, then move at the end depending on standard to efi install? going to try it
buildpackage "${1}/${theme}" "/tmpcham/Extra/Themes" "" "start_selected=\"false\"" >/dev/null 2>&1
done
((xmlindent--))
# clean up
rm -R -f "${1}"
#rm -R -f "${1}"
}
header+="auth=\"root\">\n"
header+="\t<payload installKBytes=\"${installedsize##* }\" numberOfFiles=\"${filecount##* }\"/>\n"
rm -R -f "${1}/Temp"
#rm -R -f "${1}/Temp"
[ -d "${1}/Temp" ] || mkdir -m 777 "${1}/Temp"
[ -d "${1}/Root" ] && mkbom "${1}/Root" "${1}/Temp/Bom"
fi
header+="</pkg-info>"
echo -e "${header}" >> ~/Desktop/header
echo -e "${header}" > "${1}/Temp/PackageInfo"
pushd "${1}/Root" >/dev/null
find . -print | cpio -o -z -H cpio > "../Temp/Payload"
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}"
#rm -R -f "${1}"
fi
}

Archive Download the corresponding diff file

Revision: 1566