Chameleon

Chameleon Commit Details

Date:2011-08-14 04:46:29 (12 years 8 months ago)
Author:ErmaC
Commit:1363
Parents: 1362
Message:Add EnableC2/3/4 State and Npci=0x2000 options for the pkg, also edit Localizable file for English and Italian
Changes:
A/trunk/package/Scripts/Advanced/Npci
A/trunk/package/Scripts/BaseOptions/EnableC2State/postinstall
A/trunk/package/Scripts/BaseOptions/EnableC3State/postinstall
A/trunk/package/Scripts/BaseOptions/EnableC4State/postinstall
A/trunk/package/Scripts/BaseOptions/EnableC2State
A/trunk/package/Scripts/BaseOptions/EnableC3State
A/trunk/package/Scripts/BaseOptions/EnableC4State
A/trunk/package/Scripts/Advanced/Npci/postinstall
M/trunk/package/Resources/Italian.lproj/Localizable.strings
M/trunk/package/Resources/English.lproj/Localizable.strings

File differences

trunk/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
#!/usr/bin/python
# Script to add Kernel Flags = npci=0x2000 for Chameleon boot loaders
import sys
import os
vol = str(sys.argv[3])
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
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()
trunk/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
#!/usr/bin/python
# Script to add EnableC2State for Chameleon boot loaders
import sys
import os
vol = str(sys.argv[3])
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
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()
trunk/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
#!/usr/bin/python
# Script to add EnableC3State for Chameleon boot loaders
import sys
import os
vol = str(sys.argv[3])
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
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()
trunk/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
#!/usr/bin/python
# Script to add EnableC4State for Chameleon boot loaders
import sys
import os
vol = str(sys.argv[3])
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
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()

Archive Download the corresponding diff file

Revision: 1363