Commits

Ronald Oussoren committed e669cf1

- Add Tools/mknibwrapper following a suggestion by Just van Rossum
- Removed Scripts/nibclasswrapper (and therefore the entire directory)
because it is no longer needed.

Comments (0)

Files changed (6)

+2002-11-22 Ronald Oussoren <oussoren@cistron.nl>
+	* Examples/TableModel2/main.m: Set PYTHONPATH in the environment of
+	  the child
+	* Import bundlebuilder.py and plistlib.py from MacPython
+	* Remove Tools/mknibwrapper: It is no longer needed
+	* Added scripts/nibclassbuilder, as suggested by Just van Rossum
+
 2002-11-20 Ronald Oussoren <oussoren@cistron.nl>
 	Translated a number of names to a more Cocoa like syntax:
 	* objc.lookup_class -> objc.lookUpClass

pyobjc/Scripts/README

-Reserved for PyObjC related scripts (for 'end-users')
+Reserved for PyObjC related scripts 

pyobjc/Scripts/nibclassbuilder

+#!/usr/bin/env python
+from AppKit import NibClassBuilder
+NibClassBuilder.commandline()

pyobjc/Tools/README

-Reserved for PyObjC related tools

pyobjc/Tools/mknibwrapper

-#!/usr/bin/env python
-"""
-mknibwrapper [--module=nibwrapper] [--output-directory=.] [--help] file.nib...
-
-This tool can be used to generate the classes defined in a NIB file.
-"""
-import sys
-import getopt
-import os
-
-from AppKit.classnib import parse_classes_nib, generate_wrapper_module
-
-PRG=sys.argv[0]
-MODNAME='nibwrapper'
-BASEDIR='.'
-
-def usage(fp):
-	fp.write("Usage:\n")
-	fp.write("\t%s [--module=nibwrapper] [--output-directory=.] [--help] x.nib...\n", PRG)
-
-try:
-	opts, args = getopt.getopt(sys.argv[1:],
-		'm:h?o:', [ 'help', 'module=', 'output-directory=' ])
-except getopt.error, msg:
-	sys.stderr.write("%s: %s\n"%(PRG, msg))
-	usage(sys.stderr)
-	sys.exit(1)
-
-for key, value in opts:
-	if key in [ '-h', '-?', '--help' ]:
-		usage(sys.stdout)
-		sys.exit(0)
-	elif key in [ '-m', '--module' ]:
-		MODNAME = value
-	elif key in [ '-d', '--output-directory' ]:
-		BASEDIR = value
-	else:
-		raise InternalError, "Unhandled option: %s"%key
-
-if not args:
-	sys.stderr.write("%s: No NIB file specified\n"%PRG)
-	usage(sys.stderr)
-	sys.exit(1)
-
-class_data = [ parse_classes_nib(a) for a in args ]
-
-fname = os.path.join(BASEDIR, MODNAME.replace('.', '/')) + '.py'
-generate_wrapper_module(open(fname, 'w'), class_data)
 			 + AddressBookExtensions 
 			 ),
 	   packages = CorePackages + CocoaPackages + AddressBookPackages,
-	   package_dir = { '':'Lib' }
+	   package_dir = { '':'Lib' },
+           scripts = [ 'Scripts/nibclassbuilder', ],
            )
 
 except:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.