Is it worth persevering with Macports_Framework?
jkh at apple.com
Tue Feb 12 17:06:55 PST 2013
On Feb 10, 2013, at 8:13 PM, Ian Wadham <iandw.au at gmail.com> wrote:
> I heartily agree with you that "wrapping basic commands" is not enough.
> I particularly hate GUIs that wrap basic programming and then pass
> through base-level error messages ---unedited and out of context.
Just to riff on this a bit - it IS possible to design to a goal somewhere in between the "ideal" of Macports_Framework being a complete "API" for MacPorts' internals and just calling system("port install bletch") and hoping for the best as you attempt to parse an undisciplined stream of text flying out of the shell.
What you do instead is add special text markers to port(1) which it emits when called in a special "slave mode" from a GUI (or, for that matter, a batch build wrapper doing macports builds for a Tinderbox server). Those let you differentiate different build phases and also separate "normal build output" from errors, all without having to know more than what text markers to look for. Hugely elegant it may not be, but it works - I know because this same approach has been used by numerous "GUI wrappers" for Unix tools over the years, the most successful ones using this technique. It's probably how XML was ultimately invented. :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the macports-dev