xcos module
Allan CORNET [Tue, 28 Jul 2009 14:04:44 +0000 (16:04 +0200)]
40 files changed:
scilab/Scilab.sln
scilab/Scilab_f2c.sln
scilab/build.incl.xml
scilab/configure.ac
scilab/etc/classpath.xml.in
scilab/etc/classpath.xml.vc
scilab/etc/modules.xml.in
scilab/etc/modules.xml.vc
scilab/modules/Makefile.am
scilab/modules/core/includes/callinterf.h
scilab/modules/core/src/c/callinterf.c
scilab/modules/core/src/c/dynamic_gateways.c
scilab/modules/core/src/c/dynamic_gateways.h
scilab/modules/xcos/.gitignore [new file with mode: 0644]
scilab/modules/xcos/Makefile.am [new file with mode: 0644]
scilab/modules/xcos/build.xml [new file with mode: 0644]
scilab/modules/xcos/changelog.txt [new file with mode: 0644]
scilab/modules/xcos/etc/xcos.quit [new file with mode: 0644]
scilab/modules/xcos/etc/xcos.start [new file with mode: 0644]
scilab/modules/xcos/includes/dynlib_xcos.h [new file with mode: 0644]
scilab/modules/xcos/includes/gw_xcos.h [new file with mode: 0644]
scilab/modules/xcos/license.txt [new file with mode: 0644]
scilab/modules/xcos/macros/buildmacros.bat [new file with mode: 0644]
scilab/modules/xcos/macros/buildmacros.sce [new file with mode: 0644]
scilab/modules/xcos/macros/cleanmacros.bat [new file with mode: 0644]
scilab/modules/xcos/readme.txt [new file with mode: 0644]
scilab/modules/xcos/sci_gateway/c/gw_xcos.c [new file with mode: 0644]
scilab/modules/xcos/sci_gateway/cpp/sci_Xcos.cpp [new file with mode: 0644]
scilab/modules/xcos/sci_gateway/xcos_gateway.xml [new file with mode: 0644]
scilab/modules/xcos/src/c/DllmainXCOS.c [new file with mode: 0644]
scilab/modules/xcos/src/c/LibScilab_Import.def [new file with mode: 0644]
scilab/modules/xcos/src/c/xcos.vcproj [new file with mode: 0644]
scilab/modules/xcos/src/java/org/scilab/modules/xcos/XCos.java [new file with mode: 0644]
scilab/modules/xcos/src/java/xcos-JAVA.vcproj [new file with mode: 0644]
scilab/modules/xcos/src/noxcos/noxcos.c [new file with mode: 0644]
scilab/modules/xcos/src/noxcos/noxcos.h [new file with mode: 0644]
scilab/modules/xcos/version.xml [new file with mode: 0644]
scilab/modules/xcos/xcos.iss [new file with mode: 0644]
scilab/scilab-lib.properties.in
scilab/scilab-lib.properties.vc

index b2dba9e..ab28b8e 100644 (file)
@@ -1033,6 +1033,23 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdf5", "modules\hdf5\src\c\
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdf5-Ant", "modules\hdf5\src\java\hdf5-JAVA.vcproj", "{9B6500B0-66F6-44F0-910D-47A1435B4E02}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xcos-Ant", "modules\xcos\src\java\xcos-JAVA.vcproj", "{F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}"
+       ProjectSection(ProjectDependencies) = postProject
+               {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43} = {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43}
+               {B2911268-79E2-4FE5-AD59-2C3CB7CB794E} = {B2911268-79E2-4FE5-AD59-2C3CB7CB794E}
+               {F01C26E3-E409-4E74-BA84-C7C4A71A7FDC} = {F01C26E3-E409-4E74-BA84-C7C4A71A7FDC}
+       EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xcos", "modules\xcos\src\c\xcos.vcproj", "{494FA8C9-6C85-4175-BE4C-9A113C7A3278}"
+       ProjectSection(ProjectDependencies) = postProject
+               {ECFFEB0C-1EDA-45EE-9A10-B18143852E17} = {ECFFEB0C-1EDA-45EE-9A10-B18143852E17}
+               {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E} = {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E}
+               {8BA2DDA8-BD04-4D4D-8EE6-6CAA955F7470} = {8BA2DDA8-BD04-4D4D-8EE6-6CAA955F7470}
+               {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0} = {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0}
+               {3170E4C2-1173-4264-A222-7EE8CCB3DDF7} = {3170E4C2-1173-4264-A222-7EE8CCB3DDF7}
+               {A5911CD7-F8E8-440C-A23E-4843A0636F3A} = {A5911CD7-F8E8-440C-A23E-4843A0636F3A}
+       EndProjectSection
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
@@ -2121,6 +2138,22 @@ Global
                {9B6500B0-66F6-44F0-910D-47A1435B4E02}.Release|Win32.Build.0 = Release|Win32
                {9B6500B0-66F6-44F0-910D-47A1435B4E02}.Release|x64.ActiveCfg = Release|x64
                {9B6500B0-66F6-44F0-910D-47A1435B4E02}.Release|x64.Build.0 = Release|x64
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Debug|Win32.ActiveCfg = Debug|Win32
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Debug|Win32.Build.0 = Debug|Win32
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Debug|x64.ActiveCfg = Debug|x64
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Debug|x64.Build.0 = Debug|x64
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Release|Win32.ActiveCfg = Release|Win32
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Release|Win32.Build.0 = Release|Win32
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Release|x64.ActiveCfg = Release|x64
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Release|x64.Build.0 = Release|x64
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Debug|Win32.ActiveCfg = Debug|Win32
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Debug|Win32.Build.0 = Debug|Win32
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Debug|x64.ActiveCfg = Debug|x64
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Debug|x64.Build.0 = Debug|x64
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Release|Win32.ActiveCfg = Release|Win32
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Release|Win32.Build.0 = Release|Win32
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Release|x64.ActiveCfg = Release|x64
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Release|x64.Build.0 = Release|x64
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
index d83ac84..6e22879 100644 (file)
@@ -1033,6 +1033,23 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdf5", "modules\hdf5\src\c\
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdf5-Ant", "modules\hdf5\src\java\hdf5-JAVA.vcproj", "{9B6500B0-66F6-44F0-910D-47A1435B4E02}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xcos-Ant", "modules\xcos\src\java\xcos-JAVA.vcproj", "{F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}"
+       ProjectSection(ProjectDependencies) = postProject
+               {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43} = {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43}
+               {B2911268-79E2-4FE5-AD59-2C3CB7CB794E} = {B2911268-79E2-4FE5-AD59-2C3CB7CB794E}
+               {F01C26E3-E409-4E74-BA84-C7C4A71A7FDC} = {F01C26E3-E409-4E74-BA84-C7C4A71A7FDC}
+       EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xcos", "modules\xcos\src\c\xcos.vcproj", "{494FA8C9-6C85-4175-BE4C-9A113C7A3278}"
+       ProjectSection(ProjectDependencies) = postProject
+               {ECFFEB0C-1EDA-45EE-9A10-B18143852E17} = {ECFFEB0C-1EDA-45EE-9A10-B18143852E17}
+               {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E} = {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E}
+               {8BA2DDA8-BD04-4D4D-8EE6-6CAA955F7470} = {8BA2DDA8-BD04-4D4D-8EE6-6CAA955F7470}
+               {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0} = {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0}
+               {3170E4C2-1173-4264-A222-7EE8CCB3DDF7} = {3170E4C2-1173-4264-A222-7EE8CCB3DDF7}
+               {A5911CD7-F8E8-440C-A23E-4843A0636F3A} = {A5911CD7-F8E8-440C-A23E-4843A0636F3A}
+       EndProjectSection
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
@@ -2121,6 +2138,22 @@ Global
                {9B6500B0-66F6-44F0-910D-47A1435B4E02}.Release|Win32.Build.0 = Release|Win32
                {9B6500B0-66F6-44F0-910D-47A1435B4E02}.Release|x64.ActiveCfg = Release|x64
                {9B6500B0-66F6-44F0-910D-47A1435B4E02}.Release|x64.Build.0 = Release|x64
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Debug|Win32.ActiveCfg = Debug|Win32
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Debug|Win32.Build.0 = Debug|Win32
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Debug|x64.ActiveCfg = Debug|x64
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Debug|x64.Build.0 = Debug|x64
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Release|Win32.ActiveCfg = Release|Win32
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Release|Win32.Build.0 = Release|Win32
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Release|x64.ActiveCfg = Release|x64
+               {F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}.Release|x64.Build.0 = Release|x64
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Debug|Win32.ActiveCfg = Debug|Win32
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Debug|Win32.Build.0 = Debug|Win32
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Debug|x64.ActiveCfg = Debug|x64
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Debug|x64.Build.0 = Debug|x64
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Release|Win32.ActiveCfg = Release|Win32
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Release|Win32.Build.0 = Release|Win32
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Release|x64.ActiveCfg = Release|x64
+               {494FA8C9-6C85-4175-BE4C-9A113C7A3278}.Release|x64.Build.0 = Release|x64
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
index 58e3482..d223ed1 100644 (file)
@@ -43,8 +43,9 @@
        
        <path id="compile.classpath">
        
