Mailing List Archive

CVS: python/dist/src/Mac/Lib buildtools.py,1.10,1.11
Update of /cvsroot/python/python/dist/src/Mac/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv794

Modified Files:
buildtools.py
Log Message:
Handle .icns and .plist files for applets.

Also, for now (until we learn to parse .plist files) we make a special case
for the IDE, setting the creator to "Pide".


Index: buildtools.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Lib/buildtools.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** buildtools.py 29 Mar 2002 21:21:28 -0000 1.10
--- buildtools.py 29 Mar 2002 23:44:37 -0000 1.11
***************
*** 269,273 ****
# Strip the .app suffix
shortname = shortname[:-4]
! plistname = shortname + '.plist'
# Start with copying the .app framework
if not is_update:
--- 269,284 ----
# Strip the .app suffix
shortname = shortname[:-4]
! # And deduce the .plist and .icns names
! plistname = None
! icnsname = None
! if rsrcname and rsrcname[-5:] == '.rsrc':
! tmp = rsrcname[:-5]
! plistname = tmp + '.plist'
! if os.path.exists(plistname):
! icnsname = tmp + '.icns'
! if not os.path.exists(icnsname):
! icnsname = None
! else:
! plistname = None
# Start with copying the .app framework
if not is_update:
***************
*** 278,286 ****
copyapptree(template, destname, exceptlist)
# Now either use the .plist file or the default
! if plistname and os.path.exists(plistname):
shutil.copy2(plistname, os.path.join(destname, 'Contents/Info.plist'))
! # XXXX Wrong. This should be parsed from plist file
! # icnsname = 'PythonApplet.icns'
! ownertype = 'PytA'
# XXXX Should copy .icns file
else:
--- 289,304 ----
copyapptree(template, destname, exceptlist)
# Now either use the .plist file or the default
! if plistname:
shutil.copy2(plistname, os.path.join(destname, 'Contents/Info.plist'))
! if icnsname:
! icnsdest = os.path.split(icnsname)[1]
! icnsdest = os.path.join(destname,
! os.path.join('Contents/Resources', icnsdest))
! shutil.copy2(icnsname, icnsdest)
! # XXXX Wrong. This should be parsed from plist file. Also a big hack:-)
! if shortname == 'PythonIDE':
! ownertype = 'Pide'
! else:
! ownertype = 'PytA'
# XXXX Should copy .icns file
else: