ftp.nice.ch/Attic/openStep/implementation/gnustep/sources/objcX-0.87.tgz#/objcX-0.87/examples/NXBundle

LoadMe.bproj/
 
Makefile.in
 
README.NXBundle
 
bundle.m
[View bundle.m] 

README.NXBundle

The files in this directory consist of a simple example of creating a program
that dynamically loads in "bundles", which are basically directories that
contain loadable object code and any associated data that goes with it.
The NXBundle class should work much like NeXT's implimentation (give or take
a few bugs).  One addition is that if the setSystemLanguages: method is not
explicitly called or if it is called with a NULL language list, it looks for
the environment variable "LANGUAGES" which is a space separated list of
language preferences.

In order to use this example, you need to have gcc version 2.6.? or better
plus the libobjects library (available from cs.rochester.edu).

In order to do dynamic linking, 
you also need the dld library (from prep.ai.mit.edu) which only runs on
VAX (Ultrix), Sun 3(SunOS 3.4 and 4.0), SPARCstation (SunOS 4.0),
Sequent Symmetry(Dynix), and Atari ST computers. I know someone who is
trying to improve this, but I don't know when it will be finished.

To compile, edit the Makefile to suit your needs, then type make.

Here are some of the bugs that I know of (some of these will have to wait
for a re-write of dld):

[1] I still don't know how to find the Category structure that was
    loaded (this is apparently a local symbol that is not stored by dld),
    so this information is not returned in the callback 
    (objc-load.c (objc_find_symbols)).

[2] Possible bug in objc_find_symbols  if a loaded module name is a
    substring of an already loaded module name (will find classes for both
    modules). (objc-load.c (objc_find_symbols))

[3] Since we have to sort classes to find the principal class, there is
    an explicit limit of MAXCLASSES (currently 1024) classes in a bundle.
    (objc-load.c (objc_find_symbols))

[5] Won't return the full path to a resource if not given the full path when
    the bundle is initialized. (NXBundle.m (-initForDirectory:))

[6] Main bundle dir is the path to the executable.  Since most Unix's don't
    have the concept of an application bundle (*.app directory), perhaps we
    should also look in some other place for main bundle files (via an
    APPDIR environment variable, perhaps?) (NXBundle.m (+mainBundle))

[7] Doesn't handle shared libraries -- must compile main with -static on SPARCS
    (needs fix of dld?).

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.