-         <pathelement location="${library.hdf5.dir}/${library.hdf5.name}"/>
-         <pathelement location="${library.localization.dir}/${library.localization.name}"/>
+               <pathelement location="${library.xcos.dir}/${library.xcos.name}"/>
+               <pathelement location="${library.hdf5.dir}/${library.hdf5.name}"/>
+               <pathelement location="${library.localization.dir}/${library.localization.name}"/>
                <pathelement location="${library.shell.dir}/${library.shell.name}"/>
                <pathelement location="${library.history_manager.dir}/${library.history_manager.name}"/>
                <pathelement location="${library.completion.dir}/${library.completion.name}"/>
@@ -71,6 +72,8 @@
                <pathelement location="${jhdf5.jar}"/>
                
                <pathelement location="${jhall.jar}"/>
+               
+               <pathelement location="${jgraphx.jar}"/>
 
        <!-- Only usefull for the documentation -->     
                <pathelement location="${library.helptools.dir}/${library.helptools.name}"/>
index c4dbe0a..b4217b8 100644 (file)
@@ -1470,6 +1470,7 @@ modules/simulated_annealing/Makefile
 modules/parameters/Makefile
 modules/matio/Makefile
 modules/atoms/Makefile
+modules/xcos/Makefile
 modules/Makefile
 libs/Makefile
 Makefile
index 4a58d56..34dd7df 100644 (file)
@@ -35,6 +35,7 @@ The option is "disableUnderMode" and can be:
 <path value="@LOOKS@"/>
 <path value="@COMMONS_LOGGING@"/>
 <path value="@JHALL@"/>
+<path value="@JGRAPHX@"/>
 
 <!-- Load when needed -->
 <path value="@JOGL@" load="onUse">
@@ -53,6 +54,10 @@ The option is "disableUnderMode" and can be:
 <!-- Temp. loaded at startup -->
 <path value="$SCILAB/modules/hdf5/jar/org.scilab.modules.hdf5.jar" load="startup"/>
 
+<path value="$SCILAB/modules/xcos/jar/org.scilab.modules.xcos.jar" load="onUse">
+       <load on="XCos"/>
+</path>
+
 <!-- Documentation (not mandatory) -->
 <path value="@JEUCLID_CORE@" load="onUse">
        <load on="documentationGeneration"/>
index 098ca24..dfcdc9c 100644 (file)
@@ -35,6 +35,8 @@ The option is "disableUnderMode" and can be:
 <path value="$SCILAB/thirdparty/looks-2.1.1.jar" load="startup"/>
 <path value="$SCILAB/thirdparty/commons-logging-1.1.jar" load="startup"/>
 <path value="$SCILAB/thirdparty/jhall.jar" load="startup"/>
+<path value="$SCILAB/thirdparty/jgraphx.jar" load="startup"/>
+
 
 <!-- Load when needed -->
 <path value="$SCILAB/thirdparty/jogl.jar" load="onUse">
@@ -53,6 +55,10 @@ The option is "disableUnderMode" and can be:
 <!-- Temp. loaded at startup -->
 <path value="$SCILAB/modules/hdf5/jar/org.scilab.modules.hdf5.jar" load="startup"/>
 
