[Python-checkins] python/dist/src/Lib/plat-mac bundlebuilder.py,1.4,1.5
jvr@users.sourceforge.net
jvr@users.sourceforge.net
Sat, 01 Feb 2003 00:34:49 -0800
Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv2720/Lib/plat-mac
Modified Files:
bundlebuilder.py
Log Message:
icon support by Robin Dunn, closes patch #678218
Index: bundlebuilder.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/bundlebuilder.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** bundlebuilder.py 17 Jan 2003 20:02:06 -0000 1.4
--- bundlebuilder.py 1 Feb 2003 08:34:46 -0000 1.5
***************
*** 282,285 ****
--- 282,289 ----
nibname = None
+ # The name of the icon file to be copied to Resources and used for
+ # the Finder icon.
+ iconfile = None
+
# Symlink the executable instead of copying it.
symlink_exec = 0
***************
*** 370,373 ****
--- 374,382 ----
os.chmod(bootstrappath, 0775)
+ if self.iconfile is not None:
+ iconbase = os.path.basename(self.iconfile)
+ self.plist.CFBundleIconFile = iconbase
+ self.files.append((self.iconfile, pathjoin(resdir, iconbase)))
+
def postProcess(self):
if self.standalone:
***************
*** 611,614 ****
--- 620,625 ----
--nib=NAME main nib name
-c, --creator=CCCC 4-char creator code (default: '????')
+ --iconfile=FILE filename of the icon (an .icns file) to be used
+ as the Finder icon
-l, --link symlink files/folder instead of copying them
--link-exec symlink the executable instead of copying it
***************
*** 638,642 ****
"mainprogram=", "creator=", "nib=", "plist=", "link",
"link-exec", "help", "verbose", "quiet", "standalone",
! "exclude=", "include=", "package=", "strip")
try:
--- 649,653 ----
"mainprogram=", "creator=", "nib=", "plist=", "link",
"link-exec", "help", "verbose", "quiet", "standalone",
! "exclude=", "include=", "package=", "strip", "iconfile=")
try:
***************
*** 658,661 ****
--- 669,674 ----
elif opt in ('-c', '--creator'):
builder.creator = arg
+ elif opt == '--iconfile':
+ builder.iconfile = arg
elif opt == "--nib":
builder.nibname = arg