-------------------------------------------------------------------- README.WIN32 - Microsoft Visual C++ Build instructions for MapServer -------------------------------------------------------------------- -------------------------------------------------------------------- IMPORTANT - READ THIS FIRST: The Win32 build process is not very friendly for unexperienced users. So it is strongly recommended that you use one of the precompiled binaries available on the MapServer site: http://mapserver.gis.umn.edu/win32binaries.html There are precompiled Win32 binaries available for the last stable release and the latest nightly build and they include the most common options... so you shouldn't have to compile your own executables. If for some reason you still decide to compile Win32 binaries yourself, then don't do it unless you really know what you're doing... and hopefully the rest of this file contains some hints that may help you. Good Luck! -------------------------------------------------------------------- For the developers using MSVC++, a NMAKE makefile (Makefile.vc) to build the MapServer library and executable programs is included with the distribution. To build the package using the Makefile.vc and NMAKE: - Edit Makefile.vc to select (or deselect) optional components of the MapServer. Please read the notes below about each component before you move ahead with the compilation. - Open a DOS prompt window - Run the VCVARS32.BAT script to initialize the VC++ environment variables. VCVARS32.BAT is automatically generated by the MSVC++ install procedure and should be located in the BIN sub-directory of your MSVC++ installation. - Then start the build with: nmake /f Makefile.vc This will create "mapserv.exe" (the main MapServer CGI program), the other command-line utilities, and "mapserver.lib" that is used by the MapScript modules. -------------------------------------------------------------------- MapScript -------------------------------------------------------------------- To compile the various versions of MapScript (Perl, PHP, etc) first compile the main mapserver directory and then see the README files in the mapscript/perl or mapscript/php3 directory for specific instructions. -------------------------------------------------------------------- GD library -------------------------------------------------------------------- - MapServer uses the GD library from http://boutell.com/ and the Win32 makefiles are set by default to work with GD version 1.8.4 with the GIF support patch (see http://www.rime.com.au/gd/) If you are using a different version of GD, then it is very important to make sure that you update the -DUSE_GD_* flags in all the Makefile.vc. You'll have to compile your own GD library with the options you want, including Freetype since starting with MapServer version 3.5, Freetype is supported through the GD library. Here are some useful pointers: - The original GD library: http://boutell.com/gd/ - Patched GD library: http://www.rime.com.au/gd/ - libpng: http://www.libpng.org/pub/png/libpng.html - zlib: http://www.info-zip.org/pub/infozip/zlib/ - libjpeg: ftp://ftp.uu.net/graphics/jpeg/ - Freetype: http://www.freetype.org/download.html -------------------------------------------------------------------- REGEX library -------------------------------------------------------------------- - MapServer uses the REGEX library which is standard on all the Unix systems that I know of, but does not come with VC++. If the MapServer distribution did not include a copy of the REGEX library, then you can get a copy from: ftp://ftp.gnu.org/pub/gnu/regex/regex-0.12.tar.gz The default case in the Makefile.vc is set to compile with GNU regex-0.12 located in the "regex-0.12" directory. - If you are planning to compile the PHP3_MAPSCRIPT.DLL module, then it is important to make sure that the main Makefile.vc creates MAPSERVER.LIB with the same version of REGEX that PHP uses. See the notes in the main Makefile.vc about that. -------------------------------------------------------------------- Notes on libtiff build. -------------------------------------------------------------------- - LibTiff comes with a makefile.vc in the libtiff directory, so building it should be as simple as: cd tiff-v3.5.4/libtiff nmake /f makefile.vc - see also the libtiff installation procedures (tiff-v3.5.4/html/build.html) - the makefile refers to file fax3sm_winnt.obj. This file is not in the ./libtiff directory. To be able to build sucessfully, copy the file from the ./contrib/winnt directory (file is fax3sm.c) to your libtiff directory and rename it to fax3sm_winnt.c -------------------------------------------------------------------- Notes on Freetype build. -------------------------------------------------------------------- - You can use the Visual Workspace in freetype/lib/arch/win32 to build the library. - make sure the value of the -DUSE_GD_* flag in the gdft/Makefile.vc matches the version of GD that you are building with. - directory ./mapserver/gdft should not be compiled with DEBUG option -------------------------------------------------------------------- Notes on the proj module -------------------------------------------------------------------- - The Proj.4 (cartographic projection routines) is located at http://www.remotesensing.org/proj/ Note on the epsg files location and the nad directory : * there is an environnemnt variable PROJ_LIB_DIR that can be set to locate the directory where the epsg file is located * if you build this module, at the top of the makefile (./src/makefile.vc), you can set the PROJ_LIB variable and this setting will be used to locates the files. -------------------------------------------------------------------- Notes libwww : used to support WMS client connection -------------------------------------------------------------------- - the libaray is located at http://www.w3.org/Library/ Notes on how to build it using MSVC: - before starting please refer to http://www.w3.org/INSTALL.html#Windows - Get the source code from CVS - Get the latest MSVC makefiles - Do the "bootstrap mechanism" : (http://www.w3.org/Library/cvs.html#Boot). You will need a Perl module for this. - you can then compile by opening the libwww/windows/world.dsw workspace and do a batch build of the whole thing. other notes : I had to define #define WWW_MSWINDOWS 1 in wwwsys.h before compiling. Notes on mapserver's makefile.vc modifications : - flag to add : -DUSE_WMS_LYR - include : -I../Libwww/library/src -I../libwww/modules/expat/xmlparse - libararies : ../Libwww/bin/wwwcore.lib ../Libwww/bin/wwwapp.lib ../Libwww/bin/wwwinit.lib ../Libwww/bin/wwwutils.lib Installation : - The best way is to get a precomiled binaries from the site. There is an windows install available at : ftp://ftp.idm.ru/libwww/Libwww_V5.3.2.exe - copy the following dll to a location where dll's can be loaded (ex : c:/winnt/syetem32) : gnu_regex.dll xmlparse.dll xmltok.dll (these dlls should be in .libwww/library/external after the build or available in your install directory) - You also needs the following dll files. These file are installed in your system directory when you install Libwww : * wwwapp.dll * wwwcache.dll * wwwcore.dll * wwwdir.dll * wwwdll.dll * wwwfile.dll * wwwftp.dll * wwwgophe.dll * wwwhtml.dll * wwwhttp.dll * wwwinit.dll * wwwmime.dll * wwwmux.dll * wwwnews.dll * wwwstream.dll * wwwtelnt.dll * wwwtrans.dll * wwwutils.dll * wwwwais.dll * wwwxml.dll * wwwzip.dll ------------------------------------------------------------ Notes on GDAL ------------------------------------------------------------ - If you are compiling the GDAL library (http://gdal.velocet.ca/projects/opengis/) with the PNG support, make sure that the libpng that you use in mapserver is the same as the one used in GDAL. ---------------- $Id$ ----------------