Chameleon

Chameleon Commit Details

Date:2011-09-25 02:23:00 (12 years 7 months ago)
Author:ErmaC
Commit:1571
Parents: 1570
Message:sync with trunk reverted changes (thx jrcs)
Changes:
R/branches/ErmaC/package/Scripts/Keymaps/postinstall → /branches/ErmaC/package/Scripts/Keymaps/postinstall.in
M/branches/ErmaC/package/buildpkg.sh

File differences

branches/ErmaC/package/Scripts/Keymaps/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 KeyLayout for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/tmpcham/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/tmpcham/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
KeyLayoutCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written KeyLayout Yet
if "</dict>" in line and KeyLayoutCheck == False:
line = " <key>KeyLayout</key>\n"
line += " <string>@@KEYMAP@@</string>\n"
line += "</dict>\n"
KeyLayoutCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/ErmaC/package/Scripts/Keymaps/postinstall.in
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 KeyLayout for Chameleon boot loaders
import sys
import os
import shutil
vol = str(sys.argv[3])
extrafolder = vol + "/tmpcham/Extra"
if not os.path.exists(extrafolder):
os.makedirs(extrafolder)
boot = "/tmpcham/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
KeyLayoutCheck = False
body = ""
for line in infile:
# if we finish the tags and haven't written KeyLayout Yet
if "</dict>" in line and KeyLayoutCheck == False:
line = " <key>KeyLayout</key>\n"
line += " <string>@@KEYMAP@@</string>\n"
line += "</dict>\n"
KeyLayoutCheck = True
body += line
infile.close()
outfile = open(plist, "w")
outfile.write(body)
outfile.close()
branches/ErmaC/package/buildpkg.sh
300300
301301
302302
303
303
304304
305305
306306
do
mkdir -p "${1}/${keymaps[$i]}/Root/"
mkdir -p "${1}/${keymaps[$i]}/Scripts/"
sed "s/@@KEYMAP@@/${keymaps[$i]}/g" "${pkgroot}/Scripts/Keymaps/postinstall" > "${1}/${keymaps[$i]}/Scripts/postinstall" && \
sed "s/@@KEYMAP@@/${keymaps[$i]}/g" "${pkgroot}/Scripts/Keymaps/postinstall.in" > "${1}/${keymaps[$i]}/Scripts/postinstall" && \
chmod +rx "${1}/${keymaps[$i]}/Scripts/postinstall"
echo "[BUILD] ${keymaps[$i]} "
#blackosx = why use install location /tmpcham for this ? changing to root

Archive Download the corresponding diff file

Revision: 1571