discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Example of a framework?


From: Kaelin Colclasure
Subject: Re: Example of a framework?
Date: Sat, 12 Jan 2002 10:59:29 -0800

On Saturday, January 12, 2002, at 02:36 AM, Nicola Pero wrote:


I'm new to GNUstep, so forgive me if I'm asking trivially simple
questions. Where might I find a reasonably concise example of how to set
up a makefile, etc. for a framework bundle? And once I have it, is it
possible to have it included in a RPM as part of a separate tool? Are
tools really bundled at all?


I'm in the midst of building a benchmarking framework for firewalls, and
most of the functionality is in two tools: fwbcontrol which is run by
the operator, and fwbworker which is spawned on all of the test hosts in a cluster. I would like for these two tools to share a common framework, yet they must be packaged (in RPMs) separately because they're installed
on different machines. Right now I build a fwbench-control package and
an fwbench-worker package. Ideally the common framework would get
included in each... However, I would settle for having a third
fwbench-common package if that simplifies things significantly.

Well - I suppose you basically have -

 - a shared library (the proper core of your `framework')
 - two tools both of them using this same library.

the idea with RPMs is that they work the same way as you would use the
source code ...

so really have two options -

 - either you build a framework containing both the library (as the
   main framework object) and the two tools, and install the framework
   with both tools on all machines - that makes a single big RPM;

I'd like to avoid this because I am working with two very differently configured classes of machines here -- cluster (worker) nodes and workstation (control) hosts. I don't want to be restricted on the control side to the set of libraries, etc. available on the workers.

 - or you build a project containing three subprojects - a framework
   (or perhaps simply a library if you don't need the special features
   of frameworks), and the two tools - if you build the RPM from the top
   level, all the subprojects get automatically included in the RPM;

 - or you have a separate framework project (/library) - which makes
   up a first RPM you install on both machines - and then you have the
two tools as separate projects - which makes other two RPMs, which you
   can install separately.

This is workable... but my (poorly elaborated) question was really more about how bundles work under GNUstep. Let me try to explain in a bit more detail...

I have just been reading about bundles in Apple's "Inside Mac OS X: System Overview" and I am trying to get a grasp on how / whether the same feature set is available from GNUstep. I am reading that an application bundle can include a `Frameworks' directory containing private frameworks, and that the libraries included there will always be used in preference to any other when that application loads a shared library. Does GNUstep implement a similar feature? And if so, is it supported by GNUstep make? And if so, is there an example GNUmakefile / project directory structure that I can crib from?

A related confusion on my part: Are tools considered to be in a bundle or not? They do use the nice wrapper script for finding the correct executable for the current platform / library combination...

Having the framework installed with each tool is not as clean, because if
you want to install both the tools, you end up with the framework
installed twice.

For most normal uses I would agree completely, but in this specific case the wasted disk space and potential for version conflict are not really concerns. My priority is that configuring additional machines to act as workers is a quick and (relatively) painless process. I also will eventually have to deal with machines that don't (natively) do RPM. Mac OS X and OpenBSD sooner, but eventually perhaps even (shudder) Windows.

The ability of a bundle to handle multiple executables (for different platforms) seems attractive. But I'm not quite to the point of needing to figure that one out just yet.

Building a framework using gnustep-make should be quite easy ... it's
basically the same as for a library, with some more options - you can know
about them by looking at the header of the framework.make makefile
included by gnustep-make.


Yes, I'm finding GNUstep make to be quite pleasant to work with. Thanks for the pointer, I'll check it out and see what I can come up with. :-)

-- Kaelin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]