[240] | 1 | .. _kernel-installation-windows: |
---|
| 2 | |
---|
| 3 | Windows |
---|
[271] | 4 | ======= |
---|
| 5 | |
---|
[323] | 6 | :Authors: Nicolas Bozon, Gérald Fenoy, Jeff McKenna |
---|
[314] | 7 | :Last Updated: $Date: 2011-08-11 17:11:51 +0000 (Thu, 11 Aug 2011) $ |
---|
[240] | 8 | |
---|
| 9 | .. contents:: Table of Contents |
---|
| 10 | :depth: 2 |
---|
| 11 | :backlinks: top |
---|
| 12 | |
---|
| 13 | Using OSGeo4W |
---|
| 14 | ------------- |
---|
| 15 | |
---|
| 16 | Install OSGeo4W |
---|
| 17 | *************** |
---|
| 18 | |
---|
| 19 | Download the OSGeo4W installer from http://trac.osgeo.org/osgeo4w/, and install it with all the dependencies needed by your |
---|
| 20 | services (GDAL/OGR for example). The following libs are required: FastCGI, libxml, Python, cURL. |
---|
| 21 | |
---|
| 22 | Install other tools and libraries |
---|
| 23 | ********************************* |
---|
| 24 | |
---|
| 25 | After installing OSGeo4W on your platform you'll need more GNU tools and libraries. `This package <http://www.zoo-project.org/dl/tool-win32.zip>`__ |
---|
| 26 | contains full dependencies required to compile on WIN32 platform and this one contains `full runtime dependencies to place <http://www.zoo-project.org/dl/zoo-runtime.zip>`__ |
---|
| 27 | in your c:\OSGeo4W\bin. |
---|
| 28 | |
---|
| 29 | Download and Install ZOO Kernel |
---|
| 30 | ******************************* |
---|
| 31 | |
---|
| 32 | Download the `binary version <http://www.zoo-project.org/dl/zoo_loader.cgi>`__ of the ZOO Kernel for WIN32 then place it in the |
---|
| 33 | ``C:\OSGeo4W\bin`` directory. Don't forget to place a ``main.cfg`` file in the same directory, you can use a modified copy of |
---|
| 34 | `this file <http://www.zoo-project.org/trac/browser/trunk/zoo-kernel/main.cfg>`__. |
---|
| 35 | |
---|
| 36 | Deploy ZOO Services Providers |
---|
| 37 | ***************************** |
---|
| 38 | |
---|
| 39 | Your can use the binary version of the OGR Services Provider available from `here <http://www.zoo-project.org/dl/zoo-services-win32.zip>`__. |
---|
| 40 | Then place the two libraries with their respective .zcfg files in your local ``C:\OSGeo4W\bin`` directory. |
---|
| 41 | |
---|
| 42 | Testing |
---|
| 43 | ******* |
---|
| 44 | |
---|
| 45 | Now you should be able to query your local ZOO Kernel. |
---|
| 46 | |
---|
| 47 | Compiling Using Your Own Libraries |
---|
| 48 | ---------------------------------- |
---|
| 49 | |
---|
[241] | 50 | .. note:: |
---|
| 51 | You must be sure to perform the :ref:`prerequisite steps <kernel-installation-prereq>` before compiling the ZOO Kernel. |
---|
| 52 | |
---|
[240] | 53 | The following steps are for use with the Microsoft Visual Studio compiler (and tested with MSVC 2008). |
---|
| 54 | |
---|
| 55 | 1. Make sure the gnuwin32 tools ``bison.exe`` and ``flex.exe`` are found in your path. You can download the GNUwin32 tools `here <http://www.zoo-project.org/dl/tool-win32.zip>`__. |
---|
| 56 | |
---|
| 57 | 2. Modify the file ``zoo-project\zoo-kernel\nmake.opt`` to point to your local libraries. You can find a modified nmake.opt that points to local libs `here <http://www.zoo-project.org/trac/attachment/ticket/27/nmake.opt>`__. |
---|
| 58 | You can also find a modified ``zoo-project\zoo-kernel\makefile.vc`` file `here <http://www.zoo-project.org/trac/attachment/ticket/27/makefile.vc>`__. |
---|
| 59 | |
---|
| 60 | 3. Execute: |
---|
| 61 | |
---|
| 62 | :: |
---|
| 63 | |
---|
| 64 | nmake /f makefile.vc |
---|
| 65 | |
---|
| 66 | 4. A file ``zoo_loader.cgi`` should be created. Note that if another file named ``zoo_loader.cgi.manifest`` is also created, you |
---|
| 67 | will have to run another command: |
---|
| 68 | |
---|
| 69 | :: |
---|
| 70 | |
---|
| 71 | nmake /f makefile.vc embed-manifest |
---|
| 72 | |
---|
| 73 | 5. Copy the files ``zoo_loader.cgi`` and ``main.cfg`` into your cgi-bin directory. |
---|
| 74 | |
---|
| 75 | 6. Using the command prompt, test the zoo-kernel by executing the following command: |
---|
| 76 | |
---|
| 77 | :: |
---|
| 78 | |
---|
| 79 | D:\ms4w\Apache\cgi-bin> zoo_loader.cgi |
---|
| 80 | |
---|
| 81 | which should display a message such as: |
---|
| 82 | |
---|
| 83 | :: |
---|
| 84 | |
---|
| 85 | Content-Type: text/xml; charset=utf-8 |
---|
| 86 | Status: 200 OK |
---|
| 87 | |
---|
| 88 | <?xml version="1.0" encoding="utf-8"?> |
---|
| 89 | <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"> |
---|
| 90 | <ows:Exception exceptionCode="MissingParameterValue"> |
---|
| 91 | <ows:ExceptionText>Parameter <request> was not specified</ows:ExceptionText> |
---|
| 92 | </ows:Exception> |
---|
| 93 | </ows:ExceptionReport> |
---|
| 94 | |
---|
| 95 | 7. Edit the file ``cgi-bin/main.cfg`` so that it contains values describing your WPS service. An example of such |
---|
| 96 | a file running on Windows is: |
---|
| 97 | |
---|
| 98 | :: |
---|
| 99 | |
---|
| 100 | [main] |
---|
| 101 | encoding = utf-8 |
---|
| 102 | version = 1.0.0 |
---|
| 103 | serverAddress = http://localhost/ |
---|
| 104 | lang = en-CA |
---|
| 105 | tmpPath=/ms4w/tmp/ms_tmp/ |
---|
| 106 | tmpUrl = /ms_tmp/ |
---|
| 107 | |
---|
| 108 | [identification] |
---|
| 109 | title = The Zoo WPS Development Server |
---|
| 110 | abstract = Development version of ZooWPS. See http://www.zoo-project.org |
---|
| 111 | fees = None |
---|
| 112 | accessConstraints = none |
---|
| 113 | keywords = WPS,GIS,buffer |
---|
| 114 | |
---|
| 115 | [provider] |
---|
| 116 | providerName=Gateway Geomatics |
---|
| 117 | providerSite=http://www.gatewaygeomatics.com |
---|
| 118 | individualName=Jeff McKenna |
---|
| 119 | positionName=Director |
---|
| 120 | role=Dev |
---|
| 121 | adressDeliveryPoint=1101 Blue Rocks Road |
---|
| 122 | addressCity=Lunenburg |
---|
| 123 | addressAdministrativeArea=False |
---|
| 124 | addressPostalCode=B0J 2C0 |
---|
| 125 | addressCountry=ca |
---|
| 126 | addressElectronicMailAddress=info@gatewaygeomatics.com |
---|
| 127 | phoneVoice=False |
---|
| 128 | phoneFacsimile=False |
---|
| 129 | |
---|
| 130 | 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 |
---|
| 131 | |
---|
| 132 | The response should be displayed in your browser, such as: |
---|
| 133 | |
---|
| 134 | :: |
---|
| 135 | |
---|
| 136 | <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"> |
---|
| 137 | <ows:ServiceIdentification> |
---|
| 138 | <ows:Title>The Zoo WPS Development Server</ows:Title> |
---|
| 139 | <ows:Abstract> |
---|
| 140 | Development version of ZooWPS. See http://www.zoo-project.org |
---|
| 141 | </ows:Abstract> |
---|
| 142 | <ows:Keywords> |
---|
| 143 | <ows:Keyword>WPS</ows:Keyword> |
---|
| 144 | <ows:Keyword>GIS</ows:Keyword> |
---|
| 145 | <ows:Keyword>buffer</ows:Keyword> |
---|
| 146 | </ows:Keywords> |
---|
| 147 | <ows:ServiceType>WPS</ows:ServiceType> |
---|
| 148 | <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion> |
---|
| 149 | ... |
---|
| 150 | |
---|
| 151 | Optionally Compile Individual Services |
---|
| 152 | ************************************** |
---|
| 153 | |
---|
| 154 | An example could be the ``OGR base-vect-ops`` provider in the ``zoo-project\zoo-services\ogr\base-vect-ops`` directory. |
---|
| 155 | |
---|
| 156 | 1. Edit the makefile.vc located in that directory, and execute: |
---|
| 157 | |
---|
| 158 | :: |
---|
| 159 | |
---|
| 160 | nmake /f makefile.vc |
---|
| 161 | |
---|
| 162 | Inside that same directory, the file ``cgi-env\ogr_service.zo`` should be created. |
---|
| 163 | |
---|
| 164 | 2. Copy all of the files inside ``zoo-services\ogr\base-vect-ops\cgi-env`` into your cgi-bin directory |
---|
| 165 | |
---|
| 166 | 3. Test this service provider through the following URL: |
---|
| 167 | |
---|
| 168 | 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 |
---|
| 169 | |
---|
| 170 | The response displayed in your browser should contain: |
---|
| 171 | |
---|
| 172 | :: |
---|
| 173 | |
---|
| 174 | <wps:ProcessSucceeded>Service "Buffer" run successfully.</wps:ProcessSucceeded> |
---|
| 175 | |
---|