- Timestamp:
- Apr 24, 2015, 11:47:50 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/thirds/saga2zcfg/saga2zcfg.c
r634 r637 17 17 const char* cleanAbstract(CSG_String abstract){ 18 18 char* tmp=strdup(abstract.b_str()); 19 CSG_String val=CSG_String(" ")+tmp;19 CSG_String val=CSG_String(" ")+tmp; 20 20 if(val.Contains("¸")){ 21 21 val.Replace("¸"," "); … … 23 23 if(val.Contains("\n")){ 24 24 val.Replace("\n","<br/>"); 25 } 26 if(val.Contains("\r")){ 27 val.Replace("\r",""); 25 28 } 26 29 if(val.Contains("<")){ … … 42 45 fprintf(stdout," Abstract = %s\n",CSG_String(param->Get_Name()).b_str()); 43 46 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()))); 45 48 } 46 49 if(!out){ … … 145 148 146 149 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()); 147 151 FILE *stdout1=fopen((library->Get_Library_Name()+"/"+module->Get_ID()+".zcfg").b_str(),"w+"); 148 152 fprintf(stdout1,"[%d]\n",j); 149 153 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() ) 151 156 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 } 154 166 fprintf(stdout1," storeSupported = true\n"); 155 167 fprintf(stdout1," statusSupported = true\n"); … … 294 306 for(int l=0;l<clen;l++){ 295 307 //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()); 297 309 if(l+1<clen) 298 310 fprintf(stdout1,","); … … 302 314 fprintf(stdout1," <Default>\n"); 303 315 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()); 305 317 } 306 318 fprintf(stdout1," </Default>\n"); -
trunk/zoo-project/zoo-kernel/configure.ac
r634 r637 373 373 OTB_ENABLED="" 374 374 else 375 376 then377 378 fi375 if test -z "$ITKVERS" 376 then 377 ITKVERS="4.5" 378 fi 379 379 OTB_ENABLED="-DUSE_OTB" 380 380 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" … … 439 439 [], [AC_MSG_ERROR([could not find header file $i related to SAGA-GIS])]) 440 440 LIBS_SAVE="$LIBS" 441 AC_CHECK_LIB([saga_api], [SG_Set_UI_Callback,SG_Get_Module_Library_Manager]) 441 442 AC_LANG_POP([C++]) 442 AC_CHECK_LIB([saga_api], [SG_Set_UI_Callback,SG_Get_Module_Library_Manager])443 443 fi 444 444 AC_SUBST([SAGA_CPPFLAGS]) -
trunk/zoo-project/zoo-kernel/service_internal_saga.c
r636 r637 25 25 #include <stdlib.h> 26 26 #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 27 34 #include "service_internal_saga.h" 28 35 #include "mimetypes.h" 36 37 /** 38 * Global SAGA-GIS output counter 39 */ 40 int sagaOutputCounter=0; 29 41 30 42 /** -
trunk/zoo-project/zoo-kernel/service_internal_saga.h
r634 r637 28 28 #pragma once 29 29 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 38 30 #include "service.h" 39 31 #include "service_internal.h" 40 32 41 /**42 * Global SAGA-GIS output counter43 */44 int sagaOutputCounter=0;45 33 int zoo_saga_support(maps**,map*,service*,maps**,maps**); 46 34
Note: See TracChangeset
for help on using the changeset viewer.