gnustep-dev
[Top][All Lists]
Advanced

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

Re: Minimalist GNUstep possible?


From: Richard Frith-Macdonald
Subject: Re: Minimalist GNUstep possible?
Date: Sat, 19 Jun 2010 18:35:16 +0100

On 19 Jun 2010, at 16:18, Jonathan Wolf wrote:

> The idea is to try and "mimic" the native layout of each target
> platform (Windows, Linux, and Mac) while maintaining the ObjC runtime.
> App bundles will be appropriate for Mac, where as stand alone
> executables (and any relevant data) would be appropriate for Win/Nix.
> The idea is to try and keep the nature of the GNUstep layout (with the
> various folder hierarchy) restricted as much as possible.

I'm not sure why you even consider this an issue since, as far as I understand 
it from your emails, you are not interested in writing applications (ie using 
AppKit/gnustep-gui).
If you aren't building applications, GNUstep does not use App bundles anyway 
(though if you want to use other forms of bundles you can).
If you *are* building an application, you are presumably including resources 
like images... in which case you need those images somewhere, and all an app 
bundle is, is a directory wrapper to store resources in.
I'm not sure why you say 'stand alone executables (and any relevant data)'  
would be appropriate in Win/Nix but a bundle wouldn't ... since a bundle is 
just a collection of resources (ie the relevant data) you mention.

> I know I
> will probably get some fire for this, but again, the idea is to use
> ObjC for all three systems and use GNUstep for the Windows and Linux
> side (while keeping with Apple's stuff on the Mac side).

You might want to use GNUstep additions on the Mac side ... The default way 
that gnustep-base is built on Apple is to leave out the classes from the Apple 
Foundation, and just build the additional stuff into a shared library.


>> I think you underestimate the portability and compactness of "Foundation"
>> which is what you are looking for.
> 
> Oh not at all - I wasn't looking for compactness in terms of program
> size, but rather number of dependencies and number of file system
> hierarchy modifications.
> 
> For instance, when on Mac, one has a user Library folder and program
> specific Documents folder and the likes. While that is great for Mac,
> this is not the way my team would like to mimic the hierarchy in a
> Linux or Windows environment (keeping to a /usr/local/share in nix, or
> my documents in win - just for instance).

It's a single command-line argument when configuring gnustep-make to tell it 
what filesystem layout you want things put in.
eg. 'configure --with-layout-fhs'  to use the linux filesystem hierarchy 
standard

> The data files relevant to
> storing user preferences, etc., will still be maintained in an XML,
> but that will be (on Win/Nix) local to the program directory. This is
> more just an issue of trying to, again, mimic a native application to
> said system, keeping the "mess" to an absolute minimal, and looking
> like a native built application (with only Mac having the App bundle).

The NSUserDefaults system actually stores stuff as XML ... though that's an 
implementation detail which should not be relevant to the software.
And you can configure the location of the defaults information to be in the 
same directory as the executable (normally the home directory of the user is 
used though).
The NSUserDefaults class is actually flexible enough that it's easy to 
implement a combination of both if you want though ... you could leave the 
defaults database in the normal place (the users home directory) and create an 
extra defaults domain you keep as a file in the program directory, then set the 
order of the search list so that either the info from the program directory 
overrides user preferences or so that the user preferences override the ones 
configured fin the program directory.





reply via email to

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