+<path value="$SCILAB/modules/xcos/jar/org.scilab.modules.xcos.jar" load="onUse">
+       <load on="XCos"/>
+</path>
+
 <!-- Documentation (not mandatory) -->
 <path value="$SCILAB/thirdparty/jeuclid-core.jar" load="onUse">
        <load on="documentationGeneration"/>
index 0840a43..0f8d530 100644 (file)
@@ -83,4 +83,5 @@
 <module name="atoms" activate="yes"/>
 <module name="matio" activate="@MATIO_ENABLE@"/>
 <module name="hdf5" activate="yes"/>
+<module name="xcos" activate="@GUI_ENABLE@"/>
 </modules>
index 061d0e3..2e0f6a7 100644 (file)
@@ -85,5 +85,6 @@
 <module name="matio" activate="yes"/>
 <module name="atoms" activate="yes"/>
 <module name="hdf5" activate="yes"/>
+<module name="xcos" activate="yes"/>
 <!-- comments -->
 </modules>
index 65dd000..a6d7834 100644 (file)
@@ -82,7 +82,8 @@ simulated_annealing \
 parameters \
 matio \
 atoms \
-hdf5
+hdf5 \
+xcos
 
 #umfpack
 
@@ -127,14 +128,16 @@ GUI_LIBS =        $(top_builddir)/modules/gui/libscigui.la \
        $(top_builddir)/modules/graphics/libscigraphics.la \
        $(top_builddir)/modules/graphic_export/libscigraphic_export.la \
        $(top_builddir)/modules/console/libsciconsole.la \
-       $(top_builddir)/modules/jvm/libscijvm.la
+       $(top_builddir)/modules/jvm/libscijvm.la \
+       $(top_builddir)/modules/xcos/libscixcos.la
 
 NO_GUI_LIBS = $(top_builddir)/modules/gui/libscigui-disable.la \
        $(top_builddir)/modules/renderer/libscirenderer-disable.la \
        $(top_builddir)/modules/graphics/libscigraphics-disable.la \
        $(top_builddir)/modules/graphic_export/libscigraphic_export-disable.la \
        $(top_builddir)/modules/console/libsciconsole-disable.la \
-       $(top_builddir)/modules/jvm/libscijvm-disable.la
+       $(top_builddir)/modules/jvm/libscijvm-disable.la \
+       $(top_builddir)/modules/xcos/libscixcos-disable.la
 
 ENGINE_LIBS =  $(top_builddir)/modules/fileio/libscifileio.la \
        $(top_builddir)/modules/mexlib/libmex.la \
index 9edf11f..1bb0fa4 100644 (file)
@@ -84,7 +84,8 @@
 /* 60 */                                               #include "dynamic_gateways.h" /* helptools */
 /* 61 */                                               #include "../../call_scilab/includes/gw_call_scilab.h"
 /* 62 */                                               #include "../../hdf5/includes/gw_hdf5.h"
-
+/* 63 */                                               /* xpad */
+/* 64 */                                               #include "dynamic_gateways.h" /* xcos */
 /*-------------------------------------
  * long jump to stop interface computation
  * @param n
index eb5dff7..67868d0 100644 (file)
@@ -33,7 +33,7 @@ static void sci_sigint_addinter(int n);
  ** Watch out the positions are crutial !!!
  ** @TODO : Make this less crappy...
  **/
-#define INTERFACES_MAX 62
+#define INTERFACES_MAX 64
 static OpTab Interfaces[INTERFACES_MAX] = {
     /* 01  */ {gw_user}, /* free position may be used */
        /* 02  */ {gw_linear_algebra},
@@ -96,7 +96,9 @@ static OpTab Interfaces[INTERFACES_MAX] = {
        /* 59  */ {gw_dynamic_matio},
        /* 60  */ {gw_dynamic_helptools},
        /* 61  */ {gw_call_scilab},
-       /* 62  */ {gw_hdf5}
+       /* 62  */ {gw_hdf5},
+       /* 63  */ {gw_user}, /* xpad (to replace by "{gw_dynamic_xpad}," )*/
+       /* 60  */ {gw_dynamic_xcos}
 };
 /*--------------------------------------------------------------------------*/
 static int sig_ok = 0;
index b1f5e07..3b3a735 100644 (file)
@@ -254,3 +254,19 @@ int gw_dynamic_functions(void)
                &ptr_gw_functions);
 }
 /*--------------------------------------------------------------------------*/
+/* xcos module */
+#define XCOS_MODULE_NAME "xcos"
+static DynLibHandle hXcosLib = NULL;
+static PROC_GATEWAY ptr_gw_xcos = NULL;
+static char* dynlibname_xcos = NULL;
+static char* gatewayname_xcos = NULL;
+/*--------------------------------------------------------------------------*/
+int gw_dynamic_xcos(void)
+{
+       return gw_dynamic_generic(XCOS_MODULE_NAME,
+               &dynlibname_xcos,
+               &gatewayname_xcos,
+               &hXcosLib,
+               &ptr_gw_xcos);
+}
+/*--------------------------------------------------------------------------*/
index 07cfb3d..6611159 100644 (file)
 #ifndef __DYNAMIC_GATEWAYS_H__
 #define __DYNAMIC_GATEWAYS_H__
 
+/**
+* xcos gateway
+* xcos is loaded dynamically at runtime
+* load gw_xcos in SCI/modules/xcos/sci_gateway/gw_xcos.c
+*/
+int gw_dynamic_xcos(void);
 
 /**
 * functions gateway
diff --git a/scilab/modules/xcos/.gitignore b/scilab/modules/xcos/.gitignore
new file mode 100644 (file)
index 0000000..b271e3f
--- /dev/null
@@ -0,0 +1,4 @@
+#
+#generated .def files (windows)
+#
+xcos.def
diff --git a/scilab/modules/xcos/Makefile.am b/scilab/modules/xcos/Makefile.am
new file mode 100644 (file)
index 0000000..c02e439
--- /dev/null
@@ -0,0 +1,100 @@
+#
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) DIGITEO - 2009 - Allan CORNET
+# 
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution.  The terms
+# are also available at    
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+#
+
+#### Target ######
+modulename=xcos
+
+
+#### xcos : Conf files ####
+libscixcos_la_rootdir = $(mydatadir)
+libscixcos_la_root_DATA = changelog.txt license.txt readme.txt version.xml
+
+
+#### xcos : init scripts ####
+libscixcos_la_etcdir = $(mydatadir)/etc
+libscixcos_la_etc_DATA = etc/xcos.quit \
+etc/xcos.start
+
+include $(top_srcdir)/Makefile.incl.am
+
+XCOS_C_SOURCES = 
+
+XCOS_CPP_SOURCES = 
+
+GIWS_WRAPPERS = 
+
+if GIWS
+BUILT_SOURCES=giws
+endif
+
+
+GATEWAY_C_SOURCES = sci_gateway/c/gw_xcos.c
+
+GATEWAY_CPP_SOURCES = sci_gateway/cpp/sci_Xpad.cpp
+
+libscixcos_la_CFLAGS= $(JAVA_JNI_INCLUDE) \
+                       -I$(top_srcdir)/libs/MALLOC/includes/ \
+                       -I$(top_srcdir)/modules/jvm/includes/ \
+                       -I$(top_srcdir)/modules/output_stream/includes \
+                       -I$(top_srcdir)/modules/localization/includes \
+                       -I$(top_srcdir)/modules/api_scilab/includes
+
+libscixcos_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) \
+                       -I$(srcdir)/includes/ \
+                       -I$(srcdir)/src/cpp/ \
+                       -I$(srcdir)/src/c/ \
+                       -I$(top_srcdir)/modules/jvm/includes/ \
+                       -I$(top_srcdir)/modules/output_stream/includes \
+                       -I$(top_srcdir)/modules/localization/includes \
+                       -I$(top_srcdir)/modules/api_scilab/includes
+
+# Without the xcos module 
+libscixcos_disable_la_CFLAGS = -Iincludes/ \
+                       -I$(top_srcdir)/modules/output_stream/includes
+
+XCOS_DISABLE_C_SOURCES = src/noxcos/noxcos.c
+libscixcos_disable_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)
+libscixcos_disable_la_SOURCES = $(XCOS_DISABLE_C_SOURCES)
+
+pkglib_LTLIBRARIES = libscixcos-disable.la
+
+if GUI
+pkglib_LTLIBRARIES += libscixcos.la 
+endif
+
+libscixcos_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)  $(X_LIBS) $(X_EXTRA_LIBS)
+
+libscixcos_la_SOURCES = $(XCOS_C_SOURCES) $(GATEWAY_C_SOURCES) $(GATEWAY_CPP_SOURCES) $(XCOS_CPP_SOURCES)
+
+# For the code check (splint)
+CHECK_SRC= $(XCOS_C_SOURCES) $(GATEWAY_C_SOURCES)
+INCLUDE_FLAGS = $(libscixcos_la_CFLAGS)
+
+
+
+libscixcos_la_LIBADD = $(top_builddir)/modules/core/libscicore.la \
+$(top_builddir)/libs/MALLOC/libscimalloc.la \
+$(top_builddir)/modules/output_stream/libscioutput_stream.la
+
+
+#### xcos : gateway declaration ####
+libscixcos_la_sci_gatewaydir = $(mydatadir)/sci_gateway
+libscixcos_la_sci_gateway_DATA = sci_gateway/xcos_gateway.xml
+
+
+#### xcos : include files ####
+libscixcos_la_includedir=$(pkgincludedir)/xcos
+libscixcos_la_include_HEADERS = includes/gw_xcos.h \
+includes/dynlib_xcos.h
+
+if GUI
+USEANT=1
+endif
diff --git a/scilab/modules/xcos/build.xml b/scilab/modules/xcos/build.xml
new file mode 100644 (file)
index 0000000..6692437
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * 
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at    
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
+
+<project name="xcos" default="jar">
+
+  <import file="../../build.incl.xml"/>
+  <property name="library.name" value="${library.xcos.name}" />
+
+  <description>
+                       Build the Scilab xcos module
+  </description>
+
+</project>
diff --git a/scilab/modules/xcos/changelog.txt b/scilab/modules/xcos/changelog.txt
new file mode 100644 (file)
index 0000000..02efd9e
--- /dev/null
@@ -0,0 +1,4 @@
+xcos (0.1-1) stable; urgency=medium
+
+  * First version of the module
+
diff --git a/scilab/modules/xcos/etc/xcos.quit b/scilab/modules/xcos/etc/xcos.quit
new file mode 100644 (file)
index 0000000..2f60911
--- /dev/null
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution.  The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+// Delete help chapter
+// =============================================================================
+if WITH_HELPTOOLS then
+//     del_help_chapter("XCos",%t);
+end
diff --git a/scilab/modules/xcos/etc/xcos.start b/scilab/modules/xcos/etc/xcos.start
new file mode 100644 (file)
index 0000000..ce9dc39
--- /dev/null
@@ -0,0 +1,26 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+// 
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution.  The terms
+// are also available at    
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+// Load  functions libraries
+// =============================================================================
+//load('SCI/modules/xcos/macros/lib');
+
+// Add help chapter
+// =============================================================================
+if WITH_HELPTOOLS then
+       //add_module_help_chapter("XCos");
+end
+
+// Add demos
+// =============================================================================
+if WITH_DEMOS then
+       //pathdemos = pathconvert(SCI+"/modules/xcos/demos/xcos.dem.sce",%f,%t);
+       //add_demo(gettext('XCos'),pathdemos);
+       //clear pathdemos;
+end
diff --git a/scilab/modules/xcos/includes/dynlib_xcos.h b/scilab/modules/xcos/includes/dynlib_xcos.h
new file mode 100644 (file)
index 0000000..5fa3b8a
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2009 - Allan CORNET
+* 
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution.  The terms
+* are also available at    
+* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/ 
+#ifndef __DYNLIB_XCOS_H__
+#define __DYNLIB_XCOS_H__
+
+#ifdef _MSC_VER
+       #ifdef XCOS_EXPORTS
+               #define XCOS_IMPEXP __declspec(dllexport)
+       #else
+               #define XCOS_IMPEXP __declspec(dllimport)
+       #endif
+#else
+       #define XCOS_IMPEXP
+#endif
+
+#endif /* __DYNLIB_XCOS_H__ */
+/*--------------------------------------------------------------------------*/ 
diff --git a/scilab/modules/xcos/includes/gw_xcos.h b/scilab/modules/xcos/includes/gw_xcos.h
new file mode 100644 (file)
index 0000000..1a42513
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2009 - DIGITEO - Allan CORNET
+* 
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution.  The terms
+* are also available at    
+* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+*
+*/
+
+#ifndef __GW_XCOS__
+#define __GW_XCOS__
+/*--------------------------------------------------------------------------*/
+#include "dynlib_xcos.h"
+/*--------------------------------------------------------------------------*/
+XCOS_IMPEXP int gw_xcos(void);
+XCOS_IMPEXP int sci_Xcos(char* fname, unsigned long l);
+/*--------------------------------------------------------------------------*/
+#endif /* __GW_XCOS__ */
+/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/xcos/license.txt b/scilab/modules/xcos/license.txt
new file mode 100644 (file)
index 0000000..393778b
--- /dev/null
@@ -0,0 +1,9 @@
+Copyright:
+Copyright (c) 2009 - DIGITEO
+
+License:
+This module must be used under the terms of the CeCILL.
+This module file is licensed as described in the file COPYING, which
+you should have received as part of this distribution.  The terms
+are also available at
+http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
diff --git a/scilab/modules/xcos/macros/buildmacros.bat b/scilab/modules/xcos/macros/buildmacros.bat
new file mode 100644 (file)
index 0000000..f9bd674
--- /dev/null
@@ -0,0 +1,11 @@
+
+rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+rem Copyright (C) 2009 - DIGITEO
+rem
+rem This file must be used under the terms of the CeCILL.
+rem This source file is licensed as described in the file COPYING, which
+rem you should have received as part of this distribution.  The terms
+rem are also available at
+rem http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+@..\..\..\bin\scilex -nwni -ns -e exec('buildmacros.sce');quit;
diff --git a/scilab/modules/xcos/macros/buildmacros.sce b/scilab/modules/xcos/macros/buildmacros.sce
new file mode 100644 (file)
index 0000000..9111ce1
--- /dev/null
@@ -0,0 +1,16 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET <allan.cornet@inria.fr>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution.  The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+if (isdef('genlib') == %f) then
+  exec(SCI+'/modules/functions/scripts/buildmacros/loadgenlib.sce');
+end
+
+// genlib("xcoslib","SCI/modules/xcos/macros",%f,%t);
+
diff --git a/scilab/modules/xcos/macros/cleanmacros.bat b/scilab/modules/xcos/macros/cleanmacros.bat
new file mode 100644 (file)
index 0000000..d8e26bf
--- /dev/null
@@ -0,0 +1,13 @@
+
+rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+rem Copyright (C) 2009 - DIGITEO
+rem
+rem This file must be used under the terms of the CeCILL.
+rem This source file is licensed as described in the file COPYING, which
+rem you should have received as part of this distribution.  The terms
+rem are also available at
+rem http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+@del *.bin 2>NUL
+@del lib 2>NUL
+@del names 2>NUL
diff --git a/scilab/modules/xcos/readme.txt b/scilab/modules/xcos/readme.txt
new file mode 100644 (file)
index 0000000..785eeec
--- /dev/null
@@ -0,0 +1 @@
+README File
diff --git a/scilab/modules/xcos/sci_gateway/c/gw_xcos.c b/scilab/modules/xcos/sci_gateway/c/gw_xcos.c
new file mode 100644 (file)
index 0000000..dd955fa
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#include "gw_xcos.h"
+#include "stack-c.h"
+#include "callFunctionFromGateway.h"
+#include "BOOL.h"
+#include "scilabmode.h"
+#include "localization.h"
+#include "Scierror.h"
+#include "BOOL.h"
+#include "loadOnUseClassPath.h"
+/*--------------------------------------------------------------------------*/
+static BOOL loadedDep = FALSE;
+/*--------------------------------------------------------------------------*/
+#define XCOS_TAB_SIZE 1
+static gw_generic_table Tab[XCOS_TAB_SIZE]={
+  {sci_Xcos, "Xcos"}
+};
+
+/*--------------------------------------------------------------------------*/
+int gw_xcos(void)
+{
+       Rhs = Max(0, Rhs);
+
+       if ( getScilabMode() == SCILAB_NWNI)
+       {
+               Scierror(999,_("Scilab '%s' module disabled in -nogui or -nwni mode."), "xcos");
+               return 0;
+       }
+
+       if (!loadedDep) 
+       {
+               loadOnUseClassPath("XCos");
+               loadedDep = TRUE;
+       }
+       callFunctionFromGateway(Tab,XCOS_TAB_SIZE);
+       return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/xcos/sci_gateway/cpp/sci_Xcos.cpp b/scilab/modules/xcos/sci_gateway/cpp/sci_Xcos.cpp
new file mode 100644 (file)
index 0000000..17338c4
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2009 - DIGITEO - Allan CORNET
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution.  The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+extern "C"
+{
+#include "gw_xcos.h"
+#include "stack-c.h"
+}
+/*--------------------------------------------------------------------------*/
+int sci_Xcos(char *fname,unsigned long fname_len)
+{
+       LhsVar(1) = 0;
+       PutLhsVar();
+       return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/xcos/sci_gateway/xcos_gateway.xml b/scilab/modules/xcos/sci_gateway/xcos_gateway.xml
new file mode 100644 (file)
index 0000000..7cfee99
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<!DOCTYPE GATEWAY SYSTEM "../../functions/xml/gateway.dtd">
+<GATEWAY name="xpad">
+<!-- =================== -->
+<!--
+ Scilab
+ Interface description. In this file, we define the list of the function which
+ will be available into Scilab and the link to the "native" function.
+
+ gatewayId is the position in the hashtable 'Interfaces' defined in the
+ file SCI/modules/core/src/c/callinterf.h
+
+ primitiveId is the position in the hashtable '<module>Table Tab[]' defined
+ in the file modules/<module>/sci_gateway/c/gw_<module>.c
+
+ primitiveName is the name of the Scilab function
+
+ @author Allan CORNET
+ @date DIGITEO 2009
+ ===================
+ Don't touch if you do not know what you are doing
+-->
+<!-- =================== -->
+
+<PRIMITIVE gatewayId="64" primitiveId="1" primitiveName="Xcos" />
+</GATEWAY>
diff --git a/scilab/modules/xcos/src/c/DllmainXCOS.c b/scilab/modules/xcos/src/c/DllmainXCOS.c
new file mode 100644 (file)
index 0000000..caf1f15
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * 
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at    
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include <windows.h> 
+/*--------------------------------------------------------------------------*/ 
+#pragma comment(lib,"../../../../bin/libintl.lib")
+/*--------------------------------------------------------------------------*/ 
+int WINAPI DllMain (HINSTANCE hInstance , DWORD reason, PVOID pvReserved)
+{
+       switch (reason) 
+       {
+       case DLL_PROCESS_ATTACH:
+               break;
+       case DLL_PROCESS_DETACH:
+               break;
+       case DLL_THREAD_ATTACH:
+               break;
+       case DLL_THREAD_DETACH:
+               break;
+       }
+       return 1;
+}
+/*--------------------------------------------------------------------------*/ 
+
diff --git a/scilab/modules/xcos/src/c/LibScilab_Import.def b/scilab/modules/xcos/src/c/LibScilab_Import.def
new file mode 100644 (file)
index 0000000..adcdefd
--- /dev/null
@@ -0,0 +1,10 @@
+LIBRARY    LibScilab.dll
+
+
+EXPORTS
+;
+callFunctionFromGateway
+putlhsvar_
+intersci_
+getScilabMode
+com_
\ No newline at end of file
diff --git a/scilab/modules/xcos/src/c/xcos.vcproj b/scilab/modules/xcos/src/c/xcos.vcproj
new file mode 100644 (file)
index 0000000..4402bf0
--- /dev/null
@@ -0,0 +1,437 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="9,00"
+       Name="xcos"
+       ProjectGUID="{494FA8C9-6C85-4175-BE4C-9A113C7A3278}"
+       RootNamespace="xcos"
+       Keyword="Win32Proj"
+       TargetFrameworkVersion="0"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+               <Platform
+                       Name="x64"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories=".;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../../libs/MALLOC/includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp"
+                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;XCOS_EXPORTS"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="0"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="false"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                               Description="Make dependencies"
+                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="..\..\..\..\bin\scilocalization.lib libscilab.lib"
+                               OutputFile="../../../../bin/$(ProjectName).dll"
+                               LinkIncremental="1"
+                               ModuleDefinitionFile=""
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
+                               ImportLibrary="../../../../bin/$(ProjectName).lib"
+                               TargetMachine="1"
+                               CLRUnmanagedCodeCheck="true"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|x64"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TargetEnvironment="3"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories=".;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../../libs/MALLOC/includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp"
+                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;XCOS_EXPORTS"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="0"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="false"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                               Description="Make dependencies"
+                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;&#x0D;&#x0A;"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="libscilab.lib"
+                               OutputFile="../../../../bin/$(ProjectName).dll"
+                               LinkIncremental="1"
+                               ModuleDefinitionFile=""
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
+                               ImportLibrary="../../../../bin/$(ProjectName).lib"
+                               TargetMachine="17"
+                               CLRUnmanagedCodeCheck="true"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       WholeProgramOptimization="0"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               InlineFunctionExpansion="1"
+                               FavorSizeOrSpeed="1"
+                               WholeProgramOptimization="false"
+                               AdditionalIncludeDirectories=".;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../../libs/MALLOC/includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp"
+                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;XCOS_EXPORTS"
+                               StringPooling="true"
+                               RuntimeLibrary="2"
+                               EnableEnhancedInstructionSet="0"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="false"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                               Description="Make dependencies"
+                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="..\..\..\..\bin\scilocalization.lib libscilab.lib"
+                               OutputFile="../../../../bin/$(ProjectName).dll"
+                               LinkIncremental="1"
+                               ModuleDefinitionFile=""
+                               GenerateDebugInformation="false"
+                               SubSystem="2"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               LinkTimeCodeGeneration="0"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
+                               ImportLibrary="../../../../bin/$(ProjectName).lib"
+                               TargetMachine="1"
+                               CLRUnmanagedCodeCheck="true"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|x64"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       WholeProgramOptimization="0"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TargetEnvironment="3"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               InlineFunctionExpansion="1"
+                               FavorSizeOrSpeed="1"
+                               WholeProgramOptimization="false"
+                               AdditionalIncludeDirectories=".;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../../libs/MALLOC/includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp"
+                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;XCOS_EXPORTS"
+                               StringPooling="true"
+                               RuntimeLibrary="2"
+                               EnableEnhancedInstructionSet="0"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="false"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                               Description="Make dependencies"
+                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;&#x0D;&#x0A;"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="libscilab.lib"
+                               OutputFile="../../../../bin/$(ProjectName).dll"
+                               LinkIncremental="1"
+                               ModuleDefinitionFile=""
+                               GenerateDebugInformation="false"
+                               SubSystem="2"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               LinkTimeCodeGeneration="0"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
+                               ImportLibrary="../../../../bin/$(ProjectName).lib"
+                               TargetMachine="17"
+                               CLRUnmanagedCodeCheck="true"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+                       >
+                       <File
+                               RelativePath=".\DllmainXCOS.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\sci_gateway\c\gw_xcos.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\sci_gateway\cpp\sci_Xcos.cpp"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl"
+                       >
+                       <File
+                               RelativePath="..\..\includes\dynlib_xcos.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\includes\gw_xcos.h"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="localization"
+                       >
+                       <File
+                               RelativePath="..\..\locales\en_US\messages.pot"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Libraries Dependencies"
+                       >
+                       <Filter
+                               Name="Imports"
+                               >
+                               <File
+                                       RelativePath=".\LibScilab_Import.def"
+                                       >
+                               </File>
+                       </Filter>
+               </Filter>
+               <File
+                       RelativePath="..\..\Makefile.am"
+                       >
+               </File>
+               <File
+                       RelativePath="..\..\version.xml"
+                       >
+               </File>
+               <File
+                       RelativePath="..\..\xcos.iss"
+                       >
+               </File>
+               <File
+                       RelativePath="..\..\sci_gateway\xcos_gateway.xml"
+                       >
+               </File>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/XCos.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/XCos.java
new file mode 100644 (file)
index 0000000..80ce9b1
--- /dev/null
@@ -0,0 +1,7 @@
+package org.scilab.modules.xcos;
+
+public class XCos {
+        public XCos() {
+    }
+}
+    
\ No newline at end of file
diff --git a/scilab/modules/xcos/src/java/xcos-JAVA.vcproj b/scilab/modules/xcos/src/java/xcos-JAVA.vcproj
new file mode 100644 (file)
index 0000000..e617146
--- /dev/null
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="9,00"
+       Name="xcos-Ant"
+       ProjectGUID="{F6DA4FFA-E405-4DCF-883B-A3C1713F8C5D}"
+       RootNamespace="xcos-Ant"
+       Keyword="MakeFileProj"
+       TargetFrameworkVersion="0"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+               <Platform
+                       Name="x64"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="0"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="set JAVA_HOME=$(SolutionDir)\java\jdk&#x0D;&#x0A;set PATH=$(SolutionDir)\java\ant\bin;%PATH%;&#x0D;&#x0A;cd ..\..&#x0D;&#x0A;call ant&#x0D;&#x0A;"
+                               ReBuildCommandLine="set JAVA_HOME=$(SolutionDir)\java\jdk&#x0D;&#x0A;set PATH=$(SolutionDir)\java\ant\bin;%PATH%;&#x0D;&#x0A;cd ..\..&#x0D;&#x0A;call ant&#x0D;&#x0A;"
+                               CleanCommandLine="set JAVA_HOME=$(SolutionDir)\java\jdk&#x0D;&#x0A;set PATH=$(SolutionDir)\java\ant\bin;%PATH%;&#x0D;&#x0A;cd ..\..&#x0D;&#x0A;call ant clean&#x0D;&#x0A;"
+                               Output=""
+                               PreprocessorDefinitions="WIN32;_DEBUG"
+                               IncludeSearchPath=""
+                               ForcedIncludes=""
+                               AssemblySearchPath=""
+                               ForcedUsingAssemblies=""
+                               CompileAsManaged=""
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|x64"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="0"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="set JAVA_HOME=$(SolutionDir)\java\jdk&#x0D;&#x0A;set PATH=$(SolutionDir)\java\ant\bin;%PATH%;&#x0D;&#x0A;cd ..\..&#x0D;&#x0A;call ant&#x0D;&#x0A;"
+                               ReBuildCommandLine="set JAVA_HOME=$(SolutionDir)\java\jdk&#x0D;&#x0A;set PATH=$(SolutionDir)\java\ant\bin;%PATH%;&#x0D;&#x0A;cd ..\..&#x0D;&#x0A;call ant&#x0D;&#x0A;"
+                               CleanCommandLine="set JAVA_HOME=$(SolutionDir)\java\jdk&#x0D;&#x0A;set PATH=$(SolutionDir)\java\ant\bin;%PATH%;&#x0D;&#x0A;cd ..\..&#x0D;&#x0A;call ant clean&#x0D;&#x0A;"
+                               Output=""
+                               PreprocessorDefinitions="WIN32;_DEBUG"
+                               IncludeSearchPath=""
+                               ForcedIncludes=""
+                               AssemblySearchPath=""
+                               ForcedUsingAssemblies=""
+                               CompileAsManaged=""
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="0"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="set JAVA_HOME=$(SolutionDir)\java\jdk&#x0D;&#x0A;set PATH=$(SolutionDir)\java\ant\bin;%PATH%;&#x0D;&#x0A;cd ..\..&#x0D;&#x0A;call ant&#x0D;&#x0A;"
+                               ReBuildCommandLine="set JAVA_HOME=$(SolutionDir)\java\jdk&#x0D;&#x0A;set PATH=$(SolutionDir)\java\ant\bin;%PATH%;&#x0D;&#x0A;cd ..\..&#x0D;&#x0A;call ant&#x0D;&#x0A;"
+                               CleanCommandLine="set JAVA_HOME=$(SolutionDir)\java\jdk&#x0D;&#x0A;set PATH=$(SolutionDir)\java\ant\bin;%PATH%;&#x0D;&#x0A;cd ..\..&#x0D;&#x0A;call ant clean&#x0D;&#x0A;"
+                               Output=""
+                               PreprocessorDefinitions="WIN32;NDEBUG"
+                               IncludeSearchPath=""
+                               ForcedIncludes=""
+                               AssemblySearchPath=""
+                               ForcedUsingAssemblies=""
+                               CompileAsManaged=""
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|x64"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="0"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="set JAVA_HOME=$(SolutionDir)\java\jdk&#x0D;&#x0A;set PATH=$(SolutionDir)\java\ant\bin;%PATH%;&#x0D;&#x0A;cd ..\..&#x0D;&#x0A;call ant&#x0D;&#x0A;"
+                               ReBuildCommandLine="set JAVA_HOME=$(SolutionDir)\java\jdk&#x0D;&#x0A;set PATH=$(SolutionDir)\java\ant\bin;%PATH%;&#x0D;&#x0A;cd ..\..&#x0D;&#x0A;call ant&#x0D;&#x0A;"
+                               CleanCommandLine="set JAVA_HOME=$(SolutionDir)\java\jdk&#x0D;&#x0A;set PATH=$(SolutionDir)\java\ant\bin;%PATH%;&#x0D;&#x0A;cd ..\..&#x0D;&#x0A;call ant clean&#x0D;&#x0A;"
+                               Output=""
+                               PreprocessorDefinitions="WIN32;NDEBUG"
+                               IncludeSearchPath=""
+                               ForcedIncludes=""
+                               AssemblySearchPath=""
+                               ForcedUsingAssemblies=""
+                               CompileAsManaged=""
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+               </Filter>
+               <File
+                       RelativePath="..\..\build.xml"
+                       >
+               </File>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/scilab/modules/xcos/src/noxcos/noxcos.c b/scilab/modules/xcos/src/noxcos/noxcos.c
new file mode 100644 (file)
index 0000000..2d45941
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * 
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at    
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#include "noxcos.h"
+#include "Scierror.h"
+#include "localization.h"
+/*--------------------------------------------------------------------------*/
+int gw_xcos(void)
+{
+       Scierror(999,_("Scilab '%s' module not installed.\n"), "xcos");
+       return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/xcos/src/noxcos/noxcos.h b/scilab/modules/xcos/src/noxcos/noxcos.h
new file mode 100644 (file)
index 0000000..459af61
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * 
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at    
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+/**
+ * This function is a wrapper / fake when Scilab is compiled without xcos
+ *
+ * @return 0
+ */
+int gw_xcos(void);
+/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/xcos/version.xml b/scilab/modules/xcos/version.xml
new file mode 100644 (file)
index 0000000..ea6a2d3
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * Scilab
+ * Defines the version of a module
+ * 
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at    
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
+
+<!DOCTYPE MODULE_VERSION SYSTEM "../core/xml/version.dtd">
+<MODULE_VERSION name="xcos">
+
+<VERSION major="1" minor="0" maintenance="0" revision="0" string="unstable-git" />
+</MODULE_VERSION>
diff --git a/scilab/modules/xcos/xcos.iss b/scilab/modules/xcos/xcos.iss
new file mode 100644 (file)
index 0000000..10f8f16
--- /dev/null
@@ -0,0 +1,40 @@
+;##############################################################################################################
+; Scilab ( http://mwww.scilab.org/ ) - This file is part of Scilab
+; Copyright (C) 2009 - DIGITEO - Allan CORNET
+;
+; This file must be used under the terms of the CeCILL.
+; This source file is licensed as described in the file COPYING, which
+; you should have received as part of this distribution.  The terms
+; are also available at
+; http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+;##############################################################################################################
+;--------------------------------------------------------------------------------------------------------------
+; xcos module
+;--------------------------------------------------------------------------------------------------------------
+;
+#define XCOS "xcos"
+;
+Source: bin\xcos.dll; DestDir: {app}\bin; Components: {#COMPN_XCOS}
+;
+Source: modules\{#XCOS}\jar\org.scilab.modules.xcos.jar; DestDir: {app}\modules\{#XCOS}\jar; Components: {#COMPN_XCOS}
+;
+Source: modules\{#XCOS}\VERSION.xml; DestDir: {app}\modules\{#XCOS}; Components: {#COMPN_XCOS}
+Source: modules\{#XCOS}\readme.txt; DestDir: {app}\modules\{#XCOS}; Components: {#COMPN_XCOS}
+Source: modules\{#XCOS}\license.txt; DestDir: {app}\modules\{#XCOS}; Components: {#COMPN_XCOS}
+Source: modules\{#XCOS}\changelog.txt; DestDir: {app}\modules\{#XCOS}; Components: {#COMPN_XCOS}
+;
+Source: modules\{#XCOS}\sci_gateway\xcos_gateway.xml; DestDir: {app}\modules\{#XCOS}\sci_gateway; Components: {#COMPN_XCOS}
+;
+Source: modules\{#XCOS}\etc\{#XCOS}.quit; DestDir: {app}\modules\{#XCOS}\etc; Components: {#COMPN_XCOS}
+Source: modules\{#XCOS}\etc\{#XCOS}.start; DestDir: {app}\modules\{#XCOS}\etc; Components: {#COMPN_XCOS}
+;
+;Source: modules\{#XCOS}\help\addchapter.sce; DestDir: {app}\modules\{#XCOS}\help; Flags: recursesubdirs; Components:  {#COMPN_XCOS}
+;
+Source: modules\{#XCOS}\includes\*.h; DestDir: {app}\modules\{#XCOS}\includes; Components: {#COMPN_XCOS}
+;
+;
+;Source: modules\{#XCOS}\demos\*.*; DestDir: {app}\modules\{#XCOS}\demos; Flags: recursesubdirs; Components: {#COMPN_XCOS}
+;
+;Source: modules\{#XCOS}\tests\*.*; DestDir: {app}\modules\{#XCOS}\tests; Flags: recursesubdirs; Components: {#COMPN_XCOS} and {#COMPN_TESTS}
+;
+;--------------------------------------------------------------------------------------------------------------
index f53c9ea..67d9b1b 100644 (file)
@@ -13,6 +13,8 @@ gluegen.jar=@GLUEGEN_RT@
 
 jhdf5.jar=@JHDF5@
 
+jgraphx.jar=@JGRAPHX@
+
 jrosetta-API.jar=@JROSETTA_API@
 
 jrosetta-engine.jar=@JROSETTA_ENGINE@
@@ -54,3 +56,6 @@ library.javasci.name=javasci.jar
 
 library.hdf5.dir=${modules.dir}/hdf5/${build.jar.dir}/
 library.hdf5.name=org.scilab.modules.hdf5.jar
+
+library.xcos.dir=${modules.dir}/xcos/${build.jar.dir}/
+library.xcos.name=org.scilab.modules.xcos.jar
index 4df7ecb..d8a3a9c 100644 (file)
@@ -4,6 +4,8 @@ commons-logging.jar=${thirdparty.dir}/commons-logging-1.1.jar
 
 flexdock.jar=${thirdparty.dir}/flexdock-0.5.1.jar
 
+jgraphx.jar=${thirdparty.dir}/jgraphx.jar
+
 jogl.jar=${thirdparty.dir}/jogl.jar
 
 jhdf5.jar=${thirdparty.dir}/jhdf5.jar
@@ -56,3 +58,7 @@ library.graphic_export.name=org.scilab.modules.graphic_export.jar
 
 library.hdf5.dir=${modules.dir}/hdf5/${build.jar.dir}/
 library.hdf5.name=org.scilab.modules.hdf5.jar
+
+library.xcos.dir=${modules.dir}/xcos/${build.jar.dir}/
+library.xcos.name=org.scilab.modules.xcos.jar
+