Re: [cx-freeze-users] cx_freeze OS X--custom build flags?
Brought to you by:
atuining
From: Rob R. <r.r...@sc...> - 2012-05-11 10:30:20
|
The option to copy the icon is only a stub -- it's not actually implemented as of yet. I like the idea of using the plistlib to create the info.plist. I might have a look at it when I get to it. Rob --------------------------------------------- Rob Reilink, M.Sc Science Applied phone: +31 6 187 26562 e-mail: r.r...@sc... --------------------------------------------- Op 6 mei 2012, om 19:23 heeft Kevin Walzer het volgende geschreven: > On 5/5/12 11:22 PM, Anthony Tuininga wrote: >> I can try.:) The only place that this would take place is when >> building the base executables. This is done with setup.py and follows >> the configuration used when building Python. You can see this code in >> the build_extension() method. If you have suggestions on how to make >> that work, please let me know. > > I think I've figured this out, and will submit patches for this and > other changes I've made as soon as I figure out Bitbucket. (I'm more of > an SVN/Sourceforge veteran.) Thanks for the pointer. > > I did have two other questions: > > 1. I can't figure out how to set the bundle-iconfile option for > bdist_mac--there are no samples in the source tree of how to do this. I > was able to manually copy over the icon file in my build script, so it's > not a big deal, but I'd like to use the API correctly. :-) > > 2. Looking at macdist.py in the source tree, I see that a default, > bare-bones info.plist file is created for the app bundle. Python > actually has a module for doing this, plistlib, which can take a dict > and write that data to an info.plist file. Again, it is no problem to > add this to my setup.py script as a final step, but it would be nice if > this were supported directly in cx_freeze. I actually tried to implement > it but couldn't figure out how to add the correct parameters in the > module. Here's a snippet from my setup.py to illustrate how this works: > > import plistlib > > plist = dict(CFBundleName = 'QuickWho', > CFBundleIconFile = 'quickwho.icns', > CFBundleIdentifier = 'com.codebykevin.quickwho', > CFBundleShortVersionString = '4.0.0', > CFBundleVersion = '4.0.0', > CFBundleGetInfoString = 'QuickWho 4.0.0', > CFBundleExecutable = 'QuickWho', > CFBundleHelpBookFolder = 'help', > CFBundleHelpBookName = 'QuickWho User Help', > NSHumanReadableCopyright = u'Copyright (c) 2012 WordTech > Communications LLC', > NSAppleScriptEnabled=u'YES', > OSAScriptingDefinition=u'QuickWho.sdef', > LSMinimumSystemVersion ='10.7.3', > LSMinimumSystemVersionByArchitecture = dict( > i386 = '10.7.3', > x86_64 = '10.7.3', > ), > LSArchitecturePriority = ('x86_64', 'i386'), > LSApplicationCategoryType= 'public.app-category.utilities', > NSServices = [ > dict( > NSMenuItem = dict( > default = u'QuickWho: Display Domain Information', > ), > NSMessage = u'provideService', > NSPortName = u'QuickWho', > NSSendTypes = [ > u'NSStringPboardType', > ], > ), > ], > ) > > targetplist = 'build/QuickWho.app/Contents/Info.plist' > plistlib.writePlist(plist, targetplist) > > -- > Thanks, > Kevin > > -- > Kevin Walzer > Code by Kevin > http://www.codebykevin.com > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > cx-freeze-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-freeze-users |