How to Build X/Win32 and Win32e GrADS Maintained by Arlindo da Silva dasilva@alum.mit.edu GrADS V1.8 Lat Update: December 11, 2002 These notes are specific of GrADS v1.8. As of this writing, the GrADS sources are being instrumented with autoconf and the build mechanism may change a little for v1.9. At this point there 2 versions of Win32 GrADS which are built with cygwin and the same suplibs: X/Win32 GrADS: GrADS is linked against the XFree86 X11R6 client libs provided by cgwin. This version requires an X Server to run. Win32e: A native version which does not require an X server to run. This is built around a X11R5 (yes, ancient X11 Release 5) emulation layer built on top of the GRX library. This is the same code I used for the MSDOS builds (PC/X11e GrADS), with additional patches for Win32. I've been maintainig this code for the purpose of building GrADS on the PC. 1) Install Cygwin from http://cygwin.com. Please notice: a) Because the DODS supplibs have been built with g++-2 you will need to manually select this during cygwin setup. Your other option is to rebuild the DODS library with the default g++ (version 3), a somewhat involved process. Skip this if don't need DODS capabilities. b) You must also select the XFree86 for the client X11R6 libraries. Skip this if you are only building Win32e. 2) Download from ftp://dao.gsfc.nasa.gov/pub/uwm_coads/grads/build or ftp://grads.iges.org/grads/Supplibs/1.8/lib the following files: gradssup_cygwin1.tar.gz (Supplis) pc-dist.tar.gz (auxiliary files for PCGrADS - must have!) NOTE: The X11R5 emulation libraries have been integrated into the supplib directory. If you would like to have the source code download this file as well: xlibemu32.tar.gz 3) Start Cygwin; by default this will give you a bash shell. Enter all subsequent commands from this shell (or /bin/tcsh if you wish). 4) Create a GrADS working directory and untar supplibs/dist package/sources: mkdir $HOME/GRADS (for example) cd $HOME/GRADS tar xvfz gradssup_cygwin1.tar.gz tar xvfz pc-dist.tar.gz 5) Obtain GrADS sources from CVS: cd $HOME/GRADS cvs -d :pserver:anonymous@cola8.iges.org:/var/homes/cvs co -r branch-1-8 -d src180 grads-src 6) To build and prepare distribution: cd $HOME/GRADS/src180 do_all.sh -arch=$mach w32_dist.csh $mach where $mach is "win32" (for X/Win32 GrADS) or "win32e" (for Win32e GrADS). Binaries, including frontends, will be installed under $HOME/GRADS/pc-dist/$mach At this point you can tar-up the whole pc-dit/ subdirectory and move it to a directory of your choice. Because of the front-end mechanism, you do not need to set any environment variable (GADDIR, etc), with the exception perhaps of your path to include the grads bin directory. The front-end code detects where it sits and set all these env variables accordingly. If you would like to learn more about these front-end code, take a look at the source code under the supplib directory: win32/frontend/win32run.c While X/Win32 binaries can run from the DOS console much like on Unix, the frontend only saves you the trouble of setting the environment variables. With Win32e is another story, as it must run under rxvt (it needs ptty), and the environment variable GRXFONT must be set. 7) For preparing the SETUPE.EXE installation I've been using the freeware EZINSTALL, available from http://www.soft9000.com/ezinstall.html This is not essential, but it saves me the trouble of having to answer e-mail with installation questions. Good Luck, Arlindo