discuss-gnustep
[Top][All Lists]
Advanced

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

[Mingw-users] HowTo: Deployment of GNUstep dependant application on Wind


From: Lloyd Dupont
Subject: [Mingw-users] HowTo: Deployment of GNUstep dependant application on Windows (by embedding GNUstep in your app).
Date: Fri, 15 Jul 2005 14:29:22 +1000

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:
http://wwwmain.gnustep.org/resources/documentation/User/GNUstep/README.MinGW

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 ;-)

reply via email to

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