Changeset 794 for trunk/zoo-project


Ignore:
Timestamp:
Dec 27, 2016, 6:34:38 PM (3 years ago)
Author:
djay
Message:

Add the initial C# language support.

Location:
trunk/zoo-project
Files:
11 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/HISTORY.txt

    r790 r794  
    11Version 1.6.0-dev
     2  * Add the C# as a supported programming language for Services
    23  * Add nested inputs and outputs support (WPS 2.0.0)
    34  * Add servicePath special key to specify the service location
  • trunk/zoo-project/zoo-kernel/Makefile.in

    r784 r794  
    8686        gcc -fPIC ${XML2CFLAGS} ${JSCFLAGS} ${CFLAGS} ${JS_ENABLED} -c service_internal_js.c
    8787
     88service_internal_mono.o: service_internal_mono.h service_internal_mono.c service.h
     89        gcc -c ${XML2CFLAGS} ${MONO_CFLAGS} ${CFLAGS} ${MONO_ENABLED} service_internal_mono.c
     90
    8891service_internal_ruby.o: service_internal_ruby.c service_internal_ruby.h
    8992        g++ ${XML2CFLAGS} ${RUBYCFLAGS} ${CFLAGS} ${JSCFLAGS} ${JS_ENABLED} -c service_internal_ruby.c
     
    9295        g++ -c ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} service_loader.c
    9396
    94 zoo_service_loader.o: zoo_service_loader.c service.h version.h ${MS_FILE} ${PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} ${RUBY_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE}
    95         g++ -g -O2 ${XML2CFLAGS} ${CFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${PYTHONCFLAGS} ${JAVACFLAGS} ${JSCFLAGS} ${PERLCFLAGS} ${PHPCFLAGS} ${SAGA_ENABLED} ${OTB_ENABLED} ${PYTHON_ENABLED} ${JS_ENABLED} ${PHP_ENABLED} ${PERL_ENABLED} ${JAVA_ENABLED} -c zoo_service_loader.c  -fno-common -DPIC -o zoo_service_loader.o
     97zoo_service_loader.o: zoo_service_loader.c service.h version.h ${MS_FILE} ${PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} ${RUBY_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE} ${MONO_FILE}
     98        g++ -g -O2 ${XML2CFLAGS} ${CFLAGS} ${MONO_CFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${PYTHONCFLAGS} ${JAVACFLAGS} ${JSCFLAGS} ${PERLCFLAGS} ${PHPCFLAGS} ${SAGA_ENABLED} ${OTB_ENABLED} ${PYTHON_ENABLED} ${JS_ENABLED} ${PHP_ENABLED} ${PERL_ENABLED} ${JAVA_ENABLED} ${MONO_ENABLED} -c zoo_service_loader.c  -fno-common -DPIC -o zoo_service_loader.o
    9699
    97100libzoo_service.${EXT}: version.h service_internal.o service.o sqlapi.o
     
    100103zoo_loader.cgi: version.h libzoo_service.${EXT} zoo_loader.c zoo_service_loader.o  ulinet.o service.h lex.sr.o service_conf.tab.o service_conf.y ulinet.o main_conf_read.tab.o lex.cr.o request_parser.o response_print.o server_internal.o caching.o ${MS_FILE} ${PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} ${RUBY_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE}
    101104        g++ -g -O2 ${JSCFLAGS} ${PHPCFLAGS}  ${PERLCFLAGS} ${RUBYCFLAGS}  ${JAVACFLAGS} ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} -c zoo_loader.c  -fno-common -DPIC -o zoo_loader.o
    102         g++  ${JSCFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_loader.o zoo_service_loader.o ${MS_FILE} ${PYTHON_FILE}  ${PERL_FILE} ${PHP_FILE}  ${JS_FILE} ${JAVA_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE} response_print.o server_internal.o caching.o request_parser.o ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi -L. ${LDFLAGS}
     105        g++  ${JSCFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_loader.o zoo_service_loader.o ${MS_FILE} ${PYTHON_FILE}  ${PERL_FILE} ${PHP_FILE}  ${JS_FILE} ${JAVA_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE} ${MONO_FILE} response_print.o server_internal.o caching.o request_parser.o ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi -L. ${LDFLAGS}
    103106
    104107zcfg2yaml: zcfg2yaml.c service.h lex.sr.o service_conf.tab.o service_conf.y main_conf_read.tab.o lex.cr.o response_print.o server_internal.o service_internal.o ${MS_FILE} ${YAML_FILE}
  • trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in

    r784 r794  
    9696SAGA_FILE=@SAGA_FILE@
    9797
     98MONO_CFLAGS=@MONO_CFLAGS@
     99MONO_LDFLAGS=@MONO_LDFLAGS@
     100MONO_ENABLED=@MONO_ENABLED@
     101MONO_FILE=@MONO_FILE@
     102
    98103CFLAGS=@RELY_ON_DB@ @DEB_DEF@ -fpic @OPENSSL_CFLAGS@ ${FCGI_CFLAGS} ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
    99 LDFLAGS=-lzoo_service @DEFAULT_LIBS@ -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS}  ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS}  ${FCGI_LDFLAGS} @OPENSSL_LDFLAGS@ -luuid ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${MACOS_LD_NET_FLAGS} ${YAML_LDFLAGS} ${OTBLDFLAGS} ${SAGA_LDFLAGS}
     104LDFLAGS=-lzoo_service @DEFAULT_LIBS@ -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS}  ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS}  ${FCGI_LDFLAGS} @OPENSSL_LDFLAGS@ -luuid ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${MACOS_LD_NET_FLAGS} ${YAML_LDFLAGS} ${OTBLDFLAGS} ${SAGA_LDFLAGS} ${MONO_LDFLAGS}
    100105
    101106DATAROOTDIR=@datarootdir@/zoo-project
  • trunk/zoo-project/zoo-kernel/configure.ac

    r784 r794  
    637637
    638638# ===========================================================================
     639# Detect if mono is installed
     640# ===========================================================================
     641
     642AC_ARG_WITH([mono],
     643        [AS_HELP_STRING([--with-mono=PATH], [To enable mono support, specify the path to find pkg-config,  disabled by default])],
     644        [MONOHOME="$withval"; MONO_ENABLED="-DUSE_MONO"], [MONO_ENABLED=""])
     645
     646if test -z "$MONO_ENABLED"
     647then
     648        MONO_FILE=""
     649else
     650        MONO_FILE="service_internal_mono.o"
     651        if test "x$MONOHOME" = "x";
     652        then
     653                MONOHOME="/usr"
     654        fi
     655        if test "x$MONOHOME" = "xyes";
     656        then
     657                MONOHOME="/usr"
     658        fi
     659
     660        # Extract the linker and include flags
     661        MONO_CFLAGS=`$MONOHOME/bin/pkg-config --cflags mono-2`
     662        MONO_LDFLAGS=`$MONOHOME/bin/pkg-config --libs mono-2`
     663
     664        AC_LANG([C++])
     665        echo $JAVA_CPPFLAGS
     666        # Check headers file (second time we check that in fact)
     667        CPPFLAGS_SAVE="$CFLAGS"
     668        CPPFLAGS="$MONO_CFLAGS"
     669        AC_CHECK_HEADERS([mono/jit/jit.h],
     670                         [], [AC_MSG_ERROR([could not find jit.h file])])
     671        CPPFLAGS="$CPPFLAGS_SAVE"
     672        # Ensure we can link against libmono-2.0
     673        LIBS_SAVE="$LIBS"
     674        LIBS="$MONO_LDFLAGS"
     675        AC_CHECK_LIB([mono-2.0], [mono_runtime_invoke], [], [AC_MSG_ERROR([could not find libmono])], [])
     676        LIBS="$LIBS_SAVE"
     677
     678        AC_SUBST([MONO_CFLAGS])
     679        AC_SUBST([MONO_LDFLAGS])
     680fi
     681
     682AC_SUBST([MONO_ENABLED])
     683AC_SUBST([MONO_FILE])
     684
     685# ===========================================================================
    639686# Detect if ruby is installed
    640687# ===========================================================================
  • trunk/zoo-project/zoo-kernel/request_parser.c

    r790 r794  
    16271627              cgiFilePtr file;
    16281628              int targetFile;
    1629               char storageNameOnServer[2048];
    1630               char fileNameOnServer[64];
     1629              char *storageNameOnServer;
     1630              char *fileNameOnServer;
    16311631              char contentType[1024];
    16321632              char buffer[1024];
     
    16511651                        break;
    16521652                    }
     1653                  fileNameOnServer=(char*)malloc((strlen(name) - t - 1 )*sizeof(char));
    16531654                  strcpy (fileNameOnServer, name + t + 1);
    16541655
     1656                  storageNameOnServer=(char*)malloc((strlen(path->value) + strlen(fileNameOnServer) + 2)*sizeof(char));
    16551657                  sprintf (storageNameOnServer, "%s/%s", path->value,
    16561658                           fileNameOnServer);
     
    16831685                  cgiFormFileClose (file);
    16841686                  close (targetFile);
     1687                  free(fileNameOnServer);
     1688                  free(storageNameOnServer);
    16851689#ifdef DEBUG
    16861690                  fprintf (stderr, "File \"%s\" has been uploaded",
  • trunk/zoo-project/zoo-kernel/service.c

    r790 r794  
    515515    free(tmp->value);
    516516  tmp->value=(char*)malloc((size+1)*sizeof(char));
    517   memmove(tmp->value,v,size*sizeof(char));
     517  if(v!=NULL)
     518    memmove(tmp->value,v,size*sizeof(char));
    518519  tmp->value[size]=0;
    519520  char sin[128];
  • trunk/zoo-project/zoo-kernel/zoo_service_loader.c

    r790 r794  
    8181#ifdef USE_PERL
    8282#include "service_internal_perl.h"
     83#endif
     84
     85#ifdef USE_MONO
     86#include "service_internal_mono.h"
    8387#endif
    8488
     
    705709      *eres =
    706710        zoo_ruby_support (&m, request_inputs, s1, &request_input_real_format,
     711                          &request_output_real_format);
     712    }
     713  else
     714#endif
     715
     716#ifdef USE_MONO
     717  if (strncasecmp (r_inputs->value, "Mono", 4) == 0)
     718    {
     719      *eres =
     720        zoo_mono_support (&m, request_inputs, s1, &request_input_real_format,
    707721                          &request_output_real_format);
    708722    }
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