Difference between revisions of "Deployment on Windows"

From GNUstepWiki
Jump to navigation Jump to search
(copied from Lloyds mail, slightly formatted)
 
(Language cleanup)
Line 1: Line 1:
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).
+
==Preparation of your MinGW GNUstep environment==
  
1st it is recommended you build GNUstep from CVS yourself by following these guidelines:
+
These directions seem to work but have been tested only on Lloyd Dupont's development machine so far - this has yet to be tested on a test machine without anything installed. (Please update this once someone's tested this!)
  
[http://wwwmain.gnustep.org/resources/documentation/User/GNUstep/README.MinGW README.MinGW]
+
First-off, it is recommended you build GNUstep from CVS yourself using [http://www.gnustep.org/resources/documentation/User/GNUstep/README.MinGW the MinGW README] or following the instructions for [[Installation on Windows]].
  
or here:
+
It's a relatively long but painless process.
  
[[Installation on Windows]]
+
Note: the installer "GNUstep-base-1.10.1-gui-0.9.4.exe" contains slightly buggy DLLs - please use a current CVS version!
  
it's a relatively long and painless process.
+
==Making sure that DLLs are available to your application==
(Note: this installer "GNUstep-base-1.10.1-gui-0.9.4.exe" contains slightly bugged dlls: use CVS)
 
  
 +
Once GNUstep is built, you'll need to do three things to deploy your application:
  
Okay, now you've got GNUstep build, all you need to deploy is 3 things:
+
1. Make sure that all the dependency DLLs that are installed in the MinGW GNUstep environment are in your application's directory or in the PATH (see [[Installation on Windows]] step 11 and 14: libintl, libiconv, etc)
  
1. all the dependency dll (step 11 & 14: libintl, libiconv, etc...),
+
2. Make sure that all the DLLs in <GNUstep>/System/Tools are in your application's directory or in the PATH
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
+
3. The content of <GNUstep>/System directory (with the exception of <GNUstep>/System/Tools) should be pointed to by one of the following environment variables:
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_SYSTEM_ROOT
Line 29: Line 23:
 
   GNUSTEP_LOCAL_ROOT
 
   GNUSTEP_LOCAL_ROOT
  
(have this 3 variables point to this unique directory to avoid all suprised)
+
Hint: make all three variables point to the same directory to avoid all suprises. You don't need System/Tools in these as you have already copied the DLLs.
(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:
+
The three variables are intended to support a more complex GNUstep environment than you may need for a single application deployement.
 +
 
 +
If you don't want to mess with system environment variables or want to have multiple (side by side) installations, you could set these variables at application startup time with:
  
 
   [NSProcessInfo initializeWithArguments: __argv
 
   [NSProcessInfo initializeWithArguments: __argv
Line 43: Line 37:
 
     NULL} ];
 
     NULL} ];
  
it's important to call this method early before other calls triggers other cache of (incorrect) environment variable.
+
It is important to call this method early before any other part of the application triggers caching of incorrect GNUstep environment variables.
 
 
(*) putenv might fail if, for some reason, the class NSProcessInfo has already been initialized, as it will cache the environment variables.
 
  
And voila!
+
Warning: simply using putenv might fail if, for some reason, the class NSProcessInfo has already been initialized - it will have cached the environment variables.
  
You could ship your GNUstep based application without the user having to know about or install GNUstep!
+
Voila! Your GNUstep-based application can now be shipped without the user having to know about or install GNUstep - and you don't have the risk of an untested version of GNUstep being loaded by your application either.
(and used your tested version of GNUstep as well).
 
  
 
Happy GSCoding ;-)
 
Happy GSCoding ;-)

Revision as of 14:02, 16 July 2005

Preparation of your MinGW GNUstep environment

These directions seem to work but have been tested only on Lloyd Dupont's development machine so far - this has yet to be tested on a test machine without anything installed. (Please update this once someone's tested this!)

First-off, it is recommended you build GNUstep from CVS yourself using the MinGW README or following the instructions for Installation on Windows.

It's a relatively long but painless process.

Note: the installer "GNUstep-base-1.10.1-gui-0.9.4.exe" contains slightly buggy DLLs - please use a current CVS version!

Making sure that DLLs are available to your application

Once GNUstep is built, you'll need to do three things to deploy your application:

1. Make sure that all the dependency DLLs that are installed in the MinGW GNUstep environment are in your application's directory or in the PATH (see Installation on Windows step 11 and 14: libintl, libiconv, etc)

2. Make sure that all the DLLs in <GNUstep>/System/Tools are in your application's directory or in the PATH

3. The content of <GNUstep>/System directory (with the exception of <GNUstep>/System/Tools) should be pointed to by one of the following environment variables:

 GNUSTEP_SYSTEM_ROOT
 GNUSTEP_NETWORK_ROOT
 GNUSTEP_LOCAL_ROOT

Hint: make all three variables point to the same directory to avoid all suprises. You don't need System/Tools in these as you have already copied the DLLs.

The three variables are intended to support a more complex GNUstep environment than you may need for a single application deployement.

If you don't want to mess with system environment variables or want to have multiple (side by side) installations, you could set these variables at application 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 is important to call this method early before any other part of the application triggers caching of incorrect GNUstep environment variables.

Warning: simply using putenv might fail if, for some reason, the class NSProcessInfo has already been initialized - it will have cached the environment variables.

Voila! Your GNUstep-based application can now be shipped without the user having to know about or install GNUstep - and you don't have the risk of an untested version of GNUstep being loaded by your application either.

Happy GSCoding ;-)


based on a mail from Lloyd Dupont