[659] | 1 | .. include:: <xhtml1-lat1.txt> |
---|
| 2 | .. include:: <xhtml1-symbol.txt> |
---|
| 3 | |
---|
| 4 | .. _install-onwindows: |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | Installation on Windows |trade| |
---|
| 8 | ==================== |
---|
| 9 | |
---|
[722] | 10 | Compile ZOO-Project from source |
---|
| 11 | ------------------------------- |
---|
[659] | 12 | |
---|
| 13 | .. warning:: |
---|
[722] | 14 | Ensure to first perform the :ref:`prerequisite steps |
---|
| 15 | <install-prereq>` before compiling the ZOO Kernel. |
---|
[659] | 16 | |
---|
[722] | 17 | The following steps are for use with the Microsoft Visual Studio |
---|
| 18 | compiler (and tested with MSVC 2010). |
---|
[659] | 19 | |
---|
[722] | 20 | 1. Make sure the gnuwin32 tools ``bison.exe`` and ``flex.exe`` are found |
---|
| 21 | in your path. You can download the GNUwin32 tools `here |
---|
| 22 | <http://www.zoo-project.org/dl/tool-win32.zip>`__. |
---|
[659] | 23 | |
---|
[722] | 24 | 2. Modify the ``nmake.opt`` file to point to your local libraries. Note |
---|
| 25 | that you can also use definition directly in the command line if |
---|
| 26 | you prefer. See :ref:`win_configure_options` for details about this |
---|
| 27 | options. |
---|
[659] | 28 | |
---|
| 29 | |
---|
| 30 | 3. Execute: |
---|
| 31 | |
---|
| 32 | :: |
---|
| 33 | |
---|
| 34 | nmake /f makefile.vc |
---|
| 35 | |
---|
[722] | 36 | 4. A file ``zoo_loader.cgi`` and ``libzoo_service.dll`` should be |
---|
| 37 | created. Note that if another file named |
---|
| 38 | ``zoo_loader.cgi.manifest`` is also created, you will have to run |
---|
| 39 | another command: |
---|
| 40 | |
---|
[659] | 41 | :: |
---|
| 42 | |
---|
| 43 | nmake /f makefile.vc embed-manifest |
---|
| 44 | |
---|
[722] | 45 | 5. Copy the files ``zoo_loader.cgi``, ``libzoo_service.dll`` and |
---|
| 46 | ``main.cfg`` into your cgi-bin directory. |
---|
[659] | 47 | |
---|
[722] | 48 | 6. Using the command prompt, test the ZOO-Kernel by executing the |
---|
| 49 | following command: |
---|
[659] | 50 | |
---|
| 51 | :: |
---|
| 52 | |
---|
| 53 | D:\ms4w\Apache\cgi-bin> zoo_loader.cgi |
---|
| 54 | |
---|
| 55 | which should display a message such as: |
---|
| 56 | |
---|
| 57 | :: |
---|
| 58 | |
---|
| 59 | Content-Type: text/xml; charset=utf-8 |
---|
| 60 | Status: 200 OK |
---|
| 61 | |
---|
| 62 | <?xml version="1.0" encoding="utf-8"?> |
---|
| 63 | <ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" xml:lang="en-US" version="1.1.0"> |
---|
| 64 | <ows:Exception exceptionCode="MissingParameterValue"> |
---|
| 65 | <ows:ExceptionText>Parameter <request> was not specified</ows:ExceptionText> |
---|
| 66 | </ows:Exception> |
---|
| 67 | </ows:ExceptionReport> |
---|
| 68 | |
---|
[722] | 69 | 7. Edit the ``main.cfg`` file so that it contains values describing |
---|
| 70 | your WPS service. An example of such a file running on Windows is: |
---|
[659] | 71 | |
---|
| 72 | :: |
---|
| 73 | |
---|
| 74 | [main] |
---|
| 75 | encoding = utf-8 |
---|
| 76 | version = 1.0.0 |
---|
| 77 | serverAddress = http://localhost/ |
---|
| 78 | lang = en-CA |
---|
| 79 | tmpPath=/ms4w/tmp/ms_tmp/ |
---|
| 80 | tmpUrl = /ms_tmp/ |
---|
| 81 | |
---|
| 82 | [identification] |
---|
| 83 | title = The Zoo WPS Development Server |
---|
| 84 | abstract = Development version of ZooWPS. See http://www.zoo-project.org |
---|
| 85 | fees = None |
---|
| 86 | accessConstraints = none |
---|
| 87 | keywords = WPS,GIS,buffer |
---|
| 88 | |
---|
| 89 | [provider] |
---|
| 90 | providerName=Gateway Geomatics |
---|
| 91 | providerSite=http://www.gatewaygeomatics.com |
---|
| 92 | individualName=Jeff McKenna |
---|
| 93 | positionName=Director |
---|
| 94 | role=Dev |
---|
| 95 | adressDeliveryPoint=1101 Blue Rocks Road |
---|
| 96 | addressCity=Lunenburg |
---|
| 97 | addressAdministrativeArea=False |
---|
| 98 | addressPostalCode=B0J 2C0 |
---|
| 99 | addressCountry=ca |
---|
| 100 | addressElectronicMailAddress=info@gatewaygeomatics.com |
---|
| 101 | phoneVoice=False |
---|
| 102 | phoneFacsimile=False |
---|
| 103 | |
---|
| 104 | 8. Open a web browser window, and execute a GetCapababilites request on your WPS service: http://localhost/cgi-bin/zoo_loader.cgi?request=GetCapabilities&service=WPS |
---|
| 105 | |
---|
| 106 | The response should be displayed in your browser, such as: |
---|
| 107 | |
---|
| 108 | :: |
---|
| 109 | |
---|
| 110 | <wps:Capabilities xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsGetCapabilities_response.xsd" service="WPS" xml:lang="en-US" version="1.0.0"> |
---|
| 111 | <ows:ServiceIdentification> |
---|
| 112 | <ows:Title>The Zoo WPS Development Server</ows:Title> |
---|
| 113 | <ows:Abstract> |
---|
| 114 | Development version of ZooWPS. See http://www.zoo-project.org |
---|
| 115 | </ows:Abstract> |
---|
| 116 | <ows:Keywords> |
---|
| 117 | <ows:Keyword>WPS</ows:Keyword> |
---|
| 118 | <ows:Keyword>GIS</ows:Keyword> |
---|
| 119 | <ows:Keyword>buffer</ows:Keyword> |
---|
| 120 | </ows:Keywords> |
---|
| 121 | <ows:ServiceType>WPS</ows:ServiceType> |
---|
| 122 | <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion> |
---|
| 123 | ... |
---|
| 124 | |
---|
[722] | 125 | |
---|
| 126 | .. _win_configure_options: |
---|
| 127 | |
---|
| 128 | Build options |
---|
| 129 | ............. |
---|
| 130 | |
---|
| 131 | Various build options can be set in the ``nmake.opt`` file to define |
---|
| 132 | the location of the built libraries you want to use to build your |
---|
| 133 | ZOO-Kernel. Some are optional and some are required, they are listed |
---|
| 134 | below exhaustively: |
---|
| 135 | |
---|
| 136 | .. contents:: |
---|
| 137 | :local: |
---|
| 138 | :depth: 1 |
---|
| 139 | :backlinks: top |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | gettext (Required) |
---|
| 143 | ****************** |
---|
| 144 | |
---|
| 145 | The location of the libintl (built when building gettext) should be |
---|
| 146 | specified by defining the ``INTL_DIR`` environment variable. It |
---|
| 147 | supposes that the header and the ``intl.lib`` file are available. |
---|
| 148 | |
---|
| 149 | So for instance, in case you build the gettext in |
---|
| 150 | ``\buildkit\srcs\gettext-0.14.6``, you may define the following before |
---|
| 151 | running ``nmake /f makefile.vc``: |
---|
| 152 | |
---|
| 153 | .. code:: |
---|
| 154 | |
---|
| 155 | set INTL_DIR=\buildkit\srcs\gettext-0.14.6\gettext-runtime\intl |
---|
| 156 | |
---|
| 157 | |
---|
| 158 | libCURL (Required) |
---|
| 159 | ****************** |
---|
| 160 | |
---|
| 161 | The location of the libCURL should be specified by defining |
---|
| 162 | the ``CURL_DIR`` environment variable. It supposes that there are 2 |
---|
| 163 | sub-directory ``include`` containing the libCURL header and ``lib`` |
---|
| 164 | which contains the ``libcurl.lib`` file. |
---|
| 165 | |
---|
| 166 | So for instance, in case you build the libCURL in |
---|
| 167 | ``\buildkit\srcs\curl-7.38.0``, you may define the following before |
---|
| 168 | running ``nmake /f makefile.vc``: |
---|
| 169 | |
---|
| 170 | .. code:: |
---|
| 171 | |
---|
| 172 | set CURL_DIR=\buildkit\srcs\curl-7.38.0\builds\libcurl-vc10-x86-release-dll-ssl-dll-zlib-dll-ipvs6-sspi |
---|
| 173 | |
---|
| 174 | |
---|
| 175 | libFCGI (Required) |
---|
| 176 | ****************** |
---|
| 177 | |
---|
| 178 | The location of the libFCGI should be specified by defining the |
---|
| 179 | ``FCGI_DIR`` environment variable. It supposes that there are 2 |
---|
| 180 | sub-directory ``include`` containing the FastCGI header and |
---|
| 181 | ``libfcgi/Release`` which contains the ``libfcgi.lib`` file. |
---|
| 182 | |
---|
| 183 | So for instance, in case you build the libXML2 library in |
---|
| 184 | ``\buildkit\srcs\fcgi-2.4.1``, you may define the following before |
---|
| 185 | running ``nmake /f makefile.vc``: |
---|
| 186 | |
---|
| 187 | .. code:: |
---|
| 188 | |
---|
| 189 | set FCGI_DIR=\buildkit\srcs\fcgi-2.41.1 |
---|
| 190 | |
---|
| 191 | libXML2 (Required) |
---|
| 192 | ****************** |
---|
| 193 | |
---|
| 194 | The location of the libXML2 should be specified by defining the |
---|
| 195 | ``XML2_DIR`` environment variable. It supposes that there are 2 |
---|
| 196 | sub-directory ``include`` containing the libXML2 header and |
---|
| 197 | ``win32\bin.msvc`` which contains the ``libxml2.lib`` file. |
---|
| 198 | |
---|
| 199 | So for instance, in case you build the libXML2 library in |
---|
| 200 | ``\buildkit\srcs\libxml2-2.9.0``, you may define the following before |
---|
| 201 | running ``nmake /f makefile.vc``: |
---|
| 202 | |
---|
| 203 | .. code:: |
---|
| 204 | |
---|
| 205 | set XML2_DIR=\buildkit\srcs\libxml2-2.9.0 |
---|
| 206 | |
---|
| 207 | OpenSSL (Required) |
---|
| 208 | ****************** |
---|
| 209 | |
---|
| 210 | The location of the OpenSSL library should be specified by defining |
---|
| 211 | the ``SSL_DIR`` environment variable. It supposes that there are 2 |
---|
| 212 | sub-directory ``inc32`` containing the header files and |
---|
| 213 | ``out32dll`` which contains the ``ssleay32.lib`` file. |
---|
| 214 | |
---|
| 215 | So for instance, in case you build the libXML2 library in |
---|
| 216 | ``\buildkit\srcs\openssl-1.0.2c``, you may define the following before |
---|
| 217 | running ``nmake /f makefile.vc``: |
---|
| 218 | |
---|
| 219 | .. code:: |
---|
| 220 | |
---|
| 221 | set SSL_DIR=\buildkit\srcs\openssl-1.0.2c |
---|
| 222 | |
---|
| 223 | GDAL (Required) |
---|
| 224 | ****************** |
---|
| 225 | |
---|
| 226 | The location of the GDAL library should be specified by defining |
---|
| 227 | the ``GDAL_DIR`` environment variable. It corresponds to the path |
---|
| 228 | where you uncompress and built GDAL, it supposes that you have the |
---|
| 229 | ``gdal_i.lib`` file available in this directory. |
---|
| 230 | |
---|
| 231 | So for instance, in case you build the libXML2 library in |
---|
| 232 | ``\buildkit\srcs\gdal-1.10.1``, you may define the following before |
---|
| 233 | running ``nmake /f makefile.vc``: |
---|
| 234 | |
---|
| 235 | .. code:: |
---|
| 236 | |
---|
| 237 | set GDAL_DIR=\buildkit\srcs\gdal-1.10.1 |
---|
| 238 | |
---|
| 239 | MapServer (Optional) |
---|
| 240 | ******************** |
---|
| 241 | |
---|
| 242 | The location of the MapServer library path should be specified by |
---|
| 243 | defining the ``MS_DIR`` environment variable. It corresponds to the |
---|
| 244 | path where you build MapServer on your system, this directory should |
---|
| 245 | contain the ``nmake.opt`` file used. |
---|
| 246 | |
---|
| 247 | So for instance, in case you build Python in |
---|
| 248 | ``\buildkit\srcs\mapserver-6.2.0``, you may define the following before |
---|
| 249 | running ``nmake /f makefile.vc``: |
---|
| 250 | |
---|
| 251 | .. code:: |
---|
| 252 | |
---|
| 253 | set MS_DIR=\buildkit\srcs\mapserver-6.2.0 |
---|
| 254 | |
---|
| 255 | |
---|
| 256 | Python (Optional) |
---|
| 257 | ***************** |
---|
| 258 | |
---|
| 259 | The location of the Python binaries path should be specified by |
---|
| 260 | defining the ``PY_DIR`` environment variable. It corresponds to the |
---|
| 261 | path where you build Python on your system. The location of the |
---|
| 262 | ``pythonXX.lib`` files should be specified by setting the |
---|
| 263 | ``PY_LIBRARY`` environment variable. |
---|
| 264 | |
---|
| 265 | So for instance, in case you build Python in |
---|
| 266 | ``\buildkit\srcs\Python-2.7``, you may define the following before |
---|
| 267 | running ``nmake /f makefile.vc``: |
---|
| 268 | |
---|
| 269 | .. code:: |
---|
| 270 | |
---|
| 271 | set PY_DIR=\buildkit\srcs\Python-2.7 |
---|
| 272 | set PY_LIBRARY=\buildkit\srcs\Python-2.7\PCBuild\python27.lib |
---|
| 273 | |
---|
| 274 | JavaScript (Optional) |
---|
| 275 | ********************* |
---|
| 276 | |
---|
| 277 | The location of libmozjs should be specified by defining the |
---|
| 278 | ``JS_DIR`` environment variable. It corresponds to the path where you |
---|
| 279 | build libmozjs on your system, it supposes that the header and |
---|
| 280 | the ``mozjs185-1.0.lib`` file are available in this directory. |
---|
| 281 | |
---|
| 282 | So for instance, in case you build libmozjs in |
---|
| 283 | ``\buildkit\srcs\js-1.8.5``, you may define the following before |
---|
| 284 | running ``nmake /f makefile.vc``: |
---|
| 285 | |
---|
| 286 | .. code:: |
---|
| 287 | |
---|
| 288 | set JS_DIR=\buildkit\srcs\js-1.8.5 |
---|
| 289 | |
---|
| 290 | PHP (Optional) |
---|
| 291 | ***************** |
---|
| 292 | |
---|
| 293 | The location of PHP should be specified by defining the ``PHP_DIR`` |
---|
| 294 | environment variable. It corresponds to the path where you build PHP |
---|
| 295 | on your system. The location of the ``php5embed.lib`` files should be |
---|
| 296 | specified by setting the ``PHP_LIB`` environment variable. |
---|
| 297 | |
---|
| 298 | So for instance, in case you build PHP in |
---|
| 299 | ``\buildkit\srcs\php-5.5.10``, you may define the following before |
---|
| 300 | running ``nmake /f makefile.vc``: |
---|
| 301 | |
---|
| 302 | .. code:: |
---|
| 303 | |
---|
| 304 | set PHP_DIR=\buildkit\srcs\php-5.5.10 |
---|
| 305 | set PHP_LIB=\buildkit\srcs\php-5.5.10\Release_TS\php5embed.lib |
---|
| 306 | |
---|
| 307 | Database backend (Optional) |
---|
| 308 | *************************** |
---|
| 309 | |
---|
| 310 | ZOO-Kernel can use a database backend to store ongoing status |
---|
| 311 | informations of running services, for activating this operation mode, |
---|
| 312 | you should define the evironment variable ``DB`` and set it to any |
---|
| 313 | value. So, to activate this option, you may use the following before |
---|
| 314 | running ``nmake /f makefile.vc``: |
---|
| 315 | |
---|
| 316 | .. code:: |
---|
| 317 | |
---|
| 318 | set DB=activated |
---|
| 319 | |
---|
| 320 | .. note:: |
---|
| 321 | To learn how to setup the corresponding database, please refer to |
---|
| 322 | :ref:`this section <zoo_create_db_backend>`. |
---|
| 323 | |
---|
| 324 | |
---|
| 325 | |
---|
| 326 | |
---|
[659] | 327 | Optionally Compile Individual Services |
---|
| 328 | ............................................................. |
---|
| 329 | |
---|
| 330 | An example could be the *OGR base-vect-ops* provider located in the ``zoo-project\zoo-services\ogr\base-vect-ops`` directory. |
---|
| 331 | |
---|
| 332 | 1. First edit the *makefile.vc* located in that directory, and execute: |
---|
| 333 | |
---|
| 334 | :: |
---|
| 335 | |
---|
| 336 | nmake /f makefile.vc |
---|
| 337 | |
---|
| 338 | Inside that same directory, the *ogr_service.zo* file should be created. |
---|
| 339 | |
---|
| 340 | 2. Copy all the files inside ``zoo-services\ogr\base-vect-ops\cgi-env`` into your ``cgi-bin`` directory |
---|
| 341 | |
---|
| 342 | 3. Test this service provider through the following URL: |
---|
| 343 | |
---|
| 344 | http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=Buffer&DataInputs=BufferDistance=1@datatype=interger;InputPolygon=Reference@xlink:href=http%3A%2F%2Fwww.zoo-project.org%3A8082%2Fgeoserver%2Fows%3FSERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dtopp%3Astates%26SRS%3DEPSG%3A4326%26FeatureID%3Dstates.15 |
---|
| 345 | |
---|
| 346 | The response displayed in your browser should contain: |
---|
| 347 | |
---|
| 348 | :: |
---|
| 349 | |
---|
| 350 | <wps:ProcessSucceeded>Service "Buffer" run successfully.</wps:ProcessSucceeded> |
---|
| 351 | |
---|