Ignore:
Timestamp:
Jan 6, 2014, 11:09:29 AM (11 years ago)
Author:
djay
Message:

Small fixes for building on windows platform.

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

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/makefile.vc

    r444 r451  
    66#
    77
    8 !IF DEFINED(MS_DIR)
    9 MS_BASE=$(MS_DIR)
    10 !INCLUDE $(MS_DIR)\nmake.opt
    11 !ENDIF
    128!INCLUDE nmake.opt
    139
  • trunk/zoo-project/zoo-kernel/nmake.opt

    r444 r451  
    22CC=cl $(CFLAGS)
    33CPP=cl /TP $(CFLAGS)
     4
     5!IF DEFINED(MS_DIR)
     6MS_BASE=$(MS_DIR)
     7!INCLUDE $(MS_DIR)\nmake.opt
     8!ENDIF
    49
    510!IFDEF JS_DIR
     
    3641PYTHON_CPATH=$(PY_DIR)
    3742
    38 CFLAGS=$(MS_DEFS) $(INCLUDES) $(CFLAGS1) /nologo /MD /W3 /EHsc /Ox /D_CRT_SECURE_NO_WARNINGS /DWIN32 $(CJFLAGS) -I$(ZOOK_DIR) -I./ $(JAVA_CFLAGS) $(MS_CFLAGS) -I$(TROOT)\..\..\thirds\dirent-win32 -I$(INTL_DIR) -I$(CURL_DIR)\include -I$(XML2_DIR)\include -I$(GDAL_DIR)\port $(JS_CFLAGS) -I$(GDAL_DIR)\ogr -I$(GDAL_DIR)\gcore -I$(GD_DIR) -I$(ICONV_DIR) -I$(TROOT)\..\..\thirds\include -I$(TROOT)\..\..\thirds\cgic206 -I$(PYTHON_CPATH)\include -I$(SSL_DIR)/inc32 -I$(FCGI_DIR)\include $(PY_CFLAGS) -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
     43CFLAGS=/traceback  $(MS_DEFS) $(INCLUDES) $(CFLAGS1) /nologo /MD /W3 /EHsc /Ox /D_CRT_SECURE_NO_WARNINGS /DWIN32 $(CJFLAGS) -I$(ZOOK_DIR) -I./ $(JAVA_CFLAGS) $(MS_CFLAGS) -I$(TROOT)\..\..\thirds\dirent-win32 -I$(INTL_DIR) -I$(CURL_DIR)\include -I$(XML2_DIR)\include -I$(GDAL_DIR)\port $(JS_CFLAGS) -I$(GDAL_DIR)\ogr -I$(GDAL_DIR)\gcore -I$(GD_DIR) -I$(ICONV_DIR) -I$(TROOT)\..\..\thirds\include -I$(TROOT)\..\..\thirds\cgic206 -I$(PYTHON_CPATH)\include -I$(SSL_DIR)/inc32 -I$(FCGI_DIR)\include $(PY_CFLAGS) -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
    3944
    4045LDFLAGSCGI=$(TROOT)/../../thirds/cgic206/libcgic.lib
  • trunk/zoo-project/zoo-kernel/service_internal.c

    r449 r451  
    26102610    fcontent[res.nDataLen]=0;
    26112611    fsize=res.nDataLen;
    2612     mimeType=res.mimeType;
     2612    mimeType=(char*)res.mimeType;
    26132613  }
    26142614  if(fsize==0){
  • trunk/zoo-project/zoo-kernel/service_internal_ms.c

    r434 r451  
    211211  map* msSrs=NULL;
    212212  hSRS = OSRNewSpatialReference(NULL);
    213   if( pszProjection!=NULL && strlen(pszProjection)>1 &&
    214       OSRImportFromWkt( hSRS, &pszProjection ) == CE_None ){
    215     char *proj4Str=NULL;
    216     if(OSRGetAuthorityName(hSRS,NULL)!=NULL &&
    217        OSRGetAuthorityCode(hSRS,NULL)!=NULL){
    218       char tmpSrs[20];
    219       sprintf(tmpSrs,"%s:%s",
    220               OSRGetAuthorityName(hSRS,NULL),OSRGetAuthorityCode(hSRS,NULL));
    221       msLoadProjectionStringEPSG(&m->projection,tmpSrs);
    222       msLoadProjectionStringEPSG(&myLayer->projection,tmpSrs);
    223      
    224       char tmpSrss[256];
    225       sprintf(tmpSrss,"EPSG:4326 EPSG:900913 %s",tmpSrs);
    226 
    227       msInsertHashTable(&(m->web.metadata), "ows_srs", tmpSrss);
    228       msInsertHashTable(&(myLayer->metadata), "ows_srs", tmpSrss);
    229 
    230 #ifdef DEBUGMS
    231       fprintf(stderr,"isGeo %b\n\n",OSRIsGeographic(hSRS)==TRUE);
    232 #endif
    233       if(output!=NULL){
    234         if(OSRIsGeographic(hSRS)==TRUE)
    235           addToMap(output->content,"crs_isGeographic","true");
    236         else
    237           addToMap(output->content,"crs_isGeographic","false");
    238         addToMap(output->content,"crs",tmpSrs);
    239       }
    240     }
    241     else{
    242       OSRExportToProj4(hSRS,&proj4Str);
    243       if(proj4Str!=NULL){
    244 #ifdef DEBUGMS
    245         fprintf(stderr,"PROJ (%s)\n",proj4Str);
    246 #endif
    247         msLoadProjectionString(&(m->projection),proj4Str);
    248         msLoadProjectionString(&(myLayer->projection),proj4Str);
    249         if(output!=NULL){
     213  if( pszProjection!=NULL && strlen(pszProjection)>1){
     214    if(OSRImportFromWkt( hSRS, &pszProjection ) == CE_None ){
     215      char *proj4Str=NULL;
     216      if(OSRGetAuthorityName(hSRS,NULL)!=NULL &&
     217         OSRGetAuthorityCode(hSRS,NULL)!=NULL){
     218        char tmpSrs[20];
     219        sprintf(tmpSrs,"%s:%s",
     220                OSRGetAuthorityName(hSRS,NULL),OSRGetAuthorityCode(hSRS,NULL));
     221        msLoadProjectionStringEPSG(&m->projection,tmpSrs);
     222        msLoadProjectionStringEPSG(&myLayer->projection,tmpSrs);
     223       
     224        char tmpSrss[256];
     225        sprintf(tmpSrss,"EPSG:4326 EPSG:900913 %s",tmpSrs);
     226       
     227        msInsertHashTable(&(m->web.metadata), "ows_srs", tmpSrss);
     228        msInsertHashTable(&(myLayer->metadata), "ows_srs", tmpSrss);
     229       
     230#ifdef DEBUGMS
     231        fprintf(stderr,"isGeo %b\n\n",OSRIsGeographic(hSRS)==TRUE);
     232#endif
     233        if(output!=NULL){
    250234          if(OSRIsGeographic(hSRS)==TRUE)
    251235            addToMap(output->content,"crs_isGeographic","true");
    252236          else
    253237            addToMap(output->content,"crs_isGeographic","false");
     238          addToMap(output->content,"crs",tmpSrs);
    254239        }
    255240      }
    256241      else{
    257         msLoadProjectionStringEPSG(&m->projection,"EPSG:4326");
    258         msLoadProjectionStringEPSG(&myLayer->projection,"EPSG:4326");
     242        OSRExportToProj4(hSRS,&proj4Str);
     243        fprintf(stderr,"Debug WKT: %s \n",proj4Str);
     244        if(proj4Str!=NULL){
     245#ifdef DEBUGMS
     246          fprintf(stderr,"PROJ (%s)\n",proj4Str);
     247#endif
     248          msLoadProjectionString(&(m->projection),proj4Str);
     249          msLoadProjectionString(&(myLayer->projection),proj4Str);
     250          if(output!=NULL){
     251            if(OSRIsGeographic(hSRS)==TRUE)
     252              addToMap(output->content,"crs_isGeographic","true");
     253            else
     254              addToMap(output->content,"crs_isGeographic","false");
     255          }
     256        }
     257        else{
     258          msLoadProjectionStringEPSG(&m->projection,"EPSG:4326");
     259          msLoadProjectionStringEPSG(&myLayer->projection,"EPSG:4326");
     260          if(output!=NULL){
     261            addToMap(output->content,"crs_isGeographic","true");
     262          }
     263        }
    259264        if(output!=NULL){
    260           addToMap(output->content,"crs_isGeographic","true");
     265          addToMap(output->content,"crs","EPSG:4326");
     266          addToMap(output->content,"real_extent","true");
    261267        }
     268        msInsertHashTable(&(m->web.metadata),"ows_srs", "EPSG:4326 EPSG:900913");
     269        msInsertHashTable(&(myLayer->metadata),"ows_srs","EPSG:4326 EPSG:900913");
    262270      }
    263       if(output!=NULL){
    264         addToMap(output->content,"crs","EPSG:4326");
    265         addToMap(output->content,"real_extent","true");
    266       }
    267       msInsertHashTable(&(m->web.metadata),"ows_srs", "EPSG:4326 EPSG:900913");
    268       msInsertHashTable(&(myLayer->metadata),"ows_srs","EPSG:4326 EPSG:900913");
    269 
    270 
    271271    }
    272272  }
     
    684684  }
    685685#ifdef DEBUGMS
    686     fprintf(stderr,"Accessing the DataSource %s %d\n",pszFilename,__LINE__);
     686  fprintf(stderr,"Accessing the DataSource %s %d\n",pszFilename,__LINE__);
    687687#endif
    688688
     
    696696    return -1;
    697697  }
     698  m->layers[m->numlayers]->index=m->numlayers;
    698699
    699700  layerObj* myLayer=m->layers[m->numlayers];
     
    714715  if(tmpMap!=NULL)
    715716    abstract=tmpMap->value;
     717
    716718  msInsertHashTable(&(myLayer->metadata), "ows_label", title);
    717719  msInsertHashTable(&(myLayer->metadata), "ows_title", title);
  • trunk/zoo-project/zoo-kernel/service_internal_python.c

    r411 r451  
    113113
    114114int zoo_python_support(maps** main_conf,map* request,service* s,maps **real_inputs,maps **real_outputs){
     115  char *pythonpath;
     116  char *python_path;
    115117  maps* m=*main_conf;
    116118  maps* inputs=*real_inputs;
     
    119121  char *ntmp=tmp0->value;
    120122  map* tmp=NULL;
     123  int hasToClean=0;
    121124  tmp=getMapFromMaps(*main_conf,"env","PYTHONPATH");
    122   char *python_path;
    123125#ifdef DEBUG
    124126  fprintf(stderr,"PYTHON SUPPORT \n");
    125127#endif
    126   fflush(stderr);
    127128  if(tmp!=NULL){
    128129#ifdef DEBUG
     
    131132    python_path=(char*)malloc((strlen(tmp->value))*sizeof(char));
    132133    sprintf(python_path,"%s",tmp->value);
     134    hasToClean=1;
    133135  }
    134136  else{
    135     python_path=strdup(".");
     137    python_path=".";
    136138  }
    137139  tmp=NULL;
    138140  tmp=getMap(request,"metapath");
    139   char *pythonpath;//=(char*)malloc((1+strlen(python_path)+2048)*sizeof(char));
    140141  if(tmp!=NULL && strcmp(tmp->value,"")!=0){
    141142    pythonpath=(char*)malloc((4+strlen(python_path)+strlen(ntmp)+strlen(tmp->value))*sizeof(char));
    142143#ifdef WIN32
    143     sprintf(pythonpath,"%s/%s/;%s",ntmp,tmp->value,python_path);
    144 #else
    145     sprintf(pythonpath,"%s/%s/:%s",ntmp,tmp->value,python_path);
     144  sprintf(pythonpath,"%s/%s/;%s",ntmp,tmp->value,python_path);
     145#else
     146  sprintf(pythonpath,"%s/%s/:%s",ntmp,tmp->value,python_path);
    146147#endif
    147148  }
     
    164165  sprintf(toto,"PYTHONPATH=%s",pythonpath);
    165166  putenv(toto);
    166 #endif
    167   free(python_path);
     167  free(toto);
     168#endif
     169  if(hasToClean>0)
     170    free(python_path);
    168171  free(pythonpath);
    169172
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