Message79169
The build script for a Mac OS installer, in
Mac/BuildScript/build-installer.py, currently requires OS 10.4 and
Python 2.3. At some point it will have to be ported to a newer version
of Python (and Mac OS). It uses a number of modules which are slated
for future removal, particularly Carbon and MacOS. These modules are
only used in the function "setIcon". They can be replaced with a call
to a Cocoa method via PyObjC. The "setIcon" function using PyObjC would
look like this:
def setIcon(folder, imagefile):
try:
import os, AppKit
AppKit.NSApplicationLoad() # initialize Cocoa
return
AppKit.NSWorkspace.sharedWorkspace().setIcon_forFile_options_(
AppKit.NSImage.alloc().initWithContentsOfFile_(imagefile),
os.path.abspath(folder), 0)
except ImportError:
return False |
|
Date |
User |
Action |
Args |
2009-01-05 17:15:58 | janssen | set | recipients:
+ janssen |
2009-01-05 17:15:58 | janssen | set | messageid: <1231175758.14.0.180038218422.issue4848@psf.upfronthosting.co.za> |
2009-01-05 17:15:57 | janssen | link | issue4848 messages |
2009-01-05 17:15:56 | janssen | create | |
|