Chameleon

Chameleon Commit Details

Date:2011-09-25 23:02:07 (12 years 7 months ago)
Author:blackosx
Commit:1575
Parents: 1574
Message:Revise creation of org.chameleon.Boot.plist to make managing boot options and kernel flag package installer code simpler. Basic functionality is there but it's still a work in progress.
Changes:
D/branches/blackosx/package/Scripts/Advanced/Wake/postinstall
D/branches/blackosx/package/Scripts/Advanced/ShowInfo/postinstall
D/branches/blackosx/package/Scripts/BaseOptions/EnableC3State/postinstall
D/branches/blackosx/package/Scripts/BaseOptions/GenerateCStates/postinstall
D/branches/blackosx/package/Scripts/Resolutions/1920x1200x32/postinstall
D/branches/blackosx/package/Scripts/Advanced/ForceWake/postinstall
D/branches/blackosx/package/Scripts/Advanced/QuietBoot/postinstall
D/branches/blackosx/package/Scripts/BaseOptions/CSTUsingSystemIO/postinstall
D/branches/blackosx/package/Scripts/Advanced/ForceHPET/postinstall
D/branches/blackosx/package/Scripts/BaseOptions/DropSSDT/postinstall
D/branches/blackosx/package/Scripts/BaseOptions/InstantMenu/postinstall
D/branches/blackosx/package/Scripts/Resolutions/1440x900x32/postinstall
D/branches/blackosx/package/Scripts/BaseOptions/EnableC4State/postinstall
D/branches/blackosx/package/Scripts/Resolutions/1280x768x32/postinstall
D/branches/blackosx/package/Scripts/Advanced/UseNvidiaROM/postinstall
D/branches/blackosx/package/Scripts/BaseOptions/RestartFix/postinstall
D/branches/blackosx/package/Scripts/Advanced/VBIOS/postinstall
D/branches/blackosx/package/Scripts/Advanced/EHCIacquire/postinstall
D/branches/blackosx/package/Scripts/Resolutions/1024x600x32/postinstall
D/branches/blackosx/package/Scripts/Advanced/SMBIOSdefaults/postinstall
D/branches/blackosx/package/Scripts/Advanced/LegacyLogo/postinstall
D/branches/blackosx/package/Scripts/Resolutions/1280x800x32/postinstall
D/branches/blackosx/package/Scripts/Advanced/UHCIreset/postinstall
D/branches/blackosx/package/Scripts/Advanced/Wait/postinstall
D/branches/blackosx/package/Scripts/Resolutions/1280x1024x32/postinstall
D/branches/blackosx/package/Scripts/Advanced/UseAtiROM/postinstall
D/branches/blackosx/package/Scripts/Resolutions/1920x1080x32/postinstall
D/branches/blackosx/package/Scripts/Resolutions/1680x1050x32/postinstall
D/branches/blackosx/package/Scripts/BaseOptions/GraphicsEnabler/postinstall
D/branches/blackosx/package/Scripts/BaseOptions/GeneratePStates/postinstall
D/branches/blackosx/package/Scripts/Advanced/UseKernelCache/postinstall
D/branches/blackosx/package/Scripts/Advanced/UseMemDetect/postinstall
D/branches/blackosx/package/Scripts/Advanced/GUI/postinstall
D/branches/blackosx/package/Scripts/Resolutions/1600x900x32/postinstall
D/branches/blackosx/package/Scripts/BaseOptions/EthernetBuiltIn/postinstall
D/branches/blackosx/package/Scripts/Advanced/Npci/postinstall
D/branches/blackosx/package/Scripts/Advanced/BootBanner/postinstall
D/branches/blackosx/package/Scripts/BaseOptions/EnableC2State/postinstall
D/branches/blackosx/package/Scripts/BaseOptions/arch/postinstall
D/branches/blackosx/package/Scripts/Resolutions/1280x960x32/postinstall
D/branches/blackosx/package/Scripts/Resolutions/1024x768x32/postinstall
A/branches/blackosx/package/Scripts/Resolutions/1680x1050x32/Graphics Mode=1680x1050x32
A/branches/blackosx/package/Scripts/Resolutions/1920x1080x32/Graphics Mode=1920x1080x32
A/branches/blackosx/package/Scripts/Advanced/GUI/GUI=No
A/branches/blackosx/package/Scripts/Advanced/UseMemDetect/UseMemDetect=No
A/branches/blackosx/package/Scripts/BaseOptions/DropSSDT/DropSSDT=Yes
A/branches/blackosx/package/Scripts/Advanced/UHCIreset/UHCIreset=Yes
A/branches/blackosx/package/Scripts/Advanced/Npci/KF npci=0x2000
A/branches/blackosx/package/Scripts/Advanced/BootBanner/Boot Banner=No
A/branches/blackosx/package/TO DO.txt
A/branches/blackosx/package/Scripts/Advanced/LegacyLogo/Legacy Logo=Yes
A/branches/blackosx/package/Scripts/Advanced/Wake/Wake=Yes
A/branches/blackosx/package/Scripts/BaseOptions/GenerateCStates/GenerateCStates=Yes
A/branches/blackosx/package/Scripts/Advanced/QuietBoot/QuietBoot=Yes
A/branches/blackosx/package/Scripts/Resolutions/1920x1200x32/Graphics Mode=1920x1200x32
A/branches/blackosx/package/Scripts/Advanced/ForceHPET/ForceHPET=Yes
A/branches/blackosx/package/Scripts/BaseOptions/GraphicsEnabler/GraphicsEnabler=Yes
A/branches/blackosx/package/Scripts/Advanced/EHCIacquire/EHCIacquire=Yes
A/branches/blackosx/package/Scripts/Advanced/VBIOS/VBIOS=Yes
A/branches/blackosx/package/Scripts/BaseOptions/CSTUsingSystemIO/CSTUsingSystemIO=Yes
A/branches/blackosx/package/Scripts/Advanced/UseNvidiaROM/UseNvidiaROM=Yes
A/branches/blackosx/package/Scripts/BaseOptions/GeneratePStates/GeneratePStates=Yes
A/branches/blackosx/package/Scripts/BaseOptions/RestartFix/RestartFix=No
A/branches/blackosx/package/Scripts/Resolutions/1024x600x32/Graphics Mode=1024x600x32
A/branches/blackosx/package/Scripts/BaseOptions/EthernetBuiltIn/EthernetBuiltIn=Yes
A/branches/blackosx/package/Scripts/Resolutions/1600x900x32/Graphics Mode=1600x900x32
A/branches/blackosx/package/Scripts/Resolutions/1440x900x32/Graphics Mode=1440x900x32
A/branches/blackosx/package/Scripts/Advanced/UseKernelCache/UseKernelCache=Yes
A/branches/blackosx/package/Scripts/Resolutions/1280x1024x32/Graphics Mode=1280x1024x32
A/branches/blackosx/package/Scripts/BaseOptions/arch/arch=i386
A/branches/blackosx/package/Scripts/Resolutions/1280x800x32/Graphics Mode=1280x800x32
A/branches/blackosx/package/Scripts/Advanced/ShowInfo/ShowInfo=No
A/branches/blackosx/package/Scripts/Advanced/Wait/Wait=Yes
A/branches/blackosx/package/Scripts/BaseOptions/EnableC2State/EnableC2State=Yes
A/branches/blackosx/package/Scripts/BaseOptions/EnableC3State/EnableC3State=Yes
A/branches/blackosx/package/Scripts/Advanced/ForceWake/ForceWake=Yes
A/branches/blackosx/package/Scripts/BaseOptions/EnableC4State/EnableC4State=Yes
A/branches/blackosx/package/Scripts/Advanced/UseAtiROM/UseAtiROM=Yes
A/branches/blackosx/package/Scripts/Resolutions/1280x960x32/Graphics Mode=1280x960x32
A/branches/blackosx/package/Scripts/Advanced/SMBIOSdefaults/SMBIOSdefault=Yes
A/branches/blackosx/package/Scripts/Resolutions/1024x768x32/Graphics Mode=1024x768x32
A/branches/blackosx/package/Scripts/BaseOptions/InstantMenu/Instant Menu=Yes
A/branches/blackosx/package/Scripts/Resolutions/1280x768x32/Graphics Mode=1280x768x32
M/branches/blackosx/package/buildpkg.sh
M/branches/blackosx/package/Scripts/Post/postinstall

File differences

branches/blackosx/package/TO DO.txt
1
2
3
4
5
6
7
8
TO DO
* Fix - Keylayouts to match new style for building org.chameleon.boot.plist.
* Check if boot options already exist before adding with plistbuddy.
* Check also kernel flags before adding with plistbuddy
* Add theme to org.chameleon.boot.plist? (Do what when more than one installed?)
* Install log is so far ONLY generated when selecting to install Chameleon.
* Include Boot options/kernel flags/keylayouts/themes to install log.
branches/blackosx/package/Scripts/Advanced/ForceHPET/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add ForceHPET for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if ForceHPET has been written or not
ForceHPETCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written ForceHPET Yet
if "</dict>" in line and ForceHPETCheck == False:
line = " <key>ForceHPET</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
ForceHPETCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/UseKernelCache/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add UseKernelCache for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if UseKernelCache has been written or not
UseKernelCacheCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written UseKernelCache Yet
if "</dict>" in line and UseKernelCacheCheck == False:
line = " <key>UseKernelCache</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
UseKernelCacheCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/EHCIacquire/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add EHCIacquire for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if EHCIacquire has been written or not
EHCIacquireCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written EHCIacquire Yet
if "</dict>" in line and EHCIacquireCheck == False:
line = " <key>EHCIacquire</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
EHCIacquireCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/VBIOS/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add VBIOS for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if VBIOS has been written or not
VBIOSCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written VBIOS Yet
if "</dict>" in line and VBIOSCheck == False:
line = " <key>VBIOS</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
VBIOSCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/GUI/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add GUI for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if GUI has been written or not
GUICheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written GUI Yet
if "</dict>" in line and GUICheck == False:
line = " <key>GUI</key>\n"
line += " <string>No</string>\n"
line += "</dict>\n"
GUICheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/SMBIOSdefaults/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add SMBIOSdefault for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if SMBIOSdefault has been written or not
SMBIOSdefaultCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written SMBIOSdefault Yet
if "</dict>" in line and SMBIOSdefaultCheck == False:
line = " <key>SMBIOSdefault</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
SMBIOSdefaultCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/UseMemDetect/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add UseMemDetect for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if UseMemDetect has been written or not
UseMemDetectCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written UseMemDetect Yet
if "</dict>" in line and UseMemDetectCheck == False:
line = " <key>UseMemDetect</key>\n"
line += " <string>No</string>\n"
line += "</dict>\n"
UseMemDetectCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/LegacyLogo/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add LegacyLogo for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if LegacyLogo has been written or not
LegacyLogoCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written LegacyLogo Yet
if "</dict>" in line and LegacyLogoCheck == False:
line = " <key>Legacy Logo</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
LegacyLogoCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/Wake/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Wake for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Wake has been written or not
WakeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Wake Yet
if "</dict>" in line and WakeCheck == False:
line = " <key>Wake</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
WakeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/BootBanner/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add BootBanner for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if BootBanner has been written or not
BootBannerCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written BootBanner Yet
if "</dict>" in line and BootBannerCheck == False:
line = " <key>Boot Banner</key>\n"
line += " <string>No</string>\n"
line += "</dict>\n"
BootBannerCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/Npci/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Kernel Flags = npci=0x2000 for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Kernel Flags has been written or not
KernelFlagsCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Kernel Flags Yet
if "</dict>" in line and KernelFlagsCheck == False:
line = " <key>Kernel Flags</key>\n"
line += " <string>npci=0x2000</string>\n"
line += "</dict>\n"
KernelFlagsCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/UHCIreset/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add UHCIreset for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if UHCIreset has been written or not
UHCIresetCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written UHCIreset Yet
if "</dict>" in line and UHCIresetCheck == False:
line = " <key>UHCIreset</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
UHCIresetCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/ShowInfo/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add ShowInfo for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if ShowInfo has been written or not
ShowInfoCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written ShowInfo Yet
if "</dict>" in line and ShowInfoCheck == False:
line = " <key>ShowInfo</key>\n"
line += " <string>No</string>\n"
line += "</dict>\n"
ShowInfoCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/Wait/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Wait for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Wait has been written or not
WaitCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Wait Yet
if "</dict>" in line and WaitCheck == False:
line = " <key>Wait</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
WaitCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/UseNvidiaROM/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add UseNvidiaROM for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if UseNvidiaROM has been written or not
UseNvidiaROMCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written UseNvidiaROM Yet
if "</dict>" in line and UseNvidiaROMCheck == False:
line = " <key>UseNvidiaROM</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
UseNvidiaROMCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/ForceWake/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add ForceWake for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if ForceWake has been written or not
ForceWakeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written ForceWake Yet
if "</dict>" in line and ForceWakeCheck == False:
line = " <key>ForceWake</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
ForceWakeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/UseAtiROM/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add UseAtiROM for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if UseAtiROM has been written or not
UseAtiROMCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written UseAtiROM Yet
if "</dict>" in line and UseAtiROMCheck == False:
line = " <key>UseAtiROM</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
UseAtiROMCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Advanced/QuietBoot/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add QuietBoot for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if QuietBoot has been written or not
QuietBootCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written QuietBoot Yet
if "</dict>" in line and QuietBootCheck == False:
line = " <key>QuietBoot</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
QuietBootCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Post/postinstall
3333
3434
3535
36
36
37
3738
38
39
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
4097
41
4298
4399
44100
45
101
46102
47
48103
49104
50105
51
106
52107
53108
54109
......
57112
58113
59114
115
60116
61
117
118
119
120
121
122
62123
63124
64125
......
70131
71132
72133
73
74
134
135
75136
76137
77138
dest_vol="$3"
fi
chamTemp="usr/local/chamTemp" #blackosx added
# set temporary directory
chamTemp="$dest_vol/usr/local/chamTemp" #blackosx added
# Extra folder now resides in /$chamTemp.
# Copy /$chamTemp/Extra to correct location.
# Check for temporary directory/Extra folder.
if [ ! -d "$chamTemp"/Extra ]; then
mkdir "$chamTemp"/Extra
fi
# ---------------------------------------------
# Blackosx - Build boot options / Kernel Flags.
# NEEDS MORE WORK!!!!!!!!!!!!
# ---------------------------------------------
# All options selected are now dummy files with
# the filename of the option and value residing
# in /usr/local/chamTemp/options/
# for example. Boot Banner=Yes
# Create template for org.chameleon.Boot.plist"
tempOCBP="$chamTemp"/Extra/org.chameleon.Boot.plist
cp "$dest_vol"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist "$tempOCBP"
# Read list of all boot options the user added.
arrayCount=0
find ${chamTemp}/options | while read FILE
do
options[arrayCount]="${FILE##*/}"
keyRead="${options[$arrayCount]%=*}"
value="${options[$arrayCount]#*=}"
# Check keyRead for 'KF' at beginning to
# indicate that should be a kernel flag
if [ ${keyRead:0:2} = "KF" ];then
kernelflag=${keyRead#*F }=$value
# write value to org.chameleon.Boot.plist
# but skip first one as that will be 'options'
if [ $arrayCount -gt 0 ]; then
sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelflag" "$tempOCBP"
fi
else
# escape any spaces
keyToUse=$( echo $keyRead | sed 's/ /\\ /g' )
# write value to org.chameleon.Boot.plist
# but skip first one as that will be 'options'
if [ $arrayCount -gt 0 ]; then
sudo /usr/libexec/plistbuddy -c "Add :$keyToUse string $value" "$tempOCBP"
fi
fi
arrayCount=$(( ${arrayCount} + 1 ))
done
# ---------------------------------------------
# Copy temp Extra folder to target destination
# ---------------------------------------------
# Extra folder now resides in /usr/local/chamTemp/
# Copy /usr/local/chamTemp/Extra to correct location.
if [ ! -f "$dest_vol"/.ChameleonEFI ]; then
echo "Copying $dest_vol/$chamTemp/Extra/* $dest_vol/Extra"
if [ ! -f "$dest_vol"/Extra ]; then
mkdir "$dest_vol"/Extra
fi
cp -R "$dest_vol"/$chamTemp/Extra/* "$dest_vol"/Extra
cp -R "$chamTemp"/Extra/* "$dest_vol"/Extra
else
echo "Copying $dest_vol/$chamTemp/Extra/* $/Volumes/EFI/Extra"
if [ ! -f "/Volumes/EFI/Extra" ]; then
mkdir "/Volumes/EFI/Extra"
fi
cp -R "$dest_vol"/$chamTemp/Extra/* /Volumes/EFI/Extra
cp -R "$chamTemp"/Extra/* /Volumes/EFI/Extra
# unmount /Volumes/EFI
attempts=1
umount -f $( df | grep EFI | awk '{print $1}' )
attempts=$(( ${attempts} + 1 ))
done
fi
# Remove /.ChameleonEFI file
# ---------------------------------------------
# Cleanup
# ---------------------------------------------
# Remove /.ChameleonEFI file
if [ -f "$dest_vol"/.ChameleonEFI ]; then
echo "Removing /.ChameleonEFI file"
rm "$dest_vol"/.ChameleonEFI
fi
fi
# delete the temporary Chameleon folder
echo "Removing $dest_vol/$chamTemp file"
rm -rf "$dest_vol/$chamTemp"
echo "Removing $chamTemp file"
rm -rf "$chamTemp"
echo "Done..."
branches/blackosx/package/Scripts/BaseOptions/GenerateCStates/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add GenerateCStates for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if GenerateCStates has been written or not
GenerateCStatesCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written GenerateCStates Yet
if "</dict>" in line and GenerateCStatesCheck == False:
line = " <key>GenerateCStates</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
GenerateCStatesCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/BaseOptions/DropSSDT/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add DropSSDT for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if DropSSDT has been written or not
DropSSDTCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written DropSSDT Yet
if "</dict>" in line and DropSSDTCheck == False:
line = " <key>DropSSDT</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
DropSSDTCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/BaseOptions/EthernetBuiltIn/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add EthernetBuiltIn for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if EthernetBuiltIn has been written or not
EthernetBuiltInCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written DropSSDT Yet
if "</dict>" in line and EthernetBuiltInCheck == False:
line = " <key>EthernetBuiltIn</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
EthernetBuiltInCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/BaseOptions/InstantMenu/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/python
# Script to add Instant Menu for Chameleon boot loaders
# Copyright (C) tonymacx86 LLC
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Instant Menu has been written or not
InstantMenuCheck = False
body = ""
for line in infile:
# if Timeout is there, advance the next line to
# read past it, and then change the lines to read
# "<key>Instant Menu<\key>" and "<string>Yes</string>"
if "<key>Timeout</key>" in line:
line = infile.next()
line = " <key>Instant Menu</key>\n"
line += " <string>Yes</string>\n"
InstantMenuCheck = True
# if we finish the tags and haven't written Instant Menu Yet
if "</dict>" in line and InstantMenuCheck == False:
line = " <key>Instant Menu</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
InstantMenuCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/BaseOptions/GraphicsEnabler/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add GraphicsEnabler for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if GraphicsEnabler has been written or not
GraphicsEnablerCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written GraphicsEnabler Yet
if "</dict>" in line and GraphicsEnablerCheck == False:
line = " <key>GraphicsEnabler</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
GraphicsEnablerCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/BaseOptions/RestartFix/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add RestartFix for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if RestartFix has been written or not
RestartFixCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written RestartFix Yet
if "</dict>" in line and RestartFixCheck == False:
line = " <key>RestartFix</key>\n"
line += " <string>No</string>\n"
line += "</dict>\n"
RestartFixCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/BaseOptions/CSTUsingSystemIO/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add CSTUsingSystemIO for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if CSTUsingSystemIO has been written or not
CSTUsingSystemIOCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written CSTUsingSystemIO Yet
if "</dict>" in line and CSTUsingSystemIOCheck == False:
line = " <key>CSTUsingSystemIO</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
CSTUsingSystemIOCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/BaseOptions/EnableC2State/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/python
# Script to add EnableC2State for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if EnableC2State has been written or not
EnableC2StateCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written EnableC2State Yet
if "</dict>" in line and EnableC2StateCheck == False:
line = " <key>EnableC2State</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
EnableC2StateCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/BaseOptions/EnableC3State/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add EnableC3State for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if EnableC3State has been written or not
EnableC3StateCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written EnableC3State Yet
if "</dict>" in line and EnableC3StateCheck == False:
line = " <key>EnableC3State</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
EnableC3StateCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/BaseOptions/arch/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add arch for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if arch has been written or not
archCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written arch Yet
if "</dict>" in line and archCheck == False:
line = " <key>arch</key>\n"
line += " <string>i386</string>\n"
line += "</dict>\n"
archCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/BaseOptions/EnableC4State/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add EnableC4State for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if EnableC4State has been written or not
EnableC4StateCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written EnableC4State Yet
if "</dict>" in line and EnableC4StateCheck == False:
line = " <key>EnableC4State</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
EnableC4StateCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/BaseOptions/GeneratePStates/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add GeneratePStates for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if GeneratePStates has been written or not
GeneratePStatesCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written GeneratePStates Yet
if "</dict>" in line and GeneratePStatesCheck == False:
line = " <key>GeneratePStates</key>\n"
line += " <string>Yes</string>\n"
line += "</dict>\n"
DropSSDTCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Resolutions/1024x768x32/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Graphics_Mode for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Graphics_Mode Yet
if "</dict>" in line and Graphics_ModeCheck == False:
line = " <key>Graphics Mode</key>\n"
line += " <string>1024x768x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Resolutions/1024x600x32/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Graphics_Mode for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Graphics_Mode Yet
if "</dict>" in line and Graphics_ModeCheck == False:
line = " <key>Graphics Mode</key>\n"
line += " <string>1024x600x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Resolutions/1920x1200x32/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Graphics_Mode for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Graphics_Mode Yet
if "</dict>" in line and Graphics_ModeCheck == False:
line = " <key>Graphics Mode</key>\n"
line += " <string>1920x1200x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Resolutions/1280x768x32/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Graphics_Mode for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Graphics_Mode Yet
if "</dict>" in line and Graphics_ModeCheck == False:
line = " <key>Graphics Mode</key>\n"
line += " <string>1280x768x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Resolutions/1600x900x32/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Graphics_Mode for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Graphics_Mode Yet
if "</dict>" in line and Graphics_ModeCheck == False:
line = " <key>Graphics Mode</key>\n"
line += " <string>1600x900x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Resolutions/1280x1024x32/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Graphics_Mode for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Graphics_Mode Yet
if "</dict>" in line and Graphics_ModeCheck == False:
line = " <key>Graphics Mode</key>\n"
line += " <string>1280x1024x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Resolutions/1440x900x32/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Graphics_Mode for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Graphics_Mode Yet
if "</dict>" in line and Graphics_ModeCheck == False:
line = " <key>Graphics Mode</key>\n"
line += " <string>1440x900x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Resolutions/1280x800x32/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Graphics_Mode for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Graphics_Mode Yet
if "</dict>" in line and Graphics_ModeCheck == False:
line = " <key>Graphics Mode</key>\n"
line += " <string>1280x800x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Resolutions/1680x1050x32/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Graphics_Mode for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Graphics_Mode Yet
if "</dict>" in line and Graphics_ModeCheck == False:
line = " <key>Graphics Mode</key>\n"
line += " <string>1680x1050x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Resolutions/1920x1080x32/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Graphics_Mode for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Graphics_Mode Yet
if "</dict>" in line and Graphics_ModeCheck == False:
line = " <key>Graphics Mode</key>\n"
line += " <string>1920x1080x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/Scripts/Resolutions/1280x960x32/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# Script to add Graphics_Mode for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/usr/local/chamTemp/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/usr/local/chamTemp/Extra/org.chameleon.Boot.plist"
plist = vol + boot
if not os.path.exists(plist):
shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist)
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written Graphics_Mode Yet
if "</dict>" in line and Graphics_ModeCheck == False:
line = " <key>Graphics Mode</key>\n"
line += " <string>1280x960x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/blackosx/package/buildpkg.sh
206206
207207
208208
209
210
209
210
211
211212
212
213
213214
214215
215216
......
243244
244245
245246
246
247
247
248
249
248250
249
251
250252
251253
252254
......
264266
265267
266268
267
268
269
270
271
269272
270
273
271274
272275
273276
......
320323
321324
322325
323
326
324327
325328
326329
......
361364
362365
363366
364
367
365368
366369
367370
......
398401
399402
400403
401
404
402405
403406
404407
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"
#mkdir -p "${1}/${options[$i]##*/}/Scripts"
#ditto --noextattr --noqtn "${options[$i]}/postinstall" "${1}/${options[$i]##*/}/Scripts/postinstall"
cp "${options[$i]}"/* "${1}/${options[$i]##*/}/Root"
echo "[BUILD] ${options[$i]##*/} "
buildpackage "${1}/${options[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
buildpackage "${1}/${options[$i]##*/}" "/$chamTemp/options" "" "start_selected=\"false\"" >/dev/null 2>&1
done
# End build base options packages
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"
#mkdir -p "${1}/${resolutions[$i]##*/}/Scripts/"
#ditto --noextattr --noqtn "${resolutions[$i]}/postinstall" "${1}/${resolutions[$i]##*/}/Scripts/postinstall"
cp "${resolutions[$i]}"/* "${1}/${resolutions[$i]##*/}/Root"
echo "[BUILD] ${resolutions[$i]##*/} "
buildpackage "${1}/${resolutions[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
buildpackage "${1}/${resolutions[$i]##*/}" "/$chamTemp/options" "" "start_selected=\"false\"" >/dev/null 2>&1
done
((xmlindent--))
for (( i = 0 ; i < ${#optionsadv[@]} ; i++ ))
do
mkdir -p "${1}/${optionsadv[$i]##*/}/Root"
mkdir -p "${1}/${optionsadv[$i]##*/}/Scripts"
ditto --noextattr --noqtn "${optionsadv[$i]}/postinstall" "${1}/${optionsadv[$i]##*/}/Scripts/postinstall"
#mkdir -p "${1}/${optionsadv[$i]##*/}/Scripts"
#ditto --noextattr --noqtn "${optionsadv[$i]}/postinstall" "${1}/${optionsadv[$i]##*/}/Scripts/postinstall"
cp "${optionsadv[$i]}"/* "${1}/${optionsadv[$i]##*/}/Root"
echo "[BUILD] ${optionsadv[$i]##*/} "
buildpackage "${1}/${optionsadv[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
buildpackage "${1}/${optionsadv[$i]##*/}" "/$chamTemp/options" "" "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
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: 1575