Chameleon

Chameleon Commit Details

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

File differences

branches/ErmaC/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()
branches/ErmaC/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()
branches/ErmaC/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()
branches/ErmaC/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: 1362