< Day Day Up > |
How do you get MapScript? There are variety of methods, some easier than others. The common requirement for running MapScript is that the scripting language itself must be available. The header files for the language may also be required if building the MapScript modules from source code. 14.2.1. Building MapScript from Source CodeBuilding MapScript from source for each language isn't detailed here, but there is a common approach. To build MapScript for a language, support for that language must have been configured and built into MapServer itself when it was compiled. This sets up the various files in the MapScript language folders that are needed for the next step. The MapServer source code directory structure includes a folder called mapscript. This folder has subsequent folders for each language that has some form of MapScript support. The folder may have a Makefile that is ready to be used by the make command, or it may have some setup scripts. Running these produces MapScript modules or libraries (depending on the language), and the scripts can often be used to help install them too. For example, with Python, you build and then install MapScript by running: > python setup.py build > python setup.py install There are several other files and directories that are part of the Simplified Wrapper and Interface Generator (SWIG) environment. SWIG is used to port MapScript to certain languages. This is now the standard method for producing a MapScript extension for additional languages. If you are familiar with SWIG and want to write a mapscript_wrap.c file for a new language, your contributions would be more than welcome. For more information on SWIG, see http://www.swig.org. Compilation instructions are included in README files in the specific MapScript language folder. More information can be found in the MapScript and Reference Guides sections of the MapServer documentation page at http://mapserver.gis.umn.edu/doc.html. 14.2.2. Obtaining Binary Versions of MapScriptBinary versions of MapScript are also available, depending on the programming language. The best place to get some personal direction is from the MapServer mailing list. These sites distribute various forms of MapScript:
14.2.3. Getting HelpMany first-time MapScript users need some hand-holding to get started. The previous links and the MapServer mailing list are good places to go for support. This chapter will show some simple examples to help get you started. |
< Day Day Up > |