| Project WONDER: woaFrameworkMerger |
Given a WebObjects Application package (a .woa directory), woaFrameworkMerger.pl copies all of its referenced nonsystem frameworks into the .woa itself, making the .woa stand-alone (no longer dependant on external frameworks).
Technically, it:
perl woaFrameworkMerger.pl /path/to/MyApp.woa
(the path can be relative)
Yes -- in fact, I recommend it! Just add a final "Shell Script" Build Phase to your project's top-level target. It should look something like this:
Here, I put a symbolic link in ~/Library to point to where woaFrameworkMerger really lives. But it's cool just to put the script there as well.
woaFrameworkMerger.pl currently does not support Windows. This is largely because I don't know how .woa/Contents/Windows/CLSSPATH.TXT or .woa/Contents/Windows/SUBPATHS.TXT work, and I lack the time and motivation to spend cycles learning, coding and testing. If you want to add Windows support, please be my guest! Doesn't look too hard...
It's a descendant of woaFrameworkMerger.pl, written by Giorgio Valoti, that copies over your web server resources as well as your frameworks. To quote Giorgio:
I've made a quick and dirty hack to merge web server resources using your script.I copy *all* the frameworks' web server resources, so I can set the property WOFrameworksBaseURL to /WebObjects/<APP_NAME>.woa/Contents/Frameworks without subclassing the resource manager. I use the modified version with a different PBX setup. I've created a new legacy target with a simple shell script:
pbxbuild -target ${PRODUCT_NAME} -buildstyle Deployment build
pbxbuild -target ${PRODUCT_NAME} -buildstyle WebServer build
perl ~/Developer/Tools/woaframeworkmerger/current ${DSTROOT}${LOCAL_LIBRARY_DIR}/WebObjects/Applications/${PRODUCT_NAME}.woaThis way, I avoid a potential problem with the script when used as an additional aggregate target build phase, namely the scripts does not find the web server distribution directory.
Use it the same way you use woaFrameworkMerger.pl — woaFrameworkAndWSResourceMerger.pl just does more. It probably makes sense to merge these two scripts eventually, and provide switch-based control over its actions, but we'll have to save that for another day.