|
From: | Richard Frith-Macdonald |
Subject: | Re: Defaults for a minimal embedded GNUstep tool |
Date: | Mon, 6 Sep 2004 20:06:24 +0100 |
On 6 Sep 2004, at 19:31, Pablo Di Noto wrote:
Unless I'm misunderstanding, we are not looking at an issue of selectingoptions etc via defaults or environment variables here ... the idea is to have a standalone tool without the GNUstep system ...which means without things like timezone data, information on things likewhich unicode characters are considered to be uppercase letters, localised message text etc.Well, both of you are right in a sense.The tool works in its actual incarnation, which is a very early release. I may be hitting NSString issues later because of lack of character set definition. Not sure about that NSBundle complaint either.
My guess is that it's trying to load the gnustep-base library resources bundle.
On the other hand, for this particular case, I would prefer no external files whatsoever, since the tool will be called from init (and may be in the future be the init process itself...)
That's what I thought.
The program may be intended to operate in a particular set ofcircumstances where none of these things are required ... (indeed, Pablo says the program works ... which would seem to confirm that) in which caseit does not seem unreasonable to want to silence warnings about the fact that they are not available.My idea was to hardcode suitable defaults. I'm right now learning the NSDefault concept and GNUstep tool startup sequence in order to check my options (and make more specific questions...)
It's easy to use the registerDefaults: method to do that ...however, specifying hardcoded defaults is probably unnecessary (GNUstep usually works fine without setting any defaults) and does nothing to deal with the issue of missing resource files ... in fact I don't think any of the warning messages you reported were to do with missing defaults. The first two lines would be caused by the fact that there are no timezone files to load in ... so the system defaults to using the GMT timezone. The other two lines are probably just a failure to find the language resource files.
So far I'm a little bit confused about how my main() function is being overriden. GS_FAKE_MAIN is 0 into GSConfig.h;
main() is only overridden on systems where the only way to get the process arguments is by looking at the argc and argv arguments to main() ... many systems let NSProcessInfo get the information by other mechanisms, so on those main() is not redefined.
If you are having problems with this you might want to call [NSProcessInfo+initializeWithAarguments:count:environment:] at the start of main()
[Prev in Thread] | Current Thread | [Next in Thread] |