Ignore:
Timestamp:
Oct 10, 2012, 10:11:10 AM (7 years ago)
Author:
djay
Message:

Add the capability to use a specific Python version by detecting if python-VERS-config exists or if python-config-VERS exists. Add NEED_STRCASESTR to nmake.opt for MapServer? support. Fix for the name of layer class on Unix/Windows?. Provide definition of strcasestr if and only if MapServer? was not activated.

Location:
trunk/zoo-project/zoo-kernel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/configure.ac

    r305 r370  
    175175        then
    176176                # PHP was not specified, so search within the current path
     177                PYTHONCFG_PATH=`which python${PYTHON_VERS}-config`
     178                if test -z "${PYTHONCFG_PATH}" ; then
     179                AC_PATH_PROG([PYTHONCONFIG], [python-config-${PYTHON_VERS}])
     180                else
    177181                AC_PATH_PROG([PYTHONCONFIG], [python${PYTHON_VERS}-config])
     182                fi
    178183        else
    179184                PYTHONCONFIG="$PYTHON_PATH/bin/python${PYTHON_VERS}-config"
  • trunk/zoo-project/zoo-kernel/nmake.opt

    r368 r370  
    1010
    1111!IFDEF MS_DIR
    12 MS_CFLAGS=-DUSE_MS -I$(MS_DIR)
     12MS_CFLAGS=-DUSE_MS -I$(MS_DIR) /DNEED_STRCASESTR
    1313MS_LDFLAGS=$(MS_DIR)/mapserver_i.lib
    1414MS_FILE=service_internal_ms.obj
  • trunk/zoo-project/zoo-kernel/service_internal_ms.c

    r366 r370  
    11#ifdef USE_MS
    2 
     2#ifndef WIN32
     3#define CLASS class
     4#else
     5#define CLASS _class
     6#endif
    37#include "service_internal_ms.h"
    48
     
    555559    if(msGrowLayerClasses(myLayer) == NULL)
    556560      return -1;
    557     if(initClass((myLayer->_class[myLayer->numclasses])) == -1)
     561    if(initClass((myLayer->CLASS[myLayer->numclasses])) == -1)
    558562      return -1;
    559     myLayer->_class[myLayer->numclasses]->type = myLayer->type;
    560     if(msGrowClassStyles(myLayer->_class[myLayer->numclasses]) == NULL)
     563    myLayer->CLASS[myLayer->numclasses]->type = myLayer->type;
     564    if(msGrowClassStyles(myLayer->CLASS[myLayer->numclasses]) == NULL)
    561565      return -1;
    562     if(initStyle(myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]) == -1)
     566    if(initStyle(myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]) == -1)
    563567      return -1;
    564568
     
    568572    tmpMap=getMap(output->content,"msStyle");
    569573    if(tmpMap!=NULL)
    570       msUpdateStyleFromString(myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles],tmpMap->value,0);
     574      msUpdateStyleFromString(myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles],tmpMap->value,0);
    571575    else{
    572576      /**
    573577       * Set style
    574578       */
    575       myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.red=125;
    576       myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.green=125;
    577       myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.blue=255;
    578       myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->outlinecolor.red=80;
    579       myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->outlinecolor.green=80;
    580       myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->outlinecolor.blue=80;
     579      myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.red=125;
     580      myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.green=125;
     581      myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.blue=255;
     582      myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->outlinecolor.red=80;
     583      myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->outlinecolor.green=80;
     584      myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->outlinecolor.blue=80;
    581585
    582586      /**
     
    584588       */
    585589      if(myLayer->type == MS_LAYER_POLYGON)
    586         myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->width=3;
     590        myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->width=3;
    587591      if(myLayer->type == MS_LAYER_LINE){
    588         myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->width=3;
    589         myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->outlinewidth=1.5;
     592        myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->width=3;
     593        myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->outlinewidth=1.5;
    590594      }
    591595      if(myLayer->type == MS_LAYER_POINT){
    592         myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->symbol=1;
    593         myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->size=15;
    594       }
    595 
    596     }
    597     myLayer->_class[myLayer->numclasses]->numstyles++;
     596        myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->symbol=1;
     597        myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->size=15;
     598      }
     599
     600    }
     601    myLayer->CLASS[myLayer->numclasses]->numstyles++;
    598602    myLayer->numclasses++;
    599603    m->layerorder[m->numlayers] = m->numlayers;
     
    795799            if(msGrowLayerClasses(myLayer) == NULL)
    796800              return -1;
    797             if(initClass((myLayer->_class[myLayer->numclasses])) == -1)
     801            if(initClass((myLayer->CLASS[myLayer->numclasses])) == -1)
    798802              return -1;
    799             myLayer->_class[myLayer->numclasses]->type = myLayer->type;
    800             if(msGrowClassStyles(myLayer->_class[myLayer->numclasses]) == NULL)
     803            myLayer->CLASS[myLayer->numclasses]->type = myLayer->type;
     804            if(msGrowClassStyles(myLayer->CLASS[myLayer->numclasses]) == NULL)
    801805              return -1;
    802             if(initStyle(myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]) == -1)
     806            if(initStyle(myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]) == -1)
    803807              return -1;
    804808           
     
    808812            char className[7];
    809813            sprintf(className,"class%d",i);
    810             myLayer->_class[myLayer->numclasses]->name=strdup(className);
     814            myLayer->CLASS[myLayer->numclasses]->name=strdup(className);
    811815           
    812816            /**
     
    818822            else
    819823              sprintf(expression,"([pixel]>=%.3f AND [pixel]<=%.3f)",cstep,cstep+interval);
    820             msLoadExpressionString(&myLayer->_class[myLayer->numclasses]->expression,expression);
     824            msLoadExpressionString(&myLayer->CLASS[myLayer->numclasses]->expression,expression);
    821825           
    822826            /**
    823827             * Set color
    824828             */
    825             myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.red=_tmpColors[i][0];
    826             myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.green=_tmpColors[i][1];
    827             myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.blue=_tmpColors[i][2];
     829            myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.red=_tmpColors[i][0];
     830            myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.green=_tmpColors[i][1];
     831            myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.blue=_tmpColors[i][2];
    828832            cstep+=interval;
    829             myLayer->_class[myLayer->numclasses]->numstyles++;
     833            myLayer->CLASS[myLayer->numclasses]->numstyles++;
    830834            myLayer->numclasses++;
    831835           
  • trunk/zoo-project/zoo-kernel/zoo_service_loader.c

    r368 r370  
    8787#ifdef WIN32
    8888extern "C" {
    89 __declspec(dllexport) char *strcasestr(char const *a, char const *b) {
    90     char *x=_strdup(a);
    91     char *y=_strdup(b);
    92 
    93     x=_strlwr(x);
    94     y=_strlwr(y);
    95     char *pos = strstr(x, y);
    96     char *ret = pos == NULL ? NULL : (char *)(a + (pos-x));
    97     free(x);
    98     free(y);
    99     return ret;
    100 }
     89  __declspec(dllexport) char *strcasestr(char const *a, char const *b)
     90#ifndef USE_MS
     91 {
     92  char *x=_strdup(a);
     93  char *y=_strdup(b);
     94 
     95  x=_strlwr(x);
     96  y=_strlwr(y);
     97  char *pos = strstr(x, y);
     98  char *ret = pos == NULL ? NULL : (char *)(a + (pos-x));
     99  free(x);
     100  free(y);
     101  return ret;
     102 };
     103#else
     104  ;
     105#endif
    101106}
    102107#endif
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png