Deployment on Windows

From GNUstepWiki
Revision as of 00:23, 16 July 2005 by IOOI (talk | contribs) (copied from Lloyds mail, slightly formatted)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

These directions seems to work but have been tested only on my development machine so far (I have yet to test it on a test machine without anything installed).

1st it is recommended you build GNUstep from CVS yourself by following these guidelines:

README.MinGW

or here:

Installation on Windows

it's a relatively long and painless process. (Note: this installer "GNUstep-base-1.10.1-gui-0.9.4.exe" contains slightly bugged dlls: use CVS)


Okay, now you've got GNUstep build, all you need to deploy is 3 things:

1. all the dependency dll (step 11 & 14: libintl, libiconv, etc...), installed in MinGW should be in your app's dir or in the PATH

2. all the DLL in <GNUstep>/System/Tools should be in your app's dir or in the PATH

3. The content of <GNUstep>/System directory (with the exception of <GNUstep>/System/Tools) should be in some path, pointed to by these environment variables:

 GNUSTEP_SYSTEM_ROOT
 GNUSTEP_NETWORK_ROOT
 GNUSTEP_LOCAL_ROOT

(have this 3 variables point to this unique directory to avoid all suprised) (there is 3 variables for system install & fallback mechanism) (you don't need System/Tools as you already copied the DLL)

If you don't want to mess with system environment variable (or want to have multiple, side by side, installation) you could set them (*) at startup time with:

 [NSProcessInfo initializeWithArguments: __argv
                                  count: __ argc
                            environment: (char**){
   "GNUSTEP_SYSTEM_ROOT=C:\AppLocalGSPath",
   "GNUSTEP_NETWORK_ROOT=C:\AppLocalGSPath",
   "GNUSTEP_LOCAL_ROOT=C:\AppLocalGSPath",
   NULL} ];

it's important to call this method early before other calls triggers other cache of (incorrect) environment variable.

(*) putenv might fail if, for some reason, the class NSProcessInfo has already been initialized, as it will cache the environment variables.

And voila!

You could ship your GNUstep based application without the user having to know about or install GNUstep! (and used your tested version of GNUstep as well).

Happy GSCoding ;-)


based on a mail from Lloyd Dupont