Re: [Pyobjc-dev] PyObjC sources bundled with pbxbuild install
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2003-05-27 14:53:32
|
On Tuesday, May 27, 2003, at 01:42 US/Pacific, Dinu Gherman wrote: > bb...@ma...: >> For PBX builds, you could add a shell script build phase that >> invokes a script-- python, likely-- to walk the built tree and >> remove any cruft (including CVS directories!). > > Of course, but it would be cleaner and more consistent to include > only what's needed from the start. So far, I have no idea where > and when it is defined what ends up in the PyObjC folder. Is it > in the PB templates? For normal builds, the pyobjc resources are not copied at all as an optimization. As well, this allows the build templates to work for all but installs regardless of where PyObjC is installed (though there is a default that has to be set to control how the app finds the python binary). In any case, everything is defined via PBX itself. See the build phases for the main app target. A Project Builder template is merely a PBX project shoved into the Templates directory. When a new project is created from a Template, certain strings are automatically replaced. If you want to adjust the templates, you can edit an existing template directly in PBX, just make sure you remove the pbxuser file from the pbxproj -- likely gherman.pbxuser, in your case. > Another related thing is that doing a "pbxbuild build" is just not > enough to create the full thing and "pbxbuild install" copies the > final .app into a temporary directory from where I have to move it > out again. I suppose this is a setting in PB, maybe in the targets? > Ok, in fact, if you deselect an install directory there it ends up > in build/UninstalledProducts, which is more predictable, I guess. All controlled via PBX.... Build just creates the app for the purposes of running in PBX. Install [tries to] creates an app that can be packaged for distribution. The location is entirely determined by PBX settings; see the build settings target editor. > Also, it seems that a project.pbxproj file contains an item like > this: > > 77AD459403ECA7A6004B557F = { > includeInIndex = 1; > isa = PBXFolderReference; > name = PyObjC; > path = "/usr/lib/python2.2/site-packages/PyObjC"; > refType = 0; > }; > > I'm not sure, if one can provide regular expressions in these items > like with Unix find. Probably one could do something equivalent when > building the template (at the risk of being out of being out of synch > after the next CVS compile, but ok, distutils could update the tem- > plates as well). What do you think? REGEX, no... but you could provide environment variables, I believe, and that could entirely be done from within PBX (all of the FOO=BAR settings within the PBX target editor are just passed to pbxbuild as environment variables). Some experimentation would be necessary. The distutils build doesn't touch the PBX templates. Maybe 'pbxbuild install' should do so and, as Dinu indicates, should update the templates based on > Ideally, there would be a hook for PB to do something during the in- > stantiation of such a template (like with the Installer.app), but I'm > not sure if there is such a functionality... I don't think that exists. b.bum |