224 | | To be written soon ... |
| 224 | === Requirements === |
| 225 | |
| 226 | ZOO-Kernel on WIN32 platform requires the following for building: |
| 227 | |
| 228 | * OSGeo4W packages : Apache, gdal, Python |
| 229 | * libfcgi |
| 230 | * libcrypto, flex + bison (installed in a directory we call {{{TPATH}}}) |
| 231 | |
| 232 | To be able to access flex and bison tools, you should use the following command : |
| 233 | |
| 234 | {{{ |
| 235 | #!sh |
| 236 | set TPATH=c:\My\Install\Directory |
| 237 | set PATH=%PATH%;%TPATH%\bin |
| 238 | }}} |
| 239 | |
| 240 | To make sure that environnement variables are correctly set for compilation, use the following command : |
| 241 | |
| 242 | {{{ |
| 243 | #!sh |
| 244 | c:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat |
| 245 | }}} |
| 246 | |
| 247 | === libcgic === |
| 248 | |
| 249 | Make sure you get the file {{{C:\OSGeo4W\lib\libfcgi.lib}}} on your computer, then you can run the following commands to build the required libcgic: |
| 250 | |
| 251 | {{{ |
| 252 | #!sh |
| 253 | cd thirds/cgic206 |
| 254 | make |
| 255 | }}} |
| 256 | |
| 257 | === Build and deploy ZOO-Kernel === |
| 258 | |
| 259 | To build ZOO-Kernel you should first edit the nmake.opt file to set the following variables : |
| 260 | |
| 261 | * {{{LIBINTL_CPATH}}}: the libintl installation path |
| 262 | * {{{PYTHON_CPATH}}}: the python installation path |
| 263 | * {{{TPATH}}}: discussed [#Requirements before] |
| 264 | * {{{GEODIR}}}: OSGeo4W installation path |
| 265 | * {{{CFLAGS}}}: flags used at compilation time |
| 266 | * {{{LDFLAGS}}}: flags used at link time |
| 267 | |
| 268 | Then, run the following commands to build your own WIN32 ZOO-Kernel: |
| 269 | |
| 270 | {{{ |
| 271 | #!sh |
| 272 | cd zoo-kernel |
| 273 | nmake /f makefile.vc |
| 274 | }}} |
| 275 | |
| 276 | To make sure your build can run you need to copy it in the bin directory from the OSGeo4W installation path, then try to run it from command line: |
| 277 | |
| 278 | {{{ |
| 279 | #!sh |
| 280 | copy zoo_loader.cgi main.cfg c:\OSGeo4W\bin |
| 281 | cd c:\OSGeo4W\bin |
| 282 | .\zoo_loader.cgi "request=GetCapabilities&service=WPS" |
| 283 | }}} |
| 284 | |
| 285 | If everything went right running from command line, then you can run it from your browser and build services. |
| 286 | |
| 287 | === Build and deploy !ServicesProvider === |
| 288 | |
| 289 | Actually only few !ServiceProvider was tested on WIN32 platform. To compile a service provider called SP you should run the following commands: |
| 290 | |
| 291 | {{{ |
| 292 | #!sh |
| 293 | cd zoo-service\SP |
| 294 | nmake /f makefile.vc |
| 295 | }}} |
| 296 | |
| 297 | As this {{{makefile.vc}}} uses {{{nmake.opt}}} you modified earlier, it should succeed. |
| 298 | |
| 299 | Now you just need to copy files from the {{{cgi-env}}} directory into {{{c:\OSGeo4W\bin}}} to deploy your !ServiceProvider (should contain at least a {{{.zo}}} and a {{{.zcfg}}}). |