[Pythonmac-SIG] py2app and plist entries
Cody Precord
codyprecord at gmail.com
Fri Oct 31 20:40:44 CET 2008
Hello,
On Fri, Oct 31, 2008 at 2:29 PM, Joe Strout <joe at strout.net> wrote:
> I tried py2app on my wxPython for the first time today, expecting it to be
> a long and painful chore -- and was pleasantly surprised that it worked
> right off the bat.
>
> Now I'm wondering a bit about options, mainly for things that end up in the
> Info.plist file. I do see that I could build my own Info.plist and specify
> it with the --plist option, but I really don't believe that I know better
> than it does what should be in that file; I just want to tweak a couple of
> things, like the bundle identifier. I see how to set the icon file, but no
> way to set the bundle identifier, version strings, etc. Is there any way to
> do so?
>
> Also, the py2app help says that I can give --plist a dict. Anybody have an
> example of that? And do the options I give it that way become the entire
> Info.plist, or do they just override the corresponding entries of the
> autogenerated one?
Here is an example:
PLIST = dict(CFBundleName = info.PROG_NAME,
CFBundleIconFile = 'Editra.icns',
CFBundleShortVersionString = info.VERSION,
CFBundleGetInfoString = info.PROG_NAME + " " + info.VERSION,
CFBundleExecutable = info.PROG_NAME,
CFBundleIdentifier = "org.editra.%s" % info.PROG_NAME.title(),
CFBundleDocumentTypes =
[dict(CFBundleTypeExtensions=synextreg.GetFileExtensions(),
CFBundleTypeIconFile='editra_doc',
CFBundleTypeRole="Editor"
),
],
CFBundleTypeMIMETypes = ['text/plain',],
CFBundleDevelopmentRegion = 'English',
NSHumanReadableCopyright = u"Copyright %s 2005-%d" % (AUTHOR,
YEAR)
)
Then just pass this dictionary in the py2app options
py2app_options = dict(plist=PLIST)
setup(options=dict(py2app=py2app_opts), ...)
Regards,
Cody Precord
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20081031/a1e90451/attachment.htm>
More information about the Pythonmac-SIG
mailing list