summaryrefslogtreecommitdiffstats
path: root/Mac/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-08-05 22:06:29 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-08-05 22:06:29 (GMT)
commit94caa78ebf5e52716b383236f1a737a6bed57bf6 (patch)
treeb4de0815072722e17b6f4bca2bc9c35a271ad933 /Mac/Lib
parent0a9d7559e8e07336860fb2aa901c1ba8b77b5921 (diff)
downloadcpython-94caa78ebf5e52716b383236f1a737a6bed57bf6.zip
cpython-94caa78ebf5e52716b383236f1a737a6bed57bf6.tar.gz
cpython-94caa78ebf5e52716b383236f1a737a6bed57bf6.tar.bz2
Patch by Ronald Oussoren: if there's a .lproj in the extras list also
check whether it contains a .nib, and do the Cocoa song and dance if it does.
Diffstat (limited to 'Mac/Lib')
-rw-r--r--Mac/Lib/buildtools.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/Mac/Lib/buildtools.py b/Mac/Lib/buildtools.py
index 1047da5..ca9b252 100644
--- a/Mac/Lib/buildtools.py
+++ b/Mac/Lib/buildtools.py
@@ -322,7 +322,16 @@ def process_common_macho(template, progress, code, rsrcname, destname, is_update
<string>%s</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>""" % nibname
-
+ elif o[-6:] == '.lproj':
+ files = os.listdir(o)
+ for f in files:
+ if f[-4:] == '.nib':
+ nibname = os.path.split(f)[1][:-4]
+ cocoainfo = """
+ <key>NSMainNibFile</key>
+ <string>%s</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>""" % nibname
plistname = os.path.join(template, 'Contents', 'Resources', 'Applet-Info.plist')
plistdata = open(plistname).read()