discuss-gnustep
[Top][All Lists]
Advanced

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

Re: deployment issues on windows


From: Sheldon Gill
Subject: Re: deployment issues on windows
Date: Thu, 14 Jul 2005 16:23:28 +0800
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Lloyd Dupont wrote:

OK, I know, I have the source....
Anyway let me explain the problem and maybe someone could show me a quick fix. It seems that all GNUstep based application need to be deployed is GNUstep's DLLs, plus to set the environment variable:
GNUSTEP_SYSTEM_ROOT
to point to a directory containing the content of <GNUstep>/System
so far so good.

This isn't the whole story:
a) GNUstep supports a configuration file, so you could have built to look for the conf file in the same dir as the app. b) GNUstep supports reading the ROOT from the registry. Have your installer set it up properly.

Now I'm on windows, remember! and I don't want to mess with the user's environment variable or use (disgusting) launching script (you know, these bat file or 'special' shortcuts), etc.. I just want to click on my application's exe (with a nice Icon) and here you go, it just runs! I was thinking to simply have a call to putenv() at the start of my application which setup a correct value for GNUSTEP_SYSTEM_ROOT. However this is not reliable (i.e. it sometimes work, sometimes not ;-( yeah, I know, sometimes...).

Is the putenv() before *all* GS code?

Part of the problem, I believe, is that environment variable are cached when the NSProcessInfo class is initialized (hence change to them at later date are useless). Now I wonder how to fix that without breaking anything (you know, I'm new to that code, etc.....)

Edit NSPathUtilities.m to use Win32NSStringFromEnvironmentVariable() will make it read directly from the environment block. I don't think it'll solve your problem, though. Paths are initialised pretty early.

A better solution would be to write an app loader:
   1) putenv(), whatever other set up you want
   2) exec or spawn MindMap.exe which is in the same dir

That way your GNUstep app will always have the right environment at startup and you don't have to worry.


Regards,
Sheldon




reply via email to

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