Changeset 637 for trunk


Ignore:
Timestamp:
Apr 24, 2015, 11:47:50 PM (10 years ago)
Author:
djay
Message:

Fixes in zcfg generator and fixes to build correctly on GNU/Linux.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/thirds/saga2zcfg/saga2zcfg.c

    r634 r637  
    1717const char* cleanAbstract(CSG_String abstract){
    1818  char* tmp=strdup(abstract.b_str());
    19   CSG_String val=CSG_String("")+tmp;
     19  CSG_String val=CSG_String(" ")+tmp;
    2020  if(val.Contains("¸")){
    2121    val.Replace("¸"," ");
     
    2323  if(val.Contains("\n")){
    2424    val.Replace("\n","<br/>");
     25  }
     26  if(val.Contains("\r")){
     27    val.Replace("\r","");
    2528  }
    2629  if(val.Contains("<")){
     
    4245    fprintf(stdout,"  Abstract = %s\n",CSG_String(param->Get_Name()).b_str());
    4346  else{
    44     fprintf(stdout,"  Abstract = %s\n",cleanAbstract(CSG_String(param->Get_Description()).BeforeFirst('\n')));
     47    fprintf(stdout,"  Abstract = %s\n",cleanAbstract(CSG_String(param->Get_Description())));
    4548  }
    4649  if(!out){
     
    145148
    146149          mkdir(library->Get_Library_Name().b_str(),0755);
     150          fprintf(stderr,"%s %s \n",library->Get_Library_Name().b_str(),CSG_String(module->Get_ID()).b_str());
    147151          FILE *stdout1=fopen((library->Get_Library_Name()+"/"+module->Get_ID()+".zcfg").b_str(),"w+");
    148152          fprintf(stdout1,"[%d]\n",j);
    149153          fprintf(stdout1," Title = %s\n",module->Get_Name().b_str());
    150           if(CSG_String(module->Get_Description()).is_Empty())
     154          if(CSG_String(module->Get_Description()).is_Empty() ||
     155             module->Get_Description().Length()<module->Get_Name().Length() )
    151156            fprintf(stdout1," Abstract = %s\n",module->Get_Name().b_str());
    152           else
    153             fprintf(stdout1," Abstract = %s\n",cleanAbstract(module->Get_Description()));
     157          else{
     158            const char *tmp=cleanAbstract(module->Get_Description());
     159            if(tmp==NULL || strlen(tmp)<7 ){
     160              fprintf(stdout1," Abstract = %s\n",module->Get_Name().b_str());
     161            }
     162            else{
     163              fprintf(stdout1," Abstract = %s\n",tmp);
     164            }
     165          }
    154166          fprintf(stdout1," storeSupported = true\n");
    155167          fprintf(stdout1," statusSupported = true\n");
     
    294306                    for(int l=0;l<clen;l++){
    295307                      //fprintf(stdout1,"%d",l);
    296                       fprintf(stdout1,"%s",cleanAbstract(CSG_String(choice->Get_Item(l))));
     308                      fprintf(stdout1,"%s",(CSG_String(choice->Get_Item(l))).b_str());
    297309                      if(l+1<clen)
    298310                        fprintf(stdout1,",");
     
    302314                  fprintf(stdout1,"   <Default>\n");
    303315                  if( !param->Get_Data()->Get_Default().is_Empty() ){
    304                     fprintf(stdout1,"    value = %s\n",cleanAbstract(CSG_String(choice->Get_Item(atoi(param->Get_Data()->Get_Default())))));
     316                    fprintf(stdout1,"    value = %s\n",CSG_String(choice->Get_Item(atoi(param->Get_Data()->Get_Default()))).b_str());
    305317                  }
    306318                  fprintf(stdout1,"   </Default>\n");
  • trunk/zoo-project/zoo-kernel/configure.ac

    r634 r637  
    373373        OTB_ENABLED=""
    374374else
    375     if test -z "$ITKVERS"
    376     then
    377         ITKVERS="4.5"
    378     fi
     375        if test -z "$ITKVERS"
     376        then
     377                ITKVERS="4.5"
     378        fi
    379379        OTB_ENABLED="-DUSE_OTB"
    380380        OTB_LDFLAGS="-L$OTBPATH/lib/otb -lOTBIO -lOTBCommon -lOTBApplicationEngine -L$ITKPATH/lib -lITKBiasCorrection-$ITKVERS -lITKCommon-$ITKVERS -lITKIOImageBase-$ITKVERS -lITKKLMRegionGrowing-$ITKVERS -lITKLabelMap-$ITKVERS -lITKMesh-$ITKVERS -lITKMetaIO-$ITKVERS -lITKOptimizers-$ITKVERS -lITKPath-$ITKVERS -lITKPolynomials-$ITKVERS -lITKQuadEdgeMesh-$ITKVERS -lITKSpatialObjects-$ITKVERS -lITKStatistics-$ITKVERS -lITKVNLInstantiation-$ITKVERS -lITKWatersheds-$ITKVERS -litkNetlibSlatec-$ITKVERS -litksys-$ITKVERS -litkdouble-conversion-$ITKVERS -litkv3p_lsqr-$ITKVERS -litkv3p_netlib-$ITKVERS -litkvcl-$ITKVERS -litkvnl-$ITKVERS -litkvnl_algo-$ITKVERS -litkzlib-$ITKVERS"
     
    439439                        [], [AC_MSG_ERROR([could not find header file $i related to SAGA-GIS])])
    440440        LIBS_SAVE="$LIBS"
     441        AC_CHECK_LIB([saga_api], [SG_Set_UI_Callback,SG_Get_Module_Library_Manager])
    441442        AC_LANG_POP([C++])
    442         AC_CHECK_LIB([saga_api], [SG_Set_UI_Callback,SG_Get_Module_Library_Manager])
    443443fi
    444444AC_SUBST([SAGA_CPPFLAGS])
  • trunk/zoo-project/zoo-kernel/service_internal_saga.c

    r636 r637  
    2525#include <stdlib.h>
    2626#include <limits.h>
     27#include <locale.h>
     28#include <wx/string.h>
     29#include <wx/app.h>
     30#include <api_core.h>
     31#include <data_manager.h>
     32#include <module_library.h>
     33#define _ZOO_SAGA
    2734#include "service_internal_saga.h"
    2835#include "mimetypes.h"
     36
     37/**
     38 * Global SAGA-GIS output counter
     39 */
     40int sagaOutputCounter=0;
    2941
    3042/**
  • trunk/zoo-project/zoo-kernel/service_internal_saga.h

    r634 r637  
    2828#pragma once
    2929
    30 #include <locale.h>
    31 #define _WX_WXCRTVARARG_H_
    32 #include <wx/string.h>
    33 #include <wx/app.h>
    34 #include <api_core.h>
    35 #include <data_manager.h>
    36 #include <module_library.h>
    37 
    3830#include "service.h"
    3931#include "service_internal.h"
    4032
    41 /**
    42  * Global SAGA-GIS output counter
    43  */
    44 int sagaOutputCounter=0;
    4533int zoo_saga_support(maps**,map*,service*,maps**,maps**);
    4634
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