Re: [Pyobjc-dev] PyObjC sources bundled with pbxbuild install
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2003-05-28 15:58:53
|
On Wednesday, May 28, 2003, at 08:24 US/Pacific, Dinu Gherman wrote: > bb...@ma...: >> That is certainly one way to do it.... an equivalent that doesn't >> involve hacking the pbxproj (which will potentially break with a >> complex set of targets or in other situations): > BTW, isn't there a specification for these formats, somewhere? > There is just too much magic IDs, I assume for linking and what > not... There is no specification. It is a closed format and it changes with each release of the dev tools. >> Set INSTALL_PATH environment variable appropriately before calling >> out to 'pbxbuild install'. >> Add a 'shell script' build phase at the end of the build phases that >> checks to see if it is an install phase and, if so, does your clean >> up on the install tree. > > But then, I'll have to do this for each project individually, > isn't it? Not sure if this is the most "pythonic" way to do it... But you aren't building a python project, you are building Cocoa applications in Project Builder that happen to use Python as the language of implementation. What I described is a way to solve this problem using the Apple provided tools in a supported fashion. And, yes, you'll have to do this for each project. Inconvenient, but how many projects are you planning on building? Hundreds? It takes less than a minute per project given that there are only three things to change; INSTALL_PATH, the addition of the python cleanup script and a shell script build phase that cleans up that script. If we want something that is both "pythonic" while still playing by Apple's rules, then we should write a generic python script that can be dropped in as the final build phase in the PBX templates. It could do the various random bits of cleanup, etc, as needed. The INSTALL_PATH configuration is more of a developer preference than anything else -- I set my INSTALL_PATH to something fairly specific to facilitate packaging (and I should refactor my solution out so other's can take advantage of it-- it is fairly useful). If you want something "pure pythonic", use the buildapp.py script and control the entire build from within Python. b.bum |