]> granicus.if.org Git - python/commitdiff
Patch by Ronald Oussoren: if there's a .lproj in the extras list also
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 5 Aug 2002 22:06:29 +0000 (22:06 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 5 Aug 2002 22:06:29 +0000 (22:06 +0000)
check whether it contains a .nib, and do the Cocoa song and dance if
it does.

Mac/Lib/buildtools.py

index 1047da5713004e88a697a1e79106fe0e9ac4bb97..ca9b252b39ebce8a60f70d7a19f5f2ce67e5ad38 100644 (file)
@@ -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()