Chameleon

Chameleon Commit Details

Date:2011-08-30 02:21:24 (8 years 4 months ago)
Author:ErmaC
Commit:1475
Parents: 1474
Message:Fix Graphics Mode for Resolution pkg script, added 3 more Resolution, add the field in all the Language
Changes:
A/branches/ErmaC/package/Scripts/Resolutions/1024x600x32/postinstall
A/branches/ErmaC/package/Scripts/Resolutions/1280x800x32/postinstall
A/branches/ErmaC/package/Scripts/Resolutions/1024x600x32
A/branches/ErmaC/package/Scripts/Resolutions/1280x800x32
A/branches/ErmaC/package/Scripts/Resolutions/1440x900x32/postinstall
A/branches/ErmaC/package/Scripts/Resolutions/1440x900x32
M/branches/ErmaC/package/Resources/zh.lproj/Localizable.strings
M/branches/ErmaC/package/Resources/pt-BR.lproj/Localizable.strings
M/branches/ErmaC/package/Resources/ru.lproj/Localizable.strings
M/branches/ErmaC/doc/BootHelp.txt
M/branches/ErmaC/package/Resources/id.lproj/Localizable.strings
M/branches/ErmaC/i386/boot2/boot.c
M/branches/ErmaC/package/Resources/el.lproj/Localizable.strings
M/branches/ErmaC/package/Resources/ar.lproj/Localizable.strings
M/branches/ErmaC/package/Resources/en.lproj/Localizable.strings
M/branches/ErmaC/package/Resources/pt-PT.lproj/Localizable.strings
M/branches/ErmaC/i386/libsaio/ati.c
M/branches/ErmaC/package/Resources/mk.lproj/Localizable.strings
M/branches/ErmaC/package/Resources/es.lproj/Localizable.strings
M/branches/ErmaC/package/Resources/sr.lproj/Localizable.strings
M/branches/ErmaC/package/Scripts/Resolutions/1600x900x32/postinstall
M/branches/ErmaC/package/Resources/de.lproj/Localizable.strings
M/branches/ErmaC/package/Resources/bg.lproj/Localizable.strings
M/branches/ErmaC/package/Resources/he.lproj/Localizable.strings
M/branches/ErmaC/package/Scripts/Resolutions/1280x960x32/postinstall
M/branches/ErmaC/package/Scripts/Resolutions/1024x768x32/postinstall
M/branches/ErmaC/package/Scripts/Resolutions/1920x1200x32/postinstall
M/branches/ErmaC/i386/boot2/modules.c
M/branches/ErmaC/package/Resources/fr.lproj/Localizable.strings
M/branches/ErmaC/package/Scripts/Resolutions/1280x1024x32/postinstall
M/branches/ErmaC/package/Resources/nl.lproj/Localizable.strings
M/branches/ErmaC/package/Scripts/Resolutions/1920x1080x32/postinstall
M/branches/ErmaC/package/Scripts/Resolutions/1680x1050x32/postinstall
M/branches/ErmaC/package/Resources/pl.lproj/Localizable.strings
M/branches/ErmaC/package/Resources/It.lproj/Localizable.strings
M/branches/ErmaC/package/Resources/hr-HR.lproj/Localizable.strings

File differences

branches/ErmaC/i386/libsaio/ati.c
498498
499499
500500
501
501502
502503
503504
{ 0x68B8,0x22881787, CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5770",kVervet},
{ 0x68C0,0x1594103C, CHIP_FAMILY_REDWOOD,"AMD Radeon HD 6570M",kNull},
{ 0x68C0,0x392717AA, CHIP_FAMILY_REDWOOD,"ATI Mobility Radeon HD 5730",kBaboon},
{ 0x68C1,0x033E1025, CHIP_FAMILY_REDWOOD,"ATI Mobility Radeon HD 5650",kNull},
branches/ErmaC/i386/boot2/boot.c
608608
609609
610610
611
611
612
613
614
615
616
617
612618
613619
614620
......
625631
626632
627633
628
629
630
631
632
633
634
635
636
637
638
639
640
641634
642635
643636
verbose("Loading Darwin %s\n", gMacOSVersion);
useKernelCache = false; // by default don't use prelink kernel cache
// If boot from boot helper partitions and OS is Lion use prelink kernel.
// We need to find a solution to load extra mkext with a prelink kernel.
if (gBootVolume->flags & kBVFlagBooter && checkOSVersion("10.7"))
useKernelCache = true;
else
useKernelCache = false; // by default don't use prelink kernel cache
getBoolForKey(kUseKernelCache, &useKernelCache, &bootInfo->chameleonConfig);
if (useKernelCache) do {
kernelCacheFile[0] = 0; // Use default kernel cache file
}
// If boot from boot helper partitions and OS is Lion use prelink kernel.
// We need to find a solution to load extra mkext with a prelink kernel.
if (gBootVolume->flags & kBVFlagBooter && checkOSVersion("10.7")) {
verbose("Booting from Lion RAID volume so forcing to use KernelCache\n");
useKernelCache = true;
break;
}
if ((gBootMode & kBootModeSafe) == 1) {
verbose("Booting in 'Boot Safe' mode, KernelCache will not be used\n");
useKernelCache = false;
break;
}
if (gOverrideKernel && kernelCacheFile[0] == 0) {
verbose("Using a non default kernel (%s) without specifying 'Kernel Cache' path, KernelCache will not be used\n",
bootInfo->bootFile);
branches/ErmaC/i386/boot2/modules.c
276276
277277
278278
279
279
280280
281281
282282
......
11511151
11521152
11531153
1154
1154
}
DBG("Module %s not found\n", name); DBGPAUSE();
DBG("Module %s not loaded\n", name); DBGPAUSE();
return 0;
}
{
return 0;
}
#endif
#endif
branches/ErmaC/package/Scripts/Resolutions/1024x768x32/postinstall
1919
2020
2121
22
22
2323
2424
2525
2626
2727
28
28
2929
3030
3131
# "<key>GraphicsEnabler<\key>" and "<string>Yes</string>"
if "<key>GraphicsEnabler</key>" in line:
line = infile.next()
line = " <key>Graphics_Mode</key>\n"
line = " <key>Graphics Mode</key>\n"
line += " <string>1024x768x32</string>\n"
InstantMenuCheck = True
# 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 = " <key>Graphics Mode</key>\n"
line += " <string>1024x768x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
branches/ErmaC/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
vol = str(sys.argv[3])
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if GraphicsEnabler is there, advance the next line to
# read past it, and then change the lines to read
# "<key>GraphicsEnabler<\key>" and "<string>Yes</string>"
if "<key>GraphicsEnabler</key>" in line:
line = infile.next()
line = " <key>Graphics Mode</key>\n"
line += " <string>1024x600x32</string>\n"
InstantMenuCheck = True
# 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/ErmaC/package/Scripts/Resolutions/1920x1200x32/postinstall
1919
2020
2121
22
22
2323
2424
2525
2626
2727
28
28
2929
3030
3131
# "<key>GraphicsEnabler<\key>" and "<string>Yes</string>"
if "<key>GraphicsEnabler</key>" in line:
line = infile.next()
line = " <key>Graphics_Mode</key>\n"
line = " <key>Graphics Mode</key>\n"
line += " <string>1920x1200x32</string>\n"
InstantMenuCheck = True
# 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 = " <key>Graphics Mode</key>\n"
line += " <string>1920x1200x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
branches/ErmaC/package/Scripts/Resolutions/1600x900x32/postinstall
1919
2020
2121
22
22
2323
2424
2525
2626
2727
28
28
2929
3030
3131
# "<key>GraphicsEnabler<\key>" and "<string>Yes</string>"
if "<key>GraphicsEnabler</key>" in line:
line = infile.next()
line = " <key>Graphics_Mode</key>\n"
line = " <key>Graphics Mode</key>\n"
line += " <string>1600x900x32</string>\n"
InstantMenuCheck = True
# 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 = " <key>Graphics Mode</key>\n"
line += " <string>1600x900x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
branches/ErmaC/package/Scripts/Resolutions/1280x1024x32/postinstall
1919
2020
2121
22
22
2323
2424
2525
2626
2727
28
28
2929
3030
3131
# "<key>GraphicsEnabler<\key>" and "<string>Yes</string>"
if "<key>GraphicsEnabler</key>" in line:
line = infile.next()
line = " <key>Graphics_Mode</key>\n"
line = " <key>Graphics Mode</key>\n"
line += " <string>1280x1024x32</string>\n"
InstantMenuCheck = True
# 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 = " <key>Graphics Mode</key>\n"
line += " <string>1280x1024x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
branches/ErmaC/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
vol = str(sys.argv[3])
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if GraphicsEnabler is there, advance the next line to
# read past it, and then change the lines to read
# "<key>GraphicsEnabler<\key>" and "<string>Yes</string>"
if "<key>GraphicsEnabler</key>" in line:
line = infile.next()
line = " <key>Graphics Mode</key>\n"
line += " <string>1440x900x32</string>\n"
InstantMenuCheck = True
# 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/ErmaC/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
vol = str(sys.argv[3])
boot = "/Extra/org.chameleon.Boot.plist"
plist = vol + boot
infile = open(plist, "r")
# check if Graphics_Mode has been written or not
Graphics_ModeCheck = False
body = ""
for line in infile:
# if GraphicsEnabler is there, advance the next line to
# read past it, and then change the lines to read
# "<key>GraphicsEnabler<\key>" and "<string>Yes</string>"
if "<key>GraphicsEnabler</key>" in line:
line = infile.next()
line = " <key>Graphics Mode</key>\n"
line += " <string>1280x800x32</string>\n"
InstantMenuCheck = True
# 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/ErmaC/package/Scripts/Resolutions/1680x1050x32/postinstall
1919
2020
2121
22
22
2323
2424
2525
2626
2727
28
28
2929
3030
3131
# "<key>GraphicsEnabler<\key>" and "<string>Yes</string>"
if "<key>GraphicsEnabler</key>" in line:
line = infile.next()
line = " <key>Graphics_Mode</key>\n"
line = " <key>Graphics Mode</key>\n"
line += " <string>1680x1050x32</string>\n"
InstantMenuCheck = True
# 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 = " <key>Graphics Mode</key>\n"
line += " <string>1680x1050x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
branches/ErmaC/package/Scripts/Resolutions/1920x1080x32/postinstall
1919
2020
2121
22
22
2323
2424
2525
2626
2727
28
28
2929
3030
3131
# "<key>GraphicsEnabler<\key>" and "<string>Yes</string>"
if "<key>GraphicsEnabler</key>" in line:
line = infile.next()
line = " <key>Graphics_Mode</key>\n"
line = " <key>Graphics Mode</key>\n"
line += " <string>1920x1080x32</string>\n"
InstantMenuCheck = True
# 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 = " <key>Graphics Mode</key>\n"
line += " <string>1920x1080x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
branches/ErmaC/package/Scripts/Resolutions/1280x960x32/postinstall
1919
2020
2121
22
22
2323
2424
2525
2626
2727
28
28
2929
3030
3131
# "<key>GraphicsEnabler<\key>" and "<string>Yes</string>"
if "<key>GraphicsEnabler</key>" in line:
line = infile.next()
line = " <key>Graphics_Mode</key>\n"
line = " <key>Graphics Mode</key>\n"
line += " <string>1280x960x32</string>\n"
InstantMenuCheck = True
# 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 = " <key>Graphics Mode</key>\n"
line += " <string>1280x960x32</string>\n"
line += "</dict>\n"
Graphics_ModeCheck = True
branches/ErmaC/doc/BootHelp.txt
6868
6969
7070
71
72
71
72
73
7374
7475
7576
PciRoot=<value> Use an alternate value for PciRoot (default value 0).
UseKernelCache=Yes|No Default is No. Yes will load pre-linked kernel and will
ignore /E/E and /S/L/E/Extensions.mkext.
UseKernelCache=Yes|No Yes will load pre-linked kernel and will ignore /E/E
and /S/L/E/Extensions.mkext.
Default is No but Yes if you use Lion on a Raid partition.
GraphicsEnabler=Yes|No Automatic device-properties generation for gfx cards.
AtiConfig=<cardcfg> Use a different card config, e.g. AtiConfig=Megalodon.

Archive Download the corresponding diff file

Revision: 1475