summaryrefslogtreecommitdiff
path: root/modules/windows_tools
diff options
context:
space:
mode:
Diffstat (limited to 'modules/windows_tools')
-rwxr-xr-xmodules/windows_tools/.libs/libsciwindows_tools.abin0 -> 3800 bytes
l---------modules/windows_tools/.libs/libsciwindows_tools.la1
-rwxr-xr-xmodules/windows_tools/Makefile1279
-rwxr-xr-xmodules/windows_tools/Makefile.am46
-rwxr-xr-xmodules/windows_tools/Makefile.in1279
-rwxr-xr-xmodules/windows_tools/etc/windows_tools.quit11
-rwxr-xr-xmodules/windows_tools/etc/windows_tools.start36
-rwxr-xr-xmodules/windows_tools/help/en_US/addchapter.sce11
-rwxr-xr-xmodules/windows_tools/help/en_US/consolebox.xml56
-rwxr-xr-xmodules/windows_tools/help/en_US/createGUID.xml37
-rwxr-xr-xmodules/windows_tools/help/en_US/dos.xml64
-rwxr-xr-xmodules/windows_tools/help/en_US/findfileassociation.xml45
-rwxr-xr-xmodules/windows_tools/help/en_US/getsystemmetrics.xml643
-rwxr-xr-xmodules/windows_tools/help/en_US/istssession.xml41
-rwxr-xr-xmodules/windows_tools/help/en_US/mcisendstring.xml82
-rwxr-xr-xmodules/windows_tools/help/en_US/powershell.xml50
-rwxr-xr-xmodules/windows_tools/help/en_US/win64.xml49
-rwxr-xr-xmodules/windows_tools/help/en_US/winopen.xml42
-rwxr-xr-xmodules/windows_tools/help/en_US/winqueryreg.xml98
-rwxr-xr-xmodules/windows_tools/help/fr_FR/addchapter.sce11
-rwxr-xr-xmodules/windows_tools/help/fr_FR/winopen.xml29
-rwxr-xr-xmodules/windows_tools/help/fr_FR/winqueryreg.xml87
-rwxr-xr-xmodules/windows_tools/help/ja_JP/addchapter.sce11
-rwxr-xr-xmodules/windows_tools/help/ja_JP/dos.xml67
-rwxr-xr-xmodules/windows_tools/help/pt_BR/addchapter.sce11
-rwxr-xr-xmodules/windows_tools/help/ru_RU/addchapter.sce11
-rwxr-xr-xmodules/windows_tools/includes/ConvertSlash.h41
-rwxr-xr-xmodules/windows_tools/includes/FocusOnConsole.h21
-rwxr-xr-xmodules/windows_tools/includes/InitializeWindows_tools.h27
-rwxr-xr-xmodules/windows_tools/includes/MutexClosingScilab.h39
-rwxr-xr-xmodules/windows_tools/includes/TerminateWindows_tools.h28
-rwxr-xr-xmodules/windows_tools/includes/dynlib_windows_tools.h28
-rwxr-xr-xmodules/windows_tools/includes/gw_windows_tools.h36
-rwxr-xr-xmodules/windows_tools/includes/strdup_windows.h50
-rwxr-xr-xmodules/windows_tools/libsciwindows_tools.la41
-rwxr-xr-xmodules/windows_tools/license.txt10
-rwxr-xr-xmodules/windows_tools/locales/ca_ES.po118
-rwxr-xr-xmodules/windows_tools/locales/cs_CZ.po107
-rwxr-xr-xmodules/windows_tools/locales/de_DE.po112
-rwxr-xr-xmodules/windows_tools/locales/es_ES.po116
-rwxr-xr-xmodules/windows_tools/locales/fr_FR.po120
-rwxr-xr-xmodules/windows_tools/locales/it_IT.po123
-rwxr-xr-xmodules/windows_tools/locales/ja_JP.po153
-rwxr-xr-xmodules/windows_tools/locales/pl_PL.po116
-rwxr-xr-xmodules/windows_tools/locales/pt_BR.po118
-rwxr-xr-xmodules/windows_tools/locales/ru_RU.po110
-rwxr-xr-xmodules/windows_tools/locales/uk_UA.po121
-rwxr-xr-xmodules/windows_tools/locales/windows_tools.pot185
-rwxr-xr-xmodules/windows_tools/locales/zh_CN.po107
-rwxr-xr-xmodules/windows_tools/locales/zh_TW.po105
-rwxr-xr-xmodules/windows_tools/macros/buildmacros.bat1
-rwxr-xr-xmodules/windows_tools/macros/buildmacros.sce16
-rwxr-xr-xmodules/windows_tools/macros/cleanmacros.bat3
-rwxr-xr-xmodules/windows_tools/macros/powershell.sci42
-rwxr-xr-xmodules/windows_tools/sci_gateway/c/gw_windows_tools.c47
-rwxr-xr-xmodules/windows_tools/sci_gateway/c/sci_consolebox.c120
-rwxr-xr-xmodules/windows_tools/sci_gateway/c/sci_createGUID.c75
-rwxr-xr-xmodules/windows_tools/sci_gateway/c/sci_dos.c336
-rwxr-xr-xmodules/windows_tools/sci_gateway/c/sci_findfileassociation.c102
-rwxr-xr-xmodules/windows_tools/sci_gateway/c/sci_getsystemmetrics.c424
-rwxr-xr-xmodules/windows_tools/sci_gateway/c/sci_istssession.c57
-rwxr-xr-xmodules/windows_tools/sci_gateway/c/sci_mcisendstring.c123
-rwxr-xr-xmodules/windows_tools/sci_gateway/c/sci_win64.c41
-rwxr-xr-xmodules/windows_tools/sci_gateway/c/sci_winhttpdownload.c85
-rwxr-xr-xmodules/windows_tools/sci_gateway/c/sci_winopen.c41
-rwxr-xr-xmodules/windows_tools/sci_gateway/c/sci_winqueryreg.c284
-rwxr-xr-xmodules/windows_tools/sci_gateway/windows_tools_gateway.xml47
-rwxr-xr-xmodules/windows_tools/src/c/CScilex/CScilex.c180
-rwxr-xr-xmodules/windows_tools/src/c/CScilex/CScilex.rc138
-rwxr-xr-xmodules/windows_tools/src/c/CScilex/CScilex.vcxproj187
-rwxr-xr-xmodules/windows_tools/src/c/CScilex/CScilex.vcxproj.filters27
-rwxr-xr-xmodules/windows_tools/src/c/CScilex/resource.h18
-rwxr-xr-xmodules/windows_tools/src/c/CScilex/wresource.h4
-rwxr-xr-xmodules/windows_tools/src/c/Call_scilab_Import.def5
-rwxr-xr-xmodules/windows_tools/src/c/DllmainWindows_Tools.c34
-rwxr-xr-xmodules/windows_tools/src/c/FindFileAssociation.c50
-rwxr-xr-xmodules/windows_tools/src/c/FindFileAssociation.h28
-rwxr-xr-xmodules/windows_tools/src/c/InitializeWindows_tools.c32
-rwxr-xr-xmodules/windows_tools/src/c/TerminateWindows_tools.c48
-rwxr-xr-xmodules/windows_tools/src/c/WScilex/WScilex.c130
-rwxr-xr-xmodules/windows_tools/src/c/WScilex/WScilex.rc128
-rwxr-xr-xmodules/windows_tools/src/c/WScilex/WScilex.vcxproj212
-rwxr-xr-xmodules/windows_tools/src/c/WScilex/WScilex.vcxproj.filters70
-rwxr-xr-xmodules/windows_tools/src/c/WScilex/resource.h28
-rwxr-xr-xmodules/windows_tools/src/c/WScilex/wresource.h14
-rwxr-xr-xmodules/windows_tools/src/c/WinConsole.c86
-rwxr-xr-xmodules/windows_tools/src/c/WinConsole.h51
-rwxr-xr-xmodules/windows_tools/src/c/core_Import.def24
-rwxr-xr-xmodules/windows_tools/src/c/createGUID.c32
-rwxr-xr-xmodules/windows_tools/src/c/createGUID.h24
-rwxr-xr-xmodules/windows_tools/src/c/httpdownloadfile.c425
-rwxr-xr-xmodules/windows_tools/src/c/httpdownloadfile.h48
-rwxr-xr-xmodules/windows_tools/src/c/localization_Import.def8
-rwxr-xr-xmodules/windows_tools/src/c/registry.c286
-rwxr-xr-xmodules/windows_tools/src/c/registry.h86
-rwxr-xr-xmodules/windows_tools/src/c/resource.h23
-rwxr-xr-xmodules/windows_tools/src/c/resources/bin.icobin0 -> 80160 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/cos.icobin0 -> 82689 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/cosf.icobin0 -> 84124 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/dem.icobin0 -> 81677 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/graph.icobin0 -> 86021 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/sav.icobin0 -> 82786 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/sce.icobin0 -> 82534 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/sci.icobin0 -> 80277 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/scilab.icobin0 -> 58552 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/scilab_splashscreen.bmpbin0 -> 522054 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/sod.icobin0 -> 46760 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/tst.icobin0 -> 80215 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/xcos.icobin0 -> 85004 bytes
-rwxr-xr-xmodules/windows_tools/src/c/resources/zcos.icobin0 -> 47638 bytes
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/ConvertSlash.c69
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/DllmainScilab_Windows.c34
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/FilesAssociations.c332
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/FilesAssociations.h51
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/FindScilab.c75
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/FindScilab.h39
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/FocusOnConsole.c30
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/Gui_Import.def9
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/InnosetupMutex.c45
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/InnosetupMutex.h38
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/Localization_Import.def10
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/MutexClosingScilab.c77
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/SetHeapOptions.c54
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/SetHeapOptions.h30
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/SetScilabEnvironmentVariables.c266
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/SetScilabEnvironmentVariables.h28
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/TextToPrint.c626
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/TextToPrint.h45
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/WindowShow.c74
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/WindowShow.h36
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/WndThread.c160
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/WndThread.h48
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/buildMainWindowTitle_Windows.c32
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/buildMainWindowTitle_Windows.h27
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/console.c186
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/console.h67
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/console_main.c188
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/console_main.h28
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/core_Import.def21
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/dynlib_scilab_windows.h28
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/forbiddenToUseScilab.c34
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/forbiddenToUseScilab.h24
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/getBlasType.c65
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/getBlasType.h28
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/getScilabDirectory.c85
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/getScilabDirectory.h28
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/getVideoAdapters.c160
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/getVideoAdapters.h21
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/killScilabProcess.c33
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/killScilabProcess.h26
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/mmapWindows.c135
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/mmapWindows.h32
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/registry-files-association.reg46
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/resource.h24
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/scilab_main.c99
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/scilab_main.h31
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/scilab_windows.rc93
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/scilab_windows.vcxproj295
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/scilab_windows.vcxproj.filters207
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/spawncommand.c476
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/spawncommand.h79
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/splashScreen.cpp231
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/splashScreen.h23
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/strdup_windows.c48
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/windows_main.c271
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/windows_main.h31
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/windows_tools_Import.def6
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/wmcopydata.c92
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows/wmcopydata.h54
-rwxr-xr-xmodules/windows_tools/src/c/scilab_windows_Import.def19
-rwxr-xr-xmodules/windows_tools/src/c/windows_tools.rc97
-rwxr-xr-xmodules/windows_tools/src/c/windows_tools.vcxproj281
-rwxr-xr-xmodules/windows_tools/src/c/windows_tools.vcxproj.filters159
-rwxr-xr-xmodules/windows_tools/src/c/winopen.c51
-rwxr-xr-xmodules/windows_tools/src/c/winopen.h28
-rwxr-xr-xmodules/windows_tools/src/nowindows_tools/.deps/.dirstamp0
-rwxr-xr-xmodules/windows_tools/src/nowindows_tools/.deps/libsciwindows_tools_la-nowindows_tools.Plo21
-rwxr-xr-xmodules/windows_tools/src/nowindows_tools/.dirstamp0
-rwxr-xr-xmodules/windows_tools/src/nowindows_tools/.libs/libsciwindows_tools_la-nowindows_tools.obin0 -> 3544 bytes
-rwxr-xr-xmodules/windows_tools/src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo12
-rwxr-xr-xmodules/windows_tools/src/nowindows_tools/nowindows_tools.c20
-rwxr-xr-xmodules/windows_tools/src/nowindows_tools/nowindows_tools.rc97
-rwxr-xr-xmodules/windows_tools/src/nowindows_tools/nowindows_tools.vcxproj187
-rwxr-xr-xmodules/windows_tools/src/nowindows_tools/nowindows_tools.vcxproj.filters30
-rwxr-xr-xmodules/windows_tools/src/nowindows_tools/resource.h21
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_12062.dia.ref18
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_12062.tst19
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_3672.tst26
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_3789.tst21
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_3992.tst30
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_4030.tst19
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_4584.dia.ref14
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_4584.tst17
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_4702.dia.ref16
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_4702.tst20
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_5155.tst25
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_6387.tst28
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_6447.dia.ref26
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_6447.tst31
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_6489.dia.ref19
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_6489.tst23
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_6740.tst32
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_6964.tst22
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_7021.tst19
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_7291.dia.ref24
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_7291.tst27
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_8218.tst44
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_8424.tst31
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_8959.dia.ref19
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_8959.tst20
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_9920.dia.ref18
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/bug_9920.tst19
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/text_ANSI.txt1
-rwxr-xr-xmodules/windows_tools/tests/nonreg_tests/text_UTF8.txt1
-rwxr-xr-xmodules/windows_tools/tests/unit_tests/createGUID.dia.ref11
-rwxr-xr-xmodules/windows_tools/tests/unit_tests/createGUID.tst13
-rwxr-xr-xmodules/windows_tools/tests/unit_tests/findfileassociation.dia.ref14
-rwxr-xr-xmodules/windows_tools/tests/unit_tests/findfileassociation.tst16
-rwxr-xr-xmodules/windows_tools/tests/unit_tests/getsystemmetrics.dia.ref67
-rwxr-xr-xmodules/windows_tools/tests/unit_tests/getsystemmetrics.tst68
-rwxr-xr-xmodules/windows_tools/tests/unit_tests/intelcompiler.dia.ref13
-rwxr-xr-xmodules/windows_tools/tests/unit_tests/intelcompiler.tst14
-rwxr-xr-xmodules/windows_tools/tests/unit_tests/powershell.dia.ref11
-rwxr-xr-xmodules/windows_tools/tests/unit_tests/powershell.tst11
-rwxr-xr-xmodules/windows_tools/tests/unit_tests/winqueryreg.dia.ref19
-rwxr-xr-xmodules/windows_tools/tests/unit_tests/winqueryreg.tst26
-rwxr-xr-xmodules/windows_tools/windows_tools.iss49
227 files changed, 17913 insertions, 0 deletions
diff --git a/modules/windows_tools/.libs/libsciwindows_tools.a b/modules/windows_tools/.libs/libsciwindows_tools.a
new file mode 100755
index 000000000..701d2e09c
--- /dev/null
+++ b/modules/windows_tools/.libs/libsciwindows_tools.a
Binary files differ
diff --git a/modules/windows_tools/.libs/libsciwindows_tools.la b/modules/windows_tools/.libs/libsciwindows_tools.la
new file mode 120000
index 000000000..81810c3c0
--- /dev/null
+++ b/modules/windows_tools/.libs/libsciwindows_tools.la
@@ -0,0 +1 @@
+../libsciwindows_tools.la \ No newline at end of file
diff --git a/modules/windows_tools/Makefile b/modules/windows_tools/Makefile
new file mode 100755
index 000000000..40142ae39
--- /dev/null
+++ b/modules/windows_tools/Makefile
@@ -0,0 +1,1279 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# modules/windows_tools/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2007 - INRIA - Sylvestre LEDRU
+#
+# This file is distributed under the same license as the Scilab package.
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
+# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@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.1-en.txt
+#
+
+##########
+### Makefile included stuff
+### Target, variable, suffixes which are supposed to be useful in every makefile.am
+##########
+
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/scilab
+pkgincludedir = $(includedir)/scilab
+pkglibdir = $(libdir)/scilab
+pkglibexecdir = $(libexecdir)/scilab
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+DIST_COMMON = $(top_srcdir)/Makefile.incl.am $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/config/mkinstalldirs \
+ $(top_srcdir)/config/depcomp
+am__append_1 = java
+subdir = modules/windows_tools
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \
+ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \
+ $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \
+ $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \
+ $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \
+ $(top_srcdir)/m4/intel_compiler.m4 \
+ $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \
+ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \
+ $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \
+ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \
+ $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \
+ $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkglibdir)" \
+ "$(DESTDIR)$(libsciwindows_tools_la_etcdir)" \
+ "$(DESTDIR)$(libsciwindows_tools_la_rootdir)" \
+ "$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)"
+LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
+libsciwindows_tools_la_LIBADD =
+am__dirstamp = $(am__leading_dot)dirstamp
+am__objects_1 = \
+ src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo
+am_libsciwindows_tools_la_OBJECTS = $(am__objects_1)
+libsciwindows_tools_la_OBJECTS = $(am_libsciwindows_tools_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__v_lt_1 =
+am_libsciwindows_tools_la_rpath =
+#am_libsciwindows_tools_la_rpath = -rpath \
+# $(pkglibdir)
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I. -I$(top_builddir)/modules/core/includes
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libsciwindows_tools_la_SOURCES)
+DIST_SOURCES = $(libsciwindows_tools_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(libsciwindows_tools_la_etc_DATA) \
+ $(libsciwindows_tools_la_root_DATA) \
+ $(libsciwindows_tools_la_sci_gateway_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing aclocal-1.14
+ALL_LINGUAS = en_US fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR ja_JP it_IT uk_UA pl_PL cs_CZ
+ALL_LINGUAS_DOC = en_US fr_FR pt_BR ja_JP ru_RU
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+ANT = /usr/bin/ant
+ANTLR = /usr/share/java/antlr.jar
+AR = ar
+ARPACK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -larpack
+ASM3 = /usr/share/java/asm3-3.3.2.jar
+AUTOCONF = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing autoconf
+AUTOHEADER = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing autoheader
+AUTOMAKE = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing automake-1.14
+AVALON_FRAMEWORK = /home/shashank/scilab-master_5.5.2/thirdparty/avalon-framework.jar
+AWK = mawk
+BATIK = /home/shashank/scilab-master_5.5.2/thirdparty/batik-all-1.7.jar
+BLAS_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lblas
+CC = gcc
+CCACHE =
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKSTYLE =
+COBERTURA = /usr/share/java/cobertura.jar
+COMMONS_BEANUTILS =
+COMMONS_IO = /home/shashank/scilab-master_5.5.2/thirdparty/commons-io.jar
+COMMONS_LOGGING = /home/shashank/scilab-master_5.5.2/thirdparty/commons-logging.jar
+CPP = gcc -E
+CPPFLAGS =
+CURL_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+CURL_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/curl-config
+CURL_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lcurl -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -lssl -lcrypto -lrt -lz
+CURL_VERSION = libcurl 7.19.7
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEMOTOOLS_ENABLE = yes
+DEPDIR = .deps
+DLLTOOL = false
+DOCBOOK_ROOT = /home/shashank/scilab-master_5.5.2/thirdparty/docbook/
+DOXYGEN_BIN =
+DSYMUTIL =
+DUMPBIN =
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+ECJ = /home/shashank/scilab-master_5.5.2/thirdparty/ecj.jar
+EGREP = /bin/grep -E
+EXEEXT =
+F77 = gfortran
+FFLAGS = -g -O2
+FFTW3_LIB = -L/home/shashank/scilab-master_5.5.2/usr/lib -lfftw3
+FFTW_ENABLE = yes
+FGREP = /bin/grep -F
+FLEXDOCK = /home/shashank/scilab-master_5.5.2/thirdparty/flexdock-1.2.4.jar
+FLIBS = -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. -lpthread -ldl -lcurses -lgfortran -lm -lquadmath
+FOP = /home/shashank/scilab-master_5.5.2/thirdparty/fop.jar
+FREEHEP_GRAPHICS2D = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphics2d.jar
+FREEHEP_GRAPHICSIO = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphicsio.jar
+FREEHEP_GRAPHICSIO_EMF = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphicsio-emf.jar
+FREEHEP_IO = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-io.jar
+FREEHEP_UTIL = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-util.jar
+GENHTML =
+GETTEXT_MACRO_VERSION = 0.19
+GIWS_BIN =
+GLUEGEN2_RT = /home/shashank/scilab-master_5.5.2/thirdparty/gluegen2-rt.jar
+GMSGFMT = /usr/bin/msgfmt
+GMSGFMT_015 = /usr/bin/msgfmt
+GRAPHICS_ENABLE = yes
+GREP = /bin/grep
+GUI_ENABLE = yes
+HDF5_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+HDF5_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lhdf5 -lhdf5_hl
+HELP_ENABLE = yes
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+INTLLIBS =
+INTL_MACOSX_LIBS =
+JAR = /usr/lib/jvm/java-8-openjdk-amd64/bin/jar
+JAVA = /usr/lib/jvm/java-8-openjdk-amd64/bin/java
+JAVAC = /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
+JAVAC_DEBUG = off
+JAVADOC = /usr/lib/jvm/java-8-openjdk-amd64/bin/javadoc
+JAVAH = /usr/lib/jvm/java-8-openjdk-amd64/bin/javah
+JAVASCI_ENABLE = yes
+JAVA_ENABLE = yes
+JAVA_G = /usr/lib/jvm/java-8-openjdk-amd64/bin/java
+JAVA_HOME = /usr/lib/jvm/java-8-openjdk-amd64
+JAVA_JNI_INCLUDE = -I/usr/lib/jvm/java-8-openjdk-amd64/include -I/usr/lib/jvm/java-8-openjdk-amd64/include/linux
+JAVA_JNI_LIBS = -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64 -ljava -lverify -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -ljvm
+JDB = /usr/lib/jvm/java-8-openjdk-amd64/bin/jdb
+JEUCLID_CORE = /home/shashank/scilab-master_5.5.2/thirdparty/jeuclid-core.jar
+JGRAPHX = /home/shashank/scilab-master_5.5.2/thirdparty/jgraphx.jar
+JHALL = /home/shashank/scilab-master_5.5.2/thirdparty/jhall.jar
+JLATEXMATH = /home/shashank/scilab-master_5.5.2/thirdparty/jlatexmath-1.0.3.jar
+JLATEXMATH_FOP = /home/shashank/scilab-master_5.5.2/thirdparty/jlatexmath-fop-1.0.3.jar
+JOGL2 = /home/shashank/scilab-master_5.5.2/thirdparty/jogl2.jar
+JROSETTA_API = /home/shashank/scilab-master_5.5.2/thirdparty/jrosetta-API.jar
+JROSETTA_ENGINE = /home/shashank/scilab-master_5.5.2/thirdparty/jrosetta-engine.jar
+JUNIT4 = /usr/share/java/junit4.jar
+LAPACK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -llapack
+LCOV =
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = -Wl,--no-as-needed
+LIBICONV = -liconv
+LIBINTL =
+LIBM = -lm
+LIBOBJS =
+LIBS = -lpthread -ldl -lcurses -lm
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO =
+LN_S = ln -s
+LOGGING_LEVEL = SEVERE
+LOOKS = /home/shashank/scilab-master_5.5.2/thirdparty/looks-2.1.1.jar
+LTLIBICONV = -liconv
+LTLIBINTL =
+LTLIBOBJS =
+MAINT = #
+MAKEINFO = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing makeinfo
+MANIFEST_TOOL = :
+MATIO_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+MATIO_ENABLE = yes
+MATIO_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lm -lz -lmatio -lhdf5
+MKDIR_P = /bin/mkdir -p
+MPI_ENABLE = no
+MSGCAT = /usr/bin/msgcat
+MSGFMT = /usr/bin/msgfmt
+MSGFMT_015 = /usr/bin/msgfmt
+MSGMERGE = /usr/bin/msgmerge
+NM = nm
+NMEDIT =
+OBJDUMP = objdump
+OBJEXT = o
+OCAMLC = ocamlc
+OCAMLDEP = ocamldep
+OCAMLLEX = ocamllex
+OCAMLOPT = ocamlopt
+OCAMLYACC = ocamlyacc
+OPENMPI_CC =
+OPENMPI_CFLAGS =
+OPENMPI_CXX =
+OPENMPI_CXXFLAGS =
+OPENMPI_LIBS =
+OPENMP_CFLAGS = -fopenmp
+OPENMP_CXXFLAGS = -fopenmp
+OPENMP_ENABLE = yes
+OPENMP_LIBS = -lgomp -lstdc++
+OTOOL =
+OTOOL64 =
+PACKAGE = scilab
+PACKAGE_BUGREPORT = http://bugzilla.scilab.org/
+PACKAGE_NAME = Scilab
+PACKAGE_STRING = Scilab 5
+PACKAGE_TARNAME = scilab
+PACKAGE_URL =
+PACKAGE_VERSION = 5
+PATH_SEPARATOR = :
+PCRE_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+PCRE_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/pcre-config
+PCRE_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lpcreposix -lpcre
+PCRE_VERSION = 8.35
+PKG_CONFIG = /usr/bin/pkg-config
+POSUB = po
+POW_LIB =
+PYTHON =
+RANLIB = ranlib
+RELOCATABLE = no
+RT_LIB = -lrt
+SAXON = /home/shashank/scilab-master_5.5.2/thirdparty/saxon9he.jar
+SCILAB_BINARY_VERSION = 5.5.2
+SCILAB_LIBRARY_VERSION = 5:5:2
+SCILAB_VERSION_MAINTENANCE = 2
+SCILAB_VERSION_MAJOR = 5
+SCILAB_VERSION_MINOR = 5
+SCIRENDERER = ${modules.dir}/scirenderer/${build.jar.dir}/scirenderer.jar
+SCIRENDERER_CP = $SCILAB/modules/scirenderer/jar/scirenderer.jar
+SCI_CFLAGS = -D_LARGEFILE64_SOURCE -DNDEBUG -m64 -fno-stack-protector
+SCI_CXXFLAGS = -DNDEBUG -fno-stack-protector
+SCI_FFLAGS = -DNDEBUG -m64 -fPIC
+SCI_LDFLAGS =
+SED = /bin/sed
+SET_MAKE =
+SET_RELOCATABLE =
+SHELL = /bin/bash
+SKINLF = /home/shashank/scilab-master_5.5.2/thirdparty/skinlf.jar
+SPLINT = no
+STRIP = strip
+SWIG_BIN =
+SWIG_JAVA =
+SWIG_RUNTIME_LIBS_DIR =
+SWIG_SCILAB =
+TCLTK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -ltk8.5 -L/home/shashank/scilab-master_5.5.2/usr/lib -ltcl8.5 -ldl
+TCL_INC_PATH = -I/home/shashank/scilab-master_5.5.2/usr/include
+TK_INC_PATH = -I/home/shashank/scilab-master_5.5.2/usr/include
+UMFPACK_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+UMFPACK_ENABLE = yes
+UMFPACK_LIB = -L/home/shashank/scilab-master_5.5.2/usr/lib -lumfpack -lamd
+USE_NLS = yes
+VERSION = 5
+WITH_OCAML =
+WITH_TKSCI = yes
+XCOS_ENABLE = yes
+XGETTEXT = /usr/bin/xgettext
+XGETTEXT_015 = /usr/bin/xgettext
+XGETTEXT_EXTRA_OPTIONS =
+XMKMF =
+XMLGRAPHICS_COMMONS = /home/shashank/scilab-master_5.5.2/thirdparty/xmlgraphics-commons-1.4.jar
+XML_APIS_EXT = /home/shashank/scilab-master_5.5.2/thirdparty/xml-apis-ext.jar
+XML_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/xml2-config
+XML_FLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include/libxml2
+XML_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lxml2 -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -lz -lm -ldl
+XML_VERSION = 2.9.1
+X_CFLAGS =
+X_EXTRA_LIBS =
+X_LIBS =
+X_PRE_LIBS =
+abs_builddir = /home/shashank/scilab-master_5.5.2/modules/windows_tools
+abs_srcdir = /home/shashank/scilab-master_5.5.2/modules/windows_tools
+abs_top_builddir = /home/shashank/scilab-master_5.5.2
+abs_top_srcdir = /home/shashank/scilab-master_5.5.2
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN =
+ac_ct_F77 = gfortran
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias =
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+cxx_present = yes
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias =
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/shashank/scilab-master_5.5.2/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+
+# List of the c files
+WINDOWS_TOOLS_C_SOURCES = src/nowindows_tools/nowindows_tools.c
+
+# Includes need for the compilation
+libsciwindows_tools_la_CPPFLAGS = -I$(srcdir)/includes/ \
+ -I$(srcdir)/src/c/ \
+ -I$(top_srcdir)/modules/api_scilab/includes/ \
+ -I$(top_srcdir)/modules/output_stream/includes/ \
+ $(AM_CPPFLAGS)
+
+
+# Name of the future library (.la will be replace by .so, .a, etc regarding
+# the system)
+#pkglib_LTLIBRARIES = libsciwindows_tools.la
+noinst_LTLIBRARIES = libsciwindows_tools.la
+
+# All the sources needed by libsciwindows_tools.la
+libsciwindows_tools_la_SOURCES = $(WINDOWS_TOOLS_C_SOURCES)
+
+#### Name of the module and the path ######
+modulename = windows_tools
+
+#### windows_tools : Conf files ####
+libsciwindows_tools_la_rootdir = $(mydatadir)
+libsciwindows_tools_la_root_DATA = license.txt
+
+#### windows_tools : init scripts ####
+libsciwindows_tools_la_etcdir = $(mydatadir)/etc
+libsciwindows_tools_la_etc_DATA = etc/windows_tools.quit etc/windows_tools.start
+
+#### windows_tools : gateway declaration ####
+libsciwindows_tools_la_sci_gatewaydir = $(mydatadir)/sci_gateway
+libsciwindows_tools_la_sci_gateway_DATA = sci_gateway/windows_tools_gateway.xml
+
+# Where all the Scilab stuff is installed (macros, help, ...)
+mydatadir = $(pkgdatadir)/modules/$(modulename)
+
+# Set AM_* SCI detected settings
+AM_CPPFLAGS = $(SCI_CPPFLAGS)
+AM_CFLAGS = $(SCI_CFLAGS)
+AM_CXXFLAGS = $(SCI_CXXFLAGS)
+# append includes to AM_FFLAGS to manage fortran includes
+AM_FFLAGS = $(SCI_FFLAGS) -I$(top_srcdir)/modules/core/includes/
+
+# Tag shared libraries with the Scilab version
+AM_LDFLAGS = $(SCI_LDFLAGS) -version-number $(SCILAB_LIBRARY_VERSION)
+
+# splint options
+SPLINT_OPTIONS = -weak -booltype BOOL
+
+########################### JAVA ######################################
+#### We are delegating java compilation to ant... Thanks to that
+#### the procedure will be the same with Microsoft Windows (C)
+#### and Linux/Unix
+#######################################################################
+TARGETS_ALL = $(am__append_1)
+
+################ MACROS ######################
+# Rule to build a macro
+# NOT USED AT THE MOMENT
+SUFFIXES = .sci
+
+########### INSTALL DOCUMENTATION ###################
+
+# Install documentation files into the right target
+# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because
+# automake needs the html files to be present which is not the case when
+# we are building Scilab
+
+# Where it should be installed
+pkgdocdir = $(mydatadir)
+
+# What is the mask of the help source
+DOCMASKXML = *.xml
+
+# What is the mask of the MathML sources
+DOCMASKMML = *.mml
+
+########### INSTALL DATA ###################
+# Install macros, help & demos
+# Where it should be installed
+pkgmacrosdir = $(mydatadir)
+# Which directory we process
+MACRODIRS = macros/
+# Mask of the Scilab sources macros
+MACROMASK = *.sci
+# Mask of the Scilab executable sources macros
+MACROBUILDMASK = *.sce
+# Mask of the Scilab compiled macros
+MACROBINMASK = *.bin
+# List of the standard directory for tests
+TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests tests/java
+# Where the demos should be installed
+pkgdemosdir = $(mydatadir)
+# List of the standard directory for demos
+DEMOS_DIR = demos
+# List of the standard directory for examples
+EXAMPLES_DIR = examples
+# Where to export JAVA archives (.jar)
+JARDIR = jar/
+# JAR files mask
+JARMASK = *.jar
+# Chapter file
+HELP_CHAPTERDIR = help/
+HELP_CHAPTERFILE = addchapter.sce
+HELP_CHAPTERLANG = en_US fr_FR pt_BR
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .sci .bin .c .lo .o .obj
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/windows_tools/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/windows_tools/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/Makefile.incl.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+src/nowindows_tools/$(am__dirstamp):
+ @$(MKDIR_P) src/nowindows_tools
+ @: > src/nowindows_tools/$(am__dirstamp)
+src/nowindows_tools/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/nowindows_tools/$(DEPDIR)
+ @: > src/nowindows_tools/$(DEPDIR)/$(am__dirstamp)
+src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo: \
+ src/nowindows_tools/$(am__dirstamp) \
+ src/nowindows_tools/$(DEPDIR)/$(am__dirstamp)
+
+libsciwindows_tools.la: $(libsciwindows_tools_la_OBJECTS) $(libsciwindows_tools_la_DEPENDENCIES) $(EXTRA_libsciwindows_tools_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libsciwindows_tools_la_rpath) $(libsciwindows_tools_la_OBJECTS) $(libsciwindows_tools_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f src/nowindows_tools/*.$(OBJEXT)
+ -rm -f src/nowindows_tools/*.lo
+
+distclean-compile:
+ -rm -f *.tab.c
+
+include src/nowindows_tools/$(DEPDIR)/libsciwindows_tools_la-nowindows_tools.Plo
+
+.c.o:
+ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Po
+# $(AM_V_CC)source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Po
+# $(AM_V_CC)source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Plo
+# $(AM_V_CC)source='$<' object='$@' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $<
+
+src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo: src/nowindows_tools/nowindows_tools.c
+ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciwindows_tools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo -MD -MP -MF src/nowindows_tools/$(DEPDIR)/libsciwindows_tools_la-nowindows_tools.Tpo -c -o src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo `test -f 'src/nowindows_tools/nowindows_tools.c' || echo '$(srcdir)/'`src/nowindows_tools/nowindows_tools.c
+ $(AM_V_at)$(am__mv) src/nowindows_tools/$(DEPDIR)/libsciwindows_tools_la-nowindows_tools.Tpo src/nowindows_tools/$(DEPDIR)/libsciwindows_tools_la-nowindows_tools.Plo
+# $(AM_V_CC)source='src/nowindows_tools/nowindows_tools.c' object='src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciwindows_tools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo `test -f 'src/nowindows_tools/nowindows_tools.c' || echo '$(srcdir)/'`src/nowindows_tools/nowindows_tools.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+ -rm -rf src/nowindows_tools/.libs src/nowindows_tools/_libs
+install-libsciwindows_tools_la_etcDATA: $(libsciwindows_tools_la_etc_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsciwindows_tools_la_etc_DATA)'; test -n "$(libsciwindows_tools_la_etcdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsciwindows_tools_la_etcdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsciwindows_tools_la_etcdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciwindows_tools_la_etcdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciwindows_tools_la_etcdir)" || exit $$?; \
+ done
+
+uninstall-libsciwindows_tools_la_etcDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsciwindows_tools_la_etc_DATA)'; test -n "$(libsciwindows_tools_la_etcdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsciwindows_tools_la_etcdir)'; $(am__uninstall_files_from_dir)
+install-libsciwindows_tools_la_rootDATA: $(libsciwindows_tools_la_root_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsciwindows_tools_la_root_DATA)'; test -n "$(libsciwindows_tools_la_rootdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsciwindows_tools_la_rootdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsciwindows_tools_la_rootdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciwindows_tools_la_rootdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciwindows_tools_la_rootdir)" || exit $$?; \
+ done
+
+uninstall-libsciwindows_tools_la_rootDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsciwindows_tools_la_root_DATA)'; test -n "$(libsciwindows_tools_la_rootdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsciwindows_tools_la_rootdir)'; $(am__uninstall_files_from_dir)
+install-libsciwindows_tools_la_sci_gatewayDATA: $(libsciwindows_tools_la_sci_gateway_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsciwindows_tools_la_sci_gateway_DATA)'; test -n "$(libsciwindows_tools_la_sci_gatewaydir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)" || exit $$?; \
+ done
+
+uninstall-libsciwindows_tools_la_sci_gatewayDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsciwindows_tools_la_sci_gateway_DATA)'; test -n "$(libsciwindows_tools_la_sci_gatewaydir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA) all-local
+installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(libsciwindows_tools_la_etcdir)" "$(DESTDIR)$(libsciwindows_tools_la_rootdir)" "$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f src/nowindows_tools/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/nowindows_tools/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf src/nowindows_tools/$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-local distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local \
+ install-libsciwindows_tools_la_etcDATA \
+ install-libsciwindows_tools_la_rootDATA \
+ install-libsciwindows_tools_la_sci_gatewayDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am: install-html-local
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf src/nowindows_tools/$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libsciwindows_tools_la_etcDATA \
+ uninstall-libsciwindows_tools_la_rootDATA \
+ uninstall-libsciwindows_tools_la_sci_gatewayDATA \
+ uninstall-pkglibLTLIBRARIES
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am \
+ check-local clean clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-local distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-html-local install-info \
+ install-info-am install-libsciwindows_tools_la_etcDATA \
+ install-libsciwindows_tools_la_rootDATA \
+ install-libsciwindows_tools_la_sci_gatewayDATA install-man \
+ install-pdf install-pdf-am install-pkglibLTLIBRARIES \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am \
+ uninstall-libsciwindows_tools_la_etcDATA \
+ uninstall-libsciwindows_tools_la_rootDATA \
+ uninstall-libsciwindows_tools_la_sci_gatewayDATA \
+ uninstall-pkglibLTLIBRARIES
+
+
+# This target enables tests for Scilab
+check-local: $(top_builddir)/scilab-bin test
+ if test -d $(mydatadir)/tests; then \
+ @COMMAND="try test_run('$(modulename)');catch exit(-1);end;exit(0)"; export LANG=C; $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"; \
+ fi
+check-code:
+ if test -f build.xml; then \
+ $(ANT) checkstyle; \
+ fi
+ if test -x "$(SPLINT)"; then \
+ $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \
+ fi
+java:
+# Some configurations needs to export JAVA_HOME in the current env
+ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT); \
+ fi
+
+clean-java:
+# Some configurations needs to export JAVA_HOME in the current env
+ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT) clean; \
+ fi;
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+#swig: $(SWIG_WRAPPERS)
+# @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \
+# SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \
+# if test -n "$(SWIG_WRAPPERS)"; then \
+# for file in $(SWIG_WRAPPERS) ; do \
+# echo "Swig process of $$file (Java) ..."; \
+# $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \
+# done; \
+# fi
+
+#swig-scilab: $(SWIG_SCILAB_WRAPPERS)
+# @SWIG_OUTDIR=src/swig/; \
+# if test -n "$(SWIG_SCILAB_WRAPPERS)"; then \
+# for file in $(SWIG_SCILAB_WRAPPERS) ; do \
+# echo "Swig process of $$file (Scilab) ..."; \
+# $(SWIG_BIN) $(SWIG_SCILAB) -outdir $$SWIG_OUTDIR $$file; \
+# done; \
+# fi
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+#giws: $(GIWS_WRAPPERS)
+# @GIWS_OUTPUTDIR=src/jni/; \
+# MANDATORY_OPTIONS="--throws-exception-on-error --description-file"; \
+# if test -n "$(GIWS_WRAPPERS)"; then \
+# for file in $(GIWS_WRAPPERS) ; do \
+# echo "GIWS process of $$file ..."; \
+# if test -z "$(GIWS_OPTIONS)"; then \
+# $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+# else \
+# echo "Custom GIWS call with '$$GIWS_OPTIONS'"; \
+# $(GIWS_BIN) $$GIWS_OPTIONS --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+# fi \
+# done; \
+# fi
+
+#giws-exception:
+# @GIWS_OUTPUTDIR=src/jni/;\
+# echo "GIWS: Generation of exception class ..."; \
+# $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR
+
+macros:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been built"; \
+ else \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\
+ fi)
+
+# Removes the macros
+clean-macros:
+# Removes macros (*.bin generated from .sci)
+ @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \
+ rm -f $(builddir)/$$dir/$(MACROBINMASK); \
+ done
+
+test:
+# More tests could be added here
+ @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT) test; \
+ fi
+
+all-local: $(TARGETS_ALL)
+
+.sci.bin:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been build"; \
+ else \
+ echo "Creating $@"; \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \
+ fi )
+
+install-html-local:
+
+install-data-local-local:
+# Mainly for javasci
+ @if test -d $(srcdir)/javadoc; then \
+ cp -R $(srcdir)/javadoc $(DESTDIR)/$(mydatadir)/; \
+ fi
+# If the user wants the help sources to be installed
+ @echo "-------- Install of XML sources of help files --------"; \
+ for lang in $(ALL_LINGUAS); do \
+ if test -d $(srcdir)/help/$$lang; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \
+ if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \
+ for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \
+ done ; \
+ fi; \
+ fi; \
+ done; \
+ @echo "-------- Install of MathML sources --------"; \
+ if test -d $(srcdir)/help/mml/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \
+ if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \
+ for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \
+ done ; \
+ fi; \
+ fi
+install-data-local:
+# Install the tests
+ @echo "-------- Install tests (if any) --------"; \
+ for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the help chapter
+ @echo "-------- Install the help chapter (if any) --------"; \
+ for lang in $(HELP_CHAPTERLANG); do \
+ HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \
+ if test -f $$HELPFILE; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ fi; \
+ done
+# Install the demos & examples
+ @echo "-------- Install demos & examples (if any) --------"; \
+ for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the macros
+ @echo "-------- Install macros (if any) --------"; \
+ for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ if test -d $(srcdir)/$$dir/; then \
+ FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\
+ if test -n "$(MACROSSPECIALEXT)"; then \
+ specialExtDir=""; \
+ for specialExt in $(MACROSSPECIALEXT); do \
+ specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \
+ done; \
+ FILELIST="$$FILELIST $$specialExtDir"; \
+ fi; \
+ for file in `ls -1 $$FILELIST 2>/dev/null`; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \
+ done; \
+ fi; \
+ done
+# Install java files (.jar)
+ @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \
+ echo "-------- Install jar files --------"; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \
+ for file in $(srcdir)/$(JARDIR)$(JARMASK); do\
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \
+ done ; \
+ fi
+
+########### CLEAN ###################
+# Clean help (generated automatically by Scilab)
+# It used to clean the macro (clean-macros) but this was causing
+# make clean && make to fail Scilab startup
+clean-local: clean-java
+#clean-local:
+
+distclean-local:
+ rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_*
+
+.PHONY: macros java swig giws
+
+# Provides macros compilation, Java compilation, cleaning
+# If you want Makefile to call ant, added USEANT=1
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/modules/windows_tools/Makefile.am b/modules/windows_tools/Makefile.am
new file mode 100755
index 000000000..9da717403
--- /dev/null
+++ b/modules/windows_tools/Makefile.am
@@ -0,0 +1,46 @@
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2007 - INRIA - Sylvestre LEDRU
+#
+# This file is distributed under the same license as the Scilab package.
+
+# List of the c files
+WINDOWS_TOOLS_C_SOURCES = src/nowindows_tools/nowindows_tools.c
+
+# Includes need for the compilation
+libsciwindows_tools_la_CPPFLAGS= -I$(srcdir)/includes/ \
+ -I$(srcdir)/src/c/ \
+ -I$(top_srcdir)/modules/api_scilab/includes/ \
+ -I$(top_srcdir)/modules/output_stream/includes/ \
+ $(AM_CPPFLAGS)
+
+# Name of the future library (.la will be replace by .so, .a, etc regarding
+# the system)
+
+if MAINTAINER_MODE
+pkglib_LTLIBRARIES = libsciwindows_tools.la
+else
+noinst_LTLIBRARIES = libsciwindows_tools.la
+endif
+
+
+# All the sources needed by libsciwindows_tools.la
+libsciwindows_tools_la_SOURCES = $(WINDOWS_TOOLS_C_SOURCES)
+
+#### Name of the module and the path ######
+modulename=windows_tools
+
+#### windows_tools : Conf files ####
+libsciwindows_tools_la_rootdir = $(mydatadir)
+libsciwindows_tools_la_root_DATA = license.txt
+
+#### windows_tools : init scripts ####
+libsciwindows_tools_la_etcdir = $(mydatadir)/etc
+libsciwindows_tools_la_etc_DATA = etc/windows_tools.quit etc/windows_tools.start
+
+#### windows_tools : gateway declaration ####
+libsciwindows_tools_la_sci_gatewaydir = $(mydatadir)/sci_gateway
+libsciwindows_tools_la_sci_gateway_DATA = sci_gateway/windows_tools_gateway.xml
+
+# Provides macros compilation, Java compilation, cleaning
+# If you want Makefile to call ant, added USEANT=1
+include $(top_srcdir)/Makefile.incl.am
diff --git a/modules/windows_tools/Makefile.in b/modules/windows_tools/Makefile.in
new file mode 100755
index 000000000..99390b490
--- /dev/null
+++ b/modules/windows_tools/Makefile.in
@@ -0,0 +1,1279 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2007 - INRIA - Sylvestre LEDRU
+#
+# This file is distributed under the same license as the Scilab package.
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
+# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@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.1-en.txt
+#
+
+##########
+### Makefile included stuff
+### Target, variable, suffixes which are supposed to be useful in every makefile.am
+##########
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(top_srcdir)/Makefile.incl.am $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/config/mkinstalldirs \
+ $(top_srcdir)/config/depcomp
+@NEED_JAVA_TRUE@am__append_1 = java
+subdir = modules/windows_tools
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \
+ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \
+ $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \
+ $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \
+ $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \
+ $(top_srcdir)/m4/intel_compiler.m4 \
+ $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \
+ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \
+ $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \
+ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \
+ $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \
+ $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkglibdir)" \
+ "$(DESTDIR)$(libsciwindows_tools_la_etcdir)" \
+ "$(DESTDIR)$(libsciwindows_tools_la_rootdir)" \
+ "$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)"
+LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
+libsciwindows_tools_la_LIBADD =
+am__dirstamp = $(am__leading_dot)dirstamp
+am__objects_1 = \
+ src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo
+am_libsciwindows_tools_la_OBJECTS = $(am__objects_1)
+libsciwindows_tools_la_OBJECTS = $(am_libsciwindows_tools_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+@MAINTAINER_MODE_FALSE@am_libsciwindows_tools_la_rpath =
+@MAINTAINER_MODE_TRUE@am_libsciwindows_tools_la_rpath = -rpath \
+@MAINTAINER_MODE_TRUE@ $(pkglibdir)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/modules/core/includes
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libsciwindows_tools_la_SOURCES)
+DIST_SOURCES = $(libsciwindows_tools_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(libsciwindows_tools_la_etc_DATA) \
+ $(libsciwindows_tools_la_root_DATA) \
+ $(libsciwindows_tools_la_sci_gateway_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+ALL_LINGUAS_DOC = @ALL_LINGUAS_DOC@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANT = @ANT@
+ANTLR = @ANTLR@
+AR = @AR@
+ARPACK_LIBS = @ARPACK_LIBS@
+ASM3 = @ASM3@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVALON_FRAMEWORK = @AVALON_FRAMEWORK@
+AWK = @AWK@
+BATIK = @BATIK@
+BLAS_LIBS = @BLAS_LIBS@
+CC = @CC@
+CCACHE = @CCACHE@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKSTYLE = @CHECKSTYLE@
+COBERTURA = @COBERTURA@
+COMMONS_BEANUTILS = @COMMONS_BEANUTILS@
+COMMONS_IO = @COMMONS_IO@
+COMMONS_LOGGING = @COMMONS_LOGGING@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_CONFIG = @CURL_CONFIG@
+CURL_LIBS = @CURL_LIBS@
+CURL_VERSION = @CURL_VERSION@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEMOTOOLS_ENABLE = @DEMOTOOLS_ENABLE@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCBOOK_ROOT = @DOCBOOK_ROOT@
+DOXYGEN_BIN = @DOXYGEN_BIN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ECJ = @ECJ@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FFTW3_LIB = @FFTW3_LIB@
+FFTW_ENABLE = @FFTW_ENABLE@
+FGREP = @FGREP@
+FLEXDOCK = @FLEXDOCK@
+FLIBS = @FLIBS@
+FOP = @FOP@
+FREEHEP_GRAPHICS2D = @FREEHEP_GRAPHICS2D@
+FREEHEP_GRAPHICSIO = @FREEHEP_GRAPHICSIO@
+FREEHEP_GRAPHICSIO_EMF = @FREEHEP_GRAPHICSIO_EMF@
+FREEHEP_IO = @FREEHEP_IO@
+FREEHEP_UTIL = @FREEHEP_UTIL@
+GENHTML = @GENHTML@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GIWS_BIN = @GIWS_BIN@
+GLUEGEN2_RT = @GLUEGEN2_RT@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GRAPHICS_ENABLE = @GRAPHICS_ENABLE@
+GREP = @GREP@
+GUI_ENABLE = @GUI_ENABLE@
+HDF5_CFLAGS = @HDF5_CFLAGS@
+HDF5_LIBS = @HDF5_LIBS@
+HELP_ENABLE = @HELP_ENABLE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JAR = @JAR@
+JAVA = @JAVA@
+JAVAC = @JAVAC@
+JAVAC_DEBUG = @JAVAC_DEBUG@
+JAVADOC = @JAVADOC@
+JAVAH = @JAVAH@
+JAVASCI_ENABLE = @JAVASCI_ENABLE@
+JAVA_ENABLE = @JAVA_ENABLE@
+JAVA_G = @JAVA_G@
+JAVA_HOME = @JAVA_HOME@
+JAVA_JNI_INCLUDE = @JAVA_JNI_INCLUDE@
+JAVA_JNI_LIBS = @JAVA_JNI_LIBS@
+JDB = @JDB@
+JEUCLID_CORE = @JEUCLID_CORE@
+JGRAPHX = @JGRAPHX@
+JHALL = @JHALL@
+JLATEXMATH = @JLATEXMATH@
+JLATEXMATH_FOP = @JLATEXMATH_FOP@
+JOGL2 = @JOGL2@
+JROSETTA_API = @JROSETTA_API@
+JROSETTA_ENGINE = @JROSETTA_ENGINE@
+JUNIT4 = @JUNIT4@
+LAPACK_LIBS = @LAPACK_LIBS@
+LCOV = @LCOV@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOGGING_LEVEL = @LOGGING_LEVEL@
+LOOKS = @LOOKS@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MATIO_CFLAGS = @MATIO_CFLAGS@
+MATIO_ENABLE = @MATIO_ENABLE@
+MATIO_LIBS = @MATIO_LIBS@
+MKDIR_P = @MKDIR_P@
+MPI_ENABLE = @MPI_ENABLE@
+MSGCAT = @MSGCAT@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OCAMLC = @OCAMLC@
+OCAMLDEP = @OCAMLDEP@
+OCAMLLEX = @OCAMLLEX@
+OCAMLOPT = @OCAMLOPT@
+OCAMLYACC = @OCAMLYACC@
+OPENMPI_CC = @OPENMPI_CC@
+OPENMPI_CFLAGS = @OPENMPI_CFLAGS@
+OPENMPI_CXX = @OPENMPI_CXX@
+OPENMPI_CXXFLAGS = @OPENMPI_CXXFLAGS@
+OPENMPI_LIBS = @OPENMPI_LIBS@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
+OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
+OPENMP_ENABLE = @OPENMP_ENABLE@
+OPENMP_LIBS = @OPENMP_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PCRE_CFLAGS = @PCRE_CFLAGS@
+PCRE_CONFIG = @PCRE_CONFIG@
+PCRE_LIBS = @PCRE_LIBS@
+PCRE_VERSION = @PCRE_VERSION@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+RANLIB = @RANLIB@
+RELOCATABLE = @RELOCATABLE@
+RT_LIB = @RT_LIB@
+SAXON = @SAXON@
+SCILAB_BINARY_VERSION = @SCILAB_BINARY_VERSION@
+SCILAB_LIBRARY_VERSION = @SCILAB_LIBRARY_VERSION@
+SCILAB_VERSION_MAINTENANCE = @SCILAB_VERSION_MAINTENANCE@
+SCILAB_VERSION_MAJOR = @SCILAB_VERSION_MAJOR@
+SCILAB_VERSION_MINOR = @SCILAB_VERSION_MINOR@
+SCIRENDERER = @SCIRENDERER@
+SCIRENDERER_CP = @SCIRENDERER_CP@
+SCI_CFLAGS = @SCI_CFLAGS@
+SCI_CXXFLAGS = @SCI_CXXFLAGS@
+SCI_FFLAGS = @SCI_FFLAGS@
+SCI_LDFLAGS = @SCI_LDFLAGS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SET_RELOCATABLE = @SET_RELOCATABLE@
+SHELL = @SHELL@
+SKINLF = @SKINLF@
+SPLINT = @SPLINT@
+STRIP = @STRIP@
+SWIG_BIN = @SWIG_BIN@
+SWIG_JAVA = @SWIG_JAVA@
+SWIG_RUNTIME_LIBS_DIR = @SWIG_RUNTIME_LIBS_DIR@
+SWIG_SCILAB = @SWIG_SCILAB@
+TCLTK_LIBS = @TCLTK_LIBS@
+TCL_INC_PATH = @TCL_INC_PATH@
+TK_INC_PATH = @TK_INC_PATH@
+UMFPACK_CFLAGS = @UMFPACK_CFLAGS@
+UMFPACK_ENABLE = @UMFPACK_ENABLE@
+UMFPACK_LIB = @UMFPACK_LIB@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WITH_OCAML = @WITH_OCAML@
+WITH_TKSCI = @WITH_TKSCI@
+XCOS_ENABLE = @XCOS_ENABLE@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XMLGRAPHICS_COMMONS = @XMLGRAPHICS_COMMONS@
+XML_APIS_EXT = @XML_APIS_EXT@
+XML_CONFIG = @XML_CONFIG@
+XML_FLAGS = @XML_FLAGS@
+XML_LIBS = @XML_LIBS@
+XML_VERSION = @XML_VERSION@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+cxx_present = @cxx_present@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# List of the c files
+WINDOWS_TOOLS_C_SOURCES = src/nowindows_tools/nowindows_tools.c
+
+# Includes need for the compilation
+libsciwindows_tools_la_CPPFLAGS = -I$(srcdir)/includes/ \
+ -I$(srcdir)/src/c/ \
+ -I$(top_srcdir)/modules/api_scilab/includes/ \
+ -I$(top_srcdir)/modules/output_stream/includes/ \
+ $(AM_CPPFLAGS)
+
+
+# Name of the future library (.la will be replace by .so, .a, etc regarding
+# the system)
+@MAINTAINER_MODE_TRUE@pkglib_LTLIBRARIES = libsciwindows_tools.la
+@MAINTAINER_MODE_FALSE@noinst_LTLIBRARIES = libsciwindows_tools.la
+
+# All the sources needed by libsciwindows_tools.la
+libsciwindows_tools_la_SOURCES = $(WINDOWS_TOOLS_C_SOURCES)
+
+#### Name of the module and the path ######
+modulename = windows_tools
+
+#### windows_tools : Conf files ####
+libsciwindows_tools_la_rootdir = $(mydatadir)
+libsciwindows_tools_la_root_DATA = license.txt
+
+#### windows_tools : init scripts ####
+libsciwindows_tools_la_etcdir = $(mydatadir)/etc
+libsciwindows_tools_la_etc_DATA = etc/windows_tools.quit etc/windows_tools.start
+
+#### windows_tools : gateway declaration ####
+libsciwindows_tools_la_sci_gatewaydir = $(mydatadir)/sci_gateway
+libsciwindows_tools_la_sci_gateway_DATA = sci_gateway/windows_tools_gateway.xml
+
+# Where all the Scilab stuff is installed (macros, help, ...)
+mydatadir = $(pkgdatadir)/modules/$(modulename)
+
+# Set AM_* SCI detected settings
+AM_CPPFLAGS = $(SCI_CPPFLAGS)
+AM_CFLAGS = $(SCI_CFLAGS)
+AM_CXXFLAGS = $(SCI_CXXFLAGS)
+# append includes to AM_FFLAGS to manage fortran includes
+AM_FFLAGS = $(SCI_FFLAGS) -I$(top_srcdir)/modules/core/includes/
+
+# Tag shared libraries with the Scilab version
+AM_LDFLAGS = $(SCI_LDFLAGS) -version-number $(SCILAB_LIBRARY_VERSION)
+
+# splint options
+SPLINT_OPTIONS = -weak -booltype BOOL
+
+########################### JAVA ######################################
+#### We are delegating java compilation to ant... Thanks to that
+#### the procedure will be the same with Microsoft Windows (C)
+#### and Linux/Unix
+#######################################################################
+TARGETS_ALL = $(am__append_1)
+
+################ MACROS ######################
+# Rule to build a macro
+# NOT USED AT THE MOMENT
+SUFFIXES = .sci
+
+########### INSTALL DOCUMENTATION ###################
+
+# Install documentation files into the right target
+# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because
+# automake needs the html files to be present which is not the case when
+# we are building Scilab
+
+# Where it should be installed
+pkgdocdir = $(mydatadir)
+
+# What is the mask of the help source
+DOCMASKXML = *.xml
+
+# What is the mask of the MathML sources
+DOCMASKMML = *.mml
+
+########### INSTALL DATA ###################
+# Install macros, help & demos
+# Where it should be installed
+pkgmacrosdir = $(mydatadir)
+# Which directory we process
+MACRODIRS = macros/
+# Mask of the Scilab sources macros
+MACROMASK = *.sci
+# Mask of the Scilab executable sources macros
+MACROBUILDMASK = *.sce
+# Mask of the Scilab compiled macros
+MACROBINMASK = *.bin
+# List of the standard directory for tests
+TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests tests/java
+# Where the demos should be installed
+pkgdemosdir = $(mydatadir)
+# List of the standard directory for demos
+DEMOS_DIR = demos
+# List of the standard directory for examples
+EXAMPLES_DIR = examples
+# Where to export JAVA archives (.jar)
+JARDIR = jar/
+# JAR files mask
+JARMASK = *.jar
+# Chapter file
+HELP_CHAPTERDIR = help/
+HELP_CHAPTERFILE = addchapter.sce
+HELP_CHAPTERLANG = en_US fr_FR pt_BR
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .sci .bin .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/windows_tools/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/windows_tools/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/Makefile.incl.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+src/nowindows_tools/$(am__dirstamp):
+ @$(MKDIR_P) src/nowindows_tools
+ @: > src/nowindows_tools/$(am__dirstamp)
+src/nowindows_tools/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/nowindows_tools/$(DEPDIR)
+ @: > src/nowindows_tools/$(DEPDIR)/$(am__dirstamp)
+src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo: \
+ src/nowindows_tools/$(am__dirstamp) \
+ src/nowindows_tools/$(DEPDIR)/$(am__dirstamp)
+
+libsciwindows_tools.la: $(libsciwindows_tools_la_OBJECTS) $(libsciwindows_tools_la_DEPENDENCIES) $(EXTRA_libsciwindows_tools_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libsciwindows_tools_la_rpath) $(libsciwindows_tools_la_OBJECTS) $(libsciwindows_tools_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f src/nowindows_tools/*.$(OBJEXT)
+ -rm -f src/nowindows_tools/*.lo
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@src/nowindows_tools/$(DEPDIR)/libsciwindows_tools_la-nowindows_tools.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo: src/nowindows_tools/nowindows_tools.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciwindows_tools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo -MD -MP -MF src/nowindows_tools/$(DEPDIR)/libsciwindows_tools_la-nowindows_tools.Tpo -c -o src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo `test -f 'src/nowindows_tools/nowindows_tools.c' || echo '$(srcdir)/'`src/nowindows_tools/nowindows_tools.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/nowindows_tools/$(DEPDIR)/libsciwindows_tools_la-nowindows_tools.Tpo src/nowindows_tools/$(DEPDIR)/libsciwindows_tools_la-nowindows_tools.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/nowindows_tools/nowindows_tools.c' object='src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciwindows_tools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo `test -f 'src/nowindows_tools/nowindows_tools.c' || echo '$(srcdir)/'`src/nowindows_tools/nowindows_tools.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+ -rm -rf src/nowindows_tools/.libs src/nowindows_tools/_libs
+install-libsciwindows_tools_la_etcDATA: $(libsciwindows_tools_la_etc_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsciwindows_tools_la_etc_DATA)'; test -n "$(libsciwindows_tools_la_etcdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsciwindows_tools_la_etcdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsciwindows_tools_la_etcdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciwindows_tools_la_etcdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciwindows_tools_la_etcdir)" || exit $$?; \
+ done
+
+uninstall-libsciwindows_tools_la_etcDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsciwindows_tools_la_etc_DATA)'; test -n "$(libsciwindows_tools_la_etcdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsciwindows_tools_la_etcdir)'; $(am__uninstall_files_from_dir)
+install-libsciwindows_tools_la_rootDATA: $(libsciwindows_tools_la_root_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsciwindows_tools_la_root_DATA)'; test -n "$(libsciwindows_tools_la_rootdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsciwindows_tools_la_rootdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsciwindows_tools_la_rootdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciwindows_tools_la_rootdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciwindows_tools_la_rootdir)" || exit $$?; \
+ done
+
+uninstall-libsciwindows_tools_la_rootDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsciwindows_tools_la_root_DATA)'; test -n "$(libsciwindows_tools_la_rootdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsciwindows_tools_la_rootdir)'; $(am__uninstall_files_from_dir)
+install-libsciwindows_tools_la_sci_gatewayDATA: $(libsciwindows_tools_la_sci_gateway_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsciwindows_tools_la_sci_gateway_DATA)'; test -n "$(libsciwindows_tools_la_sci_gatewaydir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)" || exit $$?; \
+ done
+
+uninstall-libsciwindows_tools_la_sci_gatewayDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsciwindows_tools_la_sci_gateway_DATA)'; test -n "$(libsciwindows_tools_la_sci_gatewaydir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA) all-local
+installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(libsciwindows_tools_la_etcdir)" "$(DESTDIR)$(libsciwindows_tools_la_rootdir)" "$(DESTDIR)$(libsciwindows_tools_la_sci_gatewaydir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f src/nowindows_tools/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/nowindows_tools/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf src/nowindows_tools/$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-local distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local \
+ install-libsciwindows_tools_la_etcDATA \
+ install-libsciwindows_tools_la_rootDATA \
+ install-libsciwindows_tools_la_sci_gatewayDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am: install-html-local
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf src/nowindows_tools/$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libsciwindows_tools_la_etcDATA \
+ uninstall-libsciwindows_tools_la_rootDATA \
+ uninstall-libsciwindows_tools_la_sci_gatewayDATA \
+ uninstall-pkglibLTLIBRARIES
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am \
+ check-local clean clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-local distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-html-local install-info \
+ install-info-am install-libsciwindows_tools_la_etcDATA \
+ install-libsciwindows_tools_la_rootDATA \
+ install-libsciwindows_tools_la_sci_gatewayDATA install-man \
+ install-pdf install-pdf-am install-pkglibLTLIBRARIES \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am \
+ uninstall-libsciwindows_tools_la_etcDATA \
+ uninstall-libsciwindows_tools_la_rootDATA \
+ uninstall-libsciwindows_tools_la_sci_gatewayDATA \
+ uninstall-pkglibLTLIBRARIES
+
+
+# This target enables tests for Scilab
+check-local: $(top_builddir)/scilab-bin test
+ if test -d $(mydatadir)/tests; then \
+ @COMMAND="try test_run('$(modulename)');catch exit(-1);end;exit(0)"; export LANG=C; $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"; \
+ fi
+check-code:
+ if test -f build.xml; then \
+ $(ANT) checkstyle; \
+ fi
+ if test -x "$(SPLINT)"; then \
+ $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \
+ fi
+@NEED_JAVA_TRUE@java:
+# Some configurations needs to export JAVA_HOME in the current env
+@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \
+@NEED_JAVA_TRUE@ $(ANT); \
+@NEED_JAVA_TRUE@ fi
+
+@NEED_JAVA_TRUE@clean-java:
+# Some configurations needs to export JAVA_HOME in the current env
+@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \
+@NEED_JAVA_TRUE@ $(ANT) clean; \
+@NEED_JAVA_TRUE@ fi;
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+@SWIG_TRUE@swig: $(SWIG_WRAPPERS)
+@SWIG_TRUE@ @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \
+@SWIG_TRUE@ SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \
+@SWIG_TRUE@ if test -n "$(SWIG_WRAPPERS)"; then \
+@SWIG_TRUE@ for file in $(SWIG_WRAPPERS) ; do \
+@SWIG_TRUE@ echo "Swig process of $$file (Java) ..."; \
+@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \
+@SWIG_TRUE@ done; \
+@SWIG_TRUE@ fi
+
+@SWIG_TRUE@swig-scilab: $(SWIG_SCILAB_WRAPPERS)
+@SWIG_TRUE@ @SWIG_OUTDIR=src/swig/; \
+@SWIG_TRUE@ if test -n "$(SWIG_SCILAB_WRAPPERS)"; then \
+@SWIG_TRUE@ for file in $(SWIG_SCILAB_WRAPPERS) ; do \
+@SWIG_TRUE@ echo "Swig process of $$file (Scilab) ..."; \
+@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_SCILAB) -outdir $$SWIG_OUTDIR $$file; \
+@SWIG_TRUE@ done; \
+@SWIG_TRUE@ fi
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+@GIWS_TRUE@giws: $(GIWS_WRAPPERS)
+@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/; \
+@GIWS_TRUE@ MANDATORY_OPTIONS="--throws-exception-on-error --description-file"; \
+@GIWS_TRUE@ if test -n "$(GIWS_WRAPPERS)"; then \
+@GIWS_TRUE@ for file in $(GIWS_WRAPPERS) ; do \
+@GIWS_TRUE@ echo "GIWS process of $$file ..."; \
+@GIWS_TRUE@ if test -z "$(GIWS_OPTIONS)"; then \
+@GIWS_TRUE@ $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+@GIWS_TRUE@ else \
+@GIWS_TRUE@ echo "Custom GIWS call with '$$GIWS_OPTIONS'"; \
+@GIWS_TRUE@ $(GIWS_BIN) $$GIWS_OPTIONS --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+@GIWS_TRUE@ fi \
+@GIWS_TRUE@ done; \
+@GIWS_TRUE@ fi
+
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@ echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@ $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR
+
+macros:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been built"; \
+ else \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\
+ fi)
+
+# Removes the macros
+clean-macros:
+# Removes macros (*.bin generated from .sci)
+ @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \
+ rm -f $(builddir)/$$dir/$(MACROBINMASK); \
+ done
+
+test:
+# More tests could be added here
+ @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT) test; \
+ fi
+
+all-local: $(TARGETS_ALL)
+
+.sci.bin:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been build"; \
+ else \
+ echo "Creating $@"; \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \
+ fi )
+
+install-html-local:
+
+install-data-local-local:
+# Mainly for javasci
+ @if test -d $(srcdir)/javadoc; then \
+ cp -R $(srcdir)/javadoc $(DESTDIR)/$(mydatadir)/; \
+ fi
+# If the user wants the help sources to be installed
+@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of XML sources of help files --------"; \
+@INSTALL_HELP_XML_TRUE@ for lang in $(ALL_LINGUAS); do \
+@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/$$lang; then \
+@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \
+@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \
+@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \
+@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \
+@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \
+@INSTALL_HELP_XML_TRUE@ done ; \
+@INSTALL_HELP_XML_TRUE@ fi; \
+@INSTALL_HELP_XML_TRUE@ fi; \
+@INSTALL_HELP_XML_TRUE@ done; \
+@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of MathML sources --------"; \
+@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/mml/; then \
+@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \
+@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \
+@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \
+@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \
+@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \
+@INSTALL_HELP_XML_TRUE@ done ; \
+@INSTALL_HELP_XML_TRUE@ fi; \
+@INSTALL_HELP_XML_TRUE@ fi
+install-data-local:
+# Install the tests
+ @echo "-------- Install tests (if any) --------"; \
+ for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the help chapter
+ @echo "-------- Install the help chapter (if any) --------"; \
+ for lang in $(HELP_CHAPTERLANG); do \
+ HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \
+ if test -f $$HELPFILE; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ fi; \
+ done
+# Install the demos & examples
+ @echo "-------- Install demos & examples (if any) --------"; \
+ for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the macros
+ @echo "-------- Install macros (if any) --------"; \
+ for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ if test -d $(srcdir)/$$dir/; then \
+ FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\
+ if test -n "$(MACROSSPECIALEXT)"; then \
+ specialExtDir=""; \
+ for specialExt in $(MACROSSPECIALEXT); do \
+ specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \
+ done; \
+ FILELIST="$$FILELIST $$specialExtDir"; \
+ fi; \
+ for file in `ls -1 $$FILELIST 2>/dev/null`; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \
+ done; \
+ fi; \
+ done
+# Install java files (.jar)
+ @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \
+ echo "-------- Install jar files --------"; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \
+ for file in $(srcdir)/$(JARDIR)$(JARMASK); do\
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \
+ done ; \
+ fi
+
+########### CLEAN ###################
+# Clean help (generated automatically by Scilab)
+# It used to clean the macro (clean-macros) but this was causing
+# make clean && make to fail Scilab startup
+@NEED_JAVA_TRUE@clean-local: clean-java
+@NEED_JAVA_FALSE@clean-local:
+
+distclean-local:
+ rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_*
+
+.PHONY: macros java swig giws
+
+# Provides macros compilation, Java compilation, cleaning
+# If you want Makefile to call ant, added USEANT=1
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/modules/windows_tools/etc/windows_tools.quit b/modules/windows_tools/etc/windows_tools.quit
new file mode 100755
index 000000000..b64bbfc8d
--- /dev/null
+++ b/modules/windows_tools/etc/windows_tools.quit
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2007-2008 - INRIA
+// 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.1-en.txt
+
+// =============================================================================
diff --git a/modules/windows_tools/etc/windows_tools.start b/modules/windows_tools/etc/windows_tools.start
new file mode 100755
index 000000000..5c715992b
--- /dev/null
+++ b/modules/windows_tools/etc/windows_tools.start
@@ -0,0 +1,36 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Allan CORNET
+// Copyright (C) DIGITEO - 2011 - 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.1-en.txt
+
+function [windows_toolslib, WSCI] = startModule()
+
+// Load functions libraries
+// =============================================================================
+ load("SCI/modules/windows_tools/macros/lib");
+
+// path of scilab main directory for Windows
+// =============================================================================
+ WSCI = getlongpathname(pathconvert(SCI, %f, %f, "w"));
+
+// =============================================================================
+ if (getscilabmode() == 'STD' & find(sciargs() == "-keepconsole") == []) then
+ consolebox('off');
+ end
+
+ //detect WinXP/2oo3 and show warning message of obsolescence
+ verStr = winqueryreg("HKLM", "Software\Microsoft\Windows NT\CurrentVersion", "CurrentVersion");
+ verNum = evstr(verStr)
+ if verNum < 6 then //Windows XP
+ warning(_("Scilab 5.5.X family will be the latest one working under Windows XP."));
+ end
+
+endfunction
+
+[windows_toolslib, WSCI] = startModule();
+clear startModule;
diff --git a/modules/windows_tools/help/en_US/addchapter.sce b/modules/windows_tools/help/en_US/addchapter.sce
new file mode 100755
index 000000000..1c59fafdb
--- /dev/null
+++ b/modules/windows_tools/help/en_US/addchapter.sce
@@ -0,0 +1,11 @@
+// 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.1-en.txt
+
+add_help_chapter("Windows tools",SCI+"/modules/windows_tools/help/en_US",%T);
+
diff --git a/modules/windows_tools/help/en_US/consolebox.xml b/modules/windows_tools/help/en_US/consolebox.xml
new file mode 100755
index 000000000..61672350a
--- /dev/null
+++ b/modules/windows_tools/help/en_US/consolebox.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="consolebox">
+ <refnamediv>
+ <refname>consolebox</refname>
+ <refpurpose>show or hide console box (Windows)</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>state1=console(state2)
+ state1=console()
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>state1</term>
+ <listitem>
+ <para>returns console's state 'on' or 'off'</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>state2</term>
+ <listitem>
+ <para>'on' or 'off' set console's state</para>
+ <para>'toggle' to switch between console's state</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <para>show or hide console box (Windows).</para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+consolebox('off')
+state=consolebox()
+consolebox()
+consolebox('toggle')
+consolebox('toggle')
+ ]]></programlisting>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/en_US/createGUID.xml b/modules/windows_tools/help/en_US/createGUID.xml
new file mode 100755
index 000000000..9930f1d47
--- /dev/null
+++ b/modules/windows_tools/help/en_US/createGUID.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="createGUID" xml:lang="en">
+ <refnamediv>
+ <refname>createGUID</refname>
+ <refpurpose>Creates a GUID (Windows only)</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>res = createGUID(number_of_GUID)
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+ <para>createGUID creates a Globally Unique IDentifier (GUID), , a unique
+ 128-bit integer used for CLSIDs and interface identifiers .
+ </para>
+ </refsection>
+ <refsection>
+ <title>Example</title>
+ <programlisting role="example"><![CDATA[
+if getos() == 'Windows' then
+ disp(createGUID(1));
+end
+ ]]></programlisting>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/en_US/dos.xml b/modules/windows_tools/help/en_US/dos.xml
new file mode 100755
index 000000000..f347c106f
--- /dev/null
+++ b/modules/windows_tools/help/en_US/dos.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="dos">
+ <refnamediv>
+ <refname>dos</refname>
+ <refpurpose>shell (cmd) command execution (Windows
+ only)
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>bOK=dos(command-name)
+ bOK=dos(command-name,'-echo')
+ [output,bOK]=dos(command-name)
+ [output,bOK,exitcode]=dos(command-name)
+ [output,bOK]=dos(command-name,'-echo')
+ [output,bOK,exitcode]=dos(command-name,'-echo')
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+ <para>Sends a string command-name to Windows for execution by the cmd shell.
+ Standard output and standard errors of the shell command are written in
+ the calling shell. bOK returns if command has been executed.
+ </para>
+ <para>[output,bOK] = dos(command-name,'-echo') forces the output to the
+ Command Window, even though it is also being assigned into a variable.
+ </para>
+ <para>exitcode value returned by the external process.</para>
+ <para>To open the notepad editor and return control immediately to Scilab
+ dos('start notepad')
+ </para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+[s,w] = dos('dir');
+[s,w] = dos('dir','-echo');
+dos('start notepad')
+dos('taskkill /IM notepad.exe') // Caution, this command will kill all launched notepad's processus
+[s, w] = dos('foo')
+[s, w, code] = dos('dir')
+[s, w, code] = dos('foo')
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="unix">unix</link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/en_US/findfileassociation.xml b/modules/windows_tools/help/en_US/findfileassociation.xml
new file mode 100755
index 000000000..f5d5933e6
--- /dev/null
+++ b/modules/windows_tools/help/en_US/findfileassociation.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="findfileassociation">
+ <refnamediv>
+ <refname>findfileassociation</refname>
+ <refpurpose>Searches for and retrieves a file association-related string from the registry (Windows only)</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>findfileassociation('A file name extension, such as .txt')</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+ <para>
+ <literal>findfileassociation('A file name extension, such as .txt')</literal> Searches for and retrieves a file association-related string from the registry.
+ </para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+findfileassociation('.txt')
+findfileassociation('.sce')
+findfileassociation('.xsl')
+findfileassociation('.toto')
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="winopen">winopen</link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/en_US/getsystemmetrics.xml b/modules/windows_tools/help/en_US/getsystemmetrics.xml
new file mode 100755
index 000000000..53f4d08cb
--- /dev/null
+++ b/modules/windows_tools/help/en_US/getsystemmetrics.xml
@@ -0,0 +1,643 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA -
+ *
+ * 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="getsystemmetrics" xml:lang="en">
+ <refnamediv>
+ <refname>getsystemmetrics</refname>
+ <refpurpose>Retrieves the specified system metric or system configuration
+ setting (Windows only)
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>res = getsystemmetrics(key)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>res</term>
+ <listitem>
+ <para>a value (integer)</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>key</term>
+ <listitem>
+ <para>a string (see below)</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <para>Retrieves the specified system metric or system configuration
+ setting.
+ </para>
+ <informaltable border="1">
+ <tr>
+ <td>SM_ARRANGE</td>
+ <td>The flags that specify how the system arranged minimized windows.
+ For more information, see the Remarks section in this topic.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CLEANBOOT</td>
+ <td>The value that specifies how the system is started: 0 Normal boot
+ 1 Fail-safe boot 2 Fail-safe with network boot A fail-safe boot (also
+ called SafeBoot, Safe Mode, or Clean Boot) bypasses the user startup
+ files.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CMONITORS</td>
+ <td>The number of display monitors on a desktop. For more information,
+ see the Remarks section in this topic.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CMOUSEBUTTONS</td>
+ <td>The number of buttons on a mouse, or zero if no mouse is
+ installed.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXBORDER</td>
+ <td>The width of a window border, in pixels. This is equivalent to the
+ SM_CXEDGE value for windows with the 3-D look.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXCURSOR</td>
+ <td>The width of a cursor, in pixels. The system cannot create cursors
+ of other sizes.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXDLGFRAME</td>
+ <td>This value is the same as SM_CXFIXEDFRAME.</td>
+ </tr>
+ <tr>
+ <td>SM_CXDOUBLECLK</td>
+ <td>The width of the rectangle around the location of a first click in
+ a double-click sequence, in pixels. The second click must occur within
+ the rectangle that is defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for
+ the system to consider the two clicks a double-click. The two clicks
+ must also occur within a specified time. To set the width of the
+ double-click rectangle, call SystemParametersInfo with
+ SPI_SETDOUBLECLKWIDTH.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXDRAG</td>
+ <td>The number of pixels on either side of a mouse-down point that the
+ mouse pointer can move before a drag operation begins. This allows the
+ user to click and release the mouse button easily without
+ unintentionally starting a drag operation. If this value is negative,
+ it is subtracted from the left of the mouse-down point and added to
+ the right of it.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXEDGE</td>
+ <td>The width of a 3-D border, in pixels. This metric is the 3-D
+ counterpart of SM_CXBORDER.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXFIXEDFRAME</td>
+ <td>The thickness of the frame around the perimeter of a window that
+ has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is the
+ height of the horizontal border, and SM_CYFIXEDFRAME is the width of
+ the vertical border. This value is the same as SM_CXDLGFRAME.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXFOCUSBORDER</td>
+ <td>The width of the left and right edges of the focus rectangle that
+ the DrawFocusRect draws. This value is in pixels.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXFRAME</td>
+ <td>This value is the same as SM_CXSIZEFRAME.</td>
+ </tr>
+ <tr>
+ <td>SM_CXFULLSCREEN</td>
+ <td>The width of the client area for a full-screen window on the
+ primary display monitor, in pixels. To get the coordinates of the
+ portion of the screen that is not obscured by the system taskbar or by
+ application desktop toolbars, call the SystemParametersInfo function
+ with the SPI_GETWORKAREA value.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXHSCROLL</td>
+ <td>The width of the arrow bitmap on a horizontal scroll bar, in
+ pixels.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXHTHUMB</td>
+ <td>The width of the thumb box in a horizontal scroll bar, in
+ pixels.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXICON</td>
+ <td>The default width of an icon, in pixels. The LoadIcon function can
+ load only icons with the dimensions that SM_CXICON and SM_CYICON
+ specifies.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXICONSPACING</td>
+ <td>The width of a grid cell for items in large icon view, in pixels.
+ Each item fits into a rectangle of size SM_CXICONSPACING by
+ SM_CYICONSPACING when arranged. This value is always greater than or
+ equal to SM_CXICON.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXMAXIMIZED</td>
+ <td>The default width, in pixels, of a maximized top-level window on
+ the primary display monitor.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXMAXTRACK</td>
+ <td>The default maximum width of a window that has a caption and
+ sizing borders, in pixels. This metric refers to the entire desktop.
+ The user cannot drag the window frame to a size larger than these
+ dimensions. A window can override this value by processing the
+ WM_GETMINMAXINFO message.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXMENUCHECK</td>
+ <td>The width of the default menu check-mark bitmap, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CXMENUSIZE</td>
+ <td>The width of menu bar buttons, such as the child window close
+ button that is used in the multiple document interface, in
+ pixels.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXMIN</td>
+ <td>The minimum width of a window, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CXMINIMIZED</td>
+ <td>The width of a minimized window, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CXMINSPACING</td>
+ <td>The width of a grid cell for a minimized window, in pixels. Each
+ minimized window fits into a rectangle this size when arranged. This
+ value is always greater than or equal to SM_CXMINIMIZED.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXMINTRACK</td>
+ <td>The minimum tracking width of a window, in pixels. The user cannot
+ drag the window frame to a size smaller than these dimensions. A
+ window can override this value by processing the WM_GETMINMAXINFO
+ message.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXPADDEDBORDER</td>
+ <td>The amount of border padding for captioned windows, in
+ pixels.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXSCREEN</td>
+ <td>The width of the screen of the primary display monitor, in pixels.
+ This is the same value obtained by calling GetDeviceCaps as follows:
+ GetDeviceCaps( hdcPrimaryMonitor, HORZRES).
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXSIZE</td>
+ <td>The width of a button in a window caption or title bar, in
+ pixels.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXSIZEFRAME</td>
+ <td>The thickness of the sizing border around the perimeter of a
+ window that can be resized, in pixels. SM_CXSIZEFRAME is the width of
+ the horizontal border, and SM_CYSIZEFRAME is the height of the
+ vertical border. This value is the same as SM_CXFRAME.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXSMICON</td>
+ <td>The recommended width of a small icon, in pixels. Small icons
+ typically appear in window captions and in small icon view.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXSMSIZE</td>
+ <td>The width of small caption buttons, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CXVIRTUALSCREEN</td>
+ <td>The width of the virtual screen, in pixels. The virtual screen is
+ the bounding rectangle of all display monitors. The SM_XVIRTUALSCREEN
+ metric is the coordinates for the left side of the virtual
+ screen.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CXVSCROLL</td>
+ <td>The width of a vertical scroll bar, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CYBORDER</td>
+ <td>The height of a window border, in pixels. This is equivalent to
+ the SM_CYEDGE value for windows with the 3-D look.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYCAPTION</td>
+ <td>The height of a caption area, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CYCURSOR</td>
+ <td>The height of a cursor, in pixels. The system cannot create
+ cursors of other sizes.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYDLGFRAME</td>
+ <td>This value is the same as SM_CYFIXEDFRAME.</td>
+ </tr>
+ <tr>
+ <td>SM_CYDOUBLECLK</td>
+ <td>The height of the rectangle around the location of a first click
+ in a double-click sequence, in pixels. The second click must occur
+ within the rectangle defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for
+ the system to consider the two clicks a double-click. The two clicks
+ must also occur within a specified time. To set the height of the
+ double-click rectangle, call SystemParametersInfo with
+ SPI_SETDOUBLECLKHEIGHT.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYDRAG</td>
+ <td>The number of pixels above and below a mouse-down point that the
+ mouse pointer can move before a drag operation begins. This allows the
+ user to click and release the mouse button easily without
+ unintentionally starting a drag operation. If this value is negative,
+ it is subtracted from above the mouse-down point and added below
+ it.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYEDGE</td>
+ <td>The height of a 3-D border, in pixels. This is the 3-D counterpart
+ of SM_CYBORDER.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYFIXEDFRAME</td>
+ <td>The thickness of the frame around the perimeter of a window that
+ has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is the
+ height of the horizontal border, and SM_CYFIXEDFRAME is the width of
+ the vertical border. This value is the same as SM_CYDLGFRAME.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYFOCUSBORDER</td>
+ <td>The height of the top and bottom edges of the focus rectangle
+ drawn by DrawFocusRect. This value is in pixels.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYFRAME</td>
+ <td>This value is the same as SM_CYSIZEFRAME.</td>
+ </tr>
+ <tr>
+ <td>SM_CYFULLSCREEN</td>
+ <td>The height of the client area for a full-screen window on the
+ primary display monitor, in pixels. To get the coordinates of the
+ portion of the screen not obscured by the system taskbar or by
+ application desktop toolbars, call the SystemParametersInfo function
+ with the SPI_GETWORKAREA value.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYHSCROLL</td>
+ <td>The height of a horizontal scroll bar, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CYICON</td>
+ <td>The default height of an icon, in pixels. The LoadIcon function
+ can load only icons with the dimensions SM_CXICON and SM_CYICON.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYICONSPACING</td>
+ <td>The height of a grid cell for items in large icon view, in pixels.
+ Each item fits into a rectangle of size SM_CXICONSPACING by
+ SM_CYICONSPACING when arranged. This value is always greater than or
+ equal to SM_CYICON.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYKANJIWINDOW</td>
+ <td>For double byte character set versions of the system, this is the
+ height of the Kanji window at the bottom of the screen, in
+ pixels.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYMAXIMIZED</td>
+ <td>The default height, in pixels, of a maximized top-level window on
+ the primary display monitor.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYMAXTRACK</td>
+ <td>The default maximum height of a window that has a caption and
+ sizing borders, in pixels. This metric refers to the entire desktop.
+ The user cannot drag the window frame to a size larger than these
+ dimensions. A window can override this value by processing the
+ WM_GETMINMAXINFO message.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYMENU</td>
+ <td>The height of a single-line menu bar, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CYMENUCHECK</td>
+ <td>The height of the default menu check-mark bitmap, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CYMENUSIZE</td>
+ <td>The height of menu bar buttons, such as the child window close
+ button that is used in the multiple document interface, in
+ pixels.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYMIN</td>
+ <td>The minimum height of a window, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CYMINIMIZED</td>
+ <td>The height of a minimized window, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CYMINSPACING</td>
+ <td>The height of a grid cell for a minimized window, in pixels. Each
+ minimized window fits into a rectangle this size when arranged. This
+ value is always greater than or equal to SM_CYMINIMIZED.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYMINTRACK</td>
+ <td>The minimum tracking height of a window, in pixels. The user
+ cannot drag the window frame to a size smaller than these dimensions.
+ A window can override this value by processing the WM_GETMINMAXINFO
+ message.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYSCREEN</td>
+ <td>The height of the screen of the primary display monitor, in
+ pixels. This is the same value obtained by calling GetDeviceCaps as
+ follows: GetDeviceCaps( hdcPrimaryMonitor, VERTRES).
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYSIZE</td>
+ <td>The height of a button in a window caption or title bar, in
+ pixels.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYSIZEFRAME</td>
+ <td>The thickness of the sizing border around the perimeter of a
+ window that can be resized, in pixels. SM_CXSIZEFRAME is the width of
+ the horizontal border, and SM_CYSIZEFRAME is the height of the
+ vertical border. This value is the same as SM_CYFRAME.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYSMCAPTION</td>
+ <td>The height of a small caption, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CYSMICON</td>
+ <td>The recommended height of a small icon, in pixels. Small icons
+ typically appear in window captions and in small icon view.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYSMSIZE</td>
+ <td>The height of small caption buttons, in pixels.</td>
+ </tr>
+ <tr>
+ <td>SM_CYVIRTUALSCREEN</td>
+ <td>The height of the virtual screen, in pixels. The virtual screen is
+ the bounding rectangle of all display monitors. The SM_YVIRTUALSCREEN
+ metric is the coordinates for the top of the virtual screen.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYVSCROLL</td>
+ <td>The height of the arrow bitmap on a vertical scroll bar, in
+ pixels.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_CYVTHUMB</td>
+ <td>The height of the thumb box in a vertical scroll bar, in
+ pixels.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_DBCSENABLED</td>
+ <td>Nonzero if User32.dll supports DBCS; otherwise, 0.</td>
+ </tr>
+ <tr>
+ <td>SM_DEBUG</td>
+ <td>Nonzero if the debug version of User.exe is installed; otherwise,
+ 0.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_IMMENABLED</td>
+ <td>Nonzero if Input Method Manager/Input Method Editor features are
+ enabled; otherwise, 0. SM_IMMENABLED indicates whether the system is
+ ready to use a Unicode-based IME on a Unicode application. To ensure
+ that a language-dependent IME works, check SM_DBCSENABLED and the
+ system ANSI code page. Otherwise the ANSI-to-Unicode conversion may
+ not be performed correctly, or some components like fonts or registry
+ settings may not be present.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_MEDIACENTER</td>
+ <td>Nonzero if the current operating system is the Windows XP, Media
+ Center Edition, 0 if not.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_MENUDROPALIGNMENT</td>
+ <td>Nonzero if drop-down menus are right-aligned with the
+ corresponding menu-bar item; 0 if the menus are left-aligned.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_MIDEASTENABLED</td>
+ <td>Nonzero if the system is enabled for Hebrew and Arabic languages,
+ 0 if not.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_MOUSEPRESENT</td>
+ <td>Nonzero if a mouse is installed; otherwise, 0. This value is
+ rarely zero, because of support for virtual mice and because some
+ systems detect the presence of the port instead of the presence of a
+ mouse.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_MOUSEHORIZONTALWHEELPRESENT</td>
+ <td>Nonzero if a mouse with a horizontal scroll wheel is installed;
+ otherwise 0.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_MOUSEWHEELPRESENT</td>
+ <td>Nonzero if a mouse with a vertical scroll wheel is installed;
+ otherwise 0.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_NETWORK</td>
+ <td>The least significant bit is set if a network is present;
+ otherwise, it is cleared. The other bits are reserved for future
+ use.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_PENWINDOWS</td>
+ <td>Nonzero if the Microsoft Windows for Pen computing extensions are
+ installed; zero otherwise.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_REMOTECONTROL</td>
+ <td>This system metric is used in a Terminal Services environment. Its
+ value is nonzero if the current session is remotely controlled;
+ otherwise, 0.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_REMOTESESSION</td>
+ <td>This system metric is used in a Terminal Services environment. If
+ the calling process is associated with a Terminal Services client
+ session, the return value is nonzero. If the calling process is
+ associated with the Terminal Server console session, the return value
+ is 0. The console session is not necessarily the physical console. For
+ more information, see WTSGetActiveConsoleSessionId.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_SAMEDISPLAYFORMAT</td>
+ <td>Nonzero if all the display monitors have the same color format,
+ otherwise, 0. Two displays can have the same bit depth, but different
+ color formats. For example, the red, green, and blue pixels can be
+ encoded with different numbers of bits, or those bits can be located
+ in different places in a pixel color value.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_SECURE</td>
+ <td>This system metric should be ignored; it always returns 0.</td>
+ </tr>
+ <tr>
+ <td>SM_SERVERR2</td>
+ <td>The build number if the system is Windows Server 2003 R2;
+ otherwise, 0.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_SHOWSOUNDS</td>
+ <td>Nonzero if the user requires an application to present information
+ visually in situations where it would otherwise present the
+ information only in audible form; otherwise, 0.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_SHUTTINGDOWN</td>
+ <td>Nonzero if the current session is shutting down; otherwise,
+ 0.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_SLOWMACHINE</td>
+ <td>Nonzero if the computer has a low-end (slow) processor; otherwise,
+ 0.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_STARTER</td>
+ <td>Nonzero if the current operating system is Windows XP Starter
+ Edition; otherwise, 0.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_SWAPBUTTON</td>
+ <td>Nonzero if the meanings of the left and right mouse buttons are
+ swapped; otherwise, 0.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_TABLETPC</td>
+ <td>Nonzero if the current operating system is the Windows XP Tablet
+ PC edition, 0 if not.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_XVIRTUALSCREEN</td>
+ <td>The coordinates for the left side of the virtual screen. The
+ virtual screen is the bounding rectangle of all display monitors. The
+ SM_CXVIRTUALSCREEN metric is the width of the virtual screen.
+ </td>
+ </tr>
+ <tr>
+ <td>SM_YVIRTUALSCREEN</td>
+ <td>The coordinates for the top of the virtual screen. The virtual
+ screen is the bounding rectangle of all display monitors. The
+ SM_CYVIRTUALSCREEN metric is the height of the virtual screen.
+ </td>
+ </tr>
+ </informaltable>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+getsystemmetrics('SM_MOUSEPRESENT')
+getsystemmetrics('SM_SLOWMACHINE')
+getsystemmetrics('SM_REMOTESESSION');
+ ]]></programlisting>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/en_US/istssession.xml b/modules/windows_tools/help/en_US/istssession.xml
new file mode 100755
index 000000000..84bb6f6e6
--- /dev/null
+++ b/modules/windows_tools/help/en_US/istssession.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA
+ *
+ * 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="istssession">
+ <refnamediv>
+ <refname>istssession</refname>
+ <refpurpose>Determines if scilab is launched from a ms terminal service session (Windows only)</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>istssession()</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+ <para>
+ tf =istssession() returns boolean (%t) if scilab is launched from a ms
+ terminal service session and boolean (%f) otherwise.
+ </para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+if getos() == 'Windows' then
+ if istssession() then
+ disp('Scilab from a ms terminal service session.');
+ else
+ disp('Scilab standard session.');
+ end
+end
+ ]]></programlisting>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/en_US/mcisendstring.xml b/modules/windows_tools/help/en_US/mcisendstring.xml
new file mode 100755
index 000000000..2be6fa091
--- /dev/null
+++ b/modules/windows_tools/help/en_US/mcisendstring.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="mcisendstring">
+ <refnamediv>
+ <refname>mcisendstring</refname>
+ <refpurpose>sends a command string to an MCI
+ device (Windows only)
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>mcisendstring(mcistring)
+ bOK=mcisendstring(mcistring)
+ [bOK,CodeError]=mcisendstring(mcistring)
+ [bOK,CodeError,StringError]=mcisendstring(mcistring)
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>mcistring</term>
+ <listitem>
+ <para>a command string to send to an MCI device</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>bOK</term>
+ <listitem>
+ <para>returns %T or %F</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>CodeError</term>
+ <listitem>
+ <para>returns error code (0 --&gt; if bOK == %T)</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>StringError</term>
+ <listitem>
+ <para>returns MCI interpreter message ('OK' --&gt; if bOK ==
+ %T)
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <para>The mciSendString primitive sends a command string to an MCI device.
+ The device that the command is sent to is specified in the command
+ string.
+ </para>
+ <para>
+ see on <ulink url="http://msdn.microsoft.com/library/default.asp">http://msdn.microsoft.com/library/default.asp</ulink> and search
+ "Windows Multimedia SDK open"
+ </para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+mcisendstring("open ""d:\audio.mp3"" type MPEGVideo alias MP3_Device")
+mcisendstring("play MP3_Device")
+mcisendstring("close MP3_Device")
+
+mcisendstring("open ""d:\video.avi"" type avivideo alias AVI_Device")
+mcisendstring("play AVI_Device from 0")
+mcisendstring("close AVI_Device")
+ ]]></programlisting>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/en_US/powershell.xml b/modules/windows_tools/help/en_US/powershell.xml
new file mode 100755
index 000000000..80b4e71c7
--- /dev/null
+++ b/modules/windows_tools/help/en_US/powershell.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="powershell">
+ <refnamediv>
+ <refname>powershell</refname>
+ <refpurpose>shell (powershell) command execution (Windows
+ only)
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>output=powershell(command-name)
+ [output,bOK]=powershell(command-name)
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+ <para>Sends a string command-name to Windows for execution by the powershell.
+ Standard output and standard errors of the shell command are written in
+ the calling shell. bOK returns if command has been executed.
+ </para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+[s,w] = powershell('ls');
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="unix">unix</link>
+ </member>
+ <member>
+ <link linkend="dos">dos</link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/en_US/win64.xml b/modules/windows_tools/help/en_US/win64.xml
new file mode 100755
index 000000000..541d8ab9d
--- /dev/null
+++ b/modules/windows_tools/help/en_US/win64.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="win64" xml:lang="en">
+ <refnamediv>
+ <refname>win64</refname>
+ <refpurpose>Determine whether Windows x64 version of Scilab (Windows only)</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>win64()
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+ <para>tf =win64() returns boolean (%t) for Windows x64 of Scilab and
+ boolean (%f) otherwise.
+ </para>
+ </refsection>
+ <refsection>
+ <title>Example</title>
+ <programlisting role="example"><![CDATA[
+if getos() == 'Windows' then
+ if win64() then
+ disp('Scilab built for Windows x64.');
+ else
+ disp('Scilab built for Windows 32 bits.');
+ end
+end
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="getos">getos</link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/en_US/winopen.xml b/modules/windows_tools/help/en_US/winopen.xml
new file mode 100755
index 000000000..cd5c30588
--- /dev/null
+++ b/modules/windows_tools/help/en_US/winopen.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="winopen">
+ <refnamediv>
+ <refname>winopen</refname>
+ <refpurpose>Open file in appropriate application
+ (Windows only)
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>winopen('filename')</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+ <para>
+ <literal>winopen('filename')</literal> opens filename in the appropriate
+ Microsoft Windows application. The winopen function uses the appropriate
+ Windows shell command, and performs the same action as if you double-click
+ the file in the Windows Explorer. If filename is not in the current
+ directory, specify the absolute path for filename.
+ </para>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="unix">unix</link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/en_US/winqueryreg.xml b/modules/windows_tools/help/en_US/winqueryreg.xml
new file mode 100755
index 000000000..f0c5d61a3
--- /dev/null
+++ b/modules/windows_tools/help/en_US/winqueryreg.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="winqueryreg">
+ <refnamediv>
+ <refname>winqueryreg</refname>
+ <refpurpose>Get item from Microsoft Windows
+ registry (Windows only)
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>
+ value = winqueryreg('name', 'rootkey','subkey')
+ value = winqueryreg('key', 'rootkey','subkey')
+ value = winqueryreg('rootkey', 'subkey','valname')
+ value = winqueryreg('rootkey','subkey')
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+ <para>
+ value = winqueryreg('name', 'rootkey', 'subkey') returns the values names
+ in <literal>rootkey\subkey</literal> in a matrix of strings. The first argument
+ is the literal quoted string, 'name'.
+ </para>
+ <para>If the data retrieved from the registry is a string, winqueryreg
+ returns a string. If the data is a 32-bit integer, winqueryreg returns
+ the data as an integer (int32).
+ </para>
+ <para>
+ value = winqueryreg('key', 'rootkey', 'subkey') returns the keys names
+ in <literal>rootkey\subkey</literal> in a matrix of strings. The first argument
+ is the literal quoted string, 'key'.
+ </para>
+ <para>value = winqueryreg('rootkey', 'subkey', 'valname') returns the data
+ for value valname in <literal>rootkey\subkey</literal>.
+ </para>
+ <para>value = winqueryreg('rootkey', 'subkey') returns a data in
+ <literal>rootkey\subkey</literal> that has no value name property.
+ </para>
+ <para>
+ <literal>Note</literal>The literal name argument, key argument and the rootkey argument
+ are case-sensitive. The subkey and valname arguments are not.
+ </para>
+ <para>supported root keys are: 'HKEY_CLASSES_ROOT', 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE', 'HKEY_USERS', 'HKEY_DYN_DATA' and 'HKEY_CURRENT_CONFIG'.</para>
+ <para>and shortcut names: 'HKCR', 'HKCU', 'HKLM', 'HKU', 'HKDD' and 'HKCC'.</para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example">
+ <![CDATA[
+if getos() == 'Windows' then
+ winqueryreg 'HKEY_LOCAL_MACHINE' 'HARDWARE\DESCRIPTION\System\CentralProcessor\0\' 'ProcessorNameString'
+
+ mousechar = winqueryreg('name', 'HKEY_CURRENT_USER','control panel\mouse');
+ len=size(mousechar);
+ for k=1:len(1)
+ setting = winqueryreg('HKEY_CURRENT_USER','control panel\mouse', mousechar(k));
+ if (mousechar(k)=='') then mousechar(k)='default';,end
+ str = msprintf('%s = %s', mousechar(k), string(setting));
+ disp(str);
+ end
+
+ winqueryreg('HKEY_CURRENT_CONFIG', 'Software\Fonts\','LogPixels')
+ winqueryreg('key' ,'HKLM', 'Software\Microsoft\.NETFramework')
+end
+ ]]>
+ </programlisting>
+ </refsection>
+ <refsection>
+ <title>History</title>
+ <revhistory>
+ <revision>
+ <revnumber>5.4.0</revnumber>
+ <revremark>This function also manages 'HKEY_CURRENT_CONFIG' key.</revremark>
+ </revision>
+ <revision>
+ <revnumber>5.4.1</revnumber>
+ <revremark>
+ <itemizedlist>
+ <listitem>Manage shorcut root names.</listitem>
+ <listitem>Can retrieve key list names.</listitem>
+ </itemizedlist>
+ </revremark>
+ </revision>
+ </revhistory>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/fr_FR/addchapter.sce b/modules/windows_tools/help/fr_FR/addchapter.sce
new file mode 100755
index 000000000..d6d0cffc0
--- /dev/null
+++ b/modules/windows_tools/help/fr_FR/addchapter.sce
@@ -0,0 +1,11 @@
+// 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.1-en.txt
+
+add_help_chapter("Outils Windows",SCI+"/modules/windows_tools/help/fr_FR",%T);
+
diff --git a/modules/windows_tools/help/fr_FR/winopen.xml b/modules/windows_tools/help/fr_FR/winopen.xml
new file mode 100755
index 000000000..a10359f91
--- /dev/null
+++ b/modules/windows_tools/help/fr_FR/winopen.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="fr" xml:id="winopen">
+ <refnamediv>
+ <refname>winopen</refname>
+ <refpurpose>Ouvre le fichier avec l'application
+ appropriée (Windows seulement)
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Séquence d'appel</title>
+ <synopsis>winopen('filename')</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+ <para>
+ <literal>winopen('filename')</literal> ouvre le fichier avec l'application
+ appropriée de Microsoft Windows. winopen effectue la même action que si
+ vous double-cliquez sur l'icone dans l'explorateur de Windows.
+ </para>
+ </refsection>
+ <refsection role="see also">
+ <title>Voir aussi</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="unix">unix</link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/fr_FR/winqueryreg.xml b/modules/windows_tools/help/fr_FR/winqueryreg.xml
new file mode 100755
index 000000000..029512e81
--- /dev/null
+++ b/modules/windows_tools/help/fr_FR/winqueryreg.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="fr" xml:id="winqueryreg">
+ <refnamediv>
+ <refname>winqueryreg</refname>
+ <refpurpose>Obtenir une clef de la base des
+ registres de Microsoft Windows
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Séquence d'appel</title>
+ <synopsis>
+ value = winqueryreg('name', 'rootkey', 'subkey')
+ value = winqueryreg('key', 'rootkey', 'subkey')
+ value = winqueryreg('rootkey', 'subkey', 'valname')
+ value = winqueryreg('rootkey', 'subkey')
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+ <para>value = winqueryreg('name', 'rootkey', 'subkey') retourne les clefs
+ contenues dans rootkey\subkey dans une matrice de chaines de caracteres.
+ Le premier argument doit etre la chaine de caracteres, 'name'.
+ </para>
+ <para>Si la valeur contenue dans la base des registres est une chaine de
+ caracteres, winqueryreg retourne une chaine de caracteres. Si la valeur
+ est un entier sur 32 bits, winqueryreg retourne la valeur comme un entier
+ (int32).
+ </para>
+ <para>
+ value = winqueryreg('key', 'rootkey', 'subkey') retourne les sous clés
+ contenues dans rootkey\subkey dans une matrice de chaines de caracteres.
+ Le premier argument doit etre la chaine de caracteres, 'key'.
+ </para>
+ <para>value = winqueryreg('rootkey', 'subkey', 'valname') retourne la valeur
+ pour la clef valname dans rootkey\subkey.
+ </para>
+ <para>value = winqueryreg('rootkey', 'subkey') retourne la valeur "par
+ défaut" de la clef rootkey\subkey.
+ </para>
+ <para>
+ <literal>Note</literal>Les arguments 'name', 'key et 'rootkey' sont
+ "case-sensitive". Les arguments 'subkey' et 'valname' ne le sont pas.
+ </para>
+ <para>Les clefs racine supportées sont: 'HKEY_CLASSES_ROOT', 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE', 'HKEY_USERS', 'HKEY_DYN_DATA' and 'HKEY_CURRENT_CONFIG'.</para>
+ <para>Leurs raccourcis peuvent aussi être utilisé 'HKCR', 'HKCU', 'HKLM', 'HKU', 'HKDD' and 'HKCC'</para>
+ </refsection>
+ <refsection>
+ <title>Exemples</title>
+ <programlisting role="example">
+ <![CDATA[
+if getos() == 'Windows' then
+ winqueryreg 'HKEY_LOCAL_MACHINE' 'HARDWARE\DESCRIPTION\System\CentralProcessor\0\' 'ProcessorNameString'
+
+ mousechar = winqueryreg('name', 'HKEY_CURRENT_USER','control panel\mouse');
+ len=size(mousechar);
+ for k=1:len(1)
+ setting = winqueryreg('HKEY_CURRENT_USER','control panel\mouse', mousechar(k));
+ if (mousechar(k)=='') then mousechar(k)='default';,end
+ str = msprintf('%s = %s', mousechar(k), string(setting));
+ disp(str);
+ end
+
+ winqueryreg('HKEY_CURRENT_CONFIG', 'Software\Fonts\','LogPixels')
+ winqueryreg('key' ,'HKLM', 'Software\Microsoft\.NETFramework')
+end
+ ]]>
+ </programlisting>
+ </refsection>
+ <refsection>
+ <title>History</title>
+ <revhistory>
+ <revision>
+ <revnumber>5.4.0</revnumber>
+ <revremark>Cette fonction gére également la clé 'HKEY_CURRENT_CONFIG'.</revremark>
+ </revision>
+ <revision>
+ <revnumber>5.4.1</revnumber>
+ <revremark>
+ <itemizedlist>
+ <listitem>Accepte les raccourcis de clés racine.</listitem>
+ <listitem>Peut renvoyer la liste des noms de clés.</listitem>
+ </itemizedlist>
+ </revremark>
+ </revision>
+ </revhistory>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/ja_JP/addchapter.sce b/modules/windows_tools/help/ja_JP/addchapter.sce
new file mode 100755
index 000000000..6795d2155
--- /dev/null
+++ b/modules/windows_tools/help/ja_JP/addchapter.sce
@@ -0,0 +1,11 @@
+// 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.1-en.txt
+
+add_help_chapter("Windows tools",SCI+"/modules/windows_tools/help/ja_JP",%T);
+
diff --git a/modules/windows_tools/help/ja_JP/dos.xml b/modules/windows_tools/help/ja_JP/dos.xml
new file mode 100755
index 000000000..e72af8e7b
--- /dev/null
+++ b/modules/windows_tools/help/ja_JP/dos.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="dos">
+ <refnamediv>
+ <refname>dos</refname>
+ <refpurpose>シェル (cmd) コマンド実行 (Windows専用)</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>呼び出し手順</title>
+ <synopsis>bOK=dos(command-name)
+ bOK=dos(command-name,'-echo')
+ [output,bOK]=dos(command-name)
+ [output,bOK,exitcode]=dos(command-name)
+ [output,bOK]=dos(command-name,'-echo')
+ [output,bOK,exitcode]=dos(command-name,'-echo')
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>説明</title>
+ <para>コマンドシェルで実行するために
+ コマンド名の文字列をWindowsに送信します.
+ シェルコマンドの標準出力および標準エラーが呼び出し側のシェルに
+ 書き込まれます.
+ コマンドが実行された場合は, bOK が返されます.
+ </para>
+ <para>[output,bOK] = dos(command-name,'-echo') は,
+ 出力先が特定の変数へ割り付けられている場合でも
+ コマンドウインドウへの出力を強制的に行ないます.
+ </para>
+ <para>外部プロセスによる終了コードの値が返されます.</para>
+ <para>
+ ノートパッドエディタをオープンした後,すぐに
+ Scilabに制御を戻すには以下のようにします:
+ dos('start notepad')
+ </para>
+ </refsection>
+ <refsection>
+ <title>例</title>
+ <programlisting role="example"><![CDATA[
+[s,w] = dos('dir');
+[s,w] = dos('dir','-echo');
+dos('start notepad')
+dos('taskkill /IM notepad.exe') // 注意:このコマンドは全てのノートパッドのプロセスを終了します
+[s, w] = dos('foo')
+[s, w, code] = dos('dir')
+[s, w, code] = dos('foo')
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>参照</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="unix">unix</link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/windows_tools/help/pt_BR/addchapter.sce b/modules/windows_tools/help/pt_BR/addchapter.sce
new file mode 100755
index 000000000..46d11e694
--- /dev/null
+++ b/modules/windows_tools/help/pt_BR/addchapter.sce
@@ -0,0 +1,11 @@
+// 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.1-en.txt
+
+add_help_chapter("Ferramentas Windows",SCI+"/modules/windows_tools/help/pt_BR",%T);
+
diff --git a/modules/windows_tools/help/ru_RU/addchapter.sce b/modules/windows_tools/help/ru_RU/addchapter.sce
new file mode 100755
index 000000000..8476b9428
--- /dev/null
+++ b/modules/windows_tools/help/ru_RU/addchapter.sce
@@ -0,0 +1,11 @@
+// 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.1-en.txt
+
+add_help_chapter("Windows tools",SCI+"/modules/windows_tools/help/ru_RU",%T);
+
diff --git a/modules/windows_tools/includes/ConvertSlash.h b/modules/windows_tools/includes/ConvertSlash.h
new file mode 100755
index 000000000..67aed5a90
--- /dev/null
+++ b/modules/windows_tools/includes/ConvertSlash.h
@@ -0,0 +1,41 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - 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.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __CONVERTSLASH_H__
+#define __CONVERTSLASH_H__
+
+#include "BOOL.h"
+
+
+/* C:\Windows\system and C:/Windows/system */
+/* since Windows 2000 SP2 are supported */
+
+/**
+* convert a unix path to windows path 'format'
+* replaces '/' by '\'
+* @param [in] path in with '/'
+* @param [out] path out with '\'
+* @return TRUE or FALSE
+*/
+BOOL slashToAntislash(char *pathunix, char *pathwindows);
+
+/**
+* convert a windows path to unix path 'format'
+* replaces '\' by '/'
+* @param [in] path in with '\'
+* @param [out] path out with '/'
+* @return TRUE or FALSE
+*/
+BOOL AntislashToSlash(char *pathwindows, char *pathunix);
+
+#endif /* __CONVERTSLASH_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/includes/FocusOnConsole.h b/modules/windows_tools/includes/FocusOnConsole.h
new file mode 100755
index 000000000..8b34fa6e0
--- /dev/null
+++ b/modules/windows_tools/includes/FocusOnConsole.h
@@ -0,0 +1,21 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2008 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#ifndef __FOCUSONCONSOLE_H__
+#define __FOCUSONCONSOLE_H__
+
+/* set Focus on NW console */
+/* bug 3702 */
+
+void setFocusOnConsole(void);
+/*--------------------------------------------------------------------------*/
+#endif /* __FOCUSONCONSOLE_H__ */
diff --git a/modules/windows_tools/includes/InitializeWindows_tools.h b/modules/windows_tools/includes/InitializeWindows_tools.h
new file mode 100755
index 000000000..2bfd0c5bf
--- /dev/null
+++ b/modules/windows_tools/includes/InitializeWindows_tools.h
@@ -0,0 +1,27 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __INITIALIZEWINDOWS_TOOLS_H__
+#define __INITIALIZEWINDOWS_TOOLS_H__
+
+#include "dynlib_windows_tools.h"
+#include "BOOL.h" /* BOOL */
+
+/**
+* Initialize Windows_tools module
+* @return TRUE or FALSE
+*/
+WINDOWS_TOOLS_IMPEXP BOOL InitializeWindows_tools(void);
+
+#endif /* __INITIALIZEWINDOWS_TOOLS_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/includes/MutexClosingScilab.h b/modules/windows_tools/includes/MutexClosingScilab.h
new file mode 100755
index 000000000..712988e7f
--- /dev/null
+++ b/modules/windows_tools/includes/MutexClosingScilab.h
@@ -0,0 +1,39 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2008 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __MUTEXCLOSINGSCILAB_H__
+#define __MUTEXCLOSINGSCILAB_H__
+
+#include "dynlib_scilab_windows.h"
+#include "BOOL.h"
+
+#define CLOSING_SCILAB_MUTEX_NAME "Closing_Scilab"
+
+/**
+* Create a named Mutex used to known if we close scilab
+*/
+SCILAB_WINDOWS_IMPEXP void createMutexClosingScilab(void);
+
+/**
+* Close named Mutex used by Innosetup
+*/
+SCILAB_WINDOWS_IMPEXP void terminateMutexClosingScilab(void);
+
+/**
+* check if Mutex about Closing scilab is opening
+* @return TRUE or FALSE
+*/
+SCILAB_WINDOWS_IMPEXP BOOL haveMutexClosingScilab(void);
+/*--------------------------------------------------------------------------*/
+
+#endif /* __MUTEXCLOSINGSCILAB_H__ */
diff --git a/modules/windows_tools/includes/TerminateWindows_tools.h b/modules/windows_tools/includes/TerminateWindows_tools.h
new file mode 100755
index 000000000..7a164a622
--- /dev/null
+++ b/modules/windows_tools/includes/TerminateWindows_tools.h
@@ -0,0 +1,28 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __TERMINATEWINDOWS_TOOLS_H__
+#define __TERMINATEWINDOWS_TOOLS_H__
+
+#include "dynlib_windows_tools.h"
+#include "BOOL.h" /* BOOL */
+
+/**
+* Terminate Windows_tools module
+* @return TRUE or FALSE
+*/
+WINDOWS_TOOLS_IMPEXP BOOL TerminateWindows_tools(void);
+
+
+#endif /* __TERMINATEWINDOWS_TOOLS_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/includes/dynlib_windows_tools.h b/modules/windows_tools/includes/dynlib_windows_tools.h
new file mode 100755
index 000000000..bb15662ea
--- /dev/null
+++ b/modules/windows_tools/includes/dynlib_windows_tools.h
@@ -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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __DYNLIB_WINDOWS_TOOLS_H__
+#define __DYNLIB_WINDOWS_TOOLS_H__
+
+#ifdef _MSC_VER
+#ifdef WINDOWS_TOOLS_EXPORTS
+#define WINDOWS_TOOLS_IMPEXP __declspec(dllexport)
+#else
+#define WINDOWS_TOOLS_IMPEXP __declspec(dllimport)
+#endif
+#else
+#define WINDOWS_TOOLS_IMPEXP
+#endif
+
+#endif /* __DYNLIB_WINDOWS_TOOLS_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/includes/gw_windows_tools.h b/modules/windows_tools/includes/gw_windows_tools.h
new file mode 100755
index 000000000..426e2de70
--- /dev/null
+++ b/modules/windows_tools/includes/gw_windows_tools.h
@@ -0,0 +1,36 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __GW_WINDOWS_TOOLS_H__
+#define __GW_WINDOWS_TOOLS_H__
+/*--------------------------------------------------------------------------*/
+#include "dynlib_windows_tools.h"
+/*--------------------------------------------------------------------------*/
+WINDOWS_TOOLS_IMPEXP int gw_windows_tools(void);
+/*--------------------------------------------------------------------------*/
+/* Declaration of all the profile function declared and */
+/* used in sci_gateway */
+WINDOWS_TOOLS_IMPEXP int sci_winopen(char *fname, unsigned long l);
+WINDOWS_TOOLS_IMPEXP int sci_winqueryreg(char *fname, unsigned long l);
+WINDOWS_TOOLS_IMPEXP int sci_findfileassociation(char *fname, unsigned long l);
+WINDOWS_TOOLS_IMPEXP int sci_dos(char *fname, unsigned long l);
+WINDOWS_TOOLS_IMPEXP int sci_mcisendstring(char *fname, unsigned long l);
+WINDOWS_TOOLS_IMPEXP int sci_consolebox(char *fname, unsigned long l);
+WINDOWS_TOOLS_IMPEXP int sci_win64(char *fname, unsigned long l);
+WINDOWS_TOOLS_IMPEXP int sci_istssession(char *fname, unsigned long l);
+WINDOWS_TOOLS_IMPEXP int sci_getsystemmetrics(char *fname, unsigned long l);
+WINDOWS_TOOLS_IMPEXP int sci_createGUID(char *fname, unsigned long l);
+/*--------------------------------------------------------------------------*/
+#endif /* __GW_WINDOWS_TOOLS_H__ */
+
+
diff --git a/modules/windows_tools/includes/strdup_windows.h b/modules/windows_tools/includes/strdup_windows.h
new file mode 100755
index 000000000..a12eb4b89
--- /dev/null
+++ b/modules/windows_tools/includes/strdup_windows.h
@@ -0,0 +1,50 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __STRDUP_WIN_H__
+#define __STRDUP_WIN_H__
+
+/* strdup is deprecated on Windows with VS 2005 and more */
+/* required to fix warnings about strdup */
+
+#ifdef _MSC_VER
+#include <string.h>
+#ifdef strdup
+#undef strdup
+#endif
+#ifdef wstrdup
+#undef wstrdup
+#endif
+
+#define strdup strdup_windows
+#define wstrdup wstrdup_windows
+
+/**
+* Duplicate strings
+* @param[in] string source
+* @return a pointer to the storage location for the copied string
+*/
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+ char *strdup_windows(const char *strSource);
+ wchar_t *wstrdup_windows(const wchar_t *strSource);
+#ifdef __cplusplus
+};
+#endif
+
+#endif
+
+#endif /* __STRDUP_WIN_H__ */
+/*--------------------------------------------------------------------------*/ \ No newline at end of file
diff --git a/modules/windows_tools/libsciwindows_tools.la b/modules/windows_tools/libsciwindows_tools.la
new file mode 100755
index 000000000..89d30c6c7
--- /dev/null
+++ b/modules/windows_tools/libsciwindows_tools.la
@@ -0,0 +1,41 @@
+# libsciwindows_tools.la - a libtool library file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libsciwindows_tools.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lpthread -ldl -lcurses -lm'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libsciwindows_tools.
+current=
+age=
+revision=
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir=''
diff --git a/modules/windows_tools/license.txt b/modules/windows_tools/license.txt
new file mode 100755
index 000000000..933635069
--- /dev/null
+++ b/modules/windows_tools/license.txt
@@ -0,0 +1,10 @@
+Copyright:
+Copyright (c) 2008 - DIGITEO
+Copyright (c) 1989-2008 - INRIA
+
+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.1-en.txt
diff --git a/modules/windows_tools/locales/ca_ES.po b/modules/windows_tools/locales/ca_ES.po
new file mode 100755
index 000000000..538540575
--- /dev/null
+++ b/modules/windows_tools/locales/ca_ES.po
@@ -0,0 +1,118 @@
+# Catalan translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-04-19 18:08+0000\n"
+"Last-Translator: Marc Coll Carrillo <Unknown>\n"
+"Language-Team: Catalan <ca@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: ca\n"
+
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "Només en mode Windows, no en mode finestra.\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s: Error de memòria.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr ""
+"%s: L'argument d'entrada té un valor incorrecte: Han de ser nombres enters "
+"no-negatius.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr ""
+"%s: L'argument d'entrada és d'un tipus incorrecte: Ha de ser un escalar.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: no es pot llegir el paràmetre d'entrada #%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: L'argument d'entrada #%d és d'un tipus incorrecte: Ha de ser una cadena "
+"de caràcters.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: L'argument d'entrada #%d té una mida incorrecta: Ha de ser una cadena de "
+"text.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr ""
+"%s: L'argument d'entrada #%d té un valor incorrecte: Ha de ser '%s'.\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: No hi ha més memòria.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr ""
+"%s: L'argument d'entrada #%d és d'un tipus incorrecte: Ha de ser un text.\n"
+
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr ""
+"%s: Els arguments d'entrada són d'un tipus incorrecte. Han de ser cadenes de "
+"text.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s: L'argument d'entrada té un valor incorrecte: %s.\n"
+
+msgid "see help"
+msgstr "Veieu l'ajuda"
+
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s: No s'ha pogut obrir el fitxer %s.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s: No s'ha pogut obrir el registre de Windows.\n"
+
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr "%s: No es pot consultar un valor d'aquest tipus.\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr ""
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr ""
+
+msgid "Error(s) : see help powershell"
+msgstr "Error(s) : Veieu help powershell"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "Verifiqueu la vostra ordre de Powershell sense l'Scilab."
+
+msgid "Only for Microsoft Windows."
+msgstr "Només per a Microsoft Windows."
+
+msgid "Powershell 1.0 not found."
+msgstr "No s'ha trobat el Powershell 1.0."
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr "%s: Nombre incorrecte d'arguments d'entrada: Han de ser %d.\n"
diff --git a/modules/windows_tools/locales/cs_CZ.po b/modules/windows_tools/locales/cs_CZ.po
new file mode 100755
index 000000000..db8f876c8
--- /dev/null
+++ b/modules/windows_tools/locales/cs_CZ.po
@@ -0,0 +1,107 @@
+# Czech translation for scilab
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-01-23 20:35+0000\n"
+"Last-Translator: Zbyněk Schwarz <Unknown>\n"
+"Language-Team: Czech <cs@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "Pouze v Režimu Windows, není dostupné v Režimu Konzole.\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s: Chyba při přidělování paměti.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr ""
+"%s: Chybná hodnota vstupního argumentu: Očekávány nezáporná celá čísla.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr "%s: Chybný typ vstupního argumentu: Očekáván skalár.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: Nelze přečíst vstupní argument #%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr "%s: Špatný typ vstupního argumentu #%d: Očekáván řetězec.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr "%s: Špatná velikost vstupního argumentu #%d: Očekáván řetězec.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr "%s: Chybná hodnota vstupního argumentu #%d: Očekáván '%s'.\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: Není více paměti.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr "%s: Špatný typ vstupního argumentu #%d: Očekáván řetězec.\n"
+
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr "%s: Špatný typ vstupních argumentů: Očekávány řetězce.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s: Chybná hodnota vstupního argumentu: %s.\n"
+
+msgid "see help"
+msgstr "Podívejte se do nápovědy"
+
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s: Nelze otevřít soubor %s.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr "%s: Špatná velikost vstupního argumentu #%d: Očekáván řetězec.\n"
+
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s: Nelze otevřít registry Windows.\n"
+
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr "%s: Nelze se dotázat na hodnotu tohoto typu.\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr ""
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr ""
+
+msgid "Error(s) : see help powershell"
+msgstr "Chyba(y): podívejte se na nápovědu powershell"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "Ověřte, prosím, Vaše příkazy powershell bez Scilab."
+
+msgid "Only for Microsoft Windows."
+msgstr "Pouze pro Microsoft Windows."
+
+msgid "Powershell 1.0 not found."
+msgstr "Powershell 1.0 nenalezen."
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr "%s: Špatný počet vstupních argumentů: Očekáváno %d.\n"
diff --git a/modules/windows_tools/locales/de_DE.po b/modules/windows_tools/locales/de_DE.po
new file mode 100755
index 000000000..e34a96c7d
--- /dev/null
+++ b/modules/windows_tools/locales/de_DE.po
@@ -0,0 +1,112 @@
+# German translation for scilab
+# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-01-31 16:44+0000\n"
+"Last-Translator: Niko K <Unknown>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: de\n"
+
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "Nur im Fenstermodus, nicht im Konsolenmodus.\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s: Speicherzuweisungsfehler.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr ""
+"%s: falscher Wert für Eingangsargument: nicht-negative Integer erwartet.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr "%s: falscher Typ für Eingangsargument: Skalar erwartet.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: Kann Eingangsgument nicht lesen #%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: falscher Typ für Eingangsargument #%d: eine Zeichenkette erwartet.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: falsche Größe für Eingangsargument #%d: eine Zeichenkette erwartet.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr "%s: falscher Wert für Eingangsargument #%d: '%s' erwartet.\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: kein weiterer Speicher.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr "%s: falscher Typ für Eingangsargument #%d: Variable erwartet.\n"
+
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr "%s: falscher Typ für Eingangsargument: Variabel erwartet.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s: falscher Wert für Eingangsargument: %s.\n"
+
+msgid "see help"
+msgstr "in der Hilfe nachsehen"
+
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s: Kann die Datei nicht öffnen %s.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr ""
+"%s: Falsche Größe für Eingangsargument #%d: es wird eine Zeichenkette "
+"erwartet.\n"
+
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s: Kann Windows Registry nicht öffnen.\n"
+
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr "%s: kann Quersumme von diesem Typ nicht berechnen.\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr ""
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr ""
+
+msgid "Error(s) : see help powershell"
+msgstr "Fehler: siehe die Hilfe von Powershell"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "Verifizieren Sie bitte ihren Powershell-Befehl ohne Scilab."
+
+msgid "Only for Microsoft Windows."
+msgstr "Nur für Microsoft Windows"
+
+msgid "Powershell 1.0 not found."
+msgstr "Powershell 1.0 nicht gefunden."
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr "%s: Falsche Anzahl von Eingabeargumenten: %d erwartet.\n"
diff --git a/modules/windows_tools/locales/es_ES.po b/modules/windows_tools/locales/es_ES.po
new file mode 100755
index 000000000..72fd8823f
--- /dev/null
+++ b/modules/windows_tools/locales/es_ES.po
@@ -0,0 +1,116 @@
+# Spanish translation for scilab
+# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2013-01-03 18:01+0000\n"
+"Last-Translator: Marc Coll Carrillo <Unknown>\n"
+"Language-Team: Spanish <es@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: es\n"
+
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "Sólo en Modo Ventana, no en Modo Consola.\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s: Error de asignación de memoria.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr ""
+"%s: Tipo incorrecto para el argumento de entrada: Se esperaban enteros no "
+"negativos.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr ""
+"%s: Tipo incorrecto para el argumento de entrada: Se esperaba un escalar.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: No se puede leer el argumento de entrada #%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: Tipo incorrecto del argumento de entrada #%d: Se esperaba un string.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: Tamaño incorrecto del argumento de entrada #%d: Se esperaba un string.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr ""
+"%s: Valor incorrecto del argumento de entrada #%d: Se esperaba '%s'.\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: No hay más memoria.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr ""
+"%s: Tipo incorrecto del argumento de entrada #%d: Se esperaba un string.\n"
+
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr ""
+"%s: Tipo incorrecto de los argumentos de entrada: Se esperaban strings.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s: Valor incorrecto del argumento de entrada: %s.\n"
+
+msgid "see help"
+msgstr "vea la ayuda"
+
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s: No se puede abrir el archivo %s.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr ""
+"%s: Tamaño incorrecto del argumento de entrada #%d: Se esperaba un string.\n"
+
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s: No se pudo abrir el registro de Windows.\n"
+
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr "%s: No se puede consultar valores de este tipo.\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr ""
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr ""
+
+msgid "Error(s) : see help powershell"
+msgstr "Error(es): vea la ayuda de powershell"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "Por favor verifique el comando powershell sin Scilab."
+
+msgid "Only for Microsoft Windows."
+msgstr "Sólo para Microsoft Windows."
+
+msgid "Powershell 1.0 not found."
+msgstr "No se encontró Powershell 1.0"
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr "%s: Número incorrecto de argumento(s) de entrada: Se esperaban %d.\n"
diff --git a/modules/windows_tools/locales/fr_FR.po b/modules/windows_tools/locales/fr_FR.po
new file mode 100755
index 000000000..3616d012d
--- /dev/null
+++ b/modules/windows_tools/locales/fr_FR.po
@@ -0,0 +1,120 @@
+# French translation for scilab
+# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2014-03-31 08:38+0000\n"
+"Last-Translator: Vincent Couvert <Unknown>\n"
+"Language-Team: French <fr@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: fr\n"
+
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "Disponible uniquement en mode graphique, non en mode standard.\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s : Erreur d'allocation mémoire.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr ""
+"%s : Valeur erronée de l'argument d'entrée : Des entiers non-négatifs "
+"attendus.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr "%s : Type erroné de l'argument d'entrée : Un scalaire attendu.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s : Impossible de lire l'argument d'entrée n°%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr ""
+"%s : Type erroné de l'argument d'entrée n°%d : Une chaîne de caractères "
+"attendue.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr ""
+"%s : Dimension erronée de l'argument d'entrée n°%d : Une chaîne de "
+"caractères attendue.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr "%s : Valeur erronée de l'argument d'entrée n°%d : '%s' attendu.\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s : Plus de mémoire disponible.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr ""
+"%s : Type erroné de l'argument d'entrée n°%d : Une chaîne de caractères "
+"attendue.\n"
+
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr ""
+"%s : Type erroné des arguments d'entrée : Une chaîne de caractères "
+"attendue.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s : Valeur erronée de l'argument d'entrée : %s.\n"
+
+msgid "see help"
+msgstr "Consulter l'aide"
+
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s : Impossible d'ouvrir le fichier %s.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr ""
+"%s : Dimension erronée de l'argument d'entrée n°%d : Une chaîne de "
+"caractères attendue.\n"
+
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s : Impossible d'ouvrir la base de registre Windows.\n"
+
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr "%s : Impossible de renseigner la valeur de ce type.\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr "Console Scilab %s"
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr ""
+"Scilab 5.5.X sera la dernière famille qui fonctionnera sous Windows XP."
+
+msgid "Error(s) : see help powershell"
+msgstr "Erreur(s) : voir help powershell"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "Veuillez vérifier la commande powershell sans Scilab."
+
+msgid "Only for Microsoft Windows."
+msgstr "Seulement disponible pour Microsoft Windows"
+
+msgid "Powershell 1.0 not found."
+msgstr "Powershell 1.0 non trouvé."
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr "%s : Nombre erroné d'argument(s) d'entrée : %d attendu(s).\n"
diff --git a/modules/windows_tools/locales/it_IT.po b/modules/windows_tools/locales/it_IT.po
new file mode 100755
index 000000000..134e909e4
--- /dev/null
+++ b/modules/windows_tools/locales/it_IT.po
@@ -0,0 +1,123 @@
+# Italian translation for scilab
+# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-09-28 04:13+0000\n"
+"Last-Translator: Carml <mighty.carml@gmail.com>\n"
+"Language-Team: Italian <it@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: it\n"
+
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "Solo in modalità grafica. Non in modalità console\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s: Errore di allocazione della memoria.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr ""
+"%s: L'argomento in ingresso ha un valore sbagliato: era atteso un intero non "
+"negativo\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr ""
+"%s: L'argomento in ingresso è di tipo errato: era atteso uno scalare.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: Impossibile leggere l'argomento in ingresso #%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: L'argomento in ingresso #%d è di tipo sbagliato: era attesa una "
+"stringa.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: L'argomento in ingresso #%d ha una dimensione sbagliata: era attesa una "
+"stringa.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr ""
+"%s: L'argomento in ingresso #%d ha un valore sbagliato: era atteso '%s'\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: Memoria esaurita.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr ""
+"%s: L'argomento in ingresso #%d è di tipo sbagliato: era attesa una "
+"stringa.\n"
+
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr ""
+"%s: Gli argomenti in ingresso sono di tipo sbagliato: erano attese delle "
+"stringhe.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s: L'argomento in ingresso %s ha un valore sbagliato.\n"
+
+msgid "see help"
+msgstr "guardare la sezione Aiuto"
+
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s: Non è possibile aprire il file %s\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr ""
+"%s: L'argomento in ingresso #%d ha una dimensione sbagliata: era attesa una "
+"stringa.\n"
+
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s: Non è possibile aprire il registro di Windows.\n"
+
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr ""
+"%s: Non è possibile effettuare una ricerca con un valore di questo tipo.\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr ""
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr ""
+
+msgid "Error(s) : see help powershell"
+msgstr "Errore/i : consultare la guida di powershell"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "Verificare il proprio comando powershell senza Scilab."
+
+msgid "Only for Microsoft Windows."
+msgstr "Solo per Microsoft Windows"
+
+msgid "Powershell 1.0 not found."
+msgstr "Powershell 1.0 non trovata"
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr ""
+"%s: Il numero degli argomenti in ingresso è sbagliato: ne erano attesi %d.\n"
diff --git a/modules/windows_tools/locales/ja_JP.po b/modules/windows_tools/locales/ja_JP.po
new file mode 100755
index 000000000..aa40acd8a
--- /dev/null
+++ b/modules/windows_tools/locales/ja_JP.po
@@ -0,0 +1,153 @@
+# Japanese translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2014-03-30 14:16+0000\n"
+"Last-Translator: Rui Hirokawa <Unknown>\n"
+"Language-Team: Japanese <z-saito@guitar.ocn.ne.jp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"X-Poedit-Country: Japan\n"
+"Language: ja\n"
+"X-Poedit-Language: Japanese\n"
+
+#
+# File: sci_gateway/c/sci_consolebox.c, line: 45
+# File: sci_gateway/c/sci_consolebox.c, line: 82
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "ウインドウズモードに限定されます、コンソールモードではありません。\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s: メモリ確保エラー.\n"
+
+#
+# File: sci_gateway/c/sci_createGUID.c, line: 61
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr "%s: 不正な値の入力引数: 負ではない整数を想定します。\n"
+
+#
+# File: sci_gateway/c/sci_createGUID.c, line: 66
+# File: sci_gateway/c/sci_createGUID.c, line: 71
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr "%s: 入力引数で不正な型: スカラーを想定します。\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: 入力引数 #%d を読み込めません.\n"
+
+# File: sci_gateway/c/sci_chartooem.c, line: 48
+# File: sci_gateway/c/sci_dos.c, line: 50
+# File: sci_gateway/c/sci_dos.c, line: 62
+# File: sci_gateway/c/sci_findfileassociation.c, line: 38
+# File: sci_gateway/c/sci_getsystemmetrics.c, line: 31
+# File: sci_gateway/c/sci_mcisendstring.c, line: 106
+# File: sci_gateway/c/sci_oemtochar.c, line: 48
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr "%s: 入力引数 #%d で不正な型: 文字列を想定します。\n"
+
+# File: sci_gateway/c/sci_chartooem.c, line: 48
+# File: sci_gateway/c/sci_dos.c, line: 50
+# File: sci_gateway/c/sci_dos.c, line: 62
+# File: sci_gateway/c/sci_findfileassociation.c, line: 38
+# File: sci_gateway/c/sci_getsystemmetrics.c, line: 31
+# File: sci_gateway/c/sci_mcisendstring.c, line: 106
+# File: sci_gateway/c/sci_oemtochar.c, line: 48
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr "%s: 入力引数 #%d で不正なサイズ: 文字列を想定します。\n"
+
+#
+# File: sci_gateway/c/sci_dos.c, line: 70
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr "%s: 入力引数 #%d で不正な値: '%s' を想定します。\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: これ以上のメモリはありません。\n"
+
+# File: sci_gateway/c/sci_chartooem.c, line: 48
+# File: sci_gateway/c/sci_dos.c, line: 50
+# File: sci_gateway/c/sci_dos.c, line: 62
+# File: sci_gateway/c/sci_findfileassociation.c, line: 38
+# File: sci_gateway/c/sci_getsystemmetrics.c, line: 31
+# File: sci_gateway/c/sci_mcisendstring.c, line: 106
+# File: sci_gateway/c/sci_oemtochar.c, line: 48
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr "%s: 入力引数 #%d で不正な型: 文字列を想定します。\n"
+
+#
+# File: sci_gateway/c/sci_findfileassociation.c, line: 56
+# File: sci_gateway/c/sci_winhttpdownload.c, line: 67
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr "%s: 入力引数で不正な型: 文字列を想定します。\n"
+
+#
+# File: sci_gateway/c/sci_getsystemmetrics.c, line: 50
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s: 不正な値の入力引数: %s\n"
+
+#
+# File: sci_gateway/c/sci_getsystemmetrics.c, line: 50
+msgid "see help"
+msgstr "ヘルプを見てください。"
+
+#
+# File: sci_gateway/c/sci_winopen.c, line: 34
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s: ファイル '%s' をオープンできません。\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr "%s: 入力引数 #%d の大きさが間違っています: 文字列を指定してください.\n"
+
+#
+# File: sci_gateway/c/sci_winqueryreg.c, line: 89
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s: ウインドウズのレジストリを開けません。\n"
+
+#
+# File: sci_gateway/c/sci_winqueryreg.c, line: 137
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr "%s: この型の値を得ることができません。\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr "Scilab %s コンソール"
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr "Scilab 5.5.X ファミリーは Windows XP で動作する最後のバージョンとなります."
+
+msgid "Error(s) : see help powershell"
+msgstr "エラー(s): パワーシェル・ヘルプを見てください"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "powershell コマンドを Scilab なしの環境で確認してください."
+
+msgid "Only for Microsoft Windows."
+msgstr "Microsoft Windows のみです。"
+
+msgid "Powershell 1.0 not found."
+msgstr "Powershell 1.0 が見つかりません."
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr "%s: 入力引数の数に誤りがあります: %d 個の引数を指定してください.\n"
diff --git a/modules/windows_tools/locales/pl_PL.po b/modules/windows_tools/locales/pl_PL.po
new file mode 100755
index 000000000..bc131ebd3
--- /dev/null
+++ b/modules/windows_tools/locales/pl_PL.po
@@ -0,0 +1,116 @@
+# Polish translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-10-26 15:19+0000\n"
+"Last-Translator: Grzegorz Szostek <Unknown>\n"
+"Language-Team: Polish <pl@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: pl\n"
+
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "Tylko w trybie Windows, a nie w konsoli.\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s: Błąd przedzielania pamięci\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr ""
+"%s: Nieprawidłowa wartość argumentu wejściowego: Oczekiwane dodatnie liczby "
+"całkowite.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr "%s: Nieprawidłowy typ argumentu wejściowego: oczekiwany skalar.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: Nie można odczytać argumentu wejściowego #%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: Nieprawidłowy typ argumentu wejściowego nr %d: oczekiwano łańcuch.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: Nieprawidłowy rozmiar parametru wejściowego nr %d: oczekiwano ciągu "
+"znaków.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr ""
+"%s: Nieprawidłowa wartość dla argumentu wejściowego nr %d: oczekiwano '%s'\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: Brak pamięci.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr ""
+"%s: Nieprawidłowy typ argumentu wejściowego nr %d: oczekiwano łańcuch.\n"
+
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr "%s: Zły typ parametrów wejściowych: oczekiwano ciągów znaków.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s: Nieprawidłowa wartość dla argumentu wejściowego: %s.\n"
+
+msgid "see help"
+msgstr "zobacz pomoc"
+
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s: Nie można otworzyć pliku %s.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr ""
+"%s: Nieprawidłowy rozmiar argumentu wejściowego #%d: Oczekiwano łańcucha "
+"znaków.\n"
+
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s: Niemożna otworzyć okien rejestru.\n"
+
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr "%s: Niemożna kwestionować wartości tego typu.\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr ""
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr ""
+
+msgid "Error(s) : see help powershell"
+msgstr "Błąd : zobacz pomoc Powershell"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "Proszę sprawdzić swoje polecenie Powershell poza Scilab."
+
+msgid "Only for Microsoft Windows."
+msgstr "Tylko dla Microsoft Windows"
+
+msgid "Powershell 1.0 not found."
+msgstr "Nie znaleziono Powershell 1.0."
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr "%s: Nieprawidłowa liczba parametrów wejściowych: oczekiwano %d.\n"
diff --git a/modules/windows_tools/locales/pt_BR.po b/modules/windows_tools/locales/pt_BR.po
new file mode 100755
index 000000000..ec91961d2
--- /dev/null
+++ b/modules/windows_tools/locales/pt_BR.po
@@ -0,0 +1,118 @@
+# Brazilian Portuguese translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2013-12-06 18:02+0000\n"
+"Last-Translator: Scilab.team <Unknown>\n"
+"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: pt_BR\n"
+
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "Apenas no Modo Windows, não no modo Console.\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s: Erro de alocação de memória.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr ""
+"%s: Valor incorreto para o argumento de entrada: esperava-se números "
+"inteiros não negativos.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr ""
+"%s: Tipo incorreto para o argumento de entrada: esperava-se um escalar.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: Não foi possível ler argumento de entrada #%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: Tipo incorreto para o argumento de entrada #%d: esperava-se um texto.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: Tamanho incorreto para o argumento de entrada #%d: esperava-se um "
+"texto.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr ""
+"%s: Valor incorreto para o argumento de entrada #%d: esperava-se '%s'.\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: Memória esgotada.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr ""
+"%s: Tipo incorreto para o argumento de entrada #%d: esperava-se um texto.\n"
+
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr ""
+"%s: Tipo incorreto para os argumentos de entrada: esperava-se textos.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s: Valor incorreto para o argumento de entrada: %s.\n"
+
+msgid "see help"
+msgstr "veja a ajuda"
+
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s: Não foi possível abrir o arquivo %s.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr ""
+"%s: Tamanho incorreto para o argumento de entrada #%d: esperava-se um "
+"texto.\n"
+
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s: Não foi possível abrir o registro do Windows.\n"
+
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr "%s: Não é possível consultar o valor desse tipo.\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr ""
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr "A família Scilab 5.5.X será a última funcionando no Windows XP."
+
+msgid "Error(s) : see help powershell"
+msgstr "Erro(s): veja a ajuda do Powershell"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "Por favor, verifique seu comando Powershell sem o Scilab."
+
+msgid "Only for Microsoft Windows."
+msgstr "Apenas para Microsoft Windows."
+
+msgid "Powershell 1.0 not found."
+msgstr "Powershell 1.0 não foi encontrado."
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr "%s: Quantidade incorreta de argumentos de entrada: esperava-se %d.\n"
diff --git a/modules/windows_tools/locales/ru_RU.po b/modules/windows_tools/locales/ru_RU.po
new file mode 100755
index 000000000..5a5e5119a
--- /dev/null
+++ b/modules/windows_tools/locales/ru_RU.po
@@ -0,0 +1,110 @@
+# Russian translation for scilab
+# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2015-02-14 16:52+0000\n"
+"Last-Translator: Stanislav V. Kroter <krotersv@gmail.com>\n"
+"Language-Team: Russian <ru@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: ru\n"
+
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "Только в оконном режиме, не в консольном.\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s: Ошибка выделения памяти.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr ""
+"%s: Неверное значение входного параметра: ожидалось неотрицательное целое "
+"число.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr "%s: Неверный тип входного параметра: ожидался скаляр.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: Не могу прочитать входной аргумент №%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr "%s: Неверный тип входного параметра №%d: ожидалась строка.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr "%s: Неверный размер входного параметра №%d: ожидалась строка.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr "%s: Неверное значение входного параметра №%d: ожидалось «%s».\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: Не осталось доступной памяти.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr "%s: Неверный тип входного параметра №%d: ожидалась строка.\n"
+
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr "%s: Неверный тип входных параметров: ожидались строки.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s: Неверное значение входного параметра: %s.\n"
+
+msgid "see help"
+msgstr "см. справку"
+
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s: Не удалось открыть файл %s.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr "%s: Неверный размер входного параметра №%d: ожидалась строка.\n"
+
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s: Не удалось открыть реестр Windows.\n"
+
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr "%s: Не удалось запросить значение этого типа.\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr "Командное окно Scilab %s"
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr ""
+"Семейство Scilab 5.5.X будет последним, которое работает в Windows XP."
+
+msgid "Error(s) : see help powershell"
+msgstr "Ошибка(и) : см. справку powershell"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "Проверьте вашу команду на powershell без Scilab."
+
+msgid "Only for Microsoft Windows."
+msgstr "Только для Microsoft Windows."
+
+msgid "Powershell 1.0 not found."
+msgstr "Powershell 1.0 не найден."
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr "%s: Неверное количество входных параметров: ожидалось %d.\n"
diff --git a/modules/windows_tools/locales/uk_UA.po b/modules/windows_tools/locales/uk_UA.po
new file mode 100755
index 000000000..47c968046
--- /dev/null
+++ b/modules/windows_tools/locales/uk_UA.po
@@ -0,0 +1,121 @@
+# Ukrainian translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+#
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+# Yuri Chornoivan <yurchor@gmail.com>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2014-03-29 18:33+0000\n"
+"Last-Translator: Yuri Chornoivan <yurchor@gmail.com>\n"
+"Language-Team: Ukrainian <translation@linux.org.ua>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: uk\n"
+
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "Лише у режимі вікон, а не у консольному режимі.\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s: помилка під час спроби виділення пам’яті.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr ""
+"%s: помилкове значення вхідного параметра: слід було вказувати невід’ємні "
+"цілі числа.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr ""
+"%s: помилковий тип вхідного параметра: слід використовувати дійсне число.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: не вдалося прочитати вхідний параметр №%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: помилковий тип вхідного параметра №%d: слід використовувати тип "
+"«string».\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr ""
+"%s: помилковий розмір вхідного параметра №%d: слід використовувати рядок.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr ""
+"%s: помилкове значення вхідного параметра №%d: слід використовувати «%s».\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: доступну пам’ять вичерпано.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr ""
+"%s: помилковий тип вхідного параметра №%d: слід використовувати тип "
+"«string».\n"
+
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr ""
+"%s: помилковий тип вхідних параметрів: слід використовувати «string».\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s: помилкове значення вхідного параметра: %s.\n"
+
+msgid "see help"
+msgstr "див. довідку"
+
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s: не вдалося відкрити файл %s.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr ""
+"%s: помилковий розмір вхідного параметра №%d: слід використовувати рядок.\n"
+
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s: не вдалося відкрити реєстр Windows.\n"
+
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr "%s: запит на значення такого типу неможливий.\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr "Консоль Scilab %s"
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr ""
+"Сімейство Scilab 5.5.X є останнім сімейством версій, які працюватимуть у "
+"Windows XP."
+
+msgid "Error(s) : see help powershell"
+msgstr "Помилки: див. help powershell"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "Будь ласка, перевірте вашу команду powershell поза межами Scilab."
+
+msgid "Only for Microsoft Windows."
+msgstr "Лише для Microsoft Windows."
+
+msgid "Powershell 1.0 not found."
+msgstr "Не виявлено Powershell 1.0."
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr "%s: помилкова кількість вхідних параметрів: мало бути %d.\n"
diff --git a/modules/windows_tools/locales/windows_tools.pot b/modules/windows_tools/locales/windows_tools.pot
new file mode 100755
index 000000000..45d8826bb
--- /dev/null
+++ b/modules/windows_tools/locales/windows_tools.pot
@@ -0,0 +1,185 @@
+# Localization of the module windows_tools
+# Please see in SCI/tools/localization for localization management
+# Copyright (C) 2007-2008 - INRIA
+# Copyright (C) 2008-2011 - DIGITEO
+# Copyright (C) 2012-2014 - Scilab-Enterprises
+# This file is distributed under the same license as the Scilab package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"Last-Translator: Vincent COUVERT <vincent.couvert@scilab-enterprises.com>\n"
+"Language-Team: Scilab Localization <localization@lists.scilab.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Revision-Date: 2015-03-27 13:54+0100\n"
+
+# File: sci_gateway/c/sci_consolebox.c, line: 51
+# File: sci_gateway/c/sci_consolebox.c, line: 93
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_createGUID.c, line: 56
+# File: sci_gateway/c/sci_dos.c, line: 241
+# File: sci_gateway/c/sci_dos.c, line: 269
+# File: sci_gateway/c/sci_dos.c, line: 279
+# File: sci_gateway/c/sci_dos.c, line: 293
+# File: sci_gateway/c/sci_winqueryreg.c, line: 65
+# File: sci_gateway/c/sci_winqueryreg.c, line: 117
+# File: sci_gateway/c/sci_winqueryreg.c, line: 135
+# File: sci_gateway/c/sci_winqueryreg.c, line: 189
+# File: sci_gateway/c/sci_winqueryreg.c, line: 260
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_createGUID.c, line: 61
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_createGUID.c, line: 66
+# File: sci_gateway/c/sci_createGUID.c, line: 71
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_dos.c, line: 62
+# File: sci_gateway/c/sci_dos.c, line: 70
+# File: sci_gateway/c/sci_dos.c, line: 84
+# File: sci_gateway/c/sci_dos.c, line: 101
+# File: sci_gateway/c/sci_dos.c, line: 128
+# File: sci_gateway/c/sci_dos.c, line: 136
+# File: sci_gateway/c/sci_dos.c, line: 150
+# File: sci_gateway/c/sci_dos.c, line: 171
+# File: sci_gateway/c/sci_winqueryreg.c, line: 47
+# File: sci_gateway/c/sci_winqueryreg.c, line: 74
+# File: sci_gateway/c/sci_winqueryreg.c, line: 94
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_dos.c, line: 76
+# File: sci_gateway/c/sci_dos.c, line: 142
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_dos.c, line: 90
+# File: sci_gateway/c/sci_dos.c, line: 156
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_dos.c, line: 109
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_dos.c, line: 119
+# File: sci_gateway/c/sci_dos.c, line: 313
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_findfileassociation.c, line: 39
+# File: sci_gateway/c/sci_getsystemmetrics.c, line: 32
+# File: sci_gateway/c/sci_mcisendstring.c, line: 119
+# File: sci_gateway/c/sci_winqueryreg.c, line: 53
+# File: sci_gateway/c/sci_winqueryreg.c, line: 80
+# File: sci_gateway/c/sci_winqueryreg.c, line: 100
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_findfileassociation.c, line: 57
+# File: sci_gateway/c/sci_winhttpdownload.c, line: 81
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_getsystemmetrics.c, line: 51
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_getsystemmetrics.c, line: 51
+msgid "see help"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_winopen.c, line: 34
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_winqueryreg.c, line: 59
+# File: sci_gateway/c/sci_winqueryreg.c, line: 86
+# File: sci_gateway/c/sci_winqueryreg.c, line: 106
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_winqueryreg.c, line: 199
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr ""
+
+#
+# File: sci_gateway/c/sci_winqueryreg.c, line: 252
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr ""
+
+#
+# File: src/c/scilab_windows/splashScreen.cpp, line: 225
+#, c-format
+msgid "Scilab %s Console"
+msgstr ""
+
+# File: etc/windows_tools.start, line: 30
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr ""
+
+#
+# File: macros/powershell.sci, line: 15
+msgid "Error(s) : see help powershell"
+msgstr ""
+
+#
+# File: macros/powershell.sci, line: 15
+msgid "Please verify your powershell command without Scilab."
+msgstr ""
+
+#
+# File: macros/powershell.sci, line: 21
+msgid "Only for Microsoft Windows."
+msgstr ""
+
+#
+# File: macros/powershell.sci, line: 28
+msgid "Powershell 1.0 not found."
+msgstr ""
+
+#
+# File: macros/powershell.sci, line: 40
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr ""
diff --git a/modules/windows_tools/locales/zh_CN.po b/modules/windows_tools/locales/zh_CN.po
new file mode 100755
index 000000000..6a503fc4a
--- /dev/null
+++ b/modules/windows_tools/locales/zh_CN.po
@@ -0,0 +1,107 @@
+# Simplified Chinese translation for scilab
+# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-05-30 08:46+0000\n"
+"Last-Translator: Wesh <Unknown>\n"
+"Language-Team: Simplified Chinese <zh_CN@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: \n"
+
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "只可在窗口模式下,不可在控制台模式下。\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s:内存分配错误。\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr "%s:输入参数的值错误:应该为非负整数。\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr "%s:输入参数的类型错误:应该为标量。\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s:不能读取第%d个输入参数。\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr "%s:输入参数#%d的类型错误:应该为一个字符串。\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr "%s:输入参数#%d的大小错误:应该为字符串。\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr "%s:输入参数#%d的值错误:应该为'%s'。\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: 内存不足。\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr "%s:输入参数#%d的类型错误:应该为字符串。\n"
+
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr "%s:输入参数的类型错误:应该为字符串。\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s:输入参数的值错误:%s。\n"
+
+msgid "see help"
+msgstr "请参考帮助"
+
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s:无法打开文件%s。\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr "%s:第%d个输入参数的大小错误:应该为字符串。\n"
+
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s:无法打开Windows注册项。\n"
+
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr "%s:无法查询此类型的值。\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr ""
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr ""
+
+msgid "Error(s) : see help powershell"
+msgstr "错误:请参阅powershell帮助。"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "请在不用Scilab的情况下确认PowerShell命令。"
+
+msgid "Only for Microsoft Windows."
+msgstr "只可用于微软 Windows。"
+
+msgid "Powershell 1.0 not found."
+msgstr "Powershell 1.0 未找到。"
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr "%s:输入参数的数目错误:应该为%d。\n"
diff --git a/modules/windows_tools/locales/zh_TW.po b/modules/windows_tools/locales/zh_TW.po
new file mode 100755
index 000000000..512f97f03
--- /dev/null
+++ b/modules/windows_tools/locales/zh_TW.po
@@ -0,0 +1,105 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: Scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2011-09-01 09:53+0000\n"
+"Last-Translator: tim loo <timloo0710@gmail.com>\n"
+"Language-Team: Traditional Chinese <zh_TW@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: \n"
+"Revision-Date: 2011-04-04 22:09+0100\n"
+
+msgid "Only on Windows Mode, not in Console Mode.\n"
+msgstr "僅可在視窗模式下使用,不可在主控模式下使用.\n"
+
+#, c-format
+msgid "%s: Memory allocation error.\n"
+msgstr "%s: Memory 分配有誤.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: Non-negative integers expected.\n"
+msgstr "%s: 輸入參數的數值錯誤: 應該是非負號的整數值.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument: Scalar expected.\n"
+msgstr "%s: 輸入參數的型態錯誤: 應該是純量.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: A string expected.\n"
+msgstr "%s: 第 %d 個輸入參數的型態錯誤: 應該是字串.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: A string expected.\n"
+msgstr "%s: 第 %d 個輸入參數的資料長度錯誤: 應該是字串.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument #%d: '%s' expected.\n"
+msgstr "%s: 第 %d 個輸入參數值錯誤: 應該是 '%s'.\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: 記憶體空間不足.\n"
+
+#, c-format
+msgid "%s: Wrong type for input argument #%d: String expected.\n"
+msgstr "%s: 第 %d 個輸入參數的型態錯誤: 應該是字串.\n"
+
+#, c-format
+msgid "%s: Wrong type for input arguments: Strings expected.\n"
+msgstr "%s: 輸入參數的型態錯誤: 應該是字串.\n"
+
+#, c-format
+msgid "%s: Wrong value for input argument: %s.\n"
+msgstr "%s: 給輸入參數的數值錯誤: %s.\n"
+
+#
+# File: sci_gateway/c/sci_getsystemmetrics.c, line: 50
+msgid "see help"
+msgstr "參考線上文件 (help)"
+
+#, c-format
+msgid "%s: Cannot open file %s.\n"
+msgstr "%s: 無法開啟 %s 檔案.\n"
+
+#, c-format
+msgid "%s: Wrong size for input argument #%d: String expected.\n"
+msgstr "%s: 第 %d 個輸入參數長度錯誤: 應為字串.\n"
+
+#, c-format
+msgid "%s: Cannot open Windows registry.\n"
+msgstr "%s: 無法開啟 Windows 的系統註冊功能.\n"
+
+#, c-format
+msgid "%s: Cannot query value of this type.\n"
+msgstr "%s: 此資料型態的值無法查詢.\n"
+
+#, c-format
+msgid "Scilab %s Console"
+msgstr ""
+
+msgid "Scilab 5.5.X family will be the latest one working under Windows XP."
+msgstr ""
+
+msgid "Error(s) : see help powershell"
+msgstr "錯誤: 參閱 powershell 說明"
+
+msgid "Please verify your powershell command without Scilab."
+msgstr "請驗証你的 powershell command without Scilab."
+
+msgid "Only for Microsoft Windows."
+msgstr "僅適用於微軟視窗系統."
+
+msgid "Powershell 1.0 not found."
+msgstr "Powershell 1.0 找不到."
+
+#, c-format
+msgid "%s: Wrong number of input argument(s): %d expected.\n"
+msgstr "%s: 輸入參數的個數錯誤: 應該有 %d 個.\n"
diff --git a/modules/windows_tools/macros/buildmacros.bat b/modules/windows_tools/macros/buildmacros.bat
new file mode 100755
index 000000000..c4e35ec40
--- /dev/null
+++ b/modules/windows_tools/macros/buildmacros.bat
@@ -0,0 +1 @@
+@..\..\..\bin\scilex -nwni -ns -e exec('buildmacros.sce');quit; \ No newline at end of file
diff --git a/modules/windows_tools/macros/buildmacros.sce b/modules/windows_tools/macros/buildmacros.sce
new file mode 100755
index 000000000..73bc47e15
--- /dev/null
+++ b/modules/windows_tools/macros/buildmacros.sce
@@ -0,0 +1,16 @@
+//------------------------------------
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - 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.1-en.txt
+//------------------------------------
+if (isdef("genlib") == %f) then
+ exec(SCI+"/modules/functions/scripts/buildmacros/loadgenlib.sce");
+end
+//------------------------------------
+genlib("windows_toolslib","SCI/modules/windows_tools/macros",%f,%t);
+//------------------------------------
diff --git a/modules/windows_tools/macros/cleanmacros.bat b/modules/windows_tools/macros/cleanmacros.bat
new file mode 100755
index 000000000..5079dfd71
--- /dev/null
+++ b/modules/windows_tools/macros/cleanmacros.bat
@@ -0,0 +1,3 @@
+@del *.bin 2>NUL
+@del lib 2>NUL
+@del names 2>NUL \ No newline at end of file
diff --git a/modules/windows_tools/macros/powershell.sci b/modules/windows_tools/macros/powershell.sci
new file mode 100755
index 000000000..c9c6f13d5
--- /dev/null
+++ b/modules/windows_tools/macros/powershell.sci
@@ -0,0 +1,42 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2007 - INRIA - Allan CORNET
+// Copyright (C) 2010 - 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.1-en.txt
+
+// start a command PowerShell
+function [resultat, status] = powershell(varargin)
+ Chainecmd = "";
+ Chainecmdbegin = "powershell.exe -nologo -inputformat text -outputformat text -Noninteractive ";
+ resultat = [gettext("Error(s) : see help powershell");gettext("Please verify your powershell command without Scilab.")];
+ status = %f;
+
+ [lhs, rhs] = argn(0);
+
+ if (getos() <> "Windows") then
+ resultat = [gettext("Only for Microsoft Windows.")];
+ return;
+ end
+
+ try
+ winqueryreg("HKEY_LOCAL_MACHINE", "SOFTWARE\Microsoft\PowerShell\1", "Install");
+ catch
+ resultat = [gettext("Powershell 1.0 not found.")];
+ return;
+ end
+
+ if (rhs == 1) then
+ if ( (type(varargin(1)) == 10) & and(size(varargin(1)) == [1 1]) ) then
+ Chainecmd = Chainecmdbegin + "-command """ + varargin(1) + """";
+ [resultat, status] = dos(Chainecmd);
+ else
+ error(msprintf(gettext("%s: Wrong type for input argument #%d: String expected.\n"), "powershell", 1));
+ end
+ else
+ error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"), "powershell", 1));
+ end
+endfunction
diff --git a/modules/windows_tools/sci_gateway/c/gw_windows_tools.c b/modules/windows_tools/sci_gateway/c/gw_windows_tools.c
new file mode 100755
index 000000000..6832a1591
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/c/gw_windows_tools.c
@@ -0,0 +1,47 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <string.h>
+#include "gw_windows_tools.h"
+#include "MALLOC.h"
+#include "api_scilab.h"
+#include "callFunctionFromGateway.h"
+/*--------------------------------------------------------------------------*/
+static gw_generic_table Tab[] =
+{
+ {sci_winopen, "winopen"},
+ {sci_winqueryreg, "winqueryreg"},
+ {sci_findfileassociation, "findfileassociation"},
+ {sci_dos, "dos"},
+ {sci_mcisendstring, "mcisendstring"},
+ {sci_consolebox, "consolebox"},
+ {sci_win64, "win64"},
+ {sci_istssession, "istssession"},
+ {sci_getsystemmetrics, "getsystemmetrics"},
+ {sci_createGUID, "createGUID"}
+};
+/*--------------------------------------------------------------------------*/
+int gw_windows_tools(void)
+{
+ Rhs = Max(0, Rhs);
+
+ if (pvApiCtx == NULL)
+ {
+ pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx));
+ }
+
+ pvApiCtx->pstName = (char*)Tab[Fin - 1].name;
+ callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab));
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/sci_gateway/c/sci_consolebox.c b/modules/windows_tools/sci_gateway/c/sci_consolebox.c
new file mode 100755
index 000000000..579da5f46
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/c/sci_consolebox.c
@@ -0,0 +1,120 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <string.h>
+#include "gw_windows_tools.h"
+#include "scilabmode.h"
+#include "MALLOC.h" /* MALLOC */
+#include "stack-c.h"
+#include "sciprint.h"
+#include "WinConsole.h"
+#include "Scierror.h"
+#include "localization.h"
+/*--------------------------------------------------------------------------*/
+int sci_consolebox(char *fname, unsigned long l)
+{
+ static int l1, n1, m1;
+ char *Output = NULL;
+
+ Rhs = Max(Rhs, 0);
+ CheckRhs(0, 1);
+ CheckLhs(0, 1);
+
+ Output = (char*)MALLOC(4 * sizeof(char));
+
+ if (Rhs == 0)
+ {
+ if (getScilabMode() == SCILAB_STD)
+ {
+ if (GetConsoleState())
+ {
+ strcpy(Output, "on");
+ }
+ else
+ {
+ strcpy(Output, "off");
+ }
+
+ }
+ else
+ {
+ sciprint(_("Only on Windows Mode, not in Console Mode.\n"));
+ strcpy(Output, "off");
+ }
+ }
+ else if (GetType(1) == sci_strings)
+ {
+ char *param = NULL;
+
+ GetRhsVar(1, STRING_DATATYPE, &m1, &n1, &l1);
+ param = cstk(l1);
+
+ if ( (strcmp(param, "off") == 0) || (strcmp(param, "on") == 0) || (strcmp(param, "toggle") == 0) )
+ {
+ if (getScilabMode() == SCILAB_STD)
+ {
+ if (strcmp(param, "on") == 0)
+ {
+ SetConsoleState(1);
+ ShowScilex();
+ strcpy(Output, "on");
+ }
+ else if (strcmp(param, "off") == 0)
+ {
+ SetConsoleState(0);
+ HideScilex();
+ strcpy(Output, "off");
+ }
+ else /* toggle */
+ {
+ SwitchConsole();
+ if (GetConsoleState())
+ {
+ strcpy(Output, "on");
+ }
+ else
+ {
+ strcpy(Output, "off");
+ }
+ }
+ }
+ else
+ {
+ sciprint(_("Only on Windows Mode, not in Console Mode.\n"));
+ strcpy(Output, "off");
+ }
+ }
+ else
+ {
+ Scierror(999, ("%s: Wrong input argument: '%s', '%s' or '%s' expected.\n"), fname, "on", "off", "toggle");
+ return 0;
+ }
+ }
+ else
+ {
+ Scierror(999, ("%s: Wrong input argument: '%s', '%s' or '%s' expected.\n"), fname, "on", "off", "toggle");
+ return 0;
+ }
+
+ n1 = 1;
+ CreateVarFromPtr(Rhs + 1, STRING_DATATYPE, (m1 = (int)strlen(Output), &m1), &n1, &Output);
+ if (Output)
+ {
+ FREE(Output);
+ Output = NULL;
+ }
+ LhsVar(1) = Rhs + 1;
+ PutLhsVar();
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/sci_gateway/c/sci_createGUID.c b/modules/windows_tools/sci_gateway/c/sci_createGUID.c
new file mode 100755
index 000000000..e0e8be876
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/c/sci_createGUID.c
@@ -0,0 +1,75 @@
+/*--------------------------------------------------------------------------*/
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - 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.1-en.txt
+/*--------------------------------------------------------------------------*/
+#include "gw_windows_tools.h"
+#include "stack-c.h"
+#include "MALLOC.h"
+#include "Scierror.h"
+#include "localization.h"
+#include "createGUID.h"
+#include "freeArrayOfString.h"
+/*--------------------------------------------------------------------------*/
+int sci_createGUID(char *fname, unsigned long l)
+{
+ CheckRhs(1, 1);
+ CheckLhs(1, 1);
+
+ if (GetType(1) == sci_matrix)
+ {
+ int m1 = 0, n1 = 0, l1 = 0;
+ GetRhsVar(1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l1);
+ if ( (m1 == 1) && (n1 == 1) )
+ {
+ int numberOfGuids = (int) * stk(l1);
+
+ if ( numberOfGuids > 0 )
+ {
+ char **GUIDs = (char **)MALLOC(numberOfGuids * (sizeof(char*)));
+
+ if (GUIDs)
+ {
+ int mOutput = 0, nOutput = 0;
+ int i = 0;
+ for (i = 0; i < numberOfGuids ; i++)
+ {
+ GUIDs[i] = createGUID();
+ }
+
+ mOutput = numberOfGuids;
+ nOutput = 1;
+ CreateVarFromPtr(Rhs + 1, MATRIX_OF_STRING_DATATYPE, &mOutput, &nOutput, GUIDs);
+
+ freeArrayOfString(GUIDs, mOutput * nOutput);
+
+ LhsVar(1) = Rhs + 1 ;
+ PutLhsVar();
+ }
+ else
+ {
+ Scierror(999, _("%s: Memory allocation error.\n"), fname);
+ }
+ }
+ else
+ {
+ Scierror(999, _("%s: Wrong value for input argument: Non-negative integers expected.\n"), fname);
+ }
+ }
+ else
+ {
+ Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname);
+ }
+ }
+ else
+ {
+ Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname);
+ }
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/sci_gateway/c/sci_dos.c b/modules/windows_tools/sci_gateway/c/sci_dos.c
new file mode 100755
index 000000000..2f9bb78dd
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/c/sci_dos.c
@@ -0,0 +1,336 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <stdio.h>
+#include "gw_windows_tools.h"
+#include "PATH_MAX.h"
+#include "MALLOC.h" /* MALLOC */
+#include "spawncommand.h"
+#include "sciprint.h"
+#include "tmpdir.h"
+#include "FileExist.h"
+#include "localization.h"
+#include "Scierror.h"
+#include "freeArrayOfString.h"
+#include "getshortpathname.h"
+#include "api_scilab.h"
+#include "stack-c.h"
+#include "charEncoding.h"
+/*--------------------------------------------------------------------------*/
+#define BUFSIZE 4096
+/*--------------------------------------------------------------------------*/
+static int PrintOuput(char **output, int nbrlines);
+/*--------------------------------------------------------------------------*/
+int sci_dos(char *fname, unsigned long l)
+{
+ SciErr sciErr;
+ int *piAddressVarOne = NULL;
+ int iType1 = 0;
+ int m1 = 0, n1 = 0;
+ wchar_t *pStVarOne = NULL;
+ int lenStVarOne = 0;
+
+ char **Output = NULL;
+ int numberoflines = 0;
+ BOOL ECHOMODE = FALSE;
+
+ CheckRhs(1, 2);
+ CheckLhs(1, 3);
+
+ if (Rhs == 2)
+ {
+ int *piAddressVarTwo = NULL;
+ int m2 = 0, n2 = 0;
+ int iType2 = 0;
+ char *pStVarTwo = NULL;
+ int lenStVarTwo = 0;
+
+ sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddressVarTwo);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
+ return 0;
+ }
+
+ sciErr = getVarType(pvApiCtx, piAddressVarTwo, &iType2);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
+ return 0;
+ }
+
+ if (iType2 != sci_strings )
+ {
+ Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 2);
+ return 0;
+ }
+
+ sciErr = getMatrixOfString(pvApiCtx, piAddressVarTwo, &m2, &n2, &lenStVarTwo, NULL);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
+ return 0;
+ }
+
+ if ( (m2 != n2) && (n2 != 1) )
+ {
+ Scierror(999, _("%s: Wrong size for input argument #%d: A string expected.\n"), fname, 2);
+ return 0;
+ }
+
+ pStVarTwo = (char*)MALLOC(sizeof(char) * (lenStVarTwo + 1));
+ if (pStVarTwo)
+ {
+ sciErr = getMatrixOfString(pvApiCtx, piAddressVarTwo, &m2, &n2, &lenStVarTwo, &pStVarTwo);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
+ return 0;
+ }
+
+ if ( strcmp(pStVarTwo, "-echo") )
+ {
+ FREE(pStVarTwo);
+ pStVarTwo = NULL;
+ Scierror(999, _("%s: Wrong value for input argument #%d: '%s' expected.\n"), fname, 2, "-echo");
+ return 0;
+ }
+ else
+ {
+ ECHOMODE = TRUE;
+ }
+ }
+ else
+ {
+ Scierror(999, _("%s: No more memory.\n"), fname);
+ return 0;
+ }
+ }
+
+ sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
+ return 0;
+ }
+
+ sciErr = getVarType(pvApiCtx, piAddressVarOne, &iType1);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
+ return 0;
+ }
+
+ if (iType1 != sci_strings )
+ {
+ Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 1);
+ return 0;
+ }
+
+ sciErr = getMatrixOfString(pvApiCtx, piAddressVarOne, &m1, &n1, &lenStVarOne, NULL);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
+ return 0;
+ }
+
+ if ( (m1 != n1) && (n1 != 1) )
+ {
+ Scierror(999, _("%s: Wrong size for input argument #%d: A string expected.\n"), fname, 1);
+ return 0;
+ }
+
+ pStVarOne = (wchar_t*)MALLOC(sizeof(wchar_t) * (lenStVarOne + 1));
+ if (pStVarOne)
+ {
+ double exitCode = 0.;
+ BOOL DetachProcessOption = FALSE;
+ BOOL *StatusExit = NULL;
+
+ sciErr = getMatrixOfWideString(pvApiCtx, piAddressVarOne, &m1, &n1, &lenStVarOne, &pStVarOne);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
+ return 0;
+ }
+
+ DetachProcessOption = DetectDetachProcessInCommandLine(pStVarOne);
+ exitCode = (double)spawncommand(pStVarOne, DetachProcessOption);
+ FREE(pStVarOne);
+
+ StatusExit = (BOOL*)MALLOC(sizeof(BOOL));
+
+ if (DetachProcessOption)
+ {
+ if ( strlen((const char *)(pipeSpawnErr.OutputBuffer)) )
+ {
+ /* StdErr will be "Output" */
+ *StatusExit = FALSE;
+ Output = CreateOuput(&pipeSpawnErr, DetachProcessOption);
+ numberoflines = pipeSpawnErr.NumberOfLines;
+ }
+ else
+ {
+ /* StdOut will be "Output" */
+ *StatusExit = TRUE;
+ Output = CreateOuput(&pipeSpawnOut, DetachProcessOption);
+ numberoflines = pipeSpawnOut.NumberOfLines;
+ }
+ }
+ else
+ {
+ char FileTMPDir[PATH_MAX + 16];
+ BOOL bConvert = FALSE;
+
+ char *TMPDirLong = getTMPDIR();
+ char *TMPDirShort = getshortpathname(TMPDirLong, &bConvert);
+
+ sprintf(FileTMPDir, "%s\\DOS.OK", TMPDirLong);
+ FREE(TMPDirLong);
+ TMPDirLong = NULL;
+ FREE(TMPDirShort);
+ TMPDirShort = NULL;
+
+ if (FileExist(FileTMPDir))
+ {
+ DeleteFile(FileTMPDir);
+ /* StdOut will be "Output" */
+ *StatusExit = TRUE;
+ Output = CreateOuput(&pipeSpawnOut, DetachProcessOption);
+ numberoflines = pipeSpawnOut.NumberOfLines;
+ }
+ else
+ {
+ /* StdErr will be "Output" */
+ *StatusExit = FALSE;
+ Output = CreateOuput(&pipeSpawnErr, DetachProcessOption);
+ numberoflines = pipeSpawnErr.NumberOfLines;
+ }
+ }
+
+ if (ECHOMODE)
+ {
+ PrintOuput(Output, numberoflines);
+ }
+
+ if (Lhs == 1)
+ {
+ int m_out = 1, n_out = 1;
+ sciErr = createMatrixOfBoolean(pvApiCtx, Rhs + 1, m_out, n_out, StatusExit);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Memory allocation error.\n"), fname);
+ return 0;
+ }
+
+ LhsVar(1) = Rhs + 1;
+ }
+ else
+ {
+ int m_out2 = 1;
+ int n_out2 = 1;
+
+ if (Output && Output[0])
+ {
+ int m_out1 = numberoflines;
+ int n_out1 = 1;
+ sciErr = createMatrixOfString(pvApiCtx, Rhs + 1, m_out1, n_out1, Output);
+ }
+ else
+ {
+ /* returns [] */
+ int m_out1 = 0;
+ int n_out1 = 0;
+ sciErr = createMatrixOfDouble(pvApiCtx, Rhs + 1, m_out1, n_out1, NULL);
+ }
+
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Memory allocation error.\n"), fname);
+ return 0;
+ }
+
+ LhsVar(1) = Rhs + 1;
+
+ sciErr = createMatrixOfBoolean(pvApiCtx, Rhs + 2, m_out2, n_out2, StatusExit);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Memory allocation error.\n"), fname);
+ return 0;
+ }
+
+ LhsVar(2) = Rhs + 2;
+ }
+
+ if (Lhs > 2)
+ {
+ int m_out3 = 1, n_out3 = 1;
+ sciErr = createMatrixOfDouble(pvApiCtx, Rhs + 3, m_out3, n_out3, &exitCode);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Memory allocation error.\n"), fname);
+ return 0;
+ }
+
+ LhsVar(3) = Rhs + 3;
+ }
+ if (StatusExit)
+ {
+ FREE(StatusExit);
+ StatusExit = NULL;
+ }
+ freeArrayOfString(Output, numberoflines);
+
+ ClosePipeInfo (pipeSpawnOut);
+ ClosePipeInfo (pipeSpawnErr);
+
+ PutLhsVar();
+ }
+ else
+ {
+ Scierror(999, _("%s: No more memory.\n"), fname);
+ }
+
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
+static int PrintOuput(char **output, int nbrlines)
+{
+ if (output)
+ {
+ int i = 0;
+ for (i = 0; i < nbrlines; i++)
+ {
+ if (output[i])
+ {
+ sciprint("%s\n", output[i]);
+ }
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
+
diff --git a/modules/windows_tools/sci_gateway/c/sci_findfileassociation.c b/modules/windows_tools/sci_gateway/c/sci_findfileassociation.c
new file mode 100755
index 000000000..2d44f56db
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/c/sci_findfileassociation.c
@@ -0,0 +1,102 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include <string.h>
+#include "gw_windows_tools.h"
+#include "MALLOC.h"
+#include "Scierror.h"
+#include "FindFileAssociation.h"
+#include "PATH_MAX.h"
+#include "stack-c.h"
+#include "localization.h"
+/*--------------------------------------------------------------------------*/
+int sci_findfileassociation(char *fname, unsigned long l)
+{
+ static int l1, n1, m1;
+ char *Output = NULL;
+ char ExtraParam[PATH_MAX];
+ char AssocParam[PATH_MAX];
+
+ Rhs = Max(Rhs, 0);
+ CheckRhs(1, 2);
+ CheckLhs(0, 1);
+
+ if (Rhs == 1)
+ {
+ if (GetType(1) != sci_strings)
+ {
+ Scierror(999, _("%s: Wrong type for input argument #%d: String expected.\n") , fname, 1);
+ return 0;
+ }
+ else
+ {
+ char *param = NULL;
+
+ GetRhsVar(1, STRING_DATATYPE, &m1, &n1, &l1);
+ param = cstk(l1);
+ strcpy(AssocParam, param);
+
+ strcpy(ExtraParam, "open");
+ }
+ }
+ else
+ {
+ if ( (GetType(1) != sci_strings) && (GetType(2) != sci_strings) )
+ {
+ Scierror(999, _("%s: Wrong type for input arguments: Strings expected.\n"), fname);
+ return 0;
+ }
+ else
+ {
+ char *param = NULL;
+
+ GetRhsVar(1, STRING_DATATYPE, &m1, &n1, &l1);
+ param = cstk(l1);
+
+ strcpy(AssocParam, param);
+
+ GetRhsVar(2, STRING_DATATYPE, &m1, &n1, &l1);
+ param = cstk(l1);
+
+ strcpy(ExtraParam, param);
+ }
+ }
+
+ Output = FindFileAssociation(AssocParam, ExtraParam) ;
+
+ if (Output)
+ {
+ n1 = 1;
+ m1 = (int)strlen(Output);
+ CreateVarFromPtr(Rhs + 1, STRING_DATATYPE, &m1, &n1, &Output);
+ }
+ else
+ {
+ n1 = 0;
+ m1 = 0;
+ l1 = 0;
+ CreateVarFromPtr(Rhs + 1, MATRIX_OF_DOUBLE_DATATYPE, &n1, &m1, &l1);
+ }
+
+ if (Output)
+ {
+ FREE(Output);
+ Output = NULL;
+ }
+ LhsVar(1) = Rhs + 1;
+ PutLhsVar();
+
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/sci_gateway/c/sci_getsystemmetrics.c b/modules/windows_tools/sci_gateway/c/sci_getsystemmetrics.c
new file mode 100755
index 000000000..b19623a36
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/c/sci_getsystemmetrics.c
@@ -0,0 +1,424 @@
+/*--------------------------------------------------------------------------*/
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - 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.1-en.txt
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include "gw_windows_tools.h"
+#include "stack-c.h"
+#include "MALLOC.h"
+#include "Scierror.h"
+#include "localization.h"
+/*--------------------------------------------------------------------------*/
+static int getnIndexFromString(char *nIndex_char);
+/*--------------------------------------------------------------------------*/
+int sci_getsystemmetrics(char *fname, unsigned long l)
+{
+ char *param = NULL;
+ int nIndex = -1;
+ int m1 = 0;
+ int n1 = 0;
+ int l1 = 0;
+
+ CheckRhs(1, 1);
+
+ if (GetType(1) != sci_strings)
+ {
+ Scierror(999, _("%s: Wrong type for input argument #%d: String expected.\n"), fname, 1);
+ return 0;
+ }
+
+ GetRhsVar(1, STRING_DATATYPE, &m1, &n1, &l1);
+ param = cstk(l1);
+
+ nIndex = getnIndexFromString(param);
+ if ( nIndex > -1 )
+ {
+ int one = 1;
+ CreateVar(Rhs + 1, MATRIX_OF_INTEGER_DATATYPE, &one, &one, &l1);
+ *istk(l1) = GetSystemMetrics(nIndex);
+ LhsVar(1) = Rhs + 1;
+
+ PutLhsVar();
+ }
+ else
+ {
+ Scierror(999, _("%s: Wrong value for input argument: %s.\n"), fname, _("see help"));
+ }
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
+static int getnIndexFromString(char *nIndex_char)
+{
+ if (_stricmp("SM_ARRANGE", nIndex_char) == 0)
+ {
+ return SM_ARRANGE;
+ }
+ if (_stricmp("SM_CLEANBOOT", nIndex_char) == 0)
+ {
+ return SM_CLEANBOOT;
+ }
+ if (_stricmp("SM_CMONITORS", nIndex_char) == 0)
+ {
+ return SM_CMONITORS;
+ }
+ if (_stricmp("SM_CMOUSEBUTTONS", nIndex_char) == 0)
+ {
+ return SM_CMOUSEBUTTONS;
+ }
+ if (_stricmp("SM_CXBORDER", nIndex_char) == 0)
+ {
+ return SM_CXBORDER;
+ }
+ if (_stricmp("SM_CXCURSOR", nIndex_char) == 0)
+ {
+ return SM_CXCURSOR;
+ }
+ if (_stricmp("SM_CXDLGFRAME", nIndex_char) == 0)
+ {
+ return SM_CXDLGFRAME;
+ }
+ if (_stricmp("SM_CXDOUBLECLK", nIndex_char) == 0)
+ {
+ return SM_CXDOUBLECLK;
+ }
+ if (_stricmp("SM_CXDRAG", nIndex_char) == 0)
+ {
+ return SM_CXDRAG;
+ }
+ if (_stricmp("SM_CXEDGE", nIndex_char) == 0)
+ {
+ return SM_CXEDGE;
+ }
+ if (_stricmp("SM_CXFIXEDFRAME", nIndex_char) == 0)
+ {
+ return SM_CXFIXEDFRAME;
+ }
+ if (_stricmp("SM_CXFOCUSBORDER", nIndex_char) == 0)
+ {
+ return SM_CXFOCUSBORDER;
+ }
+ if (_stricmp("SM_CXFRAME", nIndex_char) == 0)
+ {
+ return SM_CXFRAME;
+ }
+ if (_stricmp("SM_CXFULLSCREEN", nIndex_char) == 0)
+ {
+ return SM_CXFULLSCREEN;
+ }
+ if (_stricmp("SM_CXHSCROLL", nIndex_char) == 0)
+ {
+ return SM_CXHSCROLL;
+ }
+ if (_stricmp("SM_CXHTHUMB", nIndex_char) == 0)
+ {
+ return SM_CXHTHUMB;
+ }
+ if (_stricmp("SM_CXICON", nIndex_char) == 0)
+ {
+ return SM_CXICON;
+ }
+ if (_stricmp("SM_CXICONSPACING", nIndex_char) == 0)
+ {
+ return SM_CXICONSPACING;
+ }
+ if (_stricmp("SM_CXMAXIMIZED", nIndex_char) == 0)
+ {
+ return SM_CXMAXIMIZED;
+ }
+ if (_stricmp("SM_CXMAXTRACK", nIndex_char) == 0)
+ {
+ return SM_CXMAXTRACK;
+ }
+ if (_stricmp("SM_CXMENUCHECK", nIndex_char) == 0)
+ {
+ return SM_CXMENUCHECK;
+ }
+ if (_stricmp("SM_CXMENUSIZE", nIndex_char) == 0)
+ {
+ return SM_CXMENUSIZE;
+ }
+ if (_stricmp("SM_CXMIN", nIndex_char) == 0)
+ {
+ return SM_CXMIN;
+ }
+ if (_stricmp("SM_CXMINIMIZED", nIndex_char) == 0)
+ {
+ return SM_CXMINIMIZED;
+ }
+ if (_stricmp("SM_CXMINSPACING", nIndex_char) == 0)
+ {
+ return SM_CXMINSPACING;
+ }
+ if (_stricmp("SM_CXMINTRACK", nIndex_char) == 0)
+ {
+ return SM_CXMINTRACK;
+ }
+ if (_stricmp("SM_CXPADDEDBORDER", nIndex_char) == 0)
+ {
+ return SM_CXPADDEDBORDER;
+ }
+ if (_stricmp("SM_CXSCREEN", nIndex_char) == 0)
+ {
+ return SM_CXSCREEN;
+ }
+ if (_stricmp("SM_CXSIZE", nIndex_char) == 0)
+ {
+ return SM_CXSIZE;
+ }
+ if (_stricmp("SM_CXSIZEFRAME", nIndex_char) == 0)
+ {
+ return SM_CXSIZEFRAME;
+ }
+ if (_stricmp("SM_CXSMICON", nIndex_char) == 0)
+ {
+ return SM_CXSMICON;
+ }
+ if (_stricmp("SM_CXSMSIZE", nIndex_char) == 0)
+ {
+ return SM_CXSMSIZE;
+ }
+ if (_stricmp("SM_CXVIRTUALSCREEN", nIndex_char) == 0)
+ {
+ return SM_CXVIRTUALSCREEN;
+ }
+ if (_stricmp("SM_CXVSCROLL", nIndex_char) == 0)
+ {
+ return SM_CXVSCROLL;
+ }
+ if (_stricmp("SM_CYBORDER", nIndex_char) == 0)
+ {
+ return SM_CYBORDER;
+ }
+ if (_stricmp("SM_CYCAPTION", nIndex_char) == 0)
+ {
+ return SM_CYCAPTION;
+ }
+ if (_stricmp("SM_CYCURSOR", nIndex_char) == 0)
+ {
+ return SM_CYCURSOR;
+ }
+ if (_stricmp("SM_CYDLGFRAME", nIndex_char) == 0)
+ {
+ return SM_CYDLGFRAME;
+ }
+ if (_stricmp("SM_CYDOUBLECLK", nIndex_char) == 0)
+ {
+ return SM_CYDOUBLECLK;
+ }
+ if (_stricmp("SM_CYDRAG", nIndex_char) == 0)
+ {
+ return SM_CYDRAG;
+ }
+ if (_stricmp("SM_CYEDGE", nIndex_char) == 0)
+ {
+ return SM_CYEDGE;
+ }
+ if (_stricmp("SM_CYFIXEDFRAME", nIndex_char) == 0)
+ {
+ return SM_CYFIXEDFRAME;
+ }
+ if (_stricmp("SM_CYFOCUSBORDER", nIndex_char) == 0)
+ {
+ return SM_CYFOCUSBORDER;
+ }
+ if (_stricmp("SM_CYFRAME", nIndex_char) == 0)
+ {
+ return SM_CYFRAME;
+ }
+ if (_stricmp("SM_CYFULLSCREEN", nIndex_char) == 0)
+ {
+ return SM_CYFULLSCREEN;
+ }
+ if (_stricmp("SM_CYHSCROLL", nIndex_char) == 0)
+ {
+ return SM_CYHSCROLL;
+ }
+ if (_stricmp("SM_CYICON", nIndex_char) == 0)
+ {
+ return SM_CYICON;
+ }
+ if (_stricmp("SM_CYICONSPACING", nIndex_char) == 0)
+ {
+ return SM_CYICONSPACING;
+ }
+ if (_stricmp("SM_CYKANJIWINDOW", nIndex_char) == 0)
+ {
+ return SM_CYKANJIWINDOW;
+ }
+ if (_stricmp("SM_CYMAXIMIZED", nIndex_char) == 0)
+ {
+ return SM_CYMAXIMIZED;
+ }
+ if (_stricmp("SM_CYMAXTRACK", nIndex_char) == 0)
+ {
+ return SM_CYMAXTRACK;
+ }
+ if (_stricmp("SM_CYMENU", nIndex_char) == 0)
+ {
+ return SM_CYMENU;
+ }
+ if (_stricmp("SM_CYMENUCHECK", nIndex_char) == 0)
+ {
+ return SM_CYMENUCHECK;
+ }
+ if (_stricmp("SM_CYMENUSIZE", nIndex_char) == 0)
+ {
+ return SM_CYMENUSIZE;
+ }
+ if (_stricmp("SM_CYMIN", nIndex_char) == 0)
+ {
+ return SM_CYMIN;
+ }
+ if (_stricmp("SM_CYMINIMIZED", nIndex_char) == 0)
+ {
+ return SM_CYMINIMIZED;
+ }
+ if (_stricmp("SM_CYMINSPACING", nIndex_char) == 0)
+ {
+ return SM_CYMINSPACING;
+ }
+ if (_stricmp("SM_CYMINTRACK", nIndex_char) == 0)
+ {
+ return SM_CYMINTRACK;
+ }
+ if (_stricmp("SM_CYSCREEN", nIndex_char) == 0)
+ {
+ return SM_CYSCREEN;
+ }
+ if (_stricmp("SM_CYSIZE", nIndex_char) == 0)
+ {
+ return SM_CYSIZE;
+ }
+ if (_stricmp("SM_CYSIZEFRAME", nIndex_char) == 0)
+ {
+ return SM_CYSIZEFRAME;
+ }
+ if (_stricmp("SM_CYSMCAPTION", nIndex_char) == 0)
+ {
+ return SM_CYSMCAPTION;
+ }
+ if (_stricmp("SM_CYSMICON", nIndex_char) == 0)
+ {
+ return SM_CYSMICON;
+ }
+ if (_stricmp("SM_CYSMSIZE", nIndex_char) == 0)
+ {
+ return SM_CYSMSIZE;
+ }
+ if (_stricmp("SM_CYVIRTUALSCREEN", nIndex_char) == 0)
+ {
+ return SM_CYVIRTUALSCREEN;
+ }
+ if (_stricmp("SM_CYVSCROLL", nIndex_char) == 0)
+ {
+ return SM_CYVSCROLL;
+ }
+ if (_stricmp("SM_CYVTHUMB", nIndex_char) == 0)
+ {
+ return SM_CYVTHUMB;
+ }
+ if (_stricmp("SM_DBCSENABLED", nIndex_char) == 0)
+ {
+ return SM_DBCSENABLED;
+ }
+ if (_stricmp("SM_DEBUG", nIndex_char) == 0)
+ {
+ return SM_DEBUG;
+ }
+ if (_stricmp("SM_IMMENABLED", nIndex_char) == 0)
+ {
+ return SM_IMMENABLED;
+ }
+ if (_stricmp("SM_MEDIACENTER", nIndex_char) == 0)
+ {
+ return SM_MEDIACENTER;
+ }
+ if (_stricmp("SM_MENUDROPALIGNMENT", nIndex_char) == 0)
+ {
+ return SM_MENUDROPALIGNMENT;
+ }
+ if (_stricmp("SM_MIDEASTENABLED", nIndex_char) == 0)
+ {
+ return SM_MIDEASTENABLED;
+ }
+ if (_stricmp("SM_MOUSEPRESENT", nIndex_char) == 0)
+ {
+ return SM_MOUSEPRESENT;
+ }
+ if (_stricmp("SM_MOUSEHORIZONTALWHEELPRESENT", nIndex_char) == 0)
+ {
+ return SM_MOUSEHORIZONTALWHEELPRESENT;
+ }
+ if (_stricmp("SM_MOUSEWHEELPRESENT", nIndex_char) == 0)
+ {
+ return SM_MOUSEWHEELPRESENT;
+ }
+ if (_stricmp("SM_NETWORK", nIndex_char) == 0)
+ {
+ return SM_NETWORK;
+ }
+ if (_stricmp("SM_PENWINDOWS", nIndex_char) == 0)
+ {
+ return SM_PENWINDOWS;
+ }
+ if (_stricmp("SM_REMOTECONTROL", nIndex_char) == 0)
+ {
+ return SM_REMOTECONTROL;
+ }
+ if (_stricmp("SM_REMOTESESSION", nIndex_char) == 0)
+ {
+ return SM_REMOTESESSION;
+ }
+ if (_stricmp("SM_SAMEDISPLAYFORMAT", nIndex_char) == 0)
+ {
+ return SM_SAMEDISPLAYFORMAT;
+ }
+ if (_stricmp("SM_SECURE", nIndex_char) == 0)
+ {
+ return SM_SECURE;
+ }
+ if (_stricmp("SM_SERVERR2", nIndex_char) == 0)
+ {
+ return SM_SERVERR2;
+ }
+ if (_stricmp("SM_SHOWSOUNDS", nIndex_char) == 0)
+ {
+ return SM_SHOWSOUNDS;
+ }
+ if (_stricmp("SM_SHUTTINGDOWN", nIndex_char) == 0)
+ {
+ return SM_SHUTTINGDOWN;
+ }
+ if (_stricmp("SM_SLOWMACHINE", nIndex_char) == 0)
+ {
+ return SM_SLOWMACHINE;
+ }
+ if (_stricmp("SM_STARTER", nIndex_char) == 0)
+ {
+ return SM_STARTER;
+ }
+ if (_stricmp("SM_SWAPBUTTON", nIndex_char) == 0)
+ {
+ return SM_SWAPBUTTON;
+ }
+ if (_stricmp("SM_TABLETPC", nIndex_char) == 0)
+ {
+ return SM_TABLETPC;
+ }
+ if (_stricmp("SM_XVIRTUALSCREEN", nIndex_char) == 0)
+ {
+ return SM_XVIRTUALSCREEN;
+ }
+ if (_stricmp("SM_YVIRTUALSCREEN", nIndex_char) == 0)
+ {
+ return SM_YVIRTUALSCREEN;
+ }
+ return -1;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/sci_gateway/c/sci_istssession.c b/modules/windows_tools/sci_gateway/c/sci_istssession.c
new file mode 100755
index 000000000..be799bf5c
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/c/sci_istssession.c
@@ -0,0 +1,57 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include <string.h>
+#include "BOOL.h"
+#include "gw_windows_tools.h"
+#include "MALLOC.h" /* MALLOC */
+#include "stack-c.h"
+/*--------------------------------------------------------------------------*/
+int sci_istssession(char *fname, unsigned long l)
+{
+ int n1 = 0, m1 = 0;
+ int *Status = NULL;
+
+ CheckRhs(0, 0);
+ CheckLhs(0, 1);
+
+ Status = (int*)MALLOC(sizeof(int));
+
+ /* http://msdn2.microsoft.com/en-us/library/ms724385.aspx */
+ if ( GetSystemMetrics(SM_REMOTESESSION) )
+ {
+ *Status = TRUE;
+ }
+ else
+ {
+ *Status = FALSE;
+ }
+
+ m1 = 1;
+ n1 = 1;
+ CreateVarFromPtr(Rhs + 1, MATRIX_OF_BOOLEAN_DATATYPE, &m1, &n1, &Status);
+
+ if (Status)
+ {
+ FREE(Status);
+ Status = NULL;
+ }
+
+ LhsVar(1) = Rhs + 1;
+ PutLhsVar();
+
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
+
diff --git a/modules/windows_tools/sci_gateway/c/sci_mcisendstring.c b/modules/windows_tools/sci_gateway/c/sci_mcisendstring.c
new file mode 100755
index 000000000..07693a6db
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/c/sci_mcisendstring.c
@@ -0,0 +1,123 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include "gw_windows_tools.h"
+#include "MALLOC.h"
+#include "stack-c.h"
+#include "localization.h"
+#include "Scierror.h"
+#include "strdup_windows.h"
+/*--------------------------------------------------------------------------*/
+#pragma comment(lib, "winmm.lib")
+/*--------------------------------------------------------------------------*/
+int sci_mcisendstring(char *fname, unsigned long l)
+{
+ int m1, n1, l1;
+
+ char *Output = NULL;
+ int *BoolOutput = NULL;
+ int *CodeOutput = NULL;
+
+ CheckRhs(1, 1);
+ CheckLhs(1, 3);
+
+ if (GetType(1) == sci_strings)
+ {
+ MCIERROR Error;
+ char *MCICommand = NULL;
+ char ReturnString[2048];
+
+ GetRhsVar(1, STRING_DATATYPE, &m1, &n1, &l1);
+ MCICommand = cstk(l1);
+
+ Error = mciSendString(MCICommand, (LPSTR)ReturnString, sizeof(ReturnString), NULL);
+
+ BoolOutput = (int*)MALLOC(sizeof(int));
+ CodeOutput = (int*)MALLOC(sizeof(int));
+
+ *BoolOutput = (int)0;
+ *CodeOutput = (int)Error;
+ if (Error)
+ {
+ char ErrorText[128];
+ *BoolOutput = (int)FALSE;
+
+ if ( mciGetErrorString(Error, ErrorText, sizeof(ErrorText)) == FALSE )
+ {
+ wsprintf(ErrorText, "%s", "Unknown MCI error");
+ }
+
+ Output = strdup(ErrorText);
+ }
+ else
+ {
+ *BoolOutput = (int)TRUE;
+ Output = strdup("OK");
+ }
+
+ n1 = 1;
+
+ if ( Lhs == 1 )
+ {
+ CreateVarFromPtr(Rhs + 1, MATRIX_OF_BOOLEAN_DATATYPE, &n1, &n1, &BoolOutput);
+ LhsVar(1) = Rhs + 1;
+ }
+ else if ( Lhs == 2 )
+ {
+ CreateVarFromPtr(Rhs + 1, MATRIX_OF_BOOLEAN_DATATYPE, &n1, &n1, &BoolOutput);
+ LhsVar(1) = Rhs + 1;
+
+ CreateVarFromPtr(Rhs + 2, MATRIX_OF_INTEGER_DATATYPE, &n1, &n1, &CodeOutput);
+ LhsVar(2) = Rhs + 2;
+ }
+ else /* Lhs == 3 */
+ {
+ CreateVarFromPtr(Rhs + 1, MATRIX_OF_BOOLEAN_DATATYPE, &n1, &n1, &BoolOutput);
+ LhsVar(1) = Rhs + 1;
+
+ CreateVarFromPtr(Rhs + 2, MATRIX_OF_INTEGER_DATATYPE, &n1, &n1, &CodeOutput);
+ LhsVar(2) = Rhs + 2;
+
+ m1 = (int)strlen(Output);
+ CreateVarFromPtr(Rhs + 3, STRING_DATATYPE, &m1, &n1, &Output);
+ LhsVar(3) = Rhs + 3;
+ }
+
+ if (Output)
+ {
+ FREE(Output);
+ Output = NULL;
+ }
+ if (BoolOutput)
+ {
+ FREE(BoolOutput);
+ BoolOutput = NULL;
+ }
+ if (CodeOutput)
+ {
+ FREE(CodeOutput);
+ Output = NULL;
+ }
+
+ PutLhsVar();
+
+ return 0;
+ }
+ else
+ {
+ Scierror(999, _("%s: Wrong type for input argument #%d: String expected.\n"), fname, 1);
+ return 0;
+ }
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/sci_gateway/c/sci_win64.c b/modules/windows_tools/sci_gateway/c/sci_win64.c
new file mode 100755
index 000000000..9557198b1
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/c/sci_win64.c
@@ -0,0 +1,41 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - Allan CORNET
+* Copyright (C) DIGITEO - 2011 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <string.h>
+#include "gw_windows_tools.h"
+#include "api_scilab.h"
+/*--------------------------------------------------------------------------*/
+int sci_win64(char *fname, unsigned long l)
+{
+ BOOL Status = FALSE;
+
+ CheckRhs(0, 0);
+ CheckLhs(0, 1);
+
+#ifdef _WIN64
+ Status = TRUE;
+#endif
+
+ if (createScalarBoolean(pvApiCtx, Rhs + 1, Status) != 0)
+ {
+ return 1;
+ }
+
+ LhsVar(1) = Rhs + 1;
+
+ PutLhsVar();
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
+
diff --git a/modules/windows_tools/sci_gateway/c/sci_winhttpdownload.c b/modules/windows_tools/sci_gateway/c/sci_winhttpdownload.c
new file mode 100755
index 000000000..450c8fe43
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/c/sci_winhttpdownload.c
@@ -0,0 +1,85 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include "gw_windows_tools.h"
+#include "stack-c.h"
+#include "httpdownloadfile.h"
+#include "MALLOC.h"
+#include "Scierror.h"
+#include "localization.h"
+/*--------------------------------------------------------------------------*/
+int sci_winhttpdownload(char *fname, unsigned long l)
+{
+ int m1 = 0, n1 = 0, l1 = 0;
+ int m2 = 0, n2 = 0, l2 = 0;
+ int *Status = NULL;
+
+ CheckRhs(2, 2);
+ CheckLhs(1, 2);
+
+ if ( (GetType(1) == sci_strings) && (GetType(2) == sci_strings) )
+ {
+ int *Status = NULL;
+ httpdownloadfile_error_code result;
+
+ GetRhsVar(1, STRING_DATATYPE, &m1, &n1, &l1);
+ GetRhsVar(2, STRING_DATATYPE, &m2, &n2, &l2);
+
+ result = httpDownloadFile(cstk(l1), cstk(l2));
+
+ if (Lhs == 2)
+ {
+ int numRow = 1 ;
+ int numCol = 1 ;
+ int outIndex = 0 ;
+ CreateVar( Rhs + 2, MATRIX_OF_DOUBLE_DATATYPE, &numRow, &numCol, &outIndex );
+ *stk(outIndex) = (int)result ;
+
+ }
+
+ Status = (int*)MALLOC(sizeof(int));
+
+ if (result == 0)
+ {
+ *Status = TRUE;
+ }
+ else
+ {
+ *Status = FALSE;
+ }
+
+ m1 = 1;
+ n1 = 1;
+ CreateVarFromPtr(Rhs + 1, MATRIX_OF_BOOLEAN_DATATYPE, &n1, &n1, &Status);
+
+ if (Lhs == 2)
+ {
+ LhsVar(2) = Rhs + 2;
+ }
+ LhsVar(1) = Rhs + 1;
+
+ PutLhsVar();;
+ if (Status)
+ {
+ FREE(Status);
+ Status = NULL;
+ }
+
+ }
+ else
+ {
+ Scierror(999, _("%s: Wrong type for input arguments: Strings expected.\n"), fname);
+ }
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/sci_gateway/c/sci_winopen.c b/modules/windows_tools/sci_gateway/c/sci_winopen.c
new file mode 100755
index 000000000..5f4771c0a
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/c/sci_winopen.c
@@ -0,0 +1,41 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include "gw_windows_tools.h"
+#include "stack-c.h"
+#include "winopen.h"
+#include "localization.h"
+#include "Scierror.h"
+/*--------------------------------------------------------------------------*/
+int sci_winopen(char *fname, unsigned long l)
+{
+ int m1 = 0, n1 = 0, l1 = 0;
+
+ CheckRhs(1, 1);
+
+ GetRhsVar(1, STRING_DATATYPE, &m1, &n1, &l1);
+
+ if (winopen(cstk(l1)))
+ {
+ LhsVar(1) = 0;
+ }
+ else
+ {
+ Scierror(999, _("%s: Cannot open file %s.\n"), fname, cstk(l1));
+ return 0;
+ }
+
+ PutLhsVar();
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/sci_gateway/c/sci_winqueryreg.c b/modules/windows_tools/sci_gateway/c/sci_winqueryreg.c
new file mode 100755
index 000000000..81c6712ed
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/c/sci_winqueryreg.c
@@ -0,0 +1,284 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - Allan CORNET
+ * Copyright (C) 2011 - 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.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#include "gw_windows_tools.h"
+#include "registry.h"
+#include "api_scilab.h"
+#include "MALLOC.h"
+#include "Scierror.h"
+#include "localization.h"
+#include "PATH_MAX.h"
+#include "freeArrayOfString.h"
+/*--------------------------------------------------------------------------*/
+int sci_winqueryreg(char *fname, unsigned long l)
+{
+ SciErr sciErr;
+ int *piAddressVarOne = NULL;
+ int *piAddressVarTwo = NULL;
+ int *piAddressVarThree = NULL;
+
+ char *pStrParamOne = NULL;
+ char *pStrParamTwo = NULL;
+ char *pStrParamThree = NULL;
+
+ char *pStrOutput = NULL;
+ int iOutput = 0;
+
+ Rhs = Max(0, Rhs);
+ CheckRhs(2, 3);
+ CheckLhs(0, 1);
+
+ if (Rhs == 3)
+ {
+ sciErr = getVarAddressFromPosition(pvApiCtx, 3, &piAddressVarThree);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 3);
+ return 0;
+ }
+
+ if (!isStringType(pvApiCtx, piAddressVarThree))
+ {
+ Scierror(999, _("%s: Wrong type for input argument #%d: String expected.\n"), fname, 3);
+ return 0;
+ }
+
+ if (!isScalar(pvApiCtx, piAddressVarThree))
+ {
+ Scierror(999, _("%s: Wrong size for input argument #%d: String expected.\n"), fname, 3);
+ return 0;
+ }
+
+ if (getAllocatedSingleString(pvApiCtx, piAddressVarThree, &pStrParamThree) != 0)
+ {
+ Scierror(999, _("%s: Memory allocation error.\n"), fname);
+ return 0;
+ }
+ }
+
+ sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
+ return 0;
+ }
+
+ if (!isStringType(pvApiCtx, piAddressVarOne))
+ {
+ Scierror(999, _("%s: Wrong type for input argument #%d: String expected.\n"), fname, 1);
+ return 0;
+ }
+
+ if (!isScalar(pvApiCtx, piAddressVarOne))
+ {
+ Scierror(999, _("%s: Wrong size for input argument #%d: String expected.\n"), fname, 1);
+ return 0;
+ }
+
+ sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddressVarTwo);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
+ return 0;
+ }
+
+ if (!isStringType(pvApiCtx, piAddressVarTwo))
+ {
+ Scierror(999, _("%s: Wrong type for input argument #%d: String expected.\n"), fname, 2);
+ return 0;
+ }
+
+ if (!isScalar(pvApiCtx, piAddressVarTwo))
+ {
+ Scierror(999, _("%s: Wrong size for input argument #%d: String expected.\n"), fname, 2);
+ return 0;
+ }
+
+ if (getAllocatedSingleString(pvApiCtx, piAddressVarTwo, &pStrParamTwo) != 0)
+ {
+ if (pStrParamThree)
+ {
+ freeAllocatedSingleString(pStrParamThree);
+ pStrParamThree = NULL;
+ }
+ Scierror(999, _("%s: Memory allocation error.\n"), fname);
+ return 0;
+ }
+
+ if (getAllocatedSingleString(pvApiCtx, piAddressVarOne, &pStrParamOne) != 0)
+ {
+ if (pStrParamThree)
+ {
+ freeAllocatedSingleString(pStrParamThree);
+ pStrParamThree = NULL;
+ }
+
+ if (pStrParamTwo)
+ {
+ freeAllocatedSingleString(pStrParamTwo);
+ pStrParamTwo = NULL;
+ }
+
+ Scierror(999, _("%s: Memory allocation error.\n"), fname);
+ return 0;
+ }
+
+ if (Rhs == 3)
+ {
+ BOOL bKey = strcmp(pStrParamOne, "key") == 0;
+ BOOL bValue = strcmp(pStrParamOne, "name") == 0;
+
+ if (bValue || bKey)
+ {
+ int NumbersElm = 0;
+ if (bValue)
+ {
+ WindowsQueryRegistryNumberOfValuesInList(pStrParamTwo, pStrParamThree, &NumbersElm);
+ }
+ else
+ {
+ WindowsQueryRegistryNumberOfKeysInList(pStrParamTwo, pStrParamThree, &NumbersElm);
+ }
+
+ if (NumbersElm)
+ {
+ BOOL bResult = FALSE;
+#define MAX_ELMT_REGLIST 255
+ char **ListKeysName = NULL;
+ int i = 0;
+
+ if (NumbersElm > MAX_ELMT_REGLIST)
+ {
+ NumbersElm = MAX_ELMT_REGLIST;
+ }
+ ListKeysName = (char **)MALLOC(sizeof(char*) * NumbersElm);
+ for (i = 0; i < NumbersElm; i++)
+ {
+ ListKeysName[i] = NULL;
+ }
+
+ if (bValue)
+ {
+ bResult = WindowsQueryRegistryValuesList(pStrParamTwo, pStrParamThree, NumbersElm, ListKeysName);
+ }
+ else
+ {
+ bResult = WindowsQueryRegistryKeysList(pStrParamTwo, pStrParamThree, NumbersElm, ListKeysName);
+ }
+
+ if (bResult)
+ {
+ int nOne = 1;
+ sciErr = createMatrixOfString(pvApiCtx, Rhs + 1, NumbersElm, nOne, ListKeysName);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Memory allocation error.\n"), fname);
+ }
+ else
+ {
+ LhsVar(1) = Rhs + 1;
+ PutLhsVar();
+ }
+ }
+ else
+ {
+ Scierror(999, _("%s: Cannot open Windows registry.\n"), fname);
+ }
+ freeArrayOfString(ListKeysName, NumbersElm);
+ }
+ else
+ {
+ createEmptyMatrix(pvApiCtx, Rhs + 1);
+ LhsVar(1) = Rhs + 1;
+ PutLhsVar();
+ }
+
+ if (pStrParamThree)
+ {
+ freeAllocatedSingleString(pStrParamThree);
+ pStrParamThree = NULL;
+ }
+
+ if (pStrParamTwo)
+ {
+ freeAllocatedSingleString(pStrParamTwo);
+ pStrParamTwo = NULL;
+ }
+
+ if (pStrParamOne)
+ {
+ freeAllocatedSingleString(pStrParamOne);
+ pStrParamOne = NULL;
+ }
+ return 0;
+ }
+ }
+
+ pStrOutput = (char*)MALLOC(PATH_MAX * sizeof(char));
+ if (pStrOutput)
+ {
+ BOOL OuputIsREG_SZ = FALSE;
+ BOOL TestWinQuery = WindowsQueryRegistry(pStrParamOne, pStrParamTwo, pStrParamThree, pStrOutput, &iOutput, &OuputIsREG_SZ);
+ if ( TestWinQuery )
+ {
+ if (OuputIsREG_SZ)
+ {
+ createSingleString(pvApiCtx, Rhs + 1, pStrOutput);
+ }
+ else
+ {
+ createScalarDouble(pvApiCtx, Rhs + 1, (double)iOutput);
+ }
+
+ LhsVar(1) = Rhs + 1;
+ PutLhsVar();
+ }
+ else
+ {
+ Scierror(999, _("%s: Cannot query value of this type.\n"), fname);
+ }
+
+ FREE( pStrOutput);
+ pStrOutput = NULL;
+ }
+ else
+ {
+ Scierror(999, _("%s: Memory allocation error.\n"), fname);
+ }
+
+ if (pStrParamThree)
+ {
+ freeAllocatedSingleString(pStrParamThree);
+ pStrParamThree = NULL;
+ }
+
+ if (pStrParamTwo)
+ {
+ freeAllocatedSingleString(pStrParamTwo);
+ pStrParamTwo = NULL;
+ }
+
+ if (pStrParamOne)
+ {
+ freeAllocatedSingleString(pStrParamOne);
+ pStrParamOne = NULL;
+ }
+
+ return 0;
+
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/sci_gateway/windows_tools_gateway.xml b/modules/windows_tools/sci_gateway/windows_tools_gateway.xml
new file mode 100755
index 000000000..7b4f1fd0d
--- /dev/null
+++ b/modules/windows_tools/sci_gateway/windows_tools_gateway.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<!DOCTYPE GATEWAY SYSTEM "../../functions/xml/gateway.dtd">
+<GATEWAY name="windows_tools">
+ <!-- =================== -->
+ <!--
+ 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
+
+ ===================
+ Don't touch if you do not know what you are doing
+-->
+
+
+ <!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA - 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.1-en.txt
+ *
+-->
+ <!-- =================== -->
+
+ <PRIMITIVE gatewayId="47" primitiveId="1" primitiveName="winopen" />
+ <PRIMITIVE gatewayId="47" primitiveId="2" primitiveName="winqueryreg" />
+ <PRIMITIVE gatewayId="47" primitiveId="3" primitiveName="findfileassociation" />
+ <PRIMITIVE gatewayId="47" primitiveId="4" primitiveName="dos" />
+ <PRIMITIVE gatewayId="47" primitiveId="5" primitiveName="mcisendstring" />
+ <PRIMITIVE gatewayId="47" primitiveId="6" primitiveName="consolebox" />
+ <PRIMITIVE gatewayId="47" primitiveId="7" primitiveName="win64" />
+ <PRIMITIVE gatewayId="47" primitiveId="8" primitiveName="istssession" />
+ <PRIMITIVE gatewayId="47" primitiveId="9" primitiveName="getsystemmetrics" />
+ <PRIMITIVE gatewayId="47" primitiveId="10" primitiveName="createGUID" />
+</GATEWAY>
diff --git a/modules/windows_tools/src/c/CScilex/CScilex.c b/modules/windows_tools/src/c/CScilex/CScilex.c
new file mode 100755
index 000000000..676bafded
--- /dev/null
+++ b/modules/windows_tools/src/c/CScilex/CScilex.c
@@ -0,0 +1,180 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - Allan CORNET
+* Copyright (C) 2010 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include <strsafe.h>
+#include <string.h>
+#include <stdio.h>
+#include "GetWindowsVersion.h"
+#include "MALLOC.h"
+/*--------------------------------------------------------------------------*/
+#define MSG_DETECT_XP_OR_MORE "Scilab requires Windows XP or more."
+#define MSG_DETECT_UNKNOW "Scilab does not support this unknow version of Windows."
+#define MSG_DETECT_SSE_OR_MORE "Scilab requires SSE Instructions."
+#define MSG_WARNING "Warning"
+#define MSG_LOAD_LIBRARIES "scilex.exe failed with error %d: %s"
+#define MAIN_FUNCTION "Console_Main"
+#define SCILAB_LIBRARY "scilab_windows"
+#define ARG_NW "-nw"
+#define ARG_NWNI "-nwni"
+#define ARG_NOGUI "-nogui"
+#define LENGTH_BUFFER_SECURITY 64
+/*--------------------------------------------------------------------------*/
+typedef int (*MYPROC1) (int , char **);
+/*--------------------------------------------------------------------------*/
+/* BUG 6934 */
+/* http://bugzilla.scilab.org/show_bug.cgi?id=6934 */
+/* http://msdn.microsoft.com/en-us/library/chh3fb0k(VS.80).aspx */
+#ifdef __INTEL_COMPILER
+#pragma optimize("g", off)
+#endif
+/*--------------------------------------------------------------------------*/
+int main (int argc, char **argv)
+{
+#define MAXCMDTOKENS 128
+ int iExitCode = 0;
+ UINT LastErrorMode = 0;
+ HINSTANCE hinstLib = NULL;
+
+ BOOL fFreeResult = FALSE, fRunTimeLinkSuccess = FALSE;
+
+ int argcbis = -1;
+ LPSTR argvbis[MAXCMDTOKENS];
+ int i = 0;
+ int FindNW = 0;
+
+ if (GetWindowsVersion() == OS_ERROR )
+ {
+ MessageBox(NULL, TEXT(MSG_DETECT_UNKNOW), TEXT(MSG_WARNING), MB_ICONWARNING);
+ return -1;
+ }
+
+ if (GetWindowsVersion() < OS_WIN32_WINDOWS_XP )
+ {
+ MessageBox(NULL, TEXT(MSG_DETECT_XP_OR_MORE), TEXT(MSG_WARNING), MB_ICONWARNING);
+ return -1;
+ }
+
+ /* http://msdn.microsoft.com/en-us/library/ms724482(VS.85).aspx */
+ if (!IsProcessorFeaturePresent(PF_XMMI_INSTRUCTIONS_AVAILABLE))
+ {
+ MessageBox(NULL, TEXT(MSG_DETECT_SSE_OR_MORE), TEXT(MSG_WARNING), MB_ICONWARNING);
+ return -1;
+ }
+
+ for (i = 0; i < argc; i++)
+ {
+ if (_stricmp(argv[i], ARG_NW) == 0)
+ {
+ FindNW = 1;
+ }
+ if (_stricmp(argv[i], ARG_NWNI) == 0 )
+ {
+ FindNW = 1;
+ }
+ if (_stricmp(argv[i], ARG_NOGUI) == 0 )
+ {
+ FindNW = 1;
+ }
+ }
+
+ if ( FindNW == 0 )
+ {
+ /* -nw added as first argument and not last */
+ char *nwparam = NULL;
+ nwparam = (char*)MALLOC((strlen(ARG_NW) + 1) * sizeof(char));
+ strcpy_s(nwparam, (strlen(ARG_NW) + 1), ARG_NW);
+
+ argvbis[0] = argv[0];
+ argvbis[1] = nwparam;
+
+ for (i = 1; i < argc; i++)
+ {
+ argvbis[i + 1] = argv[i];
+ }
+ argcbis = argc + 1;
+ }
+ else
+ {
+ for (i = 0; i < argc; i++)
+ {
+ argvbis[i] = argv[i];
+ }
+ argcbis = argc;
+ }
+
+ /* Disable system errors msgbox */
+ LastErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
+
+ hinstLib = LoadLibrary(TEXT(SCILAB_LIBRARY));
+
+ /* re enable system errors msgbox */
+ SetErrorMode(LastErrorMode);
+
+ if (hinstLib != NULL)
+ {
+ MYPROC1 Console_Main = NULL;
+
+ /* launch main */
+ Console_Main = (MYPROC1) GetProcAddress(hinstLib, MAIN_FUNCTION);
+
+ if (NULL != Console_Main)
+ {
+ fRunTimeLinkSuccess = TRUE;
+
+#ifndef _DEBUG
+ /* catch system errors msgbox (release mode only) */
+ /* http://msdn.microsoft.com/en-us/library/ms680621(VS.85).aspx */
+ LastErrorMode = SetErrorMode( SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX );
+ _try
+ {
+#endif
+ iExitCode = (Console_Main)(argcbis, argvbis);
+
+#ifndef _DEBUG
+ }
+ _except (EXCEPTION_EXECUTE_HANDLER)
+ {
+ }
+#endif
+ }
+ fFreeResult = FreeLibrary(hinstLib);
+ }
+
+ if (! fRunTimeLinkSuccess)
+ {
+#define BUFFER_SIZE 512
+ char buffer[BUFFER_SIZE];
+ char *OutputMsg = NULL;
+ DWORD dw = GetLastError();
+
+ if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
+ dw, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ buffer, BUFFER_SIZE, NULL) == 0)
+ {
+ StringCchPrintf(buffer, strlen("Unknown Error") + 1, "Unknown Error");
+ }
+
+ fprintf(stderr, "scilex can't launch scilab.\nError code : %lu\n", dw);
+ OutputMsg = (char*)MALLOC((strlen(buffer) + 1) * sizeof(char));
+ if (OutputMsg)
+ {
+ CharToOem(buffer, OutputMsg);
+ fprintf(stderr, "%s\n", OutputMsg);
+ FREE(OutputMsg);
+ }
+ exit(1);
+ }
+ return iExitCode;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/CScilex/CScilex.rc b/modules/windows_tools/src/c/CScilex/CScilex.rc
new file mode 100755
index 000000000..a2ee69bc6
--- /dev/null
+++ b/modules/windows_tools/src/c/CScilex/CScilex.rc
@@ -0,0 +1,138 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+#include "wresource.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// French (France) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
+#ifdef _WIN32
+LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON_SCILAB ICON "..\\resources\\scilab.ico"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""windows.h""\r\n"
+ "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""wresource.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 5,5,2,0
+ PRODUCTVERSION 5,5,2,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040c04b0"
+ BEGIN
+ VALUE "CompanyName", "Scilab Enterprises"
+ VALUE "FileDescription", "Scilab 5.5.1 (NO GUI)"
+ VALUE "FileVersion", "5, 5, 2, 0"
+ VALUE "InternalName", "WScilex"
+ VALUE "LegalCopyright", "Copyright (C) 2017"
+ VALUE "OriginalFilename", "WScilex.exe"
+ VALUE "ProductName", "Scilab 5.x Application"
+ VALUE "ProductVersion", "5, 5, 2, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x40c, 1200
+ END
+END
+
+#endif // French (France) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/modules/windows_tools/src/c/CScilex/CScilex.vcxproj b/modules/windows_tools/src/c/CScilex/CScilex.vcxproj
new file mode 100755
index 000000000..3638589d5
--- /dev/null
+++ b/modules/windows_tools/src/c/CScilex/CScilex.vcxproj
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>Scilex</ProjectName>
+ <ProjectGuid>{9BA6F7E4-AE64-4FD9-A5A7-0996A8B73B77}</ProjectGuid>
+ <RootNamespace>CScilex</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)libs\DetectFramework2;$(SolutionDir)libs\GetWindowsVersion;$(SolutionDir)modules\core\includes;$(SolutionDir)modules\windows_tools\src\c\scilab_windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)CScilex.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)libs\DetectFramework2;$(SolutionDir)libs\GetWindowsVersion;$(SolutionDir)modules\core\includes;$(SolutionDir)modules\windows_tools\src\c\scilab_windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)CScilex.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>$(SolutionDir)libs\DetectFramework2;$(SolutionDir)libs\GetWindowsVersion;$(SolutionDir)modules\core\includes;$(SolutionDir)modules\windows_tools\src\c\scilab_windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>$(SolutionDir)libs\DetectFramework2;$(SolutionDir)libs\GetWindowsVersion;$(SolutionDir)modules\core\includes;$(SolutionDir)modules\windows_tools\src\c\scilab_windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="CScilex.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="CScilex.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\..\libs\GetWindowsVersion\GetWindowsVersion.vcxproj">
+ <Project>{982bf37f-42c4-4d37-8d14-60521b141503}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\core\src\c\core.vcxproj">
+ <Project>{c6e2bc17-34d8-46e4-85f3-6293cb21adcd}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/modules/windows_tools/src/c/CScilex/CScilex.vcxproj.filters b/modules/windows_tools/src/c/CScilex/CScilex.vcxproj.filters
new file mode 100755
index 000000000..6b2834ae4
--- /dev/null
+++ b/modules/windows_tools/src/c/CScilex/CScilex.vcxproj.filters
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="CScilex.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="CScilex.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/modules/windows_tools/src/c/CScilex/resource.h b/modules/windows_tools/src/c/CScilex/resource.h
new file mode 100755
index 000000000..25bfe22f8
--- /dev/null
+++ b/modules/windows_tools/src/c/CScilex/resource.h
@@ -0,0 +1,18 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by WScilex.rc
+//
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+#define IDI_ICON_SCILAB 101
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 112
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/modules/windows_tools/src/c/CScilex/wresource.h b/modules/windows_tools/src/c/CScilex/wresource.h
new file mode 100755
index 000000000..ed1e39e94
--- /dev/null
+++ b/modules/windows_tools/src/c/CScilex/wresource.h
@@ -0,0 +1,4 @@
+#ifndef __WRESOURCE_H__
+#define __WRESOURCE_H__
+
+#endif /* __WRESOURCE_H__ */
diff --git a/modules/windows_tools/src/c/Call_scilab_Import.def b/modules/windows_tools/src/c/Call_scilab_Import.def
new file mode 100755
index 000000000..84decaffe
--- /dev/null
+++ b/modules/windows_tools/src/c/Call_scilab_Import.def
@@ -0,0 +1,5 @@
+LIBRARY call_scilab.dll
+
+
+EXPORTS
+IsFromC \ No newline at end of file
diff --git a/modules/windows_tools/src/c/DllmainWindows_Tools.c b/modules/windows_tools/src/c/DllmainWindows_Tools.c
new file mode 100755
index 000000000..53ca65b35
--- /dev/null
+++ b/modules/windows_tools/src/c/DllmainWindows_Tools.c
@@ -0,0 +1,34 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-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/modules/windows_tools/src/c/FindFileAssociation.c b/modules/windows_tools/src/c/FindFileAssociation.c
new file mode 100755
index 000000000..d2cb680d7
--- /dev/null
+++ b/modules/windows_tools/src/c/FindFileAssociation.c
@@ -0,0 +1,50 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <shlwapi.h>
+#include <stdio.h>
+#include "FindFileAssociation.h"
+#include "MALLOC.h"
+#include "strdup_windows.h"
+#include "PATH_MAX.h"
+#include "charEncoding.h"
+/*--------------------------------------------------------------------------*/
+#pragma comment(lib,"shlwapi.lib") /* AssocQueryString */
+/*--------------------------------------------------------------------------*/
+char *FindFileAssociation (char *ptrFindStr, char *Extra)
+{
+ char *ptrResult = NULL ;
+
+ if ( ptrFindStr )
+ {
+ wchar_t *wcptrFindStr = to_wide_string(ptrFindStr);
+ wchar_t *wcExtra = to_wide_string(Extra);
+ wchar_t szDefault[PATH_MAX + FILENAME_MAX];
+ DWORD ccDefault = PATH_MAX + FILENAME_MAX;
+
+ if (wcptrFindStr)
+ {
+ HRESULT rc = AssocQueryStringW (0, ASSOCSTR_EXECUTABLE, wcptrFindStr, wcExtra, szDefault, &ccDefault);
+ if (ccDefault)
+ {
+ if (rc == S_OK)
+ {
+ ptrResult = wide_string_to_UTF8(szDefault);
+ }
+ }
+ }
+ }
+ return ptrResult;
+}
+/*--------------------------------------------------------------------------*/
+
diff --git a/modules/windows_tools/src/c/FindFileAssociation.h b/modules/windows_tools/src/c/FindFileAssociation.h
new file mode 100755
index 000000000..fb26fcf1e
--- /dev/null
+++ b/modules/windows_tools/src/c/FindFileAssociation.h
@@ -0,0 +1,28 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __FINDFILEASSOCIATION_H__
+#define __FINDFILEASSOCIATION_H__
+
+/**
+* returns full name of application associated to a file extension
+* example : FindFileAssociation (".sce","print");
+* returns "c:\programs files\scilab-5.0\wscilex.exe"
+* @param[in] file extension
+* @param[in] It is typically set to a Shell verb such as open. Set this parameter to NULL if it is not used.
+* @return file associated
+*/
+char * FindFileAssociation (char *ptrFindStr, char *Extra);
+
+#endif /* __FINDFILEASSOCIATION_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/InitializeWindows_tools.c b/modules/windows_tools/src/c/InitializeWindows_tools.c
new file mode 100755
index 000000000..018ad9900
--- /dev/null
+++ b/modules/windows_tools/src/c/InitializeWindows_tools.c
@@ -0,0 +1,32 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <stdio.h>
+#include <windows.h>
+#include "InitializeWindows_tools.h"
+#include "fromc.h"
+/*--------------------------------------------------------------------------*/
+BOOL InitializeWindows_tools(void)
+{
+ BOOL bOK = FALSE;
+
+ HWND hScilab = GetConsoleWindow();
+
+ if ( (hScilab) && IsFromC() )
+ {
+ /* force redirect stdout, stderr in console */
+ freopen("CONOUT$", "wb", stdout); /* redirect stdout --> CONOUT$*/
+ }
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/TerminateWindows_tools.c b/modules/windows_tools/src/c/TerminateWindows_tools.c
new file mode 100755
index 000000000..4f992cd0f
--- /dev/null
+++ b/modules/windows_tools/src/c/TerminateWindows_tools.c
@@ -0,0 +1,48 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include "TerminateWindows_tools.h"
+#include "scilabmode.h"
+#include "console.h"
+#include "InnosetupMutex.h"
+/*--------------------------------------------------------------------------*/
+BOOL TerminateWindows_tools(void)
+{
+ BOOL bOK = FALSE;
+ int scilabMode = getScilabMode();
+
+ switch (scilabMode)
+ {
+ case SCILAB_STD:
+ {
+ CloseScilabConsole();
+ closeInnosetupMutex();
+ bOK = TRUE;
+ }
+ break;
+
+ case SCILAB_NW:
+ {
+ RestoreConsoleColors();
+ RestoreExitButton();
+ bOK = TRUE;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/WScilex/WScilex.c b/modules/windows_tools/src/c/WScilex/WScilex.c
new file mode 100755
index 000000000..4ac5b7cae
--- /dev/null
+++ b/modules/windows_tools/src/c/WScilex/WScilex.c
@@ -0,0 +1,130 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - Allan CORNET
+* Copyright (C) 2010 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include <strsafe.h>
+#include <string.h>
+#include <stdio.h>
+#include "GetWindowsVersion.h"
+#include "MALLOC.h"
+/*--------------------------------------------------------------------------*/
+#define MSG_DETECT_XP_OR_MORE "Scilab requires Windows XP or more."
+#define MSG_DETECT_UNKNOW "Scilab does not support this unknow version of Windows."
+#define MSG_DETECT_SSE_OR_MORE "Scilab requires SSE Instructions."
+#define MSG_WARNING "Warning"
+#define MSG_LOAD_LIBRARIES "Wscilex.exe failed with error %d: %s"
+#define MAIN_FUNCTION "Windows_Main"
+#define SCILAB_LIBRARY "scilab_windows"
+#define ARG_NW "-nw"
+#define ARG_NWNI "-nwni"
+#define ARG_NOGUI "-nogui"
+#define LENGTH_BUFFER_SECURITY 64
+/*--------------------------------------------------------------------------*/
+typedef int (*MYPROC1) (HINSTANCE, HINSTANCE , LPSTR szCmdLine, int iCmdShow);
+/*--------------------------------------------------------------------------*/
+/* BUG 6934 */
+/* http://bugzilla.scilab.org/show_bug.cgi?id=6934 */
+/* http://msdn.microsoft.com/en-us/library/chh3fb0k(VS.80).aspx */
+#ifdef __INTEL_COMPILER
+#pragma optimize("g", off)
+#endif
+/*--------------------------------------------------------------------------*/
+int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLine, int iCmdShow)
+{
+ int iExitCode = 0;
+ HINSTANCE hinstLib = NULL;
+ BOOL fFreeResult = FALSE, fRunTimeLinkSuccess = FALSE;
+
+ if (GetWindowsVersion() == OS_ERROR )
+ {
+ MessageBox(NULL, TEXT(MSG_DETECT_UNKNOW), TEXT(MSG_WARNING), MB_ICONWARNING);
+ return -1;
+ }
+
+ if (GetWindowsVersion() < OS_WIN32_WINDOWS_XP )
+ {
+ MessageBox(NULL, TEXT(MSG_DETECT_XP_OR_MORE), TEXT(MSG_WARNING), MB_ICONWARNING);
+ return -1;
+ }
+
+ /* http://msdn.microsoft.com/en-us/library/ms724482(VS.85).aspx */
+ if (!IsProcessorFeaturePresent(PF_XMMI_INSTRUCTIONS_AVAILABLE))
+ {
+ MessageBox(NULL, TEXT(MSG_DETECT_SSE_OR_MORE), TEXT(MSG_WARNING), MB_ICONWARNING);
+ return -1;
+ }
+
+ hinstLib = LoadLibrary(TEXT(SCILAB_LIBRARY));
+ if (hinstLib != NULL)
+ {
+ MYPROC1 Windows_Main = NULL;
+
+ /* launch main */
+ Windows_Main = (MYPROC1) GetProcAddress(hinstLib, MAIN_FUNCTION);
+ if (NULL != Windows_Main)
+ {
+
+#ifndef _DEBUG
+ /* catch system errors msgbox (release mode only) */
+ /* http://msdn.microsoft.com/en-us/library/ms680621(VS.85).aspx */
+ UINT LastErrorMode = SetErrorMode( SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX );
+ _try
+ {
+#endif
+ fRunTimeLinkSuccess = TRUE;
+ /* launch main */
+ iExitCode = (Windows_Main)(hInstance, hPrevInstance, szCmdLine, iCmdShow);
+
+#ifndef _DEBUG
+ }
+ _except (EXCEPTION_EXECUTE_HANDLER)
+ {
+ }
+#endif
+ }
+ fFreeResult = FreeLibrary(hinstLib);
+ }
+
+ if (!fRunTimeLinkSuccess)
+ {
+ LPVOID lpMsgBuf;
+ LPVOID lpDisplayBuf;
+
+ DWORD dw = GetLastError();
+
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ dw,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPTSTR) &lpMsgBuf,
+ 0, NULL );
+
+ lpDisplayBuf = (LPVOID)LocalAlloc(LMEM_ZEROINIT,
+ (lstrlen((LPCTSTR)lpMsgBuf) + LENGTH_BUFFER_SECURITY) * sizeof(TCHAR));
+ StringCchPrintf((LPTSTR)lpDisplayBuf,
+ LocalSize(lpDisplayBuf) / sizeof(TCHAR),
+ TEXT(MSG_LOAD_LIBRARIES),
+ dw, lpMsgBuf);
+
+ MessageBox(NULL, (LPCTSTR)lpDisplayBuf, TEXT(MSG_WARNING), MB_ICONERROR);
+
+ LocalFree(lpMsgBuf);
+ LocalFree(lpDisplayBuf);
+ exit(1);
+ }
+ return iExitCode;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/WScilex/WScilex.rc b/modules/windows_tools/src/c/WScilex/WScilex.rc
new file mode 100755
index 000000000..6a922b988
--- /dev/null
+++ b/modules/windows_tools/src/c/WScilex/WScilex.rc
@@ -0,0 +1,128 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+#include "wresource.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// French (France) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
+LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
+#pragma code_page(1252)
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""windows.h""\r\n"
+ "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""wresource.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 5,5,2,0
+ PRODUCTVERSION 5,5,2,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040c04b0"
+ BEGIN
+ VALUE "CompanyName", "Scilab Enterprises"
+ VALUE "FileDescription", "Scilab 5.5.2 (GUI)"
+ VALUE "FileVersion", "5, 5, 2, 0"
+ VALUE "InternalName", "WScilex"
+ VALUE "LegalCopyright", "Copyright (C) 2017"
+ VALUE "OriginalFilename", "WScilex.exe"
+ VALUE "ProductName", "Scilab 5.x Application"
+ VALUE "ProductVersion", "5, 5, 2, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x40c, 1200
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+
+IDI_ICON_SCILAB ICON "..\\resources\\scilab.ico"
+IDI_ICON_BIN ICON "..\\resources\\bin.ico"
+IDI_ICON_XCOS ICON "..\\resources\\xcos.ico"
+IDI_ICON_COSF ICON "..\\resources\\cosf.ico"
+IDI_ICON_DEM ICON "..\\resources\\dem.ico"
+IDI_ICON_GRAPH ICON "..\\resources\\graph.ico"
+IDI_ICON_SAV ICON "..\\resources\\sav.ico"
+IDI_ICON_SCE ICON "..\\resources\\sce.ico"
+IDI_ICON_SCI ICON "..\\resources\\sci.ico"
+IDI_ICON_TST ICON "..\\resources\\tst.ico"
+IDI_ICON_SOD ICON "..\\resources\\sod.ico"
+IDI_ICON_ZCOS ICON "..\\resources\\zcos.ico"
+
+#endif // French (France) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/modules/windows_tools/src/c/WScilex/WScilex.vcxproj b/modules/windows_tools/src/c/WScilex/WScilex.vcxproj
new file mode 100755
index 000000000..06306f9c3
--- /dev/null
+++ b/modules/windows_tools/src/c/WScilex/WScilex.vcxproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{CCD80549-EB9C-42AA-9B86-D687377E94F6}</ProjectGuid>
+ <RootNamespace>WScilex</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)libs\DetectFramework2;$(SolutionDir)libs\GetWindowsVersion;$(SolutionDir)modules\core\includes;$(SolutionDir)modules\windows_tools\src\c\scilab_windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)WScilex.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)libs\DetectFramework2;$(SolutionDir)libs\GetWindowsVersion;$(SolutionDir)modules\core\includes;$(SolutionDir)modules\windows_tools\src\c\scilab_windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)WScilex.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>$(SolutionDir)libs\DetectFramework2;$(SolutionDir)libs\GetWindowsVersion;$(SolutionDir)modules\core\includes;$(SolutionDir)modules\windows_tools\src\c\scilab_windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>$(SolutionDir)libs\DetectFramework2;$(SolutionDir)libs\GetWindowsVersion;$(SolutionDir)modules\core\includes;$(SolutionDir)modules\windows_tools\src\c\scilab_windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <ObjectFileName>$(Configuration)/</ObjectFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="WScilex.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\resources\BIN.ICO" />
+ <None Include="..\resources\COS.ICO" />
+ <None Include="..\resources\COSF.ICO" />
+ <None Include="..\resources\DEM.ICO" />
+ <None Include="..\resources\Graph.ICO" />
+ <None Include="..\resources\SAV.ICO" />
+ <None Include="..\resources\SCE.ICO" />
+ <None Include="..\resources\SCI.ICO" />
+ <None Include="..\resources\scilab.ico" />
+ <None Include="..\resources\sod.ico" />
+ <None Include="..\resources\TST.ICO" />
+ <None Include="..\resources\xcos.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="WScilex.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\..\libs\GetWindowsVersion\GetWindowsVersion.vcxproj">
+ <Project>{982bf37f-42c4-4d37-8d14-60521b141503}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\..\tools\localization\generatePoFile.vcxproj">
+ <Project>{6880d4df-bc7a-411f-ad9b-20a14429a92f}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\functions\scripts\buildmacros\BuildMacros.vcxproj">
+ <Project>{66f2fb48-5d68-4445-a856-119f685a371b}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\CScilex\CScilex.vcxproj">
+ <Project>{9ba6f7e4-ae64-4fd9-a5a7-0996a8b73b77}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/modules/windows_tools/src/c/WScilex/WScilex.vcxproj.filters b/modules/windows_tools/src/c/WScilex/WScilex.vcxproj.filters
new file mode 100755
index 000000000..d09d491a5
--- /dev/null
+++ b/modules/windows_tools/src/c/WScilex/WScilex.vcxproj.filters
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="WScilex.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\resources\BIN.ICO">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\COS.ICO">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\COSF.ICO">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\DEM.ICO">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\Graph.ICO">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\SAV.ICO">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\SCE.ICO">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\SCI.ICO">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\scilab.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\TST.ICO">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\xcos.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\sod.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="WScilex.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/modules/windows_tools/src/c/WScilex/resource.h b/modules/windows_tools/src/c/WScilex/resource.h
new file mode 100755
index 000000000..05efc2d1f
--- /dev/null
+++ b/modules/windows_tools/src/c/WScilex/resource.h
@@ -0,0 +1,28 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by WScilex.rc
+//
+
+#define IDI_ICON_SCILAB 112
+#define IDI_ICON_BIN 113
+#define IDI_ICON_XCOS 114
+#define IDI_ICON_COSF 115
+#define IDI_ICON_DEM 116
+#define IDI_ICON_GRAPH 117
+#define IDI_ICON_SAV 118
+#define IDI_ICON_SCE 119
+#define IDI_ICON_SCI 120
+#define IDI_ICON_TST 121
+#define IDI_ICON_SOD 122
+#define IDI_ICON_ZCOS 123
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 123
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/modules/windows_tools/src/c/WScilex/wresource.h b/modules/windows_tools/src/c/WScilex/wresource.h
new file mode 100755
index 000000000..4e319ab57
--- /dev/null
+++ b/modules/windows_tools/src/c/WScilex/wresource.h
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - 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.1-en.txt
+
+
+#ifndef __WRESOURCE_H__
+#define __WRESOURCE_H__
+
+#endif /* __WRESOURCE_H__ */
diff --git a/modules/windows_tools/src/c/WinConsole.c b/modules/windows_tools/src/c/WinConsole.c
new file mode 100755
index 000000000..b425a1c8f
--- /dev/null
+++ b/modules/windows_tools/src/c/WinConsole.c
@@ -0,0 +1,86 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#define _WIN32_WINNT 0x0500
+#include <Windows.h>
+#include <stdio.h>
+#include "WinConsole.h"
+#include "version.h"
+#include "scilabmode.h"
+#include "MALLOC.h"
+#include "scilab_windows/console.h"
+/*--------------------------------------------------------------------------*/
+static int Windows_Console_State = 0;/* 0 Hide 1 Show */
+/*--------------------------------------------------------------------------*/
+/*Cache la fenetre Scilex(x) de ce processus */
+void HideScilex(void)
+{
+ HWND hScilex = NULL;
+ hScilex = GetConsoleWindow();
+ if (hScilex)
+ {
+ ShowWindow(hScilex, SW_HIDE);
+ SetConsoleState(0);
+ }
+}
+/*--------------------------------------------------------------------------*/
+/*Montre la fenetre Scilex(x) de ce processus */
+void ShowScilex(void)
+{
+ HWND hScilex = NULL;
+ hScilex = GetConsoleWindow();
+ if (hScilex)
+ {
+ ShowWindow(hScilex, SW_SHOWNOACTIVATE);
+ SetConsoleState(1);
+ }
+}
+/*--------------------------------------------------------------------------*/
+void SwitchConsole(void)
+{
+ char *ConsoleName = getScilexConsoleName();
+
+ switch (GetConsoleState())
+ {
+ /* La fenetre etait cache , on la restaure */
+ case 0:
+ {
+ ShowScilex();
+ }
+ break;
+ /* La fenetre etait apparente , on la cache */
+ case 1:
+ {
+ HideScilex();
+ }
+ break;
+ }
+
+ if (ConsoleName)
+ {
+ SetConsoleTitle(ConsoleName);
+ FREE(ConsoleName);
+ ConsoleName = NULL;
+ }
+}
+/*--------------------------------------------------------------------------*/
+int GetConsoleState(void)
+{
+ return Windows_Console_State;
+}
+/*--------------------------------------------------------------------------*/
+void SetConsoleState(int state)
+{
+ Windows_Console_State = state;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/WinConsole.h b/modules/windows_tools/src/c/WinConsole.h
new file mode 100755
index 000000000..a3b1c2e57
--- /dev/null
+++ b/modules/windows_tools/src/c/WinConsole.h
@@ -0,0 +1,51 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __WINCONSOLE_H__
+#define __WINCONSOLE_H__
+/*--------------------------------------------------------------------------*/
+#include "dynlib_windows_tools.h"
+/*--------------------------------------------------------------------------*/
+/* Theses functions are used to manipulate console 'dos' added to GUI */
+/* only for windows */
+/*--------------------------------------------------------------------------*/
+
+/**
+* hide scilex console
+*/
+WINDOWS_TOOLS_IMPEXP void HideScilex(void);
+
+/**
+* show scilex console
+*/
+WINDOWS_TOOLS_IMPEXP void ShowScilex(void);
+
+/**
+* switch between hide and show
+*/
+WINDOWS_TOOLS_IMPEXP void SwitchConsole(void);
+
+/**
+* Get console state
+*@return state 0 hide , 1 show
+*/
+WINDOWS_TOOLS_IMPEXP int GetConsoleState(void);
+
+/**
+* Set console state
+* @param[in] 0 hide , 1 show
+*/
+WINDOWS_TOOLS_IMPEXP void SetConsoleState(int state);
+
+#endif /* __WINCONSOLE_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/core_Import.def b/modules/windows_tools/src/c/core_Import.def
new file mode 100755
index 000000000..fdce4e242
--- /dev/null
+++ b/modules/windows_tools/src/c/core_Import.def
@@ -0,0 +1,24 @@
+ LIBRARY core.dll
+
+
+EXPORTS
+;core
+
+callFunctionFromGateway
+com_
+putlhsvar_
+intersci_
+createvarfromptr_
+getScilabMode
+stack_
+getrhsvar_
+gettype_
+vstk_
+checklhs_
+checkrhs_
+freeArrayOfString
+getTMPDIR
+createvar_
+getWarningMode
+MyHeapAlloc
+MyHeapFree
diff --git a/modules/windows_tools/src/c/createGUID.c b/modules/windows_tools/src/c/createGUID.c
new file mode 100755
index 000000000..3157a73ac
--- /dev/null
+++ b/modules/windows_tools/src/c/createGUID.c
@@ -0,0 +1,32 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <unknwn.h>
+#include "createGUID.h"
+#include "strdup_Windows.h"
+/*--------------------------------------------------------------------------*/
+#define _OLEAUT32_
+/*--------------------------------------------------------------------------*/
+char *createGUID(void)
+{
+ GUID guid;
+ WORD* wstrGUID[100];
+ char strGUID[100];
+
+ CoCreateGuid (&guid);
+ StringFromCLSID (&guid, wstrGUID);
+ WideCharToMultiByte (CP_ACP, 0, *wstrGUID, -1, strGUID, MAX_PATH, NULL, NULL);
+ strGUID[strlen(strGUID) - 1] = '\0';
+ return strdup(strGUID + 1);
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/createGUID.h b/modules/windows_tools/src/c/createGUID.h
new file mode 100755
index 000000000..8f31bb505
--- /dev/null
+++ b/modules/windows_tools/src/c/createGUID.h
@@ -0,0 +1,24 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __CREATEGUID_H__
+#define __CREATEGUID_H__
+
+/**
+* Creates a GUID, a unique 128-bit int used for CLSIDs and interface identifiers.
+* @return a string (GUID)
+*/
+char *createGUID(void);
+
+#endif /* __CREATEGUID_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/httpdownloadfile.c b/modules/windows_tools/src/c/httpdownloadfile.c
new file mode 100755
index 000000000..d73d62776
--- /dev/null
+++ b/modules/windows_tools/src/c/httpdownloadfile.c
@@ -0,0 +1,425 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - Allan CORNET
+* Copyright (C) DIGITEO - 2010 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#define _WIN32_WINNT 0x0501
+#define _WIN32_IE 0x0501
+#include <windows.h>
+#include <wininet.h>
+#include <urlmon.h>
+#include "MALLOC.h"
+#include "httpdownloadfile.h"
+/* http://msdn2.microsoft.com/en-us/library/aa385098.aspx */
+/* http://msdn.microsoft.com/en-us/library/ms775123(VS.85).aspx */
+/*--------------------------------------------------------------------------*/
+#define MO 0x100000 /* Read 1 Mo by 1Mo. */
+#define OPENURL_MODE INTERNET_OPEN_TYPE_PRECONFIG
+/*--------------------------------------------------------------------------*/
+static HINSTANCE WinINETDll = NULL;
+static HINSTANCE UrlmonDll = NULL;
+
+typedef HRESULT (WINAPI * URLDownloadToFilePROC)(LPUNKNOWN pCaller,
+ LPCTSTR szURL,
+ LPCTSTR szFileName,
+ DWORD dwReserved,
+ LPBINDSTATUSCALLBACK lpfnCB);
+
+static HRESULT dynlib_URLDownloadToFile(LPUNKNOWN pCaller,
+ LPCTSTR szURL,
+ LPCTSTR szFileName,
+ DWORD dwReserved,
+ LPBINDSTATUSCALLBACK lpfnCB);
+
+static httpdownloadfile_error_code urlDownloadFile(char * szURL, char * szSaveFilePath);
+/*--------------------------------------------------------------------------*/
+typedef HINTERNET (WINAPI * InternetOpenUrlPROC) (HINTERNET hInternet,
+ LPCTSTR lpszUrl,
+ LPCTSTR lpszHeaders,
+ DWORD dwHeadersLength,
+ DWORD dwFlags,
+ DWORD_PTR dwContext);
+
+static HINTERNET dynlib_InternetOpenUrl(HINTERNET hInternet,
+ LPCTSTR lpszUrl,
+ LPCTSTR lpszHeaders,
+ DWORD dwHeadersLength,
+ DWORD dwFlags,
+ DWORD_PTR dwContext);
+/*--------------------------------------------------------------------------*/
+typedef HINTERNET (WINAPI * InternetOpenPROC) (LPCTSTR lpszAgent,
+ DWORD dwAccessType,
+ LPCTSTR lpszProxyName,
+ LPCTSTR lpszProxyBypass,
+ DWORD dwFlags);
+
+static HINTERNET dynlib_InternetOpen(LPCTSTR lpszAgent,
+ DWORD dwAccessType,
+ LPCTSTR lpszProxyName,
+ LPCTSTR lpszProxyBypass,
+ DWORD dwFlags);
+/*--------------------------------------------------------------------------*/
+typedef BOOL (WINAPI * InternetCloseHandlePROC) (HINTERNET hInternet);
+
+static BOOL dynlib_InternetCloseHandle(HINTERNET hInternet);
+/*--------------------------------------------------------------------------*/
+typedef BOOL (WINAPI * HttpQueryInfoPROC) (HINTERNET hRequest,
+ DWORD dwInfoLevel,
+ LPVOID lpvBuffer,
+ LPDWORD lpdwBufferLength,
+ LPDWORD lpdwIndex);
+
+static BOOL dynlib_HttpQueryInfo(HINTERNET hRequest,
+ DWORD dwInfoLevel,
+ LPVOID lpvBuffer,
+ LPDWORD lpdwBufferLength,
+ LPDWORD lpdwIndex);
+/*--------------------------------------------------------------------------*/
+typedef BOOL (WINAPI * InternetReadFilePROC) (HINTERNET hFile,
+ LPVOID lpBuffer,
+ DWORD dwNumberOfBytesToRead,
+ LPDWORD lpdwNumberOfBytesRead);
+
+static BOOL dynlib_InternetReadFile(HINTERNET hFile,
+ LPVOID lpBuffer,
+ DWORD dwNumberOfBytesToRead,
+ LPDWORD lpdwNumberOfBytesRead);
+/*--------------------------------------------------------------------------*/
+void httpdownload(char * szURL, char * szSaveFilePath, double *ierr)
+{
+ *ierr = urlDownloadFile(szURL, szSaveFilePath);
+ if (*ierr != HTTP_DOWNLOAD_ERROR_OK)
+ {
+ // fails to download by standard way
+ // we try by another method
+ // last chance ...
+ *ierr = httpDownloadFile(szURL, szSaveFilePath);
+ }
+
+ if (WinINETDll)
+ {
+ FreeLibrary(WinINETDll);
+ WinINETDll = NULL;
+ }
+
+ if (UrlmonDll)
+ {
+ FreeLibrary(UrlmonDll);
+ UrlmonDll = NULL;
+ }
+}
+/*--------------------------------------------------------------------------*/
+httpdownloadfile_error_code httpDownloadFile(char * szURL, char * szSaveFilePath)
+{
+ HINTERNET hiConnex = NULL;
+ /* * / * : /*rfc 2616 protocole http. all files type accepted*/
+ char szHeader[] = "Accept: */*\r\n\r\n";
+ HINTERNET hiDownload;
+
+ hiConnex = dynlib_InternetOpen("Scilab_Download", OPENURL_MODE, NULL, NULL, 0);
+ if (hiConnex == NULL)
+ {
+ return HTTP_DOWNLOAD_ERROR_INTERNET_OPEN;
+ }
+
+ hiDownload = dynlib_InternetOpenUrl(hiConnex, szURL, szHeader, lstrlen(szHeader), INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_RELOAD | INTERNET_FLAG_PRAGMA_NOCACHE, 0);
+ if (!hiDownload)
+ {
+ dynlib_InternetCloseHandle(hiConnex);
+ return HTTP_DOWNLOAD_ERROR_OPEN_URL;
+ }
+ else
+ {
+ DWORD dwStatus = 0;
+ DWORD dwStatusSize = sizeof(dwStatus);
+ DWORD dwIndex = 0;
+
+ dynlib_HttpQueryInfo(hiDownload, HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER, &dwStatus, &dwStatusSize, &dwIndex);
+
+ if (dwStatus != HTTP_STATUS_OK)
+ {
+ dynlib_InternetCloseHandle(hiConnex);
+ dynlib_InternetCloseHandle(hiDownload);
+ return HTTP_DOWNLOAD_ERROR_INVALID_URL;
+ }
+ else
+ {
+ HANDLE haFile;
+
+ haFile = CreateFile(szSaveFilePath, GENERIC_WRITE, FILE_SHARE_WRITE, 0, CREATE_ALWAYS, 0, 0);
+ if (haFile == INVALID_HANDLE_VALUE)
+ {
+ dynlib_InternetCloseHandle(hiConnex);
+ return HTTP_DOWNLOAD_ERROR_CREATEFILE;
+ }
+ else
+ {
+ char *szBuff = NULL;
+
+ DWORD dwBytesRequired = 0;
+ DWORD dwSizeOfByReq = 4;
+ DWORD dwBytesRead = 0;
+ DWORD dwBytesWritten = 0;
+
+ /* Get file size */
+ if (!dynlib_HttpQueryInfo(hiDownload, HTTP_QUERY_CONTENT_LENGTH | HTTP_QUERY_FLAG_NUMBER, (LPVOID)&dwBytesRequired, &dwSizeOfByReq, 0))
+ {
+ dynlib_InternetCloseHandle(hiConnex);
+ return HTTP_DOWNLOAD_ERROR_INVALID_FILE_SIZE;
+ }
+ else
+ {
+ if (dwBytesRequired > MO)
+ {
+ szBuff = (char*)MALLOC(MO);
+ if (szBuff == NULL)
+ {
+ CloseHandle(haFile);
+ dynlib_InternetCloseHandle(hiConnex);
+ return HTTP_DOWNLOAD_OUTOFMEMORY;
+ }
+ }
+ else
+ {
+ szBuff = (char*)MALLOC(dwBytesRequired);
+ if (szBuff == NULL)
+ {
+ CloseHandle(haFile);
+ dynlib_InternetCloseHandle(hiConnex);
+ return HTTP_DOWNLOAD_OUTOFMEMORY;
+ }
+ }
+
+ while (dwBytesRequired > 0)
+ {
+ /* we read 1Mo from file. */
+ if (dwBytesRequired >= MO)
+ {
+ if (!dynlib_InternetReadFile(hiDownload, szBuff, MO, &dwBytesRead) || dwBytesRead != MO)
+ {
+ CloseHandle(haFile);
+ dynlib_InternetCloseHandle(hiConnex);
+ FREE(szBuff);
+ return HTTP_DOWNLOAD_ERROR_INTERNET_READFILE;
+ }
+ dwBytesRequired -= MO;
+
+
+ /* we write buffer */
+ if (!WriteFile(haFile, szBuff, MO, &dwBytesWritten, NULL) || dwBytesWritten != MO)
+ {
+ CloseHandle(haFile);
+ dynlib_InternetCloseHandle(hiConnex);
+ FREE(szBuff);
+ return HTTP_DOWNLOAD_ERROR_WRITEFILE;
+ }
+ }
+ else
+ {
+ if (!dynlib_InternetReadFile(hiDownload, szBuff, dwBytesRequired, &dwBytesRead) || dwBytesRead != dwBytesRequired)
+ {
+ CloseHandle(haFile);
+ dynlib_InternetCloseHandle(hiConnex);
+ FREE(szBuff);
+ return HTTP_DOWNLOAD_ERROR_INTERNET_READFILE;
+ }
+
+ /* we write buffer in a backup file*/
+ if (!WriteFile(haFile, szBuff, dwBytesRequired, &dwBytesWritten, NULL) || dwBytesWritten != dwBytesRequired)
+ {
+ CloseHandle(haFile);
+ dynlib_InternetCloseHandle(hiConnex);
+ FREE(szBuff);
+ return HTTP_DOWNLOAD_ERROR_WRITEFILE;
+ }
+
+ dwBytesRequired = 0;
+ }
+ }
+
+ dynlib_InternetCloseHandle(hiConnex);
+ CloseHandle(haFile);
+ FREE(szBuff);
+ return HTTP_DOWNLOAD_ERROR_OK;
+ }
+ }
+ }
+ }
+}
+/*--------------------------------------------------------------------------*/
+httpdownloadfile_error_code urlDownloadFile(char * szURL, char * szSaveFilePath)
+{
+ HRESULT hr = dynlib_URLDownloadToFile(NULL, szURL, szSaveFilePath, 0, NULL);
+ switch (hr)
+ {
+ case S_OK:
+ {
+ return HTTP_DOWNLOAD_ERROR_OK;
+ }
+ break;
+
+ case E_OUTOFMEMORY:
+ {
+ return HTTP_DOWNLOAD_OUTOFMEMORY;
+ }
+ break;
+
+ case INET_E_DOWNLOAD_FAILURE:
+ default:
+ {
+ return HTTP_DOWNLOAD_FAILURE;
+ }
+ break;
+ }
+}
+/*--------------------------------------------------------------------------*/
+static HRESULT dynlib_URLDownloadToFile(LPUNKNOWN pCaller,
+ LPCTSTR szURL,
+ LPCTSTR szFileName,
+ DWORD dwReserved,
+ LPBINDSTATUSCALLBACK lpfnCB)
+{
+ if (UrlmonDll == NULL)
+ {
+ UrlmonDll = LoadLibrary ("urlmon.dll");
+ }
+ if (UrlmonDll)
+ {
+ URLDownloadToFilePROC dllURLDownloadToFile = (URLDownloadToFilePROC)GetProcAddress(UrlmonDll, "URLDownloadToFileA");
+ if (dllURLDownloadToFile)
+ {
+ return (HRESULT)(dllURLDownloadToFile)(pCaller, szURL, szFileName, dwReserved, lpfnCB);
+ }
+ }
+ return S_FALSE;
+}
+/*--------------------------------------------------------------------------*/
+HINTERNET dynlib_InternetOpenUrl(HINTERNET hInternet,
+ LPCTSTR lpszUrl,
+ LPCTSTR lpszHeaders,
+ DWORD dwHeadersLength,
+ DWORD dwFlags,
+ DWORD_PTR dwContext)
+{
+ if (WinINETDll == NULL)
+ {
+ WinINETDll = LoadLibrary ("WININET.dll");
+ }
+ if (WinINETDll)
+ {
+ InternetOpenUrlPROC dllInternetOpenUrl = (InternetOpenUrlPROC)GetProcAddress(WinINETDll, "InternetOpenUrlA");
+ if (dllInternetOpenUrl)
+ {
+ return (HINTERNET)(dllInternetOpenUrl)(hInternet,
+ lpszUrl,
+ lpszHeaders,
+ dwHeadersLength,
+ dwFlags,
+ dwContext);
+ }
+ }
+ return NULL;
+}
+/*--------------------------------------------------------------------------*/
+HINTERNET dynlib_InternetOpen(LPCTSTR lpszAgent,
+ DWORD dwAccessType,
+ LPCTSTR lpszProxyName,
+ LPCTSTR lpszProxyBypass,
+ DWORD dwFlags)
+{
+ if (WinINETDll == NULL)
+ {
+ WinINETDll = LoadLibrary ("WININET.dll");
+ }
+ if (WinINETDll)
+ {
+ InternetOpenPROC dllInternetOpen = (InternetOpenPROC)GetProcAddress(WinINETDll, "InternetOpenA");
+ if (dllInternetOpen)
+ {
+ return (HINTERNET)(dllInternetOpen)(lpszAgent,
+ dwAccessType,
+ lpszProxyName,
+ lpszProxyBypass,
+ dwFlags);
+ }
+ }
+ return NULL;
+}
+/*--------------------------------------------------------------------------*/
+BOOL dynlib_InternetCloseHandle(HINTERNET hInternet)
+{
+ if (WinINETDll == NULL)
+ {
+ WinINETDll = LoadLibrary ("WININET.dll");
+ }
+ if (WinINETDll)
+ {
+ InternetCloseHandlePROC dllInternetCloseHandle = (InternetCloseHandlePROC)
+ GetProcAddress(WinINETDll, "InternetCloseHandle");
+
+ if (dllInternetCloseHandle)
+ {
+ return (BOOL)(dllInternetCloseHandle)(hInternet);
+ }
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
+BOOL dynlib_HttpQueryInfo(HINTERNET hRequest,
+ DWORD dwInfoLevel,
+ LPVOID lpvBuffer,
+ LPDWORD lpdwBufferLength,
+ LPDWORD lpdwIndex)
+{
+ if (WinINETDll == NULL)
+ {
+ WinINETDll = LoadLibrary ("WININET.dll");
+ }
+ if (WinINETDll)
+ {
+ HttpQueryInfoPROC dllHttpQueryInfo = (HttpQueryInfoPROC)
+ GetProcAddress(WinINETDll, "HttpQueryInfoA");
+ if (dllHttpQueryInfo)
+ {
+ return (BOOL)(dllHttpQueryInfo)(hRequest,
+ dwInfoLevel,
+ lpvBuffer,
+ lpdwBufferLength,
+ lpdwIndex);
+ }
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
+BOOL dynlib_InternetReadFile(HINTERNET hFile,
+ LPVOID lpBuffer,
+ DWORD dwNumberOfBytesToRead,
+ LPDWORD lpdwNumberOfBytesRead)
+{
+ if (WinINETDll == NULL)
+ {
+ WinINETDll = LoadLibrary ("WININET.dll");
+ }
+ if (WinINETDll)
+ {
+ InternetReadFilePROC dllInternetReadFile = (InternetReadFilePROC)
+ GetProcAddress(WinINETDll, "InternetReadFile");
+ if (dllInternetReadFile)
+ {
+ return (BOOL)(dllInternetReadFile)(hFile,
+ lpBuffer,
+ dwNumberOfBytesToRead,
+ lpdwNumberOfBytesRead);
+ }
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/httpdownloadfile.h b/modules/windows_tools/src/c/httpdownloadfile.h
new file mode 100755
index 000000000..9f5200c99
--- /dev/null
+++ b/modules/windows_tools/src/c/httpdownloadfile.h
@@ -0,0 +1,48 @@
+/*--------------------------------------------------------------------------*/
+
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+#ifndef __HTTPDOWNLOADFILE_H__
+#define __HTTPDOWNLOADFILE_H__
+
+#include "dynlib_windows_tools.h"
+
+typedef enum
+{
+ HTTP_DOWNLOAD_ERROR_OK = 0,
+ HTTP_DOWNLOAD_ERROR_INVALID_URL = -1,
+ HTTP_DOWNLOAD_ERROR_INTERNET_OPEN = -2,
+ HTTP_DOWNLOAD_ERROR_OPEN_URL = -3,
+ HTTP_DOWNLOAD_ERROR_CREATEFILE = -4,
+ HTTP_DOWNLOAD_ERROR_INVALID_FILE_SIZE = -5,
+ HTTP_DOWNLOAD_ERROR_INTERNET_READFILE = -6,
+ HTTP_DOWNLOAD_ERROR_WRITEFILE = -7,
+ HTTP_DOWNLOAD_FAILURE = -8,
+ HTTP_DOWNLOAD_OUTOFMEMORY = -9
+} httpdownloadfile_error_code;
+
+/**
+* download a file by http (uses wininet library)
+* http://msdn2.microsoft.com/en-us/library/aa385473(VS.85).aspx
+* example httpDownloadFile("http://www.scilab.org/download/4.1.2/scilab-4.1.2.exe","d:/scilab-4.1.2.exe");
+* @param[in] szURL string url file to download
+* @param[in] szSaveFilePath string filename destination
+*/
+httpdownloadfile_error_code httpDownloadFile(char * szURL, char * szSaveFilePath);
+
+/* simplified version for 'call' from scilab */
+WINDOWS_TOOLS_IMPEXP void httpdownload(char * szURL, char * szSaveFilePath, double *ierr);
+
+#endif /* __HTTPDOWNLOADFILE_H__ */
+/*--------------------------------------------------------------------------*/
+
diff --git a/modules/windows_tools/src/c/localization_Import.def b/modules/windows_tools/src/c/localization_Import.def
new file mode 100755
index 000000000..a26ff4773
--- /dev/null
+++ b/modules/windows_tools/src/c/localization_Import.def
@@ -0,0 +1,8 @@
+LIBRARY scilocalization.dll
+
+
+EXPORTS
+to_wide_string
+wide_string_to_UTF8
+IsValidUTF8
+
diff --git a/modules/windows_tools/src/c/registry.c b/modules/windows_tools/src/c/registry.c
new file mode 100755
index 000000000..3168c7c58
--- /dev/null
+++ b/modules/windows_tools/src/c/registry.c
@@ -0,0 +1,286 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - Allan CORNET
+* Copyright (C) DIGITEO - 2011 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include "registry.h"
+#include "PATH_MAX.h"
+#include "MALLOC.h"
+#include "GetWindowsVersion.h"
+#include "strdup_windows.h"
+/*--------------------------------------------------------------------------*/
+#define MAX_KEY_LENGTH 255
+#define MAX_VALUE_NAME 16383
+/*--------------------------------------------------------------------------*/
+
+static BOOL WindowsOpenRegistry(char* _pstRoot, char* _pstKey, HKEY* _pKeyOut)
+{
+ DWORD OpensKeyOptions = 0;
+ HKEY hKeyToOpen = NULL;
+
+ hKeyToOpen = GetHkeyrootFromString(_pstRoot);
+ if (hKeyToOpen == NULL)
+ {
+ return FALSE;
+ }
+
+#ifdef _WIN64 /* Scilab x64 on x64 windows */
+ OpensKeyOptions = KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE | KEY_WOW64_64KEY;
+ if ( RegOpenKeyEx(hKeyToOpen, _pstKey, 0, OpensKeyOptions, _pKeyOut) != ERROR_SUCCESS)
+ {
+ OpensKeyOptions = KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE | KEY_WOW64_32KEY;
+ if ( RegOpenKeyEx(hKeyToOpen, _pstKey, 0, OpensKeyOptions, _pKeyOut) != ERROR_SUCCESS)
+ {
+ return FALSE;
+ }
+ }
+#else
+ if (IsWow64()) /* Scilab 32 bits on x64 windows */
+ {
+ OpensKeyOptions = KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE | KEY_WOW64_64KEY;
+ if ( RegOpenKeyEx(hKeyToOpen, _pstKey, 0, OpensKeyOptions, _pKeyOut) != ERROR_SUCCESS)
+ {
+ OpensKeyOptions = KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE | KEY_WOW64_32KEY;
+ if ( RegOpenKeyEx(hKeyToOpen, _pstKey, 0, OpensKeyOptions, _pKeyOut) != ERROR_SUCCESS)
+ {
+ return FALSE;
+ }
+ }
+ }
+ else /* Scilab 32 bits on windows 32 bits */
+ {
+ OpensKeyOptions = KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE;
+ if ( RegOpenKeyEx(hKeyToOpen, _pstKey, 0, OpensKeyOptions, _pKeyOut) != ERROR_SUCCESS)
+ {
+ return FALSE;
+ }
+ }
+#endif
+ return TRUE;
+}
+
+BOOL WindowsQueryRegistry(char *ParamIn1, char *ParamIn2, char *ParamIn3, char *ParamOut1, int *ParamOut2, BOOL *OuputIsREG_SZ)
+{
+ BOOL bOK = TRUE;
+ HKEY key;
+ DWORD type = 0;
+
+ if (WindowsOpenRegistry(ParamIn1, ParamIn2, &key) == FALSE)
+ {
+ return FALSE;
+ }
+
+ if ( RegQueryValueEx(key, ParamIn3, NULL, &type, NULL, NULL) == ERROR_SUCCESS )
+ {
+ if ( (type == REG_EXPAND_SZ) || (type == REG_SZ) )
+ {
+ DWORD Length = PATH_MAX;
+ char Line[PATH_MAX];
+ if (RegQueryValueEx(key, ParamIn3, NULL, &type, (LPBYTE)&Line, &Length) == ERROR_SUCCESS )
+ {
+ wsprintf(ParamOut1, "%s", Line);
+ *OuputIsREG_SZ = TRUE;
+ }
+ }
+ else
+ {
+ DWORD size = 4;
+ int Num = 0;
+ if (RegQueryValueEx(key, ParamIn3, NULL, &type, (LPBYTE)&Num, &size) == ERROR_SUCCESS )
+ {
+ *ParamOut2 = Num;
+ *OuputIsREG_SZ = FALSE;
+ }
+ }
+ }
+ else
+ {
+ bOK = FALSE;
+ }
+
+ RegCloseKey(key);
+
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
+BOOL WindowsQueryRegistryValuesList(char *ParamIn1, char *ParamIn2, int dimMax, char **ListKeys)
+{
+ HKEY key;
+ int i = 0;
+
+ if (WindowsOpenRegistry(ParamIn1, ParamIn2, &key) == FALSE)
+ {
+ return FALSE;
+ }
+
+ for (i = 0; i < dimMax; i++)
+ {
+ TCHAR achKey[MAX_KEY_LENGTH];
+ DWORD cbName = MAX_KEY_LENGTH;
+ DWORD Type = 0;
+ DWORD retCode = 0;
+
+ retCode = RegEnumValue(key, i,
+ achKey,
+ &cbName,
+ NULL,
+ &Type,
+ NULL,
+ NULL);
+
+ if (retCode != ERROR_SUCCESS)
+ {
+ RegCloseKey(key);
+ return FALSE;
+ }
+ else
+ {
+ ListKeys[i] = strdup(achKey);
+ }
+ }
+
+ RegCloseKey(key);
+
+ return TRUE;
+}
+
+BOOL WindowsQueryRegistryKeysList(char *ParamIn1, char *ParamIn2, int dimMax, char **ListKeys)
+{
+ HKEY key;
+ int i = 0;
+
+ if (WindowsOpenRegistry(ParamIn1, ParamIn2, &key) == FALSE)
+ {
+ return FALSE;
+ }
+
+ for (i = 0; i < dimMax; i++)
+ {
+ TCHAR achKey[MAX_KEY_LENGTH];
+ DWORD cbName = MAX_KEY_LENGTH;
+
+ LONG Err = RegEnumKey(key, i, achKey, cbName);
+ if (Err != ERROR_SUCCESS)
+ {
+ RegCloseKey(key);
+ return FALSE;
+ }
+ else
+ {
+ ListKeys[i] = strdup(achKey);
+ }
+ }
+
+ RegCloseKey(key);
+
+ return TRUE;
+}
+/*--------------------------------------------------------------------------*/
+HKEY GetHkeyrootFromString(char *string)
+{
+ if ( strcmp(string, "HKEY_CLASSES_ROOT") == 0 || strcmp(string, "HKCR") == 0)
+ {
+ return HKEY_CLASSES_ROOT;
+ }
+
+ if ( strcmp(string, "HKEY_CURRENT_USER") == 0 || strcmp(string, "HKCU") == 0 )
+ {
+ return HKEY_CURRENT_USER;
+ }
+
+ if ( strcmp(string, "HKEY_LOCAL_MACHINE") == 0 || strcmp(string, "HKLM") == 0 )
+ {
+ return HKEY_LOCAL_MACHINE;
+ }
+
+ if ( strcmp(string, "HKEY_USERS") == 0 || strcmp(string, "HKU") == 0 )
+ {
+ return HKEY_USERS;
+ }
+
+ if ( strcmp(string, "HKEY_DYN_DATA") == 0 || strcmp(string, "HKDD") == 0 )
+ {
+ return HKEY_DYN_DATA;
+ }
+
+ if ( strcmp(string, "HKEY_CURRENT_CONFIG") == 0 || strcmp(string, "HKCC") == 0 )
+ {
+ return HKEY_CURRENT_CONFIG;
+ }
+
+ return NULL;
+}
+/*--------------------------------------------------------------------------*/
+static BOOL WindowsQueryRegistryNumberOfItemsInList(char *ParamIn1, char *ParamIn2, int* _piKeyNumber, int* _piValueNumber)
+{
+ BOOL bOK = TRUE;
+
+ HKEY key;
+ DWORD retCode = 0;
+
+ TCHAR achClass[PATH_MAX] = TEXT(""); // buffer for class name
+ DWORD cchClassName = PATH_MAX; // size of class string
+ DWORD cSubKeys = 0; // number of subkeys
+ DWORD cbMaxSubKey = 0; // longest subkey size
+ DWORD cchMaxClass = 0; // longest class string
+ DWORD cValues = 0; // number of values for key
+ DWORD cchMaxValue = 0; // longest value name
+ DWORD cbMaxValueData = 0; // longest value data
+ DWORD cbSecurityDescriptor = 0; // size of security descriptor
+ FILETIME ftLastWriteTime; // last write time
+
+ if (WindowsOpenRegistry(ParamIn1, ParamIn2, &key) == FALSE)
+ {
+ return FALSE;
+ }
+
+ retCode = RegQueryInfoKey(
+ key, // key handle
+ achClass, // buffer for class name
+ &cchClassName, // size of class string
+ NULL, // reserved
+ &cSubKeys, // number of subkeys
+ &cbMaxSubKey, // longest subkey size
+ &cchMaxClass, // longest class string
+ &cValues, // number of values for this key
+ &cchMaxValue, // longest value name
+ &cbMaxValueData, // longest value data
+ &cbSecurityDescriptor, // security descriptor
+ &ftLastWriteTime); // last write time
+
+ if (retCode != ERROR_SUCCESS)
+ {
+ bOK = FALSE;
+ }
+ else
+ {
+ *_piValueNumber = cValues;
+ *_piKeyNumber = cSubKeys;
+ }
+
+ RegCloseKey(key);
+
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
+BOOL WindowsQueryRegistryNumberOfValuesInList(char *ParamIn1, char *ParamIn2, int *Number)
+{
+ int iKey = 0;
+ return WindowsQueryRegistryNumberOfItemsInList(ParamIn1, ParamIn2, &iKey, Number);
+}
+/*--------------------------------------------------------------------------*/
+BOOL WindowsQueryRegistryNumberOfKeysInList(char *ParamIn1, char *ParamIn2, int *Number)
+{
+ int iValue = 0;
+ return WindowsQueryRegistryNumberOfItemsInList(ParamIn1, ParamIn2, Number, &iValue);
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/registry.h b/modules/windows_tools/src/c/registry.h
new file mode 100755
index 000000000..e688e44f1
--- /dev/null
+++ b/modules/windows_tools/src/c/registry.h
@@ -0,0 +1,86 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __REGISTY_H__
+#define __REGISTY_H__
+
+#include <Windows.h>
+#include "BOOL.h" /* BOOL */
+
+/**
+* WindowsQueryRegistry
+* Query a value in a registry key
+* @param[in] ParamIn1 (HKEY)
+* @param[in] ParamIn2 (SUBKEY)
+* @param[in] ParamIn3 (value name)
+* @param[out] ParamOut1 (value REG_SZ format)
+* @param[out] ParamOut2 (value int)
+* @param[out] OuputIsREG_SZ
+* @return TRUE or FALSE
+*/
+BOOL WindowsQueryRegistry(char *ParamIn1, char *ParamIn2, char *ParamIn3, char *ParamOut1, int *ParamOut2, BOOL *OuputIsREG_SZ);
+
+/**
+* WindowsQueryRegistryValuesList
+* Query a list of values in a registry key
+* @param[in] ParamIn1 (HKEY)
+* @param[in] ParamIn2 (SUBKEY)
+* @param[in] dimMax
+* @param[out] ListKeys (values)
+* @return TRUE or FALSE
+*/
+BOOL WindowsQueryRegistryValuesList(char *ParamIn1, char *ParamIn2, int dimMax, char **ListKeys);
+
+/**
+* WindowsQueryRegistryKeysList
+* Query a list of values in a registry key
+* @param[in] ParamIn1 (HKEY)
+* @param[in] ParamIn2 (SUBKEY)
+* @param[in] dimMax
+* @param[out] ListKeys (values)
+* @return TRUE or FALSE
+*/
+BOOL WindowsQueryRegistryKeysList(char *ParamIn1, char *ParamIn2, int dimMax, char **ListKeys);
+
+
+/**
+* WindowsQueryRegistryNumberOfElementsInList
+* get numbers of elements in a list
+* @param[in] ParamIn1 (HKEY)
+* @param[in] ParamIn2 (SUBKEY)
+* @param[out] Number
+* @return TRUE or FALSE
+*/
+BOOL WindowsQueryRegistryNumberOfValuesInList(char *ParamIn1, char *ParamIn2, int *Number);
+
+/**
+* WindowsQueryRegistryNumberOfKeysInList
+* get numbers of Key in a list
+* @param[in] ParamIn1 (HKEY)
+* @param[in] ParamIn2 (SUBKEY)
+* @param[out] Number
+* @return TRUE or FALSE
+*/
+BOOL WindowsQueryRegistryNumberOfKeysInList(char *ParamIn1, char *ParamIn2, int *Number);
+
+/**
+* GetHkeyrootFromString
+* convert string value to HKEY
+* @param[in] string example "HKEY_CLASSES_ROOT"
+* @return HKEY
+*/
+HKEY GetHkeyrootFromString(char *string);
+
+
+#endif /* __REGISTY_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/resource.h b/modules/windows_tools/src/c/resource.h
new file mode 100755
index 000000000..0695c9521
--- /dev/null
+++ b/modules/windows_tools/src/c/resource.h
@@ -0,0 +1,23 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - 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.1-en.txt
+
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by windows_tools.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/modules/windows_tools/src/c/resources/bin.ico b/modules/windows_tools/src/c/resources/bin.ico
new file mode 100755
index 000000000..275ce25b0
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/bin.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/cos.ico b/modules/windows_tools/src/c/resources/cos.ico
new file mode 100755
index 000000000..1f00acf02
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/cos.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/cosf.ico b/modules/windows_tools/src/c/resources/cosf.ico
new file mode 100755
index 000000000..169b3da4e
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/cosf.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/dem.ico b/modules/windows_tools/src/c/resources/dem.ico
new file mode 100755
index 000000000..7758a16d5
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/dem.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/graph.ico b/modules/windows_tools/src/c/resources/graph.ico
new file mode 100755
index 000000000..7e5d9d841
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/graph.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/sav.ico b/modules/windows_tools/src/c/resources/sav.ico
new file mode 100755
index 000000000..400610377
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/sav.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/sce.ico b/modules/windows_tools/src/c/resources/sce.ico
new file mode 100755
index 000000000..e07eb8d4d
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/sce.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/sci.ico b/modules/windows_tools/src/c/resources/sci.ico
new file mode 100755
index 000000000..1472d23fe
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/sci.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/scilab.ico b/modules/windows_tools/src/c/resources/scilab.ico
new file mode 100755
index 000000000..eb34764a4
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/scilab.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/scilab_splashscreen.bmp b/modules/windows_tools/src/c/resources/scilab_splashscreen.bmp
new file mode 100755
index 000000000..90ccae9a4
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/scilab_splashscreen.bmp
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/sod.ico b/modules/windows_tools/src/c/resources/sod.ico
new file mode 100755
index 000000000..9e1d91b3c
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/sod.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/tst.ico b/modules/windows_tools/src/c/resources/tst.ico
new file mode 100755
index 000000000..3fe07becc
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/tst.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/xcos.ico b/modules/windows_tools/src/c/resources/xcos.ico
new file mode 100755
index 000000000..f6e7f8d28
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/xcos.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/resources/zcos.ico b/modules/windows_tools/src/c/resources/zcos.ico
new file mode 100755
index 000000000..13947e6eb
--- /dev/null
+++ b/modules/windows_tools/src/c/resources/zcos.ico
Binary files differ
diff --git a/modules/windows_tools/src/c/scilab_windows/ConvertSlash.c b/modules/windows_tools/src/c/scilab_windows/ConvertSlash.c
new file mode 100755
index 000000000..c1c514564
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/ConvertSlash.c
@@ -0,0 +1,69 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - 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.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#include <string.h>
+#include "BOOL.h"
+#include "dynlib_scilab_windows.h"
+/*--------------------------------------------------------------------------*/
+#define UNIX_SEPATATOR '/'
+#define WINDOWS_SEPATATOR '\\'
+/*--------------------------------------------------------------------------*/
+static BOOL convertSlash(char *path_in, char *path_out, BOOL slashToAntislash);
+/*--------------------------------------------------------------------------*/
+SCILAB_WINDOWS_IMPEXP BOOL slashToAntislash(char *pathunix, char *pathwindows)
+{
+ return convertSlash(pathunix, pathwindows, TRUE);
+}
+/*--------------------------------------------------------------------------*/
+SCILAB_WINDOWS_IMPEXP BOOL AntislashToSlash(char *pathwindows, char *pathunix)
+{
+ return convertSlash(pathwindows, pathunix, FALSE);
+}
+/*--------------------------------------------------------------------------*/
+static BOOL convertSlash(char *path_in, char *path_out, BOOL slashToAntislash)
+{
+ BOOL bOK = FALSE;
+ if ( (path_in) && (path_out) )
+ {
+ int i = 0;
+ int len_path_out = 0;
+ strcpy(path_out, path_in);
+ len_path_out = (int)strlen(path_out);
+
+ for (i = 0; i < len_path_out; i++)
+ {
+ if ( slashToAntislash )
+ {
+ if (path_in[i] == UNIX_SEPATATOR)
+ {
+ path_out[i] = WINDOWS_SEPATATOR;
+ bOK = TRUE;
+ }
+ }
+ else
+ {
+ if (path_in[i] == WINDOWS_SEPATATOR)
+ {
+ path_out[i] = UNIX_SEPATATOR;
+ bOK = TRUE;
+ }
+ }
+ }
+ }
+ else
+ {
+ return FALSE;
+ }
+
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/DllmainScilab_Windows.c b/modules/windows_tools/src/c/scilab_windows/DllmainScilab_Windows.c
new file mode 100755
index 000000000..422524069
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/DllmainScilab_Windows.c
@@ -0,0 +1,34 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-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/modules/windows_tools/src/c/scilab_windows/FilesAssociations.c b/modules/windows_tools/src/c/scilab_windows/FilesAssociations.c
new file mode 100755
index 000000000..e903fd536
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/FilesAssociations.c
@@ -0,0 +1,332 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - Allan CORNET
+* Copyright (C) DIGITEO - 2009-2010 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include "TextToPrint.h"
+#include <windows.h>
+#include <Winuser.h>
+#include <shlwapi.h>
+#include "version.h"
+#include "FilesAssociations.h"
+#include "MALLOC.h"
+#include "FindScilab.h"
+#include "wmcopydata.h"
+#include "strdup_windows.h"
+#include "MutexClosingScilab.h"
+#include "with_module.h"
+#include "FileExist.h"
+#include "getshortpathname.h"
+/*--------------------------------------------------------------------------*/
+static void ReplaceSlash(char *pathout, char *pathin);
+static void ExtensionFileIntoLowerCase(char *fichier);
+static BOOL isGoodExtension(char *chainefichier, char *ext);
+static BOOL IsAScicosFileCOS(char *chainefichier);
+static BOOL IsAScicosFileCOSF(char *chainefichier);
+static BOOL IsAScicosFileXCOS(char *chainefichier);
+static BOOL IsAScicosFileZCOS(char *chainefichier);
+static BOOL IsASciNotesFileSCE(char *chainefichier);
+static BOOL IsASciNotesFileSCI(char *chainefichier);
+static BOOL IsASciNotesFileTST(char *chainefichier);
+/*--------------------------------------------------------------------------*/
+#define MSG_SCIMSG1 "%s -e load(getlongpathname('%s'));disp(getlongpathname('%s')+ascii(32)+'loaded');"
+#define MSG_SCIMSG2_XCOS "%s -e xcos(getlongpathname('%s'));"
+#define MSG_SCIMSG3_XCOS "execstr('xcos(getlongpathname(''%s''));','errcatch');"
+#define MSG_SCIMSG4 "%s -e exec(getlongpathname('%s'));"
+#define MSG_SCIMSG5_EDITOR "%s -e editor(getlongpathname('%s'));"
+/* we try to launch scilab editor */
+#define MSG_SCIMSG6_EDITOR "execstr('editor(getlongpathname(''%s''));','errcatch');"
+#define MSG_SCIMSG7 "Scilab Communication"
+/*--------------------------------------------------------------------------*/
+/* Teste si le fichier a une extension .sav ou .bin*/
+/* retourne TRUE si c'est le cas sinon FALSE */
+BOOL IsABinOrSavFile(char *chainefichier)
+{
+ if (isGoodExtension(chainefichier, ".BIN") || isGoodExtension(chainefichier, ".SAV")
+ || isGoodExtension(chainefichier, ".SOD"))
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
+BOOL IsAScicosFile(char *chainefichier)
+{
+ if (IsAScicosFileCOS(chainefichier) ||
+ IsAScicosFileCOSF(chainefichier) ||
+ IsAScicosFileXCOS(chainefichier) ||
+ IsAScicosFileZCOS(chainefichier))
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
+BOOL IsAScicosFileCOS(char *chainefichier)
+{
+ return isGoodExtension(chainefichier, ".COS");
+}
+/*--------------------------------------------------------------------------*/
+BOOL IsAScicosFileCOSF(char *chainefichier)
+{
+ return isGoodExtension(chainefichier, ".COSF");
+}
+/*--------------------------------------------------------------------------*/
+BOOL IsAScicosFileXCOS(char *chainefichier)
+{
+ return isGoodExtension(chainefichier, ".XCOS");
+}
+/*--------------------------------------------------------------------------*/
+BOOL IsAScicosFileZCOS(char *chainefichier)
+{
+ return isGoodExtension(chainefichier, ".ZCOS");
+}
+/*--------------------------------------------------------------------------*/
+BOOL IsASciNotesFile(char *chainefichier)
+{
+ if (IsASciNotesFileSCE(chainefichier) ||
+ IsASciNotesFileSCI(chainefichier) ||
+ IsASciNotesFileTST(chainefichier))
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
+BOOL IsASciNotesFileSCE(char *chainefichier)
+{
+ return isGoodExtension(chainefichier, ".SCE");
+}
+/*--------------------------------------------------------------------------*/
+BOOL IsASciNotesFileSCI(char *chainefichier)
+{
+ return isGoodExtension(chainefichier, ".SCI");
+}
+/*--------------------------------------------------------------------------*/
+BOOL IsASciNotesFileTST(char *chainefichier)
+{
+ return isGoodExtension(chainefichier, ".TST");
+}
+/*--------------------------------------------------------------------------*/
+int CommandByFileExtension(char *fichier, int OpenCode, char *Cmd)
+{
+ int ReturnedValue = 0;
+ if (FileExist(fichier))
+ {
+ BOOL bConverted = FALSE;
+ char FinalFileName[(MAX_PATH * 2) + 1];
+ char *ShortPath = NULL;
+ char PathWScilex[(MAX_PATH * 2) + 1];
+
+
+ /* Recuperation du nom du fichier au format 8.3 */
+ ShortPath = getshortpathname(fichier, &bConverted);
+ GetShortPathName(fichier, ShortPath, MAX_PATH);
+ ReplaceSlash(FinalFileName, ShortPath);
+ if (ShortPath)
+ {
+ FREE(ShortPath);
+ ShortPath = NULL;
+ }
+
+ GetModuleFileName ((HINSTANCE)GetModuleHandle(NULL), PathWScilex, MAX_PATH);
+ ReturnedValue = 1;
+
+ switch (OpenCode)
+ {
+ case 0:
+ default: /* -O Open file with editor */
+ {
+ if (!HaveAnotherWindowScilab() || haveMutexClosingScilab())
+ {
+ if (with_module("scinotes"))
+ {
+ wsprintf(Cmd, MSG_SCIMSG5_EDITOR, PathWScilex, FinalFileName);
+ }
+ else
+ {
+ MessageBox(NULL, "Please install editor module.", "Error", MB_ICONSTOP);
+ exit(0);
+ }
+ }
+ else
+ {
+ char *ScilabDestination = NULL;
+
+ if (with_module("scinotes"))
+ {
+ wsprintf(Cmd, MSG_SCIMSG6_EDITOR, FinalFileName);
+ }
+ else
+ {
+ MessageBox(NULL, "Please install editor module.", "Error", MB_ICONSTOP);
+ exit(0);
+ }
+
+ ScilabDestination = getLastScilabFound();
+ if (ScilabDestination)
+ {
+ SendCommandToAnotherScilab(MSG_SCIMSG7, ScilabDestination, Cmd);
+ FREE(ScilabDestination);
+ exit(0);
+ }
+ else
+ {
+ if (with_module("scinotes"))
+ {
+ wsprintf(Cmd, MSG_SCIMSG5_EDITOR, PathWScilex, FinalFileName);
+ }
+ else
+ {
+ MessageBox(NULL, "Please install editor module.", "Error", MB_ICONSTOP);
+ exit(0);
+ }
+ }
+ }
+ }
+ break;
+
+ case 1: /* -X eXecute file */
+ {
+ if (IsABinOrSavFile(FinalFileName) == TRUE)
+ {
+ /* C'est un fichier .BIN ou .SAV d'ou load */
+ wsprintf(Cmd, MSG_SCIMSG1, PathWScilex, FinalFileName, FinalFileName);
+ }
+ else
+ {
+ if (IsAScicosFile(fichier) == TRUE)
+ {
+ ExtensionFileIntoLowerCase(FinalFileName);
+ if (!HaveAnotherWindowScilab() || haveMutexClosingScilab())
+ {
+ if (with_module("xcos"))
+ {
+ wsprintf(Cmd, MSG_SCIMSG2_XCOS, PathWScilex, FinalFileName);
+ }
+ else
+ {
+ MessageBox(NULL, "Please install xcos module.", "Error", MB_ICONSTOP);
+ exit(0);
+ }
+ }
+ else
+ {
+ char *ScilabDestination = NULL;
+
+ if (with_module("xcos"))
+ {
+ wsprintf(Cmd, MSG_SCIMSG3_XCOS, FinalFileName);
+ }
+ else
+ {
+ MessageBox(NULL, "Please install xcos module.", "Error", MB_ICONSTOP);
+ exit(0);
+ }
+
+ ScilabDestination = getLastScilabFound();
+ if (ScilabDestination)
+ {
+ SendCommandToAnotherScilab(MSG_SCIMSG7, ScilabDestination, Cmd);
+ FREE(ScilabDestination);
+ exit(0);
+ }
+ else
+ {
+ if (with_module("xcos"))
+ {
+ wsprintf(Cmd, MSG_SCIMSG2_XCOS, PathWScilex, FinalFileName);
+ }
+ else
+ {
+ MessageBox(NULL, "Please install xcos module.", "Error", MB_ICONSTOP);
+ exit(0);
+ }
+ }
+ }
+ }
+ else
+ {
+ wsprintf(Cmd, MSG_SCIMSG4, PathWScilex, FinalFileName);
+ }
+ }
+ }
+ break;
+
+ case 2: /* -P Print file */
+ {
+ PrintFile(fichier);
+ strcpy(Cmd, " ");
+ exit(0);
+ }
+ break;
+ }
+ }
+ return ReturnedValue;
+}
+/*--------------------------------------------------------------------------*/
+static void ExtensionFileIntoLowerCase(char *fichier)
+{
+ char *tmpfile = NULL;
+ char *buffer = NULL;
+ char *lastdot = NULL;
+ char *ext = NULL;
+
+ tmpfile = strdup(fichier);
+ buffer = strtok(tmpfile, ".");
+ while (buffer = strtok(NULL, "."))
+ {
+ lastdot = buffer;
+ }
+ /* le dernier . permet d'avoir l'extension */
+ ext = _strlwr(lastdot); /* Fichier en Majuscule */
+
+ strcpy(&fichier[strlen(fichier) - strlen(ext)], ext);
+
+ FREE(tmpfile);
+}
+/*--------------------------------------------------------------------------*/
+static void ReplaceSlash(char *pathout, char *pathin)
+{
+ int i = 0;
+ int len_pathin = (int)strlen(pathin);
+ for (i = 0; i < len_pathin; i++)
+ {
+ if (pathin[i] == '\\')
+ {
+ pathout[i] = '/';
+ }
+ else
+ {
+ pathout[i] = pathin[i];
+ }
+ }
+ pathout[i] = '\0';
+}
+/*--------------------------------------------------------------------------*/
+static BOOL isGoodExtension(char *chainefichier, char *ext)
+{
+ char *ExtensionFilename = PathFindExtension(chainefichier);
+ if (ExtensionFilename)
+ {
+ if (_stricmp(ExtensionFilename, ext) == 0)
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/FilesAssociations.h b/modules/windows_tools/src/c/scilab_windows/FilesAssociations.h
new file mode 100755
index 000000000..9423f70ef
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/FilesAssociations.h
@@ -0,0 +1,51 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __FILEASSOCIATION_H__
+#define __FILEASSOCIATION_H__
+
+#include "dynlib_scilab_windows.h"
+#include "BOOL.h" /* BOOL */
+/*--------------------------------------------------------------------------*/
+/**
+* check if it is a .bin or .sav
+* @param[in]
+* @return TRUE or FALSE
+*/
+SCILAB_WINDOWS_IMPEXP BOOL IsABinOrSavFile(char *chainefichier);
+
+/**
+* check if it is a scicos file
+* @param[in]
+* @return TRUE or FALSE
+*/
+SCILAB_WINDOWS_IMPEXP BOOL IsAScicosFile(char *chainefichier);
+
+/**
+* check if it is a SciNotes file
+* @param[in]
+* @return TRUE or FALSE
+*/
+SCILAB_WINDOWS_IMPEXP BOOL IsASciNotesFile(char *chainefichier);
+
+/**
+* get command to do by file extension
+* @param[in]
+* @param[in]
+* @param[out]
+* @return TRUE or FALSE
+*/
+SCILAB_WINDOWS_IMPEXP int CommandByFileExtension(char *fichier, int OpenCode, char *Cmd);
+
+#endif /* __FILEASSOCIATION_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/FindScilab.c b/modules/windows_tools/src/c/scilab_windows/FindScilab.c
new file mode 100755
index 000000000..af070be0d
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/FindScilab.c
@@ -0,0 +1,75 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include <string.h>
+#include "FindScilab.h"
+#include "version.h"
+#include "MALLOC.h"
+#include "WndThread.h"
+#include "strdup_windows.h"
+/*--------------------------------------------------------------------------*/
+#define LineMax 255
+#define NumberScilabMax 10
+/*--------------------------------------------------------------------------*/
+static char BeginningHiddenScilabWindow[LineMax];
+static char ListScilabName[NumberScilabMax][LineMax];
+static char ListHiddenScilabName[NumberScilabMax][LineMax];
+static int NumberScilab = 0;
+static BOOL MoreMaxNumberScilabMax = FALSE;
+/*--------------------------------------------------------------------------*/
+BOOL HaveAnotherWindowScilab(void)
+{
+ BOOL Retour = FALSE;
+ HWND CurrenthWnd = NULL;
+
+ wsprintf(BeginningHiddenScilabWindow, FORMAT_TITLE_HIDDEN_WINDOWS, SCI_VERSION_STRING, 0);
+ /* scilab-5.0 hidden window */
+ BeginningHiddenScilabWindow[strlen(BeginningHiddenScilabWindow) - 4] = '\0';
+
+ CurrenthWnd = GetWindow(GetDesktopWindow(), GW_CHILD);
+ CurrenthWnd = GetWindow(CurrenthWnd, GW_HWNDFIRST);
+
+ while ( CurrenthWnd != NULL )
+ {
+ char Title[LineMax];
+
+ GetWindowText(CurrenthWnd, Title, (int)strlen(BeginningHiddenScilabWindow) + 1);
+ if (strcmp(Title, BeginningHiddenScilabWindow) == 0)
+ {
+ GetWindowText(CurrenthWnd, Title, LineMax);
+ if (NumberScilab < NumberScilabMax)
+ {
+ wsprintf(ListHiddenScilabName[NumberScilab], "%s", Title);
+ }
+ else
+ {
+ MoreMaxNumberScilabMax = TRUE;
+ }
+ NumberScilab++;
+ Retour = TRUE;
+ }
+ CurrenthWnd = GetWindow(CurrenthWnd, GW_HWNDNEXT);
+ }
+ return Retour;
+}
+/*--------------------------------------------------------------------------*/
+char * getLastScilabFound(void)
+{
+ return strdup(ListHiddenScilabName[0]);
+}
+/*--------------------------------------------------------------------------*/
+char * getFirstScilabFound(void)
+{
+ return strdup(ListHiddenScilabName[NumberScilab - 1]);
+}
+/*--------------------------------------------------------------------------*/ \ No newline at end of file
diff --git a/modules/windows_tools/src/c/scilab_windows/FindScilab.h b/modules/windows_tools/src/c/scilab_windows/FindScilab.h
new file mode 100755
index 000000000..f66a85354
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/FindScilab.h
@@ -0,0 +1,39 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __FINDSCILAB_H__
+#define __FINDSCILAB_H__
+
+#include "dynlib_scilab_windows.h"
+#include "BOOL.h" /* BOOL */
+
+/**
+* Check if exists another scilab window
+* @return TRUE or FALSE
+*/
+SCILAB_WINDOWS_IMPEXP BOOL HaveAnotherWindowScilab(void);
+
+/**
+* returns name of the first Scilab found
+* @return name
+*/
+SCILAB_WINDOWS_IMPEXP char * getFirstScilabFound(void);
+
+/**
+* returns name of the last Scilab found
+* @return name
+*/
+SCILAB_WINDOWS_IMPEXP char * getLastScilabFound(void);
+
+#endif /*__FINDSCILAB_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/FocusOnConsole.c b/modules/windows_tools/src/c/scilab_windows/FocusOnConsole.c
new file mode 100755
index 000000000..d1d5b6c95
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/FocusOnConsole.c
@@ -0,0 +1,30 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2008 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include "dynlib_scilab_windows.h"
+#include "scilabmode.h"
+/*--------------------------------------------------------------------------*/
+SCILAB_WINDOWS_IMPEXP void setFocusOnConsole(void)
+{
+ if ( (getScilabMode() == SCILAB_NW) || (getScilabMode() == SCILAB_NWNI) )
+ {
+ HWND hWndConsole = GetConsoleWindow();
+ if (hWndConsole)
+ {
+ SetForegroundWindow(hWndConsole);
+ SetActiveWindow(hWndConsole);
+ }
+ }
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/Gui_Import.def b/modules/windows_tools/src/c/scilab_windows/Gui_Import.def
new file mode 100755
index 000000000..6b4b324f5
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/Gui_Import.def
@@ -0,0 +1,9 @@
+LIBRARY scigui.dll
+
+
+EXPORTS
+;
+normalMainWindow
+maximizeMainWindow
+iconifyMainWindow
+setVisibleMainWindow
diff --git a/modules/windows_tools/src/c/scilab_windows/InnosetupMutex.c b/modules/windows_tools/src/c/scilab_windows/InnosetupMutex.c
new file mode 100755
index 000000000..98fa2cff8
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/InnosetupMutex.c
@@ -0,0 +1,45 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 2008 - Allan CORNET
+* Copyright (C) DIGITEO - 2012 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include "InnosetupMutex.h"
+#include "BOOL.h"
+#include "version.h"
+/*--------------------------------------------------------------------------*/
+static HANDLE hMutexScilabID;
+/*--------------------------------------------------------------------------*/
+void createInnosetupMutex(void)
+{
+ /* http://www.vincenzo.net/isxkb/index.php?title=Application_considerations */
+ /* creates a named mutex used by Innosetup */
+ hMutexScilabID = CreateMutex (NULL, FALSE, SCI_VERSION_STRING );
+}
+/*--------------------------------------------------------------------------*/
+void closeInnosetupMutex(void)
+{
+ /* close named mutex */
+ CloseHandle(hMutexScilabID);
+}
+/*--------------------------------------------------------------------------*/
+BOOL haveInnosetupMutex(void)
+{
+ HANDLE hMutex = OpenMutex(MUTEX_ALL_ACCESS, FALSE, SCI_VERSION_STRING);
+ if (hMutex)
+ {
+ CloseHandle(hMutex);
+ return TRUE;
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/InnosetupMutex.h b/modules/windows_tools/src/c/scilab_windows/InnosetupMutex.h
new file mode 100755
index 000000000..3b44be703
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/InnosetupMutex.h
@@ -0,0 +1,38 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 2008 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __INNOSETUPMUTEX_H__
+#define __INNOSETUPMUTEX_H__
+
+#include "dynlib_scilab_windows.h"
+
+/*--------------------------------------------------------------------------*/
+/**
+* Create a named Mutex used by Innosetup
+* http://www.vincenzo.net/isxkb/index.php?title=Application_considerations
+*/
+SCILAB_WINDOWS_IMPEXP void createInnosetupMutex(void);
+
+/**
+* Close named Mutex used by Innosetup
+*/
+SCILAB_WINDOWS_IMPEXP void closeInnosetupMutex(void);
+
+/**
+* Check if named Mutex used by Innosetup exists
+*/
+SCILAB_WINDOWS_IMPEXP BOOL haveInnosetupMutex(void);
+
+/*--------------------------------------------------------------------------*/
+
+#endif /* __INNOSETUPMUTEX_H__ */
diff --git a/modules/windows_tools/src/c/scilab_windows/Localization_Import.def b/modules/windows_tools/src/c/scilab_windows/Localization_Import.def
new file mode 100755
index 000000000..d4654096e
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/Localization_Import.def
@@ -0,0 +1,10 @@
+LIBRARY scilocalization.dll
+
+
+EXPORTS
+;
+wide_string_to_UTF8
+to_wide_string
+setLanguageFromCommandLine
+IsValidUTF8
+
diff --git a/modules/windows_tools/src/c/scilab_windows/MutexClosingScilab.c b/modules/windows_tools/src/c/scilab_windows/MutexClosingScilab.c
new file mode 100755
index 000000000..9fa9ecf77
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/MutexClosingScilab.c
@@ -0,0 +1,77 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2008 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include "MALLOC.h"
+#include "MutexClosingScilab.h"
+#include "version.h"
+/*--------------------------------------------------------------------------*/
+static HANDLE hMutexClosingScilabID = NULL;
+/*--------------------------------------------------------------------------*/
+static char *getClosingScilabMutexName(void);
+/*--------------------------------------------------------------------------*/
+void createMutexClosingScilab(void)
+{
+ char *mutexname = getClosingScilabMutexName();
+ if (mutexname)
+ {
+ HANDLE hMutex = NULL;
+ hMutex = OpenMutex(MUTEX_ALL_ACCESS, FALSE, mutexname);
+ /* checks if a previous Mutex exists */
+ if (!hMutex)
+ {
+ hMutexClosingScilabID = CreateMutex (NULL, FALSE, mutexname);
+ }
+ FREE(mutexname);
+ mutexname = NULL;
+ }
+}
+/*--------------------------------------------------------------------------*/
+void terminateMutexClosingScilab(void)
+{
+ /* close named mutex */
+ if (hMutexClosingScilabID)
+ {
+ CloseHandle(hMutexClosingScilabID);
+ }
+}
+/*--------------------------------------------------------------------------*/
+BOOL haveMutexClosingScilab(void)
+{
+ char *mutexname = getClosingScilabMutexName();
+ if (mutexname)
+ {
+ HANDLE hMutex;
+ hMutex = OpenMutex(MUTEX_ALL_ACCESS, FALSE, mutexname);
+ FREE(mutexname);
+ mutexname = NULL;
+ if (hMutex)
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
+static char *getClosingScilabMutexName(void)
+{
+ int lenmutexname = (int)(strlen(CLOSING_SCILAB_MUTEX_NAME) + strlen(SCI_VERSION_STRING) + 1);
+ char *mutexname = (char*)MALLOC(sizeof(char) * lenmutexname);
+ if (mutexname)
+ {
+ strcpy(mutexname, CLOSING_SCILAB_MUTEX_NAME);
+ strcat(mutexname, SCI_VERSION_STRING);
+ }
+ return mutexname;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/SetHeapOptions.c b/modules/windows_tools/src/c/scilab_windows/SetHeapOptions.c
new file mode 100755
index 000000000..4e15d000a
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/SetHeapOptions.c
@@ -0,0 +1,54 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include "SetHeapOptions.h"
+/* http://msdn.microsoft.com/en-us/library/bb430720.aspx */
+/*--------------------------------------------------------------------------*/
+typedef BOOL (WINAPI *HSI) (HANDLE, HEAP_INFORMATION_CLASS , PVOID, SIZE_T);
+/*--------------------------------------------------------------------------*/
+BOOL SetHeapOptions(void)
+{
+#ifdef _DEBUG
+ HMODULE hLib = LoadLibrary(TEXT("kernel32.dll"));
+ if (hLib == NULL)
+ {
+ return FALSE;
+ }
+ else
+ {
+ BOOL fRet = FALSE;
+ HSI pHsi = (HSI)GetProcAddress(hLib, "HeapSetInformation");
+ if (!pHsi)
+ {
+ FreeLibrary(hLib);
+ return FALSE;
+ }
+#ifndef HeapEnableTerminationOnCorruption
+#define HeapEnableTerminationOnCorruption (HEAP_INFORMATION_CLASS)1
+#endif
+
+ fRet = (pHsi)(NULL, HeapEnableTerminationOnCorruption, NULL, 0) ? TRUE : FALSE;
+
+ if (hLib)
+ {
+ FreeLibrary(hLib);
+ }
+
+ return fRet;
+ }
+#else
+ return FALSE;
+#endif
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/SetHeapOptions.h b/modules/windows_tools/src/c/scilab_windows/SetHeapOptions.h
new file mode 100755
index 000000000..2d3429ae0
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/SetHeapOptions.h
@@ -0,0 +1,30 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - 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.1-en.txt
+ *
+ */
+
+/*--------------------------------------------------------------------------*/
+#ifndef __SETHEAPOPTIONS_H__
+#define __SETHEAPOPTIONS_H__
+
+#include "dynlib_scilab_windows.h"
+#include "BOOL.h"
+
+/**
+ * Heap corruption detection is the ability to fail an application if
+ * the heap manager detects that the application has corrupted the heap.
+ * Only on Vista and debug mode.
+ * @return TRUE if it is enabled.
+ */
+
+SCILAB_WINDOWS_IMPEXP BOOL SetHeapOptions(void);
+
+#endif /* __SETHEAPOPTIONS_H__ */
+/*--------------------------------------------------------------------------*/ \ No newline at end of file
diff --git a/modules/windows_tools/src/c/scilab_windows/SetScilabEnvironmentVariables.c b/modules/windows_tools/src/c/scilab_windows/SetScilabEnvironmentVariables.c
new file mode 100755
index 000000000..08bd0e6ac
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/SetScilabEnvironmentVariables.c
@@ -0,0 +1,266 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - Allan CORNET
+* Copyright (C) DIGITEO - 2010 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include <stdio.h>
+#include "SetScilabEnvironmentVariables.h"
+#include "PATH_MAX.h"
+#include "MALLOC.h"
+#include "setgetSCIpath.h"
+#include "getScilabDirectory.h"
+#include "scilabDefaults.h"
+#include "ConvertSlash.h"
+#include "charEncoding.h"
+#include "getshortpathname.h"
+#include "stristr.h"
+#include "strsubst.h"
+/*--------------------------------------------------------------------------*/
+static BOOL IsTheGoodShell(void);
+static BOOL Set_Shell(void);
+static BOOL Set_SCI_PATH(char *DefaultPath);
+static BOOL Set_HOME_PATH(char *DefaultPath);
+static BOOL AddScilabBinDirectoryToPATHEnvironnementVariable(char *DefaultPath);
+static BOOL Set_SOME_ENVIRONMENTS_VARIABLES_FOR_SCILAB(void);
+/*--------------------------------------------------------------------------*/
+/**
+* Set some environment variablesSCI, and some others
+*/
+void SciEnvForWindows(void)
+{
+ char *SCIPathName = getScilabDirectory(TRUE);
+
+ /* Correction Bug 1579 */
+ if (!IsTheGoodShell())
+ {
+ if ( (!Set_Shell()) || (!IsTheGoodShell()))
+ {
+ MessageBox(NULL,
+ "Please modify ""ComSpec"" environment variable.\ncmd.exe on W2K and more.",
+ "Warning", MB_ICONWARNING | MB_OK);
+ }
+ }
+
+ SetScilabEnvironmentVariables(SCIPathName);
+ if (SCIPathName)
+ {
+ FREE(SCIPathName);
+ SCIPathName = NULL;
+ }
+}
+/*--------------------------------------------------------------------------*/
+/* set env variables (used when calling scilab from * other programs) */
+void SetScilabEnvironmentVariables(char *DefaultSCIPATH)
+{
+ if (DefaultSCIPATH)
+ {
+ Set_SCI_PATH(DefaultSCIPATH);
+ Set_HOME_PATH(DefaultSCIPATH);
+ Set_SOME_ENVIRONMENTS_VARIABLES_FOR_SCILAB();
+ AddScilabBinDirectoryToPATHEnvironnementVariable(DefaultSCIPATH);
+ }
+ else
+ {
+ /* Error */
+ exit(1);
+ }
+
+}
+/*--------------------------------------------------------------------------*/
+BOOL Set_SCI_PATH(char *DefaultPath)
+{
+ BOOL bOK = FALSE;
+ char *ShortPath = NULL;
+
+ /* to be sure that it's unix 8.3 format */
+ /* c:/progra~1/scilab-5.0 */
+ ShortPath = getshortpathname(DefaultPath, &bOK);
+ if (ShortPath)
+ {
+ char env[PATH_MAX + 1 + 10];
+ AntislashToSlash(ShortPath, ShortPath);
+
+ sprintf (env, "SCI=%s", ShortPath);
+ setSCIpath(ShortPath);
+
+ if (ShortPath)
+ {
+ FREE(ShortPath);
+ ShortPath = NULL;
+ }
+
+ if (_putenv (env))
+ {
+ bOK = FALSE;
+ }
+ else
+ {
+ bOK = TRUE;
+ }
+ }
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
+BOOL Set_HOME_PATH(char *DefaultPath)
+{
+ wchar_t *wHOME = _wgetenv(L"HOME");
+ if (wHOME == NULL)
+ {
+ wchar_t *wUserProfile = _wgetenv(L"USERPROFILE");
+ if (wUserProfile)
+ {
+ return SetEnvironmentVariableW(L"HOME", wUserProfile);
+ }
+ else
+ {
+ /* if USERPROFILE is not defined , we use default profile */
+ wchar_t *wAllUsersProfile = _wgetenv(L"ALLUSERSPROFILE");
+ if (wAllUsersProfile)
+ {
+ return SetEnvironmentVariableW(L"HOME", wUserProfile);
+ }
+ else
+ {
+ BOOL bRes = FALSE;
+ wchar_t *wDefault = to_wide_string(DefaultPath);
+ if (wDefault)
+ {
+ bRes = SetEnvironmentVariableW(L"HOME", wDefault);
+ FREE(wDefault);
+ wDefault = NULL;
+ }
+ return bRes;
+ }
+ }
+ }
+ return TRUE;
+}
+/*--------------------------------------------------------------------------*/
+BOOL Set_SOME_ENVIRONMENTS_VARIABLES_FOR_SCILAB(void)
+{
+ BOOL bOK = TRUE;
+
+#ifdef _MSC_VER
+ _putenv ("COMPILER=VC++");
+#endif
+
+ /* WIN32 variable Environment */
+#ifdef _WIN32
+ _putenv ("WIN32=OK");
+#endif
+
+ /* WIN64 variable Environment */
+#ifdef _WIN64
+ _putenv ("WIN64=OK");
+#endif
+
+ if ( GetSystemMetrics(SM_REMOTESESSION) )
+ {
+ _putenv ("SCILAB_MSTS_SESSION=OK");
+ }
+
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
+BOOL IsTheGoodShell(void)
+{
+ char shellCmd[PATH_MAX];
+ char drive[_MAX_DRIVE];
+ char dir[_MAX_DIR];
+ char fname[_MAX_FNAME];
+ char ext[_MAX_EXT];
+
+ strcpy(shellCmd, "");
+ strcpy(fname, "");
+ GetEnvironmentVariable("ComSpec", shellCmd, PATH_MAX);
+ _splitpath(shellCmd, drive, dir, fname, ext);
+
+ if (_stricmp(fname, "cmd") == 0)
+ {
+ return TRUE;
+ }
+
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
+BOOL Set_Shell(void)
+{
+ BOOL bOK = FALSE;
+ char env[_MAX_DRIVE + _MAX_DIR + _MAX_FNAME + _MAX_EXT + 10];
+ char *WINDIRPATH = NULL;
+
+ WINDIRPATH = getenv ("SystemRoot");
+ sprintf(env, "ComSpec=%s\\system32\\cmd.exe", WINDIRPATH);
+
+ if (_putenv (env))
+ {
+ bOK = FALSE;
+ }
+ else
+ {
+ bOK = TRUE;
+ }
+
+ if (WINDIRPATH)
+ {
+ FREE(WINDIRPATH);
+ WINDIRPATH = NULL;
+ }
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
+static BOOL AddScilabBinDirectoryToPATHEnvironnementVariable(char *DefaultPath)
+{
+#define SCILAB_BIN_PATH "%s/bin"
+#define NEW_PATH "PATH=%s;%s"
+
+ BOOL bOK = FALSE;
+ char *PATH = NULL;
+ char *env = NULL;
+ char scilabBinPath[MAX_PATH];
+ char *scilabBinPathConverted;
+
+ PATH = getenv("PATH");
+
+ env = (char*) MALLOC(sizeof(char) * (strlen(NEW_PATH) + strlen(PATH) +
+ strlen(DefaultPath) + 1));
+ if (env)
+ {
+ sprintf(scilabBinPath, SCILAB_BIN_PATH, DefaultPath);
+
+ scilabBinPathConverted = (char*) MALLOC(MAX_PATH * sizeof(char));
+#ifdef _MSC_VER
+ scilabBinPathConverted = strsub(scilabBinPath, "/", "\\");
+#else
+ scilabBinPathConverted = strdup(scilabBinPath);
+#endif
+ if (stristr(PATH, scilabBinPathConverted) == 0)
+ {
+ sprintf(env, NEW_PATH, scilabBinPathConverted, PATH);
+ if (_putenv (env))
+ {
+ bOK = FALSE;
+ }
+ else
+ {
+ bOK = TRUE;
+ }
+ FREE(env);
+ env = NULL;
+ }
+
+ FREE(scilabBinPathConverted);
+ }
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/SetScilabEnvironmentVariables.h b/modules/windows_tools/src/c/scilab_windows/SetScilabEnvironmentVariables.h
new file mode 100755
index 000000000..439123fc5
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/SetScilabEnvironmentVariables.h
@@ -0,0 +1,28 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __SETSCILABENVIRONMENTVARIABLES_H__
+#define __SETSCILABENVIRONMENTVARIABLES_H__
+
+#include "dynlib_scilab_windows.h"
+
+/**
+* Set Some environment variables for Scilab (Windows)
+* @param[in] default path of scilab
+*/
+SCILAB_WINDOWS_IMPEXP void SetScilabEnvironmentVariables(char *DefaultSCIPATH);
+
+SCILAB_WINDOWS_IMPEXP void SciEnvForWindows(void);
+
+#endif /* __SETSCILABENVIRONMENTVARIABLES_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/TextToPrint.c b/modules/windows_tools/src/c/scilab_windows/TextToPrint.c
new file mode 100755
index 000000000..873cde933
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/TextToPrint.c
@@ -0,0 +1,626 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include "TextToPrint.h"
+#include "MALLOC.h"
+#include "charEncoding.h"
+#include "strdup_windows.h"
+/*--------------------------------------------------------------------------*/
+static HDC PrinterHDC = NULL;
+static char PrinterName[2048];
+static char PrinterOrientation;
+/*--------------------------------------------------------------------------*/
+HFONT EzCreateFont (HDC hdc, TCHAR * szFaceName, int iDeciPtHeight, int iDeciPtWidth, int iAttributes, BOOL fLogRes)
+{
+ FLOAT cxDpi, cyDpi ;
+ HFONT hFont ;
+ LOGFONT lf ;
+ POINT pt ;
+ TEXTMETRIC tm ;
+ SaveDC (hdc) ;
+ SetGraphicsMode (hdc, GM_ADVANCED) ;
+ ModifyWorldTransform (hdc, NULL, MWT_IDENTITY) ;
+ SetViewportOrgEx (hdc, 0, 0, NULL) ;
+ SetWindowOrgEx (hdc, 0, 0, NULL) ;
+ if (fLogRes)
+ {
+ cxDpi = (FLOAT) GetDeviceCaps (hdc, LOGPIXELSX) ;
+ cyDpi = (FLOAT) GetDeviceCaps (hdc, LOGPIXELSY) ;
+ }
+ else
+ {
+ cxDpi = (FLOAT) (25.4 * GetDeviceCaps (hdc, HORZRES) /
+ GetDeviceCaps (hdc, HORZSIZE)) ;
+ cyDpi = (FLOAT) (25.4 * GetDeviceCaps (hdc, VERTRES) /
+ GetDeviceCaps (hdc, VERTSIZE)) ;
+ }
+ pt.x = (int) (iDeciPtWidth * cxDpi / 72) ;
+ pt.y = (int) (iDeciPtHeight * cyDpi / 72) ;
+ DPtoLP (hdc, &pt, 1) ;
+
+ lf.lfHeight = - (int) (fabs (pt.y) / 10.0 + 0.5) ;
+ lf.lfWidth = 0 ;
+ lf.lfEscapement = 0 ;
+ lf.lfOrientation = 0 ;
+ lf.lfWeight = iAttributes & EZ_ATTR_BOLD ? 700 : 0 ;
+ lf.lfItalic = iAttributes & EZ_ATTR_ITALIC ? 1 : 0 ;
+ lf.lfUnderline = iAttributes & EZ_ATTR_UNDERLINE ? 1 : 0 ;
+ lf.lfStrikeOut = iAttributes & EZ_ATTR_STRIKEOUT ? 1 : 0 ;
+ lf.lfCharSet = DEFAULT_CHARSET ;
+ lf.lfOutPrecision = 0 ;
+ lf.lfClipPrecision = 0 ;
+ lf.lfQuality = 0 ;
+ lf.lfPitchAndFamily = 0 ;
+ lstrcpy (lf.lfFaceName, szFaceName) ;
+ hFont = CreateFontIndirect (&lf) ;
+ if (iDeciPtWidth != 0)
+ {
+ hFont = (HFONT) SelectObject (hdc, hFont) ;
+ GetTextMetrics (hdc, &tm) ;
+ DeleteObject (SelectObject (hdc, hFont)) ;
+ lf.lfWidth = (int) (tm.tmAveCharWidth *
+ fabs (pt.x) / fabs (pt.y) + 0.5) ;
+ hFont = CreateFontIndirect (&lf) ;
+ }
+ RestoreDC (hdc, -1) ;
+ return hFont ;
+}
+/*--------------------------------------------------------------------------*/
+void PrintString(char *lines, char *Entete)
+{
+ HDC PrintDC;
+ HFONT hFont, hOldFont;
+ HDC hDCmem;
+ DOCINFO di;
+ int TextLength = 0;
+ int i = 0;
+ int Index1 = 0;
+ int Index2 = 3;
+ int numero = 1;
+ // Extrait les informations sur la police
+ TEXTMETRIC tm;
+ int NbLigneParPage = 0;
+ int HauteurCaractere = 0;
+ int NombredeCaracteresparLignes = 0;
+
+
+ PrintDC = GetPrinterDC();
+ if (PrintDC != NULL)
+ {
+ hFont = EzCreateFont (PrintDC, TEXT ("Courier New"), 120, 0, 0, TRUE) ;
+
+ hOldFont = SelectObject(PrintDC, hFont );
+
+ hDCmem = CreateCompatibleDC(PrintDC);
+ memset( &di, 0, sizeof( DOCINFO ) );
+ di.cbSize = sizeof( DOCINFO );
+ di.lpszDocName = "Scilab Document";
+
+ TextLength = (int)strlen(lines);
+
+ GetTextMetrics(PrintDC, (TEXTMETRIC *)&tm);
+
+ NombredeCaracteresparLignes = GetDeviceCaps(PrintDC, HORZRES) / (tm.tmMaxCharWidth + 1);
+ // la valeur HauteurCaractere contient hauteur des caractres + l'interligne
+ HauteurCaractere = tm.tmHeight + tm.tmExternalLeading;
+ NbLigneParPage = GetDeviceCaps(PrintDC, VERTRES) / HauteurCaractere;
+
+ if (TextLength > 0)
+ {
+ if ( StartDoc( PrintDC, &di ) > 0 )
+ {
+ char *LignePrint = NULL;
+ LignePrint = (char*)MALLOC((NombredeCaracteresparLignes + 1) * sizeof(char));
+
+ StartPage(PrintDC);
+ PageHeader(PrintDC, Entete);
+ for (i = 0; i < TextLength; i++)
+ {
+ LignePrint[Index1] = lines[i];
+ if ( Index1 == NombredeCaracteresparLignes )
+ {
+ Index2 ++;
+ LignePrint[Index1] = '\0';
+ if (LignePrint[Index1 - 1] == '\r')
+ {
+ LignePrint[Index1 - 1] = '\0';
+ }
+ TextOut (PrintDC, (tm.tmMaxCharWidth + 10), Index2 * HauteurCaractere, LignePrint, (int)strlen(LignePrint));
+ Index1 = 0;
+ if (LignePrint)
+ {
+ FREE(LignePrint);
+ LignePrint = NULL;
+ }
+ LignePrint = (char*)MALLOC((NombredeCaracteresparLignes + 1) * sizeof(char));
+ }
+ else if ( (lines[i] == '\n') )
+ {
+ Index2 ++;
+ if (Index1 > 0)
+ {
+ LignePrint[Index1] = '\0';
+ if (LignePrint[Index1 - 1] == '\r')
+ {
+ LignePrint[Index1 - 1] = '\0';
+ }
+ TextOut (PrintDC, (tm.tmMaxCharWidth + 10), Index2 * HauteurCaractere, LignePrint, (int)strlen(LignePrint));
+ Index1 = 0;
+ }
+ if (LignePrint)
+ {
+ FREE(LignePrint);
+ LignePrint = NULL;
+ }
+ LignePrint = (char*)MALLOC((NombredeCaracteresparLignes + 1) * sizeof(char));
+ }
+ else
+ {
+ Index1 ++;
+ }
+ if (Index2 == NbLigneParPage - 4)
+ {
+ Footer(PrintDC, numero);
+ EndPage (PrintDC);
+ StartPage(PrintDC);
+ numero++;
+ PageHeader(PrintDC, Entete);
+ Index2 = 3;
+ }
+ }
+ Index2 ++;
+ LignePrint[Index1] = '\0';
+ TextOut (PrintDC, (tm.tmMaxCharWidth + 10), Index2 * HauteurCaractere, LignePrint, (int) strlen(LignePrint));
+ Footer(PrintDC, numero);
+ EndPage (PrintDC);
+ EndDoc (PrintDC);
+
+ if (LignePrint)
+ {
+ FREE(LignePrint);
+ LignePrint = NULL;
+ }
+ }
+ }
+ SelectObject(PrintDC, hOldFont );
+ }
+
+}
+/*--------------------------------------------------------------------------*/
+void PrintFile(char *filename)
+{
+#define MAXBUF 4096
+ HDC PrintDC;
+ HFONT hFont, hOldFont;
+ HDC hDCmem;
+ DOCINFO di;
+ int Index2 = 3;
+ int numero = 1;
+ // Extrait les informations sur la police
+ TEXTMETRIC tm;
+ int NbLigneParPage = 0;
+ int HauteurCaractere = 0;
+ int NombredeCaracteresparLignes = 0;
+ FILE * pFile;
+ char line[MAXBUF];
+
+ PrintDC = GetPrinterDC();
+ if (PrintDC != NULL)
+ {
+
+ hFont = EzCreateFont (PrintDC, TEXT ("Courier New"), 120, 0, 0, TRUE) ;
+ hOldFont = SelectObject(PrintDC, hFont );
+
+ hDCmem = CreateCompatibleDC(PrintDC);
+ memset( &di, 0, sizeof( DOCINFO ) );
+ di.cbSize = sizeof( DOCINFO );
+ di.lpszDocName = "Scilab Document";
+
+ GetTextMetrics(PrintDC, (TEXTMETRIC *)&tm);
+
+ NombredeCaracteresparLignes = GetDeviceCaps(PrintDC, HORZRES) / (tm.tmMaxCharWidth + 1);
+ // la valeur HauteurCaractere contient hauteur des caractres + l'interligne
+ HauteurCaractere = tm.tmHeight + tm.tmExternalLeading;
+ NbLigneParPage = GetDeviceCaps(PrintDC, VERTRES) / HauteurCaractere;
+
+ wcfopen(pFile , filename, "rt");
+
+ if (pFile)
+ {
+ if ( StartDoc( PrintDC, &di ) > 0 )
+ {
+ char *LignePrint = NULL;
+ StartPage(PrintDC);
+ PageHeader(PrintDC, filename);
+
+ while (fgets (line, sizeof(line), pFile) != NULL)
+ {
+ if (line[strlen(line) - 1] == '\n')
+ {
+ line[strlen(line) - 1] = '\0'; /* enleve le retour chariot */
+ }
+ if (line[strlen(line) - 2] == '\r')
+ {
+ line[strlen(line) - 2] = '\0'; /* enleve le retour chariot */
+ }
+
+ if ( strlen(line) > (unsigned int )NombredeCaracteresparLignes)
+ {
+ int i = 0;
+ int j = 0;
+ int subline = 0;
+ int restsubline = 0;
+ subline = (int)strlen(line) / NombredeCaracteresparLignes ;
+ restsubline = (int)strlen(line) % NombredeCaracteresparLignes ;
+
+ for (i = 0; i < subline; i++)
+ {
+ LignePrint = (char*)MALLOC( (NombredeCaracteresparLignes + 1) * sizeof(char));
+ for (j = 0; j < (NombredeCaracteresparLignes); j++)
+ {
+ if (line[(i * NombredeCaracteresparLignes) + j] == 9) /* == \t */
+ {
+ LignePrint[j] = ' ';
+ }
+ else
+ {
+ LignePrint[j] = line[(i * NombredeCaracteresparLignes) + j];
+ }
+
+ }
+ LignePrint[j] = '\0';
+
+ TextOut (PrintDC, (tm.tmMaxCharWidth + 10), Index2 * HauteurCaractere, LignePrint, (int)strlen(LignePrint));
+ if (LignePrint)
+ {
+ FREE(LignePrint);
+ LignePrint = NULL;
+ }
+ Index2 ++;
+ if (Index2 == NbLigneParPage - 4)
+ {
+ Footer(PrintDC, numero);
+ EndPage (PrintDC);
+ StartPage(PrintDC);
+ numero++;
+ PageHeader(PrintDC, filename);
+ Index2 = 3;
+ }
+ }
+ if (restsubline > 0)
+ {
+ LignePrint = (char*)MALLOC( (NombredeCaracteresparLignes + 1) * sizeof(char));
+ for (j = 0; j < (restsubline); j++)
+ {
+ if (line[(i * NombredeCaracteresparLignes) + j] == 9) /* == \t */
+ {
+ LignePrint[j] = ' ';
+ }
+ else
+ {
+ LignePrint[j] = line[(i * NombredeCaracteresparLignes) + j];
+ }
+ }
+ LignePrint[j] = '\0';
+ TextOut (PrintDC, (tm.tmMaxCharWidth + 10), Index2 * HauteurCaractere, LignePrint, (int)strlen(LignePrint));
+ if (LignePrint)
+ {
+ FREE(LignePrint);
+ LignePrint = NULL;
+ }
+ Index2 ++;
+ if (Index2 == NbLigneParPage - 4)
+ {
+ Footer(PrintDC, numero);
+ EndPage (PrintDC);
+ StartPage(PrintDC);
+ numero++;
+ PageHeader(PrintDC, filename);
+ Index2 = 3;
+ }
+ }
+ }
+ else
+ {
+ LignePrint = strdup(line);
+ TextOut (PrintDC, (tm.tmMaxCharWidth + 10), Index2 * HauteurCaractere, LignePrint, (int)strlen(LignePrint));
+ if (LignePrint)
+ {
+ FREE(LignePrint);
+ LignePrint = NULL;
+ }
+ Index2 ++;
+ if (Index2 == NbLigneParPage - 4)
+ {
+ Footer(PrintDC, numero);
+ EndPage (PrintDC);
+ StartPage(PrintDC);
+ numero++;
+ PageHeader(PrintDC, filename);
+ Index2 = 3;
+ }
+ }
+ }
+ fclose(pFile);
+
+ Footer(PrintDC, numero);
+ EndPage (PrintDC);
+ EndDoc (PrintDC);
+ }
+ }
+ SelectObject(PrintDC, hOldFont );
+ }
+}
+/*--------------------------------------------------------------------------*/
+void Footer(HDC hdc, int number)
+{
+ HPEN hPen, hPenOld;
+ LOGBRUSH lb;
+ int NombredeCaracteresparLignes = 0;
+ TEXTMETRIC tm;
+ int yChar = 0;
+ char *ptrLine = NULL;
+
+ int CySize = GetDeviceCaps(hdc, VERTRES);
+ // Initialize the pen's brush.
+ lb.lbStyle = BS_SOLID;
+ lb.lbColor = RGB(0, 0, 0);
+ lb.lbHatch = 0;
+
+ GetTextMetrics (hdc, (TEXTMETRIC *) & tm);
+ NombredeCaracteresparLignes = tm.tmMaxCharWidth + 10;
+ yChar = tm.tmHeight + tm.tmExternalLeading ;
+ ptrLine = (char*)MALLOC( (NombredeCaracteresparLignes + 1) * sizeof(char));
+
+ hPen = ExtCreatePen(PS_SOLID, 1, &lb, 0, NULL);
+ hPenOld = SelectObject(hdc, hPen);
+
+ MoveToEx(hdc, (tm.tmMaxCharWidth + 10), CySize - (yChar * 3) - 10, NULL);
+ LineTo(hdc, GetDeviceCaps(hdc, HORZRES) - (tm.tmMaxCharWidth + 10), CySize - (yChar * 3) - 10);
+
+ SelectObject(hdc, hPenOld);
+ DeleteObject(hPen);
+
+ wsprintf(ptrLine, "Page : %d", number);
+ TextOut(hdc, (tm.tmMaxCharWidth + 10), CySize - (yChar * 3), ptrLine, (int)strlen(ptrLine));
+ FREE(ptrLine);
+}
+/*--------------------------------------------------------------------------*/
+void PageHeader(HDC hdc, LPSTR Entete)
+{
+ HPEN hPen, hPenOld;
+ LOGBRUSH lb;
+
+ TEXTMETRIC tm;
+ int NbLigneParPage = 0;
+ int HauteurCaractere = 0;
+ int NombredeCaracteresparLignes = 0;
+ int NombredeLignesOccupeesparEntete = 1;
+
+ char dbuffer [9];
+ char tbuffer [9];
+ char *ptrLine = NULL;
+
+ // Initialize the pen's brush.
+ lb.lbStyle = BS_SOLID;
+ lb.lbColor = RGB(0, 0, 0);
+ lb.lbHatch = 0;
+
+ _strdate( dbuffer );
+ _strtime( tbuffer );
+
+ GetTextMetrics (hdc, (TEXTMETRIC *) & tm);
+
+ NombredeCaracteresparLignes = GetDeviceCaps(hdc, HORZRES) / (tm.tmMaxCharWidth + 10);
+ // la valeur HauteurCaractere contient hauteur des caractres + l'interligne
+ HauteurCaractere = tm.tmHeight + tm.tmExternalLeading;
+ NbLigneParPage = GetDeviceCaps(hdc, VERTRES) / HauteurCaractere;
+
+ ptrLine = (char*)MALLOC( (NombredeCaracteresparLignes + 1) * sizeof(char));
+ wsprintf(ptrLine, "%s %s %s", dbuffer, tbuffer, Entete);
+
+ TextOut(hdc, (tm.tmMaxCharWidth + 10), NombredeLignesOccupeesparEntete * HauteurCaractere, ptrLine, (int)strlen(ptrLine));
+ NombredeLignesOccupeesparEntete++;
+
+ hPen = ExtCreatePen(PS_SOLID, 1, &lb, 0, NULL);
+ hPenOld = SelectObject(hdc, hPen);
+
+ MoveToEx(hdc, (tm.tmMaxCharWidth + 10), NombredeLignesOccupeesparEntete * HauteurCaractere, NULL);
+ LineTo(hdc, GetDeviceCaps(hdc, HORZRES) - (tm.tmMaxCharWidth + 10), NombredeLignesOccupeesparEntete * HauteurCaractere);
+
+ SelectObject(hdc, hPenOld);
+ DeleteObject(hPen);
+
+ FREE(ptrLine);
+
+}
+/*--------------------------------------------------------------------------*/
+void CutLineForDisplay(char *CutLine, char *Line, int NumberOfCharByLine)
+{
+ int LenLine = lstrlen(Line);
+
+ if (LenLine > NumberOfCharByLine)
+ {
+ int NumberOfLines = lstrlen(Line) / NumberOfCharByLine;
+ int i = 0;
+ char *Buffer = NULL;
+
+ Buffer = (char*)MALLOC((LenLine + NumberOfLines + 1) * sizeof(char));
+ for (i = 0; i < NumberOfLines + 1; i++)
+ {
+ if ( i == 0)
+ {
+ lstrcpyn(Buffer, &Line[i * NumberOfCharByLine], NumberOfCharByLine);
+
+ }
+ else
+ {
+ char BufferCat[MAX_PATH];
+ lstrcpyn(BufferCat, &Line[i * NumberOfCharByLine], NumberOfCharByLine);
+ lstrcat(Buffer, BufferCat);
+
+ }
+ if (i != NumberOfLines)
+ {
+ lstrcat(Buffer, "\n");
+ }
+ }
+ lstrcpy(CutLine, Buffer);
+
+ FREE(Buffer);
+ }
+ else
+ {
+ wsprintf(CutLine, "%s", Line);
+ }
+}
+/*--------------------------------------------------------------------------*/
+BOOL ConfigurePrinterDialogBox(void)
+{
+ BOOL bOK = FALSE;
+
+ PRINTDLG pd;
+
+ if (PrinterHDC)
+ {
+ DeleteDC(PrinterHDC);
+ PrinterHDC = NULL;
+ }
+ wsprintf(PrinterName, "%s", "EMPTY");
+ PrinterOrientation = 'p';
+
+ memset (&pd, 0, sizeof (PRINTDLG));
+ pd.lStructSize = sizeof (PRINTDLG);
+ pd.hwndOwner = NULL;
+ pd.hDevMode = NULL;
+ pd.hDevNames = NULL;
+ pd.hDC = NULL;
+ pd.Flags = PD_ALLPAGES | PD_COLLATE | PD_RETURNDC | PD_USEDEVMODECOPIESANDCOLLATE | PD_NOSELECTION | PD_HIDEPRINTTOFILE | PD_NONETWORKBUTTON;
+ pd.nFromPage = 0;
+ pd.nToPage = 0;
+ pd.nMinPage = 0;
+ pd.nMaxPage = 0;
+ pd.nCopies = 1;
+ pd.hInstance = NULL;
+ pd.lCustData = 0L;
+ pd.lpfnPrintHook = NULL;
+ pd.lpfnSetupHook = NULL;
+ pd.lpPrintTemplateName = NULL;
+ pd.lpSetupTemplateName = NULL;
+ pd.hPrintTemplate = NULL;
+ pd.hSetupTemplate = NULL;
+ if (PrintDlg (&pd) == FALSE)
+ {
+ wsprintf(PrinterName, "%s", "EMPTY");
+ PrinterOrientation = 'p';
+ PrinterHDC = NULL;
+ bOK = FALSE;
+ }
+ else
+ {
+ LPDEVNAMES lpDev = (LPDEVNAMES)GlobalLock(pd.hDevNames);
+ LPDEVMODE lpDevMode = (LPDEVMODE)GlobalLock(pd.hDevMode);
+ LPCTSTR lpszDevice = (LPCTSTR)lpDev + lpDev->wDeviceOffset;
+
+ wsprintf(PrinterName, "%s", lpszDevice);
+ GlobalUnlock(pd.hDevNames);
+
+ if (lpDevMode->dmOrientation == DMORIENT_PORTRAIT )
+ {
+ PrinterOrientation = 'p';
+ }
+ else
+ {
+ PrinterOrientation = 'l';
+ }
+ GlobalUnlock(pd.hDevMode);
+
+ if (PrinterHDC)
+ {
+ DeleteDC(PrinterHDC);
+ PrinterHDC = NULL;
+ }
+ PrinterHDC = pd.hDC;
+ bOK = TRUE;
+ }
+
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
+HDC GetPrinterDC(void)
+{
+ if (PrinterHDC == NULL)
+ {
+ PRINTDLG pd;
+ LPDEVNAMES lpDev = NULL;
+ LPDEVMODE lpDevMode = NULL;
+ LPCTSTR lpszDevice = NULL;
+
+ int failed = 0;
+
+ // Reset printdlg struct
+ memset( &pd, 0, sizeof(PRINTDLG) );
+ pd.Flags = PD_RETURNDEFAULT | PD_RETURNDC;
+ pd.lStructSize = sizeof( PRINTDLG );
+
+
+ failed = ( ! PrintDlg( &pd ) );
+ if (failed)
+ {
+ ConfigurePrinterDialogBox();
+ }
+
+ lpDev = (LPDEVNAMES)GlobalLock(pd.hDevNames);
+ lpDevMode = (LPDEVMODE)GlobalLock(pd.hDevMode);
+ lpszDevice = (LPCTSTR)lpDev + lpDev->wDeviceOffset;
+
+ wsprintf(PrinterName, "%s", lpszDevice);
+ GlobalUnlock(pd.hDevNames);
+
+ if (lpDevMode->dmOrientation == DMORIENT_PORTRAIT )
+ {
+ PrinterOrientation = 'p';
+ }
+ else
+ {
+ PrinterOrientation = 'l';
+ }
+ GlobalUnlock(pd.hDevMode);
+
+ if (PrinterHDC)
+ {
+ DeleteDC(PrinterHDC);
+ PrinterHDC = NULL;
+ }
+ PrinterHDC = pd.hDC;
+
+ }
+
+ return PrinterHDC;
+}
+/*--------------------------------------------------------------------------*/
+char GetPrinterOrientation(void)
+{
+ return PrinterOrientation;
+}
+/*--------------------------------------------------------------------------*/
+char* GetPrinterName(void)
+{
+ char *ReturnPrinterName = NULL;
+
+ ReturnPrinterName = MALLOC(strlen(PrinterName) * sizeof(char));
+ wsprintf(ReturnPrinterName, "%s", PrinterName);
+
+ return ReturnPrinterName;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/TextToPrint.h b/modules/windows_tools/src/c/scilab_windows/TextToPrint.h
new file mode 100755
index 000000000..bed255d57
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/TextToPrint.h
@@ -0,0 +1,45 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __TEXTTOPRINT__
+#define __TEXTTOPRINT__
+/*--------------------------------------------------------------------------*/
+
+#include <windows.h>
+#include <windowsx.h>
+#include <stdio.h>
+#include <commdlg.h>
+#include <stdio.h>
+#include <ShlObj.h>
+#include <time.h>
+#include <math.h>
+#include "BOOL.h"
+
+/*--------------------------------------------------------------------------*/
+/* EzCreateFont */
+/* Fonts Properties */
+#define EZ_ATTR_BOLD 1
+#define EZ_ATTR_ITALIC 2
+#define EZ_ATTR_UNDERLINE 4
+#define EZ_ATTR_STRIKEOUT 8
+/*--------------------------------------------------------------------------*/
+void PrintString(char *lines, char *Entete);
+void PrintFile(char *filename);
+void PageHeader(HDC hdc, LPSTR Entete);
+void Footer(HDC hdc, int number);
+HDC GetPrinterDC(void);
+BOOL ConfigurePrinterDialogBox(void);
+/*--------------------------------------------------------------------------*/
+extern HDC TryToGetDC(HWND hWnd);
+#endif /* __TEXTTOPRINT__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/WindowShow.c b/modules/windows_tools/src/c/scilab_windows/WindowShow.c
new file mode 100755
index 000000000..e4584a140
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/WindowShow.c
@@ -0,0 +1,74 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2010 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include "WindowShow.h"
+#include "iconifyMainWindow.h"
+#include "setVisibleMainWindow.h"
+/*--------------------------------------------------------------------------*/
+static int CmdShow = -1;
+/*--------------------------------------------------------------------------*/
+void setWindowShowMode(int nCmdShow)
+{
+ switch (nCmdShow)
+ {
+ case SW_HIDE:
+ case SW_SHOWMINIMIZED:
+ case SW_SHOWMAXIMIZED:
+ case SW_SHOWNOACTIVATE:
+ case SW_SHOW:
+ case SW_MINIMIZE:
+ case SW_SHOWMINNOACTIVE:
+ case SW_SHOWNA:
+ case SW_RESTORE:
+ case SW_SHOWDEFAULT:
+ case SW_MAX:
+ CmdShow = nCmdShow;
+ break;
+ case SW_SHOWNORMAL:
+ default:
+ CmdShow = SW_NORMAL;
+ break;
+ }
+}
+/*--------------------------------------------------------------------------*/
+int getWindowShowMode(void)
+{
+ return CmdShow;
+}
+/*--------------------------------------------------------------------------*/
+void WindowShow(void)
+{
+ switch (CmdShow)
+ {
+ case SW_HIDE:
+ setVisibleMainWindow(FALSE);
+ break;
+
+ case SW_SHOWMINIMIZED:
+ case SW_MINIMIZE:
+ case SW_SHOWMINNOACTIVE:
+ iconifyMainWindow();
+ break;
+
+ case SW_SHOWMAXIMIZED:
+ case SW_MAX:
+ maximizeMainWindow();
+ break;
+
+ case SW_SHOWNORMAL:
+ default:
+ normalMainWindow();
+ break;
+ }
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/WindowShow.h b/modules/windows_tools/src/c/scilab_windows/WindowShow.h
new file mode 100755
index 000000000..513924473
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/WindowShow.h
@@ -0,0 +1,36 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2010 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#ifndef __WINDOWSHOW_H__
+#define __WINDOWSHOW_H__
+
+#include "dynlib_scilab_windows.h"
+
+/**
+* set Current Window Mode Show
+* @param[IN] set Current Window Mode Show
+*/
+SCILAB_WINDOWS_IMPEXP void setWindowShowMode(int nCmdShow);
+
+/**
+* get Current Window Show Mode
+* @return current Window Show Mode
+*/
+SCILAB_WINDOWS_IMPEXP int getWindowShowMode(void);
+
+/**
+* update Window show with current Mode
+*/
+SCILAB_WINDOWS_IMPEXP void WindowShow(void);
+
+#endif /* __WINDOWSHOW_H__*/
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/WndThread.c b/modules/windows_tools/src/c/scilab_windows/WndThread.c
new file mode 100755
index 000000000..1de7300c6
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/WndThread.c
@@ -0,0 +1,160 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <string.h>
+#include <Windows.h>
+#include <windowsx.h>
+#include "WndThread.h"
+#include "MALLOC.h"
+#include "version.h"
+#include "wmcopydata.h"
+#include "storeCommand.h"
+#include "strdup_windows.h"
+/*--------------------------------------------------------------------------*/
+static HWND hWndScilab = NULL;
+HANDLE HandleThreadWnd = NULL;
+static char titleHiddenScilabWindow[MAX_PATH] = "";
+static int ScilabId = -1;
+/*--------------------------------------------------------------------------*/
+static DWORD WINAPI WndThread(LPVOID lpParam);
+static void RegisterWindowClass(void);
+static void GetFreeTitleOfWindowHidden(void);
+static BOOL ON_WND_HIDDEN_WM_COPYDATA(HWND hwnd, HWND hWndSend, PCOPYDATASTRUCT MyCopyDataStruct);
+/*--------------------------------------------------------------------------*/
+BOOL CreateScilabHiddenWndThread(void)
+{
+ BOOL bOK = FALSE;
+
+ if (!HandleThreadWnd)
+ {
+ HandleThreadWnd = CreateThread( NULL, 0, WndThread, NULL, 0, NULL);
+ }
+ if (HandleThreadWnd)
+ {
+ bOK = TRUE;
+ }
+
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
+static DWORD WINAPI WndThread(LPVOID lpParam)
+{
+ HANDLE hWndScilab = NULL;
+ HINSTANCE hInstanceThisDll = (HINSTANCE)GetModuleHandle("scilab_windows");
+
+ RegisterWindowClass();
+
+ GetFreeTitleOfWindowHidden();
+
+ hWndScilab = CreateWindow(HiddenWindowClassName,
+ titleHiddenScilabWindow, WS_OVERLAPPEDWINDOW,
+ 0, 0, 350, 0,
+ NULL, NULL, hInstanceThisDll, NULL);
+
+ ShowWindow (hWndScilab, SW_HIDE);
+ UpdateWindow (hWndScilab);
+
+ if (hWndScilab)
+ {
+ MSG Msg;
+ while (GetMessage(&Msg, NULL, 0, 0))
+ {
+ TranslateMessage(&Msg);
+ DispatchMessage(&Msg);
+ }
+ }
+
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
+LRESULT CALLBACK HiddenWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
+{
+ switch (Msg)
+ {
+ HANDLE_MSG(hWnd, WM_COPYDATA, ON_WND_HIDDEN_WM_COPYDATA);
+ }
+ return DefWindowProc(hWnd, Msg, wParam, lParam);
+}
+/*--------------------------------------------------------------------------*/
+static void RegisterWindowClass(void)
+{
+ WNDCLASSEX wcex;
+
+ wcex.cbSize = sizeof(WNDCLASSEX);
+ wcex.style = CS_HREDRAW | CS_VREDRAW;
+ wcex.lpfnWndProc = HiddenWndProc;
+ wcex.cbClsExtra = 0;
+ wcex.cbWndExtra = 0;
+ wcex.hInstance = (HINSTANCE)GetModuleHandle("scilab_windows");
+ wcex.hIcon = 0;
+ wcex.hCursor = 0;
+ wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
+ wcex.lpszMenuName = 0;
+ wcex.lpszClassName = HiddenWindowClassName;
+ wcex.hIconSm = 0;
+
+ RegisterClassEx(&wcex);
+}
+/*--------------------------------------------------------------------------*/
+static void GetFreeTitleOfWindowHidden(void)
+{
+ HWND hWndScilab = NULL;
+ int Number_of_Scilab = 0;
+
+ char SearchedScilabWindow[MAX_PATH];
+
+ wsprintf(SearchedScilabWindow, FORMAT_TITLE_HIDDEN_WINDOWS, SCI_VERSION_STRING, Number_of_Scilab);
+
+ hWndScilab = FindWindow(NULL, SearchedScilabWindow);
+
+ while ( hWndScilab )
+ {
+ Number_of_Scilab++;
+ wsprintf(SearchedScilabWindow, FORMAT_TITLE_HIDDEN_WINDOWS, SCI_VERSION_STRING, Number_of_Scilab);
+ hWndScilab = FindWindow(NULL, SearchedScilabWindow);
+ }
+
+ strcpy(titleHiddenScilabWindow, SearchedScilabWindow);
+ ScilabId = Number_of_Scilab;
+}
+/*--------------------------------------------------------------------------*/
+static BOOL ON_WND_HIDDEN_WM_COPYDATA(HWND hwnd, HWND hWndSend, PCOPYDATASTRUCT MyCopyDataStruct)
+{
+ char Command[MAX_PATH];
+ char TitleWndSend[MAX_PATH];
+
+ ReceiveFromAnotherScilab(hWndSend, MyCopyDataStruct);
+
+ if ( GetCommandFromAnotherScilab(TitleWndSend, Command) )
+ {
+ StoreCommand (Command);
+ }
+
+ return TRUE;
+}
+/*--------------------------------------------------------------------------*/
+char *getCurrentTitleScilabHiddenWindow(void)
+{
+ char *currentTitle = NULL;
+ if ( strcmp(titleHiddenScilabWindow, "") )
+ {
+ currentTitle = strdup(titleHiddenScilabWindow);
+ }
+ return currentTitle;
+}
+/*--------------------------------------------------------------------------*/
+int getCurrentScilabId(void)
+{
+ return ScilabId;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/WndThread.h b/modules/windows_tools/src/c/scilab_windows/WndThread.h
new file mode 100755
index 000000000..38f94ec7c
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/WndThread.h
@@ -0,0 +1,48 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __WNDTHREAD_H__
+#define __WNDTHREAD_H__
+
+#include "BOOL.h" /* BOOL */
+#include "dynlib_scilab_windows.h"
+
+/* format for title of hidden windows */
+#define FORMAT_TITLE_HIDDEN_WINDOWS "%s hidden window (%d)"
+
+/* window class name */
+#define HiddenWindowClassName "Scilab hidden window"
+
+/**
+* Create a hidden window for Scilab (in a separate thread)
+* This window (only windows) is used for some features as WM_COPYDATA
+* disabled on -NWNI mode
+* @return TRUE or FALSE
+*/
+SCILAB_WINDOWS_IMPEXP BOOL CreateScilabHiddenWndThread(void);
+
+/**
+* get current title for scilab hidden window
+* example : scilab-5.0 hidden window (0)
+*/
+SCILAB_WINDOWS_IMPEXP char *getCurrentTitleScilabHiddenWindow(void);
+
+/**
+* get current scilab id
+* return a Id : must be (>= 0)
+* -1 if we have a problem
+*/
+SCILAB_WINDOWS_IMPEXP int getCurrentScilabId(void);
+
+#endif /* __WNDTHREAD_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/buildMainWindowTitle_Windows.c b/modules/windows_tools/src/c/scilab_windows/buildMainWindowTitle_Windows.c
new file mode 100755
index 000000000..d32e9b088
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/buildMainWindowTitle_Windows.c
@@ -0,0 +1,32 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <Windows.h>
+#include "buildMainWindowTitle_Windows.h"
+#include "MALLOC.h"
+#include "version.h"
+#include "WndThread.h"
+/*--------------------------------------------------------------------------*/
+char *buildMainWindowTitle_Windows(void)
+{
+ char *title = NULL;
+
+ title = (char*)MALLOC(sizeof(char) * (strlen("%s (%d)") + strlen(SCI_VERSION_STRING) + 10 + 1));
+ if (title)
+ {
+ wsprintf(title, "%s (%d)", SCI_VERSION_STRING, getCurrentScilabId());
+ }
+
+ return title;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/buildMainWindowTitle_Windows.h b/modules/windows_tools/src/c/scilab_windows/buildMainWindowTitle_Windows.h
new file mode 100755
index 000000000..804f11438
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/buildMainWindowTitle_Windows.h
@@ -0,0 +1,27 @@
+
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __BUILDMAINWINDOWTITLE_WINDOWS_H__
+#define __BUILDMAINWINDOWTITLE_WINDOWS_H__
+
+#include "dynlib_scilab_windows.h"
+
+/**
+* build title of the main scilab window (Windows)
+* @return string (title)
+*/
+SCILAB_WINDOWS_IMPEXP char *buildMainWindowTitle_Windows(void);
+
+#endif /* __BUILDMAINWINDOWTITLE_WINDOWS_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/console.c b/modules/windows_tools/src/c/scilab_windows/console.c
new file mode 100755
index 000000000..511d799e7
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/console.c
@@ -0,0 +1,186 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+
+#define _WIN32_WINNT 0x0500 // GetConsoleWindow
+#include <Windows.h>
+#include <shlwapi.h>
+#include <stdio.h>
+#pragma comment(lib, "shlwapi.lib")
+
+#include "WinConsole.h"
+#include "WndThread.h"
+#include "console.h"
+#include "version.h"
+#include "strdup_windows.h"
+/*--------------------------------------------------------------------------*/
+#define NameConsole "Console"
+/*--------------------------------------------------------------------------*/
+static CONSOLE_SCREEN_BUFFER_INFO csbiInfoSave;
+static char ScilexConsoleName[MAX_PATH];
+/*--------------------------------------------------------------------------*/
+void UpdateConsoleColors(void)
+{
+ HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+ COORD Coord;
+ DWORD cWritten;
+
+ Coord.X = 0;
+ Coord.Y = 0;
+
+ FillConsoleOutputAttribute( hConsole,
+ BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY,
+ csbiInfoSave.dwSize.X * csbiInfoSave.dwSize.Y,
+ Coord,
+ &cWritten);
+
+ SetConsoleTextAttribute(hConsole, BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
+
+}
+/*--------------------------------------------------------------------------*/
+void SaveConsoleColors(void)
+{
+ GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbiInfoSave);
+}
+/*--------------------------------------------------------------------------*/
+void RestoreConsoleColors(void)
+{
+ HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+ COORD Coord;
+ DWORD cWritten;
+
+ Coord.X = 0;
+ Coord.Y = 0;
+
+ FillConsoleOutputAttribute( hConsole,
+ csbiInfoSave.wAttributes,
+ csbiInfoSave.dwSize.X * csbiInfoSave.dwSize.Y,
+ Coord,
+ &cWritten);
+ SetConsoleTextAttribute(hConsole, csbiInfoSave.wAttributes);
+}
+/*--------------------------------------------------------------------------*/
+void RenameConsole(void)
+{
+ HWND hScilex = NULL;
+ char CurrentConsoleName[MAX_PATH];
+ char CurrentConsoleNameTmp[MAX_PATH];
+
+ GetConsoleTitle(CurrentConsoleName, MAX_PATH);
+ strncpy(CurrentConsoleNameTmp, CurrentConsoleName, strlen(NameConsole));
+ CurrentConsoleNameTmp[strlen(NameConsole)] = '\0';
+
+ if ( strcmp(CurrentConsoleNameTmp, NameConsole) != 0)
+ {
+ wsprintf(ScilexConsoleName, "%s %s", NameConsole, SCI_VERSION_STRING);
+ SetConsoleTitle(ScilexConsoleName);
+ }
+
+ hScilex = GetConsoleWindow();
+ if (hScilex)
+ {
+ HMENU hmenuConsole = NULL;
+ // Desactive croix dans la console
+ hmenuConsole = GetSystemMenu(hScilex, FALSE);
+ DeleteMenu(hmenuConsole, SC_CLOSE, MF_BYCOMMAND);
+ }
+}
+/*--------------------------------------------------------------------------*/
+void RestoreExitButton(void)
+{
+ HWND hScilex = NULL;
+ hScilex = GetConsoleWindow();
+ if (hScilex)
+ {
+ HMENU hmenuConsole = NULL;
+ // Active croix dans la console
+ hmenuConsole = GetSystemMenu(hScilex, FALSE);
+ AppendMenu( hmenuConsole, MF_BYCOMMAND, SC_CLOSE, "&Close Alt+F4" );
+ }
+}
+/*--------------------------------------------------------------------------*/
+void CreateScilabConsole(int ShowBanner)
+{
+ HWND hScilex = NULL;
+
+ SetConsoleState(0); /* Console DOS Cache par dfaut */
+ AllocConsole();
+
+ wsprintf(ScilexConsoleName, "%s %s (%d)", NameConsole, SCI_VERSION_STRING, getCurrentScilabId());
+ SetConsoleTitle(ScilexConsoleName);
+
+ CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CONSOLE_TEXTMODE_BUFFER, NULL);
+ freopen("CONOUT$", "wb", stdout); /* redirect stdout --> CONOUT$*/
+ freopen("CONOUT$", "wb", stderr); /* redirect stderr --> CONOUT$*/
+
+ if (ShowBanner)
+ {
+ char line[80];
+
+ strcpy(line, " ___________________________________________\n");
+ printf(line);
+ wsprintf(line, " %s\n\n", SCI_VERSION_STRING);
+ printf(line);
+ strcpy(line, " Scilab Enterprises\n");
+ printf(line);
+ strcpy(line, " Copyright (c) 2011-2017 (Scilab Enterprises)\n");
+ printf(line);
+ strcpy(line, " Copyright (c) 1989-2012 (INRIA)\n");
+ printf(line);
+ strcpy(line, " Copyright (c) 1989-2007 (ENPC)\n");
+ printf(line);
+ strcpy(line, " ___________________________________________\n\n");
+ printf(line);
+ }
+
+ hScilex = GetConsoleWindow();
+ if (hScilex)
+ {
+ HMENU hmenuConsole = NULL;
+ // Desactive croix dans la console
+ hmenuConsole = GetSystemMenu(hScilex, FALSE);
+ DeleteMenu(hmenuConsole, SC_CLOSE, MF_BYCOMMAND);
+
+ /* Cache la fenetre Console */
+ ShowWindow(hScilex, SW_HIDE);
+ }
+}
+/*--------------------------------------------------------------------------*/
+void CloseScilabConsole(void)
+{
+ fclose(stdout);
+ fclose(stderr);
+ FreeConsole();
+}
+/*--------------------------------------------------------------------------*/
+char *getScilexConsoleName(void)
+{
+ char *retName = NULL;
+
+ if (strlen(ScilexConsoleName) > 0)
+ {
+ retName = strdup(ScilexConsoleName);
+ }
+ return retName;
+}
+/*--------------------------------------------------------------------------*/
+int getXConsoleScreenSize(void)
+{
+ return (csbiInfoSave.srWindow.Right - csbiInfoSave.srWindow.Left);
+}
+/*--------------------------------------------------------------------------*/
+int getYConsoleScreenSize(void)
+{
+ return (csbiInfoSave.srWindow.Bottom - csbiInfoSave.srWindow.Top);
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/console.h b/modules/windows_tools/src/c/scilab_windows/console.h
new file mode 100755
index 000000000..418e34b51
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/console.h
@@ -0,0 +1,67 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __CONSOLE_H__
+#define __CONSOLE_H__
+#include "dynlib_scilab_windows.h"
+#include "BOOL.h"
+
+/**
+* Update Colors of console
+*/
+SCILAB_WINDOWS_IMPEXP void UpdateConsoleColors(void);
+
+/**
+* Save colors before creation
+*/
+SCILAB_WINDOWS_IMPEXP void SaveConsoleColors(void);
+
+/**
+* Restore colors of console
+*/
+SCILAB_WINDOWS_IMPEXP void RestoreConsoleColors(void);
+
+/**
+* Restore Exit button
+*/
+SCILAB_WINDOWS_IMPEXP void RestoreExitButton(void);
+
+/**
+* Rename Scilab Console with correct name
+*/
+SCILAB_WINDOWS_IMPEXP void RenameConsole(void);
+
+/**
+* Create Scilab Console
+*/
+SCILAB_WINDOWS_IMPEXP void CreateScilabConsole(BOOL ShowBanner);
+
+/**
+* Close Scilab Console
+*/
+SCILAB_WINDOWS_IMPEXP void CloseScilabConsole(void);
+
+/**
+* get scilex console name
+* @return a name
+*/
+SCILAB_WINDOWS_IMPEXP char *getScilexConsoleName(void);
+
+/* return colums size of screen console */
+SCILAB_WINDOWS_IMPEXP int getXConsoleScreenSize(void);
+
+/* return lines size of screen console */
+SCILAB_WINDOWS_IMPEXP int getYConsoleScreenSize(void);
+
+#endif /* __CONSOLE_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/console_main.c b/modules/windows_tools/src/c/scilab_windows/console_main.c
new file mode 100755
index 000000000..7cbb4e6e0
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/console_main.c
@@ -0,0 +1,188 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - Allan CORNET
+* Copyright (C) DIGITEO - 2010-2012 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <Windows.h>
+#include <shellapi.h>
+#include "console_main.h"
+#include "core_math.h"
+#include "getcommandlineargs.h"
+#include "scilabmode.h"
+#include "forbiddenToUseScilab.h"
+#include "realmain.h"
+#include "version.h"
+#include "getScilabDirectory.h"
+#include "MALLOC.h"
+#include "sciquit.h"
+#include "scilab_main.h"
+#include "console.h"
+#include "WndThread.h"
+#include "localization.h"
+#include "LanguagePreferences_Windows.h"
+#include "with_module.h"
+
+/*--------------------------------------------------------------------------*/
+#define MIN_STACKSIZE 180000
+/*--------------------------------------------------------------------------*/
+static LPSTR my_argv[MAXCMDTOKENS];
+static int my_argc = -1;
+static int startupf = 0; /** 0 if we execute startup else 1 **/
+static int memory = MIN_STACKSIZE;
+/*--------------------------------------------------------------------------*/
+extern void settexmacs(void);
+/*--------------------------------------------------------------------------*/
+int sci_show_banner = 1;
+/*--------------------------------------------------------------------------*/
+int Console_Main(int argc, char **argv)
+{
+ int iExitCode = 0;
+ int argcount = 0, lpath = 0;
+ InitScriptType pathtype = SCILAB_SCRIPT;
+ char *path = NULL;
+ char *ScilabDirectory = NULL;
+ int i = 0;
+
+ my_argc = -1;
+
+ forbiddenToUseScilab();
+
+ setScilabMode(SCILAB_NW);
+
+ setCommandLineArgs(argv, argc);
+
+ for (i = 0; i < argc; i++)
+ {
+ my_argv[i] = argv[i];
+ }
+ my_argc = argc;
+
+ ScilabDirectory = getScilabDirectory(FALSE);
+
+ if (ScilabDirectory == NULL)
+ {
+ // This message must never occur, but ...
+ MessageBox (NULL, "ERROR" , "Cannot determine the Scilab directory (SCI).", MB_ICONSTOP | MB_OK);
+ exit(1);
+ }
+ else
+ {
+ FREE(ScilabDirectory);
+ ScilabDirectory = NULL;
+ }
+
+ argcount = my_argc;
+ while (argcount > 0)
+ {
+ argcount--;
+ if (_stricmp (my_argv[argcount], "-NS") == 0)
+ {
+ startupf = 1;
+ }
+ else if ( _stricmp(my_argv[argcount], "-NB") == 0)
+ {
+ sci_show_banner = 0;
+ }
+ else if (_stricmp (my_argv[argcount], "-NWNI") == 0)
+ {
+ setScilabMode(SCILAB_NWNI);
+ }
+ else if (_stricmp (my_argv[argcount], "-F") == 0 && argcount + 1 < my_argc)
+ {
+ path = my_argv[argcount + 1];
+ lpath = (int) strlen (my_argv[argcount + 1]);
+ }
+ else if (_stricmp (my_argv[argcount], "-E") == 0 && argcount + 1 < my_argc)
+ {
+ path = my_argv[argcount + 1];
+ lpath = (int) strlen (my_argv[argcount + 1]);
+ pathtype = SCILAB_CODE;
+ }
+ else if ( _stricmp(my_argv[argcount], "-MEM") == 0 && argcount + 1 < my_argc)
+ {
+ memory = Max(atoi( my_argv[argcount + 1]), MIN_STACKSIZE );
+ }
+ else if ( _stricmp(my_argv[argcount], "-TEXMACS") == 0 )
+ {
+ setScilabMode(SCILAB_NWNI);
+ settexmacs();
+ }
+ else if ( _stricmp(my_argv[argcount], "-NOGUI") == 0 )
+ {
+ setScilabMode(SCILAB_NWNI);
+ }
+ else if ( (_stricmp (my_argv[argcount], "-VERSION") == 0) ||
+ (_stricmp (my_argv[argcount], "-VER") == 0) )
+ {
+ disp_scilab_version();
+ exit(1);
+ }
+ else if ( _stricmp(my_argv[argcount], "-L") == 0 && argcount + 1 < my_argc)
+ {
+ char *language = my_argv[argcount + 1];
+ setLanguageFromCommandLine(language);
+ }
+ else if ( (_stricmp (my_argv[argcount], "-H") == 0) ||
+ (_stricmp (my_argv[argcount], "-?") == 0) ||
+ (_stricmp (my_argv[argcount], "-HELP") == 0) )
+ {
+ printf("scilex <Options>: run Scilab.\n");
+ printf("Arguments: passes Arguments to Scilab, This Arguments can be retreived\n by the Scilab function sciargs.\n");
+ printf("-e Instruction: execute the scilab instruction given in Instruction argument.\n");
+ printf("-f File: execute the scilab script given in File argument.\n");
+ printf(" '-e' and '-f' options are mutually exclusive.\n\n");
+ printf("-l lang: it fixes the user language.\n\n" );
+ printf("-mem N: set the initial stacksize.\n");
+ printf("-ns: if this option is present the startup file scilab.start is not executed.\n");
+ printf("-nb: if this option is present then Scilab loading message is not displayed.\n");
+ printf("-nouserstartup: don't execute user startup files SCIHOME/.scilab or SCIHOME/scilab.ini.\n");
+ printf("-nw: start Scilab without specialized Scilab Window.\n");
+ printf("-nwni: start Scilab without user interaction (batch mode).\n");
+ printf("-nogui: start Scilab without GUI,tcl/tk and user interaction (batch mode).\n");
+ printf("-texmacs: reserved for WinTeXMacs.\n");
+ printf("-version: print product version and exit.\n");
+ printf("\n");
+ exit(1);
+ }
+ }
+
+ if (!with_module("jvm"))
+ {
+ /* no module jvm then we force NWNI mode */
+ setScilabMode(SCILAB_NWNI);
+ }
+
+ if (getScilabMode() != SCILAB_NWNI)
+ {
+ CreateScilabHiddenWndThread();
+ }
+
+ if ( (getScilabMode() == SCILAB_NWNI) || (getScilabMode() == SCILAB_NW) )
+ {
+ SaveConsoleColors();
+ if (getScilabMode() == SCILAB_NW)
+ {
+ RenameConsole();
+ UpdateConsoleColors();
+ }
+
+ iExitCode = sci_windows_main (&startupf, path, (InitScriptType)pathtype, &lpath, memory);
+
+ }
+ else
+ {
+ MessageBox(NULL, "-nw or -nwni not found", "ERROR", MB_ICONWARNING);
+ iExitCode = 1;
+ }
+ return iExitCode;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/console_main.h b/modules/windows_tools/src/c/scilab_windows/console_main.h
new file mode 100755
index 000000000..b2ae90a79
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/console_main.h
@@ -0,0 +1,28 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+
+#ifndef __CONSOLE_MAIN_H__
+#define __CONSOLE_MAIN_H__
+
+#include "dynlib_scilab_windows.h"
+
+/**
+* Main for scilab with no gui
+* @param [in] argc : number of arguments
+* @param [in] argv : values of arguments
+* @return 0
+*/
+SCILAB_WINDOWS_IMPEXP int Console_Main(int argc, char **argv);
+
+#endif /* __CONSOLE_MAIN_H__ */ \ No newline at end of file
diff --git a/modules/windows_tools/src/c/scilab_windows/core_Import.def b/modules/windows_tools/src/c/scilab_windows/core_Import.def
new file mode 100755
index 000000000..1f132dd52
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/core_Import.def
@@ -0,0 +1,21 @@
+LIBRARY core.dll
+
+
+EXPORTS
+;core
+getScilabMode
+disp_scilab_version
+settexmacs
+setCommandLineArgs
+setScilabMode
+with_module
+setSCIpath
+realmain
+InitializeLaunchScilabSignal
+sciquit
+getTMPDIR
+getTMPDIRW
+StoreCommand
+MyHeapAlloc
+MyHeapFree
+MyHeapRealloc
diff --git a/modules/windows_tools/src/c/scilab_windows/dynlib_scilab_windows.h b/modules/windows_tools/src/c/scilab_windows/dynlib_scilab_windows.h
new file mode 100755
index 000000000..2ad899031
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/dynlib_scilab_windows.h
@@ -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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __DYNLIB_SCILAB_WINDOWS_H__
+#define __DYNLIB_SCILAB_WINDOWS_H__
+
+#ifdef _MSC_VER
+#ifdef SCILAB_WINDOWS_EXPORTS
+#define SCILAB_WINDOWS_IMPEXP __declspec(dllexport)
+#else
+#define SCILAB_WINDOWS_IMPEXP __declspec(dllimport)
+#endif
+#else
+#define SCILAB_WINDOWS_IMPEXP
+#endif
+
+#endif /* __DYNLIB_SCILAB_WINDOWS_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/forbiddenToUseScilab.c b/modules/windows_tools/src/c/scilab_windows/forbiddenToUseScilab.c
new file mode 100755
index 000000000..49fbded3a
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/forbiddenToUseScilab.c
@@ -0,0 +1,34 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include "forbiddenToUseScilab.h"
+#include <Windows.h>
+/*--------------------------------------------------------------------------*/
+BOOL forbiddenToUseScilab(void)
+{
+ BOOL bOK = FALSE;
+ HDC hdc = GetDC(NULL);
+ int BitsByPixel = GetDeviceCaps(hdc, BITSPIXEL);
+
+ ReleaseDC (NULL, hdc);
+
+ if ( BitsByPixel < 8 )
+ {
+ MessageBox(NULL, "Warning", "Scilab supports only 256 colors or more.\n", MB_ICONSTOP);
+ exit(1);
+ }
+
+ bOK = TRUE;
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/forbiddenToUseScilab.h b/modules/windows_tools/src/c/scilab_windows/forbiddenToUseScilab.h
new file mode 100755
index 000000000..575cf1dd6
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/forbiddenToUseScilab.h
@@ -0,0 +1,24 @@
+/*--------------------------------------------------------------------------*/
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - 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.1-en.txt
+/*--------------------------------------------------------------------------*/
+#ifndef __FORBIDDENTOUSESCILAB_H__
+#define __FORBIDDENTOUSESCILAB_H__
+
+#include "dynlib_scilab_windows.h"
+#include "BOOL.h" /* BOOL */
+
+/*
+* stop scilab if windows < 256 colors
+* @return TRUE or FALSE
+*/
+SCILAB_WINDOWS_IMPEXP BOOL forbiddenToUseScilab(void);
+
+#endif /* __FORBIDDENTOUSESCILAB_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/getBlasType.c b/modules/windows_tools/src/c/scilab_windows/getBlasType.c
new file mode 100755
index 000000000..389a6e57e
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/getBlasType.c
@@ -0,0 +1,65 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2011 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#include <Windows.h>
+#include "getBlasType.h"
+/*--------------------------------------------------------------------------*/
+#define BLASLIBNAME "blasplus.dll"
+#define DGEMMCNAME "dgemm"
+#define DGEMMFNAME "dgemm_"
+#define MKLGETVERSIONNAME "MKL_Get_Version"
+/*--------------------------------------------------------------------------*/
+static blas_type blasType = BLAS_UNKNOW;
+static BOOL bBlasDetected = FALSE;
+/*--------------------------------------------------------------------------*/
+typedef int (*DGEMPROC_C) ();
+typedef int (*DGEMPROC_F) ();
+typedef int (*MKL_GET_VERSIONPROC) ();
+/*--------------------------------------------------------------------------*/
+blas_type getBlasType(void)
+{
+ if (!bBlasDetected)
+ {
+ HINSTANCE BlasDll = NULL;
+ bBlasDetected = TRUE;
+ BlasDll = LoadLibrary (BLASLIBNAME);
+ if (BlasDll != NULL)
+ {
+ DGEMPROC_C dynDGEMMPROC_C = (DGEMPROC_C)GetProcAddress(BlasDll, DGEMMCNAME);
+ DGEMPROC_F dynDGEMMPROC_F = (DGEMPROC_C)GetProcAddress(BlasDll, "dgemm_");
+ MKL_GET_VERSIONPROC dynMKL_GET_VERSIONPROC = (MKL_GET_VERSIONPROC)GetProcAddress(BlasDll, MKLGETVERSIONNAME);
+ if (dynMKL_GET_VERSIONPROC)
+ {
+ blasType = BLAS_MKL;
+ }
+ else
+ {
+ if (dynDGEMMPROC_C && dynDGEMMPROC_F)
+ {
+ blasType = BLAS_REF;
+ }
+ else
+ {
+ if ((dynDGEMMPROC_F == NULL) && (dynDGEMMPROC_C))
+ {
+ blasType = BLAS_ATLAS;
+ }
+ }
+ }
+ FreeLibrary(BlasDll);
+ BlasDll = NULL;
+ }
+ }
+ return blasType;
+}
+/*--------------------------------------------------------------------------*/
+
diff --git a/modules/windows_tools/src/c/scilab_windows/getBlasType.h b/modules/windows_tools/src/c/scilab_windows/getBlasType.h
new file mode 100755
index 000000000..89519f231
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/getBlasType.h
@@ -0,0 +1,28 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2011 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#ifndef __GETBLASTYPE_H__
+#define __GETBLASTYPE_H__
+
+#include "dynlib_scilab_windows.h"
+
+typedef enum { BLAS_UNKNOW = -1,
+ BLAS_REF = 0,
+ BLAS_ATLAS = 1,
+ BLAS_MKL = 2
+ } blas_type;
+
+/* detect blas type used by scilab */
+SCILAB_WINDOWS_IMPEXP blas_type getBlasType(void);
+
+#endif /* __GETBLASTYPE_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/getScilabDirectory.c b/modules/windows_tools/src/c/scilab_windows/getScilabDirectory.c
new file mode 100755
index 000000000..ab3c5f675
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/getScilabDirectory.c
@@ -0,0 +1,85 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include <stdlib.h>
+#include "getScilabDirectory.h"
+#include "MALLOC.h"
+#include "setgetSCIpath.h"
+#include "charEncoding.h"
+/*--------------------------------------------------------------------------*/
+char *getScilabDirectory(BOOL UnixStyle)
+{
+ char *SciPathName = NULL;
+ wchar_t* wcSciPathName = NULL;
+ wchar_t ScilabModuleName[MAX_PATH + 1];
+ wchar_t drive[_MAX_DRIVE];
+ wchar_t dir[_MAX_DIR];
+ wchar_t fname[_MAX_FNAME];
+ wchar_t ext[_MAX_EXT];
+ wchar_t *DirTmp = NULL;
+
+
+ if (!GetModuleFileNameW ((HINSTANCE)GetModuleHandleW(L"core"), (wchar_t*) ScilabModuleName, MAX_PATH))
+ {
+ return NULL;
+ }
+
+ _wsplitpath(ScilabModuleName, drive, dir, fname, ext);
+
+ if (dir[wcslen(dir) - 1] == L'\\')
+ {
+ dir[wcslen(dir) - 1] = L'\0';
+ }
+
+ DirTmp = wcsrchr (dir, L'\\');
+
+ if (wcslen(dir) - wcslen(DirTmp) > 0)
+ {
+ dir[wcslen(dir) - wcslen(DirTmp)] = L'\0';
+ }
+ else
+ {
+ return NULL;
+ }
+
+ wcSciPathName = (wchar_t*)MALLOC((int)( wcslen(drive) + wcslen(dir) + 5) * sizeof(wchar_t));
+ if (wcSciPathName)
+ {
+ _wmakepath(wcSciPathName, drive, dir, NULL, NULL);
+ if ( UnixStyle )
+ {
+ int i = 0;
+ for (i = 0; i < (int)wcslen(wcSciPathName); i++)
+ {
+ if (wcSciPathName[i] == L'\\')
+ {
+ wcSciPathName[i] = L'/';
+ }
+ }
+ }
+ wcSciPathName[wcslen(wcSciPathName) - 1] = '\0';
+
+ SciPathName = wide_string_to_UTF8(wcSciPathName);
+ FREE(wcSciPathName);
+ wcSciPathName = NULL;
+ }
+
+ if (SciPathName)
+ {
+ setSCIpath(SciPathName);
+ }
+
+ return SciPathName;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/getScilabDirectory.h b/modules/windows_tools/src/c/scilab_windows/getScilabDirectory.h
new file mode 100755
index 000000000..e0ff08799
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/getScilabDirectory.h
@@ -0,0 +1,28 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __GETSCILABDIRECTORY_H__
+#define __GETSCILABDIRECTORY_H__
+
+#include "dynlib_scilab_windows.h"
+#include "BOOL.h" /* BOOL */
+
+/**
+* get scilab directory (windows)
+* @param [in]
+* @return
+*/
+SCILAB_WINDOWS_IMPEXP char *getScilabDirectory(BOOL UnixStyle);
+
+#endif /* __GETSCILABDIRECTORY_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/getVideoAdapters.c b/modules/windows_tools/src/c/scilab_windows/getVideoAdapters.c
new file mode 100755
index 000000000..46575bd1a
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/getVideoAdapters.c
@@ -0,0 +1,160 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2011 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#include <Windows.h>
+#include "getVideoAdapters.h"
+#include "MALLOC.h"
+#include "BOOL.h"
+#include "strdup_windows.h"
+/*--------------------------------------------------------------------------*/
+static int getNumberOfAdapters(BOOL *multiDriver);
+static void RemoveDuplicateStrings(char **Strings, int *SizeStrings);
+/*--------------------------------------------------------------------------*/
+char **getVideoAdapters(int *returnedNbAdapters)
+{
+ BOOL bMultiDriver = FALSE;
+ DISPLAY_DEVICE displayDevice;
+ DEVMODE devMode;
+ char **StringNames = NULL;
+ DISPLAY_DEVICE dd;
+ int nbAdapters = getNumberOfAdapters(&bMultiDriver);
+ memset(&dd, 0, sizeof(DISPLAY_DEVICE));
+ *returnedNbAdapters = 0;
+
+ if (nbAdapters > 0)
+ {
+ StringNames = (char**)MALLOC(sizeof(char*) * nbAdapters);
+ if (StringNames)
+ {
+ DWORD deviceNum = 0;
+ DWORD i = 0;
+ memset(&displayDevice, 0, sizeof(displayDevice));
+ displayDevice.cb = sizeof(DISPLAY_DEVICE);
+ while (EnumDisplayDevices(NULL, i, &displayDevice, 0))
+ {
+ if (displayDevice.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER)
+ {
+ }
+ else
+ {
+ EnumDisplaySettings(displayDevice.DeviceName, ENUM_CURRENT_SETTINGS, &devMode);
+ StringNames[(int)deviceNum] = strdup(displayDevice.DeviceString);
+ ++deviceNum;
+ }
+ ++i;
+ }
+ *returnedNbAdapters = (int)deviceNum;
+ RemoveDuplicateStrings(StringNames, returnedNbAdapters);
+ }
+ }
+ return StringNames;
+}
+/*--------------------------------------------------------------------------*/
+static int getNumberOfAdapters(BOOL *multiDriver)
+{
+ DWORD deviceNum = 0;
+ DWORD i = 0;
+ DISPLAY_DEVICE displayDevice;
+
+ memset(&displayDevice, 0, sizeof(displayDevice));
+ displayDevice.cb = sizeof(DISPLAY_DEVICE);
+ while (EnumDisplayDevices(NULL, i, &displayDevice, 0))
+ {
+ if (displayDevice.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER)
+ {
+ }
+ else
+ {
+ if (displayDevice.StateFlags & DISPLAY_DEVICE_MULTI_DRIVER )
+ {
+ *multiDriver = TRUE;
+ }
+ ++deviceNum;
+ }
+ ++i;
+ }
+ return deviceNum;
+}
+/*--------------------------------------------------------------------------*/
+static void RemoveDuplicateStrings(char **Strings, int *SizeStrings)
+{
+ int fin, i;
+ int newsize = *SizeStrings;
+ for (fin = *SizeStrings - 1; fin > 0; fin--)
+ {
+ int Sorted = FALSE;
+ for (i = 0; i < fin; i++)
+ {
+ if (Strings[i])
+ {
+ if (strcmp(Strings[i], Strings[i + 1]) == 0)
+ {
+ FREE(Strings[i + 1]);
+ Strings[i + 1] = NULL;
+ Sorted = TRUE;
+ newsize--;
+ }
+ }
+ else
+ {
+ Strings[i] = Strings[i + 1];
+ Strings[i + 1] = NULL;
+ Sorted = TRUE;
+ }
+ }
+ if (!Sorted)
+ {
+ break;
+ }
+ }
+
+ *SizeStrings = newsize;
+}
+/*--------------------------------------------------------------------------*/
+char * GetPrimaryVideoCardVersion(void)
+{
+#define KeyDisplayIdentifer "SYSTEM\\ControlSet001\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}\\0000"
+#define KeyDisplayIdentiferOthers "SYSTEM\\ControlSet002\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}\\0000"
+#define LenLine 255
+
+ HKEY key;
+ DWORD result;
+ char *LineIdentifier;
+ ULONG length = LenLine, Type;
+
+ result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, KeyDisplayIdentifer, 0, KEY_QUERY_VALUE , &key);
+ if (result != ERROR_SUCCESS)
+ {
+ // On some configuration (x64 + non official drivers), ControlSet001 does not exist
+ result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, KeyDisplayIdentiferOthers, 0, KEY_QUERY_VALUE , &key);
+ }
+
+ LineIdentifier = (char*)MALLOC(sizeof(char) * length);
+
+ if ( RegQueryValueEx(key, "DriverVersion", 0, &Type, (LPBYTE)LineIdentifier, &length) != ERROR_SUCCESS )
+ {
+ wsprintf(LineIdentifier, "ERROR");
+ }
+
+ if ( Type != REG_SZ )
+ {
+ wsprintf(LineIdentifier, "ERROR");
+ }
+
+ if ( result == ERROR_SUCCESS )
+ {
+ RegCloseKey(key);
+ }
+
+ return (char *)LineIdentifier;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/getVideoAdapters.h b/modules/windows_tools/src/c/scilab_windows/getVideoAdapters.h
new file mode 100755
index 000000000..12bdfae25
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/getVideoAdapters.h
@@ -0,0 +1,21 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2011 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#ifndef __GETVIDEOADAPTERS_H__
+#define __GETVIDEOADAPTERS_H__
+
+#include "dynlib_scilab_windows.h"
+
+SCILAB_WINDOWS_IMPEXP char **getVideoAdapters(int *returnedNbAdapters);
+SCILAB_WINDOWS_IMPEXP char * GetPrimaryVideoCardVersion(void);
+#endif /* __GETVIDEOADAPTERS_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/killScilabProcess.c b/modules/windows_tools/src/c/scilab_windows/killScilabProcess.c
new file mode 100755
index 000000000..68600ea39
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/killScilabProcess.c
@@ -0,0 +1,33 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <windows.h>
+#include "killScilabProcess.h"
+/*--------------------------------------------------------------------------*/
+void killScilabProcess(int exitCode)
+{
+ HANDLE hProcess;
+
+ /* Ouverture de ce Process avec droit pour le tuer */
+ hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, GetCurrentProcessId());
+ if (hProcess)
+ {
+ /* Tue ce Process */
+ TerminateProcess(hProcess, exitCode);
+ }
+ else
+ {
+ MessageBox(NULL, "Don't Find Scilab Process", "Warning", MB_ICONWARNING);
+ }
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/killScilabProcess.h b/modules/windows_tools/src/c/scilab_windows/killScilabProcess.h
new file mode 100755
index 000000000..09a50be6b
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/killScilabProcess.h
@@ -0,0 +1,26 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __KILLSCILABPROCESS_H__
+#define __KILLSCILABPROCESS_H__
+
+#include "dynlib_scilab_windows.h"
+
+/**
+* Kill current scilab process
+* @param[in] exit code value
+*/
+SCILAB_WINDOWS_IMPEXP void killScilabProcess(int exitCode);
+
+#endif /* __KILLSCILABPROCESS_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/mmapWindows.c b/modules/windows_tools/src/c/scilab_windows/mmapWindows.c
new file mode 100755
index 000000000..7f488176c
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/mmapWindows.c
@@ -0,0 +1,135 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2010 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#include <string.h>
+#include <windows.h>
+#include "mmapWindows.h"
+/*--------------------------------------------------------------------------*/
+#ifdef _WIN64
+typedef LONG64 LOCKLONG;
+#else
+typedef LONG LOCKLONG;
+#endif
+static LOCKLONG g_sl = 0;
+/*--------------------------------------------------------------------------*/
+/* Wait for spin lock */
+static int slwait (LOCKLONG *sl)
+{
+
+ LOCKLONG Destination = *sl;
+ LONG Exchange = 1;
+ LONG Comparand = 0;
+#if _WIN64
+ while (InterlockedCompareExchange64(&Destination, Exchange, Comparand))
+
+#else
+ while (InterlockedCompareExchange (&Destination, Exchange, Comparand))
+#endif
+ {
+ Sleep (0);
+ }
+ *sl = Destination;
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
+/* Release spin lock */
+static int slrelease (LOCKLONG *sl)
+{
+ InterlockedExchange ((volatile LONG*)sl, 0);
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
+/* getpagesize for windows */
+static long getpagesize (void)
+{
+ static long g_pagesize = 0;
+ if (!g_pagesize)
+ {
+ SYSTEM_INFO system_info;
+ GetSystemInfo (&system_info);
+ g_pagesize = system_info.dwPageSize;
+ }
+ return g_pagesize;
+}
+/*--------------------------------------------------------------------------*/
+static long getregionsize (void)
+{
+ static long g_regionsize = 0;
+ if (! g_regionsize)
+ {
+ SYSTEM_INFO system_info;
+ GetSystemInfo (&system_info);
+ g_regionsize = system_info.dwAllocationGranularity;
+ }
+ return g_regionsize;
+}
+/*--------------------------------------------------------------------------*/
+void *mmap (void *ptr, long size, long prot, long type, long handle, long arg)
+{
+ static long g_pagesize;
+ static long g_regionsize;
+
+ /* Wait for spin lock */
+ slwait (&g_sl);
+
+ /* First time initialization */
+ if (! g_pagesize)
+ {
+ g_pagesize = getpagesize ();
+ }
+
+ if (! g_regionsize)
+ {
+ g_regionsize = getregionsize ();
+ }
+
+ /* Allocate this */
+ ptr = VirtualAlloc (ptr, size, MEM_RESERVE | MEM_COMMIT | MEM_TOP_DOWN, PAGE_READWRITE);
+ /* Release spin lock */
+ slrelease (&g_sl);
+ return ptr;
+}
+/*--------------------------------------------------------------------------*/
+long munmap (void *ptr, long size)
+{
+ static long g_pagesize = 0;
+ static long g_regionsize = 0;
+ int rc = MUNMAP_FAILURE;
+
+ /* Wait for spin lock */
+ slwait (&g_sl);
+
+ /* First time initialization */
+ if (! g_pagesize)
+ {
+ g_pagesize = getpagesize ();
+ }
+
+ if (! g_regionsize)
+ {
+ g_regionsize = getregionsize ();
+ }
+
+ /* Free this */
+ if (! VirtualFree (ptr, 0, MEM_RELEASE))
+ {
+ /* Release spin lock */
+ slrelease (&g_sl);
+ return rc;
+ }
+
+ rc = 0;
+ /* Release spin lock */
+ slrelease (&g_sl);
+ return rc;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/mmapWindows.h b/modules/windows_tools/src/c/scilab_windows/mmapWindows.h
new file mode 100755
index 000000000..a85906e5b
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/mmapWindows.h
@@ -0,0 +1,32 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2010 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#ifndef __MMAPWINDOWS_H__
+#define __MMAPWINDOWS_H__
+
+#include "dynlib_scilab_windows.h"
+
+#define MMAP_FAILURE (-1)
+#define MUNMAP_FAILURE (-1)
+#define PROT_READ 0x1
+#define PROT_WRITE 0x2
+#define MAP_SHARED 1
+#define MAP_ANONYMOUS 0x20
+
+/* Emulation of mmap and munmap on Windows */
+
+SCILAB_WINDOWS_IMPEXP void *mmap (void *ptr, long size, long prot, long type, long handle, long arg);
+
+SCILAB_WINDOWS_IMPEXP long munmap (void *ptr, long size);
+
+#endif /* __MMAPWINDOWS_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/registry-files-association.reg b/modules/windows_tools/src/c/scilab_windows/registry-files-association.reg
new file mode 100755
index 000000000..59ecda58c
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/registry-files-association.reg
@@ -0,0 +1,46 @@
+Windows Registry Editor Version 5.00
+
+[HKEY_CLASSES_ROOT\.sce]
+
+[HKEY_CLASSES_ROOT\.sce\DefaultIcon]
+@="D:\\TRUNK\\scilab\\bin\\wscilex.exe,7"
+
+[HKEY_CLASSES_ROOT\.sce\print]
+
+[HKEY_CLASSES_ROOT\.sce\print\command]
+@="\"D:\\TRUNK\\scilab\\bin\\scilex.exe\" -P \"%1\""
+
+[HKEY_CLASSES_ROOT\.sce\Run with Scilab 5.0-SVN]
+
+[HKEY_CLASSES_ROOT\.sce\Run with Scilab 5.0-SVN\command]
+@="\"d:\\TRUNK\\scilab\\bin\\wscilex.exe\" -X \"%1\""
+
+[HKEY_CLASSES_ROOT\.sce\shell]
+
+[HKEY_CLASSES_ROOT\.sce\shell\open]
+
+[HKEY_CLASSES_ROOT\.sce\shell\open\command]
+@="\"D:\\TRUNK\\scilab\\bin\\wscilex.exe\" -O \"%1\""
+
+[HKEY_CLASSES_ROOT\.sci]
+
+[HKEY_CLASSES_ROOT\.sci\DefaultIcon]
+@="D:\\TRUNK\\scilab\\bin\\wscilex.exe,8"
+
+[HKEY_CLASSES_ROOT\.sci\print]
+
+[HKEY_CLASSES_ROOT\.sci\print\command]
+@="\"D:\\TRUNK\\scilab\\bin\\scilex.exe\" -P \"%1\""
+
+[HKEY_CLASSES_ROOT\.sci\Run with Scilab 5.0-SVN]
+
+[HKEY_CLASSES_ROOT\.sci\Run with Scilab 5.0-SVN\command]
+@="\"d:\\TRUNK\\scilab\\bin\\wscilex.exe\" -X \"%1\""
+
+[HKEY_CLASSES_ROOT\.sci\shell]
+
+[HKEY_CLASSES_ROOT\.sci\shell\open]
+
+[HKEY_CLASSES_ROOT\.sci\shell\open\command]
+@="\"D:\\TRUNK\\scilab\\bin\\wscilex.exe\" -O \"%1\""
+
diff --git a/modules/windows_tools/src/c/scilab_windows/resource.h b/modules/windows_tools/src/c/scilab_windows/resource.h
new file mode 100755
index 000000000..475683b20
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/resource.h
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Allan CORNET
+// Copyright (C) DIGITEO - 2012 - Allan CORNET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, whic
+// you should have received as part of this distribution. The terms
+// are also available at
+//
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by scilab_windows.rc
+//
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 106
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1006
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/modules/windows_tools/src/c/scilab_windows/scilab_main.c b/modules/windows_tools/src/c/scilab_windows/scilab_main.c
new file mode 100755
index 000000000..3f132ac1e
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/scilab_main.c
@@ -0,0 +1,99 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <Windows.h>
+#include <stdio.h>
+#include <setjmp.h>
+#include <signal.h>
+
+#include "scilab_main.h"
+#include "scilabmode.h"
+#include "realmain.h"
+#include "sciprint.h"
+#include "sciquit.h"
+#include "LaunchScilabSignal.h"
+/*--------------------------------------------------------------------------*/
+static void interrupt_setup (void);
+static void interrupt (int an_int);
+/*--------------------------------------------------------------------------*/
+jmp_buf env;
+/*--------------------------------------------------------------------------*/
+int sci_windows_main ( int *nos, char *path, InitScriptType pathtype, int *lpath, int memory)
+{
+ InitializeLaunchScilabSignal();
+ setbuf (stderr, (char *) NULL);
+ if (!setjmp (env))
+ {
+ /* first time */
+ interrupt_setup ();
+ }
+ /* take commands from stdin */
+ return realmain(*nos, path, pathtype, memory);
+}
+/*--------------------------------------------------------------------------*/
+/* Set up to catch interrupts */
+static void interrupt_setup (void)
+{
+ (void) signal (SIGINT, interrupt);
+}
+/*--------------------------------------------------------------------------*/
+void interrupt (int an_int)
+{
+ (void) signal (SIGINT, interrupt);
+ (void) signal (SIGFPE, SIG_DFL); /* turn off FPE trapping */
+ (void) fflush (stdout);
+ sciprint ("\n");
+ longjmp (env, TRUE); /* return to prompt */
+}
+/*--------------------------------------------------------------------------*/
+void sci_clear_and_exit(int n) /* used with handlers */
+{
+#ifdef _DEBUG
+ char Message[256];
+ switch (n)
+ {
+ case SIGINT:
+ wsprintf(Message, "SIGINT Signal detected");
+ break;
+ case SIGILL:
+ wsprintf(Message, "SIGILL Signal detected");
+ break;
+ case SIGFPE:
+ wsprintf(Message, "SIGFPE Signal detected");
+ break;
+ case SIGSEGV:
+ wsprintf(Message, "SIGSEGV Signal detected");
+ break;
+ case SIGTERM:
+ wsprintf(Message, "SIGTERM Signal detected");
+ break;
+ case SIGBREAK:
+ wsprintf(Message, "SIGBREAK Signal detected");
+ break;
+ case SIGABRT:
+ wsprintf(Message, "SIGABRT Signal detected");
+ break;
+ default:
+ wsprintf(Message, "Unknown Signal detected");
+ break;
+ }
+ MessageBox(NULL, Message, "ERROR", MB_ICONWARNING);
+#else
+ /*
+ MessageBox(NULL,"Scilab has performed a illegal operation\nand will be shutdown.\n Please save your work ...",
+ "Warning",MB_ICONWARNING);
+ */
+#endif
+ sciquit();
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/scilab_main.h b/modules/windows_tools/src/c/scilab_windows/scilab_main.h
new file mode 100755
index 000000000..43e23e797
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/scilab_main.h
@@ -0,0 +1,31 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __SCILAB_MAIN__H__
+#define __SCILAB_MAIN__H__
+
+#include "dynlib_scilab_windows.h"
+#include "realmain.h" /* InitScriptType */
+
+/**
+* common main for windows
+* @param[in] no startup
+* @param[in] path script
+* @param[in] path type
+* @param[in] size path
+* @param[in] stacksize
+*/
+SCILAB_WINDOWS_IMPEXP int sci_windows_main ( int *nos, char *path, InitScriptType pathtype, int *lpath, int memory);
+
+#endif /* __SCILAB_MAIN__H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/scilab_windows.rc b/modules/windows_tools/src/c/scilab_windows/scilab_windows.rc
new file mode 100755
index 000000000..97e82a5b2
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/scilab_windows.rc
@@ -0,0 +1,93 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <windows.h>
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// French (France) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
+LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
+#pragma code_page(1252)
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 5,5,2,0
+ PRODUCTVERSION 5,5,2,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040c04b0"
+ BEGIN
+ VALUE "FileDescription", "Scilab for Windows"
+ VALUE "FileVersion", "5, 5, 2, 0"
+ VALUE "InternalName", "Scilab for Windows"
+ VALUE "LegalCopyright", "Copyright (C) 2017"
+ VALUE "OriginalFilename", "scilab_windows.dll"
+ VALUE "ProductName", "scilab_windows"
+ VALUE "ProductVersion", "5, 5, 2, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x40c, 1200
+ END
+END
+
+#endif // French (France) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/modules/windows_tools/src/c/scilab_windows/scilab_windows.vcxproj b/modules/windows_tools/src/c/scilab_windows/scilab_windows.vcxproj
new file mode 100755
index 000000000..1a1274ee7
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/scilab_windows.vcxproj
@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8028F371-6A94-4A26-8804-6E7F05F1D1AA}</ProjectGuid>
+ <RootNamespace>scilab_windows</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>.;..;../../../includes;../../../../core/includes;../../../../core/src/c;../../../../gui/includes;../../../../gui/src/c;../../../../localization/includes;../../../../localization/src/c;../../../../output_stream/includes;../../../../fileio/includes;../../../../action_binding/includes;../../../../../libs/intl;../../../../string/includes</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SCILAB_WINDOWS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <PreLinkEvent>
+ <Message>Make dependencies</Message>
+ <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)Localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scilocalization.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)Gui_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scigui.lib" 1&gt;NUL 2&gt;NUL
+</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>core.lib;scilocalization.lib;scigui.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>.;..;../../../includes;../../../../core/includes;../../../../core/src/c;../../../../gui/includes;../../../../gui/src/c;../../../../localization/includes;../../../../localization/src/c;../../../../output_stream/includes;../../../../fileio/includes;../../../../action_binding/includes;../../../../../libs/intl;../../../../string/includes</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SCILAB_WINDOWS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <PreLinkEvent>
+ <Message>Make dependencies</Message>
+ <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)Localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scilocalization.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)Gui_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scigui.lib" 1&gt;NUL 2&gt;NUL
+</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>core.lib;scilocalization.lib;scigui.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>.;..;../../../includes;../../../../core/includes;../../../../core/src/c;../../../../gui/includes;../../../../gui/src/c;../../../../localization/includes;../../../../localization/src/c;../../../../output_stream/includes;../../../../fileio/includes;../../../../action_binding/includes;../../../../../libs/intl;../../../../string/includes</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SCILAB_WINDOWS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <PreLinkEvent>
+ <Message>Make dependencies</Message>
+ <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)Localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scilocalization.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)Gui_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scigui.lib" 1&gt;NUL 2&gt;NUL
+</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>core.lib;scilocalization.lib;scigui.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>
+ </LinkTimeCodeGeneration>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>.;..;../../../includes;../../../../core/includes;../../../../core/src/c;../../../../gui/includes;../../../../gui/src/c;../../../../localization/includes;../../../../localization/src/c;../../../../output_stream/includes;../../../../fileio/includes;../../../../action_binding/includes;../../../../../libs/intl;../../../../string/includes</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SCILAB_WINDOWS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <PreLinkEvent>
+ <Message>Make dependencies</Message>
+ <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)Localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scilocalization.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)Gui_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scigui.lib" 1&gt;NUL 2&gt;NUL
+</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>core.lib;scilocalization.lib;scigui.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>
+ </LinkTimeCodeGeneration>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="buildMainWindowTitle_Windows.c" />
+ <ClCompile Include="console.c" />
+ <ClCompile Include="console_main.c" />
+ <ClCompile Include="ConvertSlash.c" />
+ <ClCompile Include="DllmainScilab_Windows.c" />
+ <ClCompile Include="FilesAssociations.c" />
+ <ClCompile Include="FindScilab.c" />
+ <ClCompile Include="FocusOnConsole.c" />
+ <ClCompile Include="forbiddenToUseScilab.c" />
+ <ClCompile Include="getBlasType.c" />
+ <ClCompile Include="getScilabDirectory.c" />
+ <ClCompile Include="getVideoAdapters.c" />
+ <ClCompile Include="InnosetupMutex.c" />
+ <ClCompile Include="killScilabProcess.c" />
+ <ClCompile Include="mmapWindows.c" />
+ <ClCompile Include="MutexClosingScilab.c" />
+ <ClCompile Include="scilab_main.c" />
+ <ClCompile Include="SetScilabEnvironmentVariables.c" />
+ <ClCompile Include="spawncommand.c" />
+ <ClCompile Include="splashScreen.cpp" />
+ <ClCompile Include="strdup_windows.c" />
+ <ClCompile Include="TextToPrint.c" />
+ <ClCompile Include="windows_main.c" />
+ <ClCompile Include="WindowShow.c" />
+ <ClCompile Include="wmcopydata.c" />
+ <ClCompile Include="WndThread.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="buildMainWindowTitle_Windows.h" />
+ <ClInclude Include="console.h" />
+ <ClInclude Include="console_main.h" />
+ <ClInclude Include="..\..\..\includes\ConvertSlash.h" />
+ <ClInclude Include="dynlib_scilab_windows.h" />
+ <ClInclude Include="FilesAssociations.h" />
+ <ClInclude Include="FindScilab.h" />
+ <ClInclude Include="..\..\..\includes\FocusOnConsole.h" />
+ <ClInclude Include="forbiddenToUseScilab.h" />
+ <ClInclude Include="getBlasType.h" />
+ <ClInclude Include="getScilabDirectory.h" />
+ <ClInclude Include="getVideoAdapters.h" />
+ <ClInclude Include="InnosetupMutex.h" />
+ <ClInclude Include="killScilabProcess.h" />
+ <ClInclude Include="mmapWindows.h" />
+ <ClInclude Include="..\..\..\includes\MutexClosingScilab.h" />
+ <ClInclude Include="resource.h" />
+ <ClInclude Include="scilab_main.h" />
+ <ClInclude Include="SetHeapOptions.h" />
+ <ClInclude Include="SetScilabEnvironmentVariables.h" />
+ <ClInclude Include="spawncommand.h" />
+ <ClInclude Include="splashScreen.h" />
+ <ClInclude Include="..\..\..\includes\strdup_windows.h" />
+ <ClInclude Include="TextToPrint.h" />
+ <ClInclude Include="windows_main.h" />
+ <ClInclude Include="WindowShow.h" />
+ <ClInclude Include="wmcopydata.h" />
+ <ClInclude Include="WndThread.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Gui_Import.def" />
+ <None Include="core_import.def" />
+ <None Include="Localization_Import.def" />
+ <None Include="windows_tools_Import.def" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="scilab_windows.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj">
+ <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\fileio\fileio.vcxproj">
+ <Project>{4fc72d4a-80ee-4b1a-8724-0201c1a35621}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\output_stream\src\c\output_stream.vcxproj">
+ <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\string\src\c\string.vcxproj">
+ <Project>{8d45767a-9b03-4905-97f6-d2f3f79141ea}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\windows_tools.vcxproj">
+ <Project>{9594ac02-20ee-4fbf-95b4-bfa5865ed7ca}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/modules/windows_tools/src/c/scilab_windows/scilab_windows.vcxproj.filters b/modules/windows_tools/src/c/scilab_windows/scilab_windows.vcxproj.filters
new file mode 100755
index 000000000..3a8ef3af9
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/scilab_windows.vcxproj.filters
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{5c5e1adc-2a57-45a2-9bcc-0d584f86aaf8}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{fe205ab9-974b-42cf-8f22-9886967a1c5c}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{36da833f-eb67-489f-a609-9921cae3b997}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Libraries Dependencies">
+ <UniqueIdentifier>{c2601202-2c27-49e6-b2e5-500839247091}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Libraries Dependencies\Imports">
+ <UniqueIdentifier>{f93061bc-eb15-411c-883c-7d772d9c3eed}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="buildMainWindowTitle_Windows.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="console.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="console_main.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ConvertSlash.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="DllmainScilab_Windows.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="FilesAssociations.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="FindScilab.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="FocusOnConsole.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="forbiddenToUseScilab.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="getScilabDirectory.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="InnosetupMutex.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="killScilabProcess.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="mmapWindows.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="MutexClosingScilab.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="scilab_main.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="SetScilabEnvironmentVariables.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="spawncommand.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="strdup_windows.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TextToPrint.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="windows_main.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="WindowShow.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="wmcopydata.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="WndThread.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="getBlasType.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="getVideoAdapters.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="splashScreen.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="buildMainWindowTitle_Windows.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="console.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="console_main.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\includes\ConvertSlash.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="dynlib_scilab_windows.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="FilesAssociations.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="FindScilab.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\includes\FocusOnConsole.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="forbiddenToUseScilab.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="getScilabDirectory.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="InnosetupMutex.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="killScilabProcess.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="mmapWindows.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\includes\MutexClosingScilab.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="scilab_main.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="SetHeapOptions.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="SetScilabEnvironmentVariables.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="spawncommand.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="splashScreen.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\includes\strdup_windows.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="TextToPrint.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="windows_main.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="WindowShow.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="wmcopydata.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="WndThread.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="getBlasType.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="getVideoAdapters.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Gui_Import.def">
+ <Filter>Libraries Dependencies\Imports</Filter>
+ </None>
+ <None Include="core_import.def">
+ <Filter>Libraries Dependencies\Imports</Filter>
+ </None>
+ <None Include="Localization_Import.def">
+ <Filter>Libraries Dependencies\Imports</Filter>
+ </None>
+ <None Include="windows_tools_Import.def">
+ <Filter>Libraries Dependencies\Imports</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="scilab_windows.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/modules/windows_tools/src/c/scilab_windows/spawncommand.c b/modules/windows_tools/src/c/scilab_windows/spawncommand.c
new file mode 100755
index 000000000..c8b31b461
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/spawncommand.c
@@ -0,0 +1,476 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - Allan CORNET
+* Copyright (C) DIGITEO - 2010 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <stdio.h>
+#include "PATH_MAX.h"
+#include "MALLOC.h"
+#include "tmpdir.h"
+#include "FileExist.h"
+#include "scilabmode.h"
+#include "spawncommand.h"
+#include "strdup_windows.h"
+#include "charEncoding.h"
+#include "getshortpathname.h"
+#include "strdup_windows.h"
+/*--------------------------------------------------------------------------*/
+#define BUFSIZE 4096
+#define LF_STR "\n"
+#define CR '\r'
+#define LF '\n'
+#define BLANK L' '
+#define NOTPRINTABLE -96
+#define EMPTY_CHAR L'\0'
+#define CMDLINE_FORMAT_DETACHED L"%ls /A /C \"%ls\""
+#define CMDLINE_FORMAT_NOTDETACHED L"%ls /A /C \"%ls && echo DOS > %ls\""
+#define OUTPUT_CHECK_FILENAME_FORMAT L"%ls\\DOS.OK"
+/*--------------------------------------------------------------------------*/
+pipeinfo SCILAB_WINDOWS_IMPEXP pipeSpawnOut = {INVALID_HANDLE_VALUE, NULL, 0};
+pipeinfo SCILAB_WINDOWS_IMPEXP pipeSpawnErr = {INVALID_HANDLE_VALUE, NULL, 0};
+/*--------------------------------------------------------------------------*/
+static int GetNumberOfLines(char *lines);
+static BOOL removeEOL(char *_string);
+static BOOL removeNotPrintableCharacters(char *_string);
+static char *convertLine(char *_string, BOOL DetachProcess);
+/*--------------------------------------------------------------------------*/
+int spawncommand(wchar_t *command, BOOL DetachProcess)
+{
+ wchar_t shellCmd[PATH_MAX];
+ wchar_t *CmdLine = NULL;
+
+ STARTUPINFOW si;
+ PROCESS_INFORMATION pi;
+ SECURITY_ATTRIBUTES sa;
+ DWORD threadID;
+ DWORD dwCreationFlags;
+ BOOL ok = FALSE;
+ HANDLE hProcess = NULL, h = NULL, pipeThreads[2];
+ DWORD ExitCode = 0;
+
+ if (wcscmp(command, L"") == 0)
+ {
+ // do nothing
+ pipeSpawnOut.NumberOfLines = 0;
+ pipeSpawnOut.OutputBuffer = NULL;
+
+ pipeSpawnErr.NumberOfLines = 0;
+ pipeSpawnErr.OutputBuffer = NULL;
+
+ return 1;
+ }
+
+ hProcess = GetCurrentProcess();
+
+ ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
+ ZeroMemory(&si, sizeof(STARTUPINFOW));
+ si.cb = sizeof(STARTUPINFO);
+ si.dwFlags = STARTF_USESTDHANDLES;
+ si.hStdInput = INVALID_HANDLE_VALUE;
+
+ ZeroMemory(&sa, sizeof(SECURITY_ATTRIBUTES));
+ sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+ sa.lpSecurityDescriptor = NULL;
+ sa.bInheritHandle = TRUE;
+
+ /* create a non-inheritible pipe. */
+ CreatePipe(&pipeSpawnOut.pipe, &h, &sa, 0);
+
+ /* dupe the write side, make it inheritible, and close the original. */
+ DuplicateHandle(hProcess, h, hProcess, &si.hStdOutput,
+ 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+
+ /* Same as above, but for the error side. */
+ CreatePipe(&pipeSpawnErr.pipe, &h, &sa, 0);
+ DuplicateHandle(hProcess, h, hProcess, &si.hStdError,
+ 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+
+ /* base command line */
+ GetEnvironmentVariableW(L"ComSpec", shellCmd, PATH_MAX);
+
+ if (DetachProcess)
+ {
+ int lenCmdLine = (int)(wcslen(shellCmd) + wcslen(command) + wcslen(CMDLINE_FORMAT_DETACHED));
+ CmdLine = (wchar_t*) MALLOC((lenCmdLine + 1) * sizeof(wchar_t));
+ swprintf(CmdLine, lenCmdLine, CMDLINE_FORMAT_DETACHED, shellCmd, command);
+
+ dwCreationFlags = DETACHED_PROCESS;
+ }
+ else
+ {
+ int lenCmdLine = 0;
+ wchar_t FileTMPDir[PATH_MAX + 16];
+ BOOL bConvert = FALSE;
+
+ wchar_t *TMPDirLong = getTMPDIRW();
+
+ swprintf(FileTMPDir, PATH_MAX + 16, OUTPUT_CHECK_FILENAME_FORMAT, TMPDirLong);
+ FREE(TMPDirLong);
+
+ if (FileExistW(FileTMPDir))
+ {
+ DeleteFileW(FileTMPDir);
+ }
+
+ lenCmdLine = (int)(wcslen(shellCmd) + wcslen(command) + wcslen(CMDLINE_FORMAT_NOTDETACHED) +
+ wcslen(FileTMPDir));
+ CmdLine = (wchar_t*)MALLOC((lenCmdLine + 1) * sizeof(wchar_t));
+ swprintf(CmdLine, lenCmdLine, CMDLINE_FORMAT_NOTDETACHED, shellCmd, command, FileTMPDir);
+
+ dwCreationFlags = 0;
+ }
+
+ ok = CreateProcessW(
+ NULL, /* Module name. */
+ CmdLine, /* Command line. */
+ NULL, /* Process handle not inheritable. */
+ NULL, /* Thread handle not inheritable. */
+ TRUE, /* yes, inherit handles. */
+ dwCreationFlags, /* No console for you. */
+ NULL, /* Use parent's environment block. */
+ NULL, /* Use parent's starting directory. */
+ &si, /* Pointer to STARTUPINFO structure. */
+ &pi); /* Pointer to PROCESS_INFORMATION structure. */
+
+ if (!ok)
+ {
+ return 2;
+ }
+
+ if (CmdLine)
+ {
+ FREE(CmdLine);
+ CmdLine = NULL;
+ }
+
+ /* close our references to the write handles that have now been inherited. */
+ CloseHandle(si.hStdOutput);
+ CloseHandle(si.hStdError);
+
+ WaitForInputIdle(pi.hProcess, 5000);
+ CloseHandle(pi.hThread);
+
+ /* start the pipe reader threads. */
+ pipeThreads[0] = CreateThread(NULL, 0, ReadFromPipe, &pipeSpawnOut, 0, &threadID);
+ pipeThreads[1] = CreateThread(NULL, 0, ReadFromPipe, &pipeSpawnErr, 0, &threadID);
+
+ /* block waiting for the process to end. */
+ WaitForSingleObject(pi.hProcess, INFINITE);
+
+ if ( GetExitCodeProcess(pi.hProcess, &ExitCode) == STILL_ACTIVE )
+ {
+ TerminateProcess(pi.hProcess, 0);
+ }
+
+ CloseHandle(pi.hProcess);
+
+ /* wait for our pipe to get done reading */
+ WaitForMultipleObjects(2, pipeThreads, TRUE, 500);
+ CloseHandle(pipeThreads[0]);
+ CloseHandle(pipeThreads[1]);
+
+ return ExitCode;
+}
+/*--------------------------------------------------------------------------*/
+int ClosePipeInfo (pipeinfo pipe)
+{
+ CloseHandle(pipe.pipe);
+ if (pipe.OutputBuffer)
+ {
+ FREE(pipe.OutputBuffer);
+ pipe.OutputBuffer = NULL;
+ pipe.NumberOfLines = 0;
+ }
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
+DWORD WINAPI ReadFromPipe (LPVOID args)
+{
+ pipeinfo *pi = (pipeinfo *) args;
+ int readSoFar = 0;
+ DWORD dwRead;
+ BOOL moreOutput = TRUE;
+ unsigned char *op = NULL;
+
+ pi->OutputBuffer = (unsigned char*) MALLOC(BUFSIZE);
+ op = pi->OutputBuffer;
+
+ while (moreOutput)
+ {
+ BOOL bres = ReadFile( pi->pipe, op, BUFSIZE - 1, &dwRead, NULL);
+
+ moreOutput = bres || (dwRead != 0);
+
+ if (moreOutput)
+ {
+ readSoFar += dwRead;
+ pi->OutputBuffer = (unsigned char*) REALLOC(pi->OutputBuffer , readSoFar + BUFSIZE);
+ op = pi->OutputBuffer + readSoFar;
+ }
+ }
+ *op = '\0';
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
+int GetNumberOfLines(char *lines)
+{
+ int NumberOfLines = 0;
+ if (lines)
+ {
+ char *buffer = strdup(lines);
+ if (buffer)
+ {
+ int i = 0;
+ char *line = strtok(buffer, LF_STR);
+
+ while (line)
+ {
+ line = strtok(NULL, LF_STR);
+ i++;
+ }
+
+ NumberOfLines = i;
+
+ FREE(buffer);
+ buffer = NULL;
+ }
+ if (NumberOfLines == 0)
+ {
+ NumberOfLines = 1;
+ }
+ }
+ return NumberOfLines;
+}
+/*--------------------------------------------------------------------------*/
+char **CreateOuput(pipeinfo *pipe, BOOL DetachProcess)
+{
+ char **OuputStrings = NULL;
+ if (pipe)
+ {
+ if (pipe->OutputBuffer)
+ {
+ char *buffer = strdup((const char *)(pipe->OutputBuffer));
+ if (buffer)
+ {
+ pipe->NumberOfLines = GetNumberOfLines(buffer);
+ if (pipe->NumberOfLines)
+ {
+ OuputStrings = (char**)MALLOC((pipe->NumberOfLines) * sizeof(char*));
+ if (OuputStrings)
+ {
+ char *line = strtok(buffer, LF_STR);
+ int i = 0;
+
+ while (line)
+ {
+ OuputStrings[i] = convertLine(line, DetachProcess);
+ line = strtok(NULL, LF_STR);
+ i++;
+ if (i > pipe->NumberOfLines)
+ {
+ break;
+ }
+ }
+ }
+ }
+ FREE(buffer);
+ buffer = NULL;
+ }
+ }
+ }
+ return OuputStrings;
+}
+/*--------------------------------------------------------------------------*/
+BOOL DetectDetachProcessInCommandLine(wchar_t *command)
+{
+ BOOL bOK = FALSE;
+ if (command)
+ {
+ int i = (int)wcslen(command);
+ for (i = (int)wcslen(command) - 1; i >= 0; i--)
+ {
+ if (command[i] == BLANK)
+ {
+ command[i] = EMPTY_CHAR;
+ }
+ else
+ {
+ break;
+ }
+ }
+ i = (int)wcslen(command);
+ if ( (i > 0) && (command[i - 1] == L'&') )
+ {
+ bOK = TRUE;
+ }
+ }
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
+BOOL removeEOL(char *_string)
+{
+ if (_string)
+ {
+ int len = (int)strlen(_string);
+ if ( (_string[len - 1] == CR) || (_string[len - 1] == LF) )
+ {
+ _string[len - 1] = EMPTY_CHAR;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
+BOOL removeNotPrintableCharacters(char *_string)
+{
+ if (_string)
+ {
+ int j = 0;
+ int len = (int)strlen(_string);
+ BOOL bRemove = FALSE;
+ for (j = 0; j < len; j++)
+ {
+ /* remove some no printable characters */
+ if (_string[j] == NOTPRINTABLE)
+ {
+ _string[j] = BLANK;
+ bRemove = TRUE;
+ }
+ }
+ return bRemove;
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
+char *convertLine(char *_string, BOOL DetachProcess)
+{
+ char *convertedString = NULL;
+ if (_string)
+ {
+ convertedString = strdup(_string);
+
+ if (getScilabMode() == SCILAB_STD)
+ {
+ if ( (!DetachProcess) && (!IsValidUTF8(_string)) )
+ {
+ // We need to add detection of ANSI characters
+ // in this case we do not convert from Oem to char
+ OemToChar(_string, convertedString);
+ }
+ }
+ else
+ {
+ // in -nw mode
+ // chcp 65001 (to switch cmd to UNICODE)
+ // and change font to Lucida (TrueType)
+ if ( (DetachProcess) && (!IsValidUTF8(_string)) )
+ {
+ CharToOem(_string, convertedString);
+ }
+ }
+
+ removeEOL(convertedString);
+ removeNotPrintableCharacters(convertedString);
+
+ }
+ return convertedString;
+}
+/*--------------------------------------------------------------------------*/
+int CallWindowsShell(char *command)
+{
+ int returnedExitCode = -1;
+
+ wchar_t shellCmd[PATH_MAX];
+ wchar_t *CmdLine = NULL;
+ wchar_t * wcommand = NULL;
+ size_t iCmdSize = 0;
+
+ PROCESS_INFORMATION piProcInfo;
+ STARTUPINFOW siStartInfo;
+ SECURITY_ATTRIBUTES saAttr;
+
+ DWORD ExitCode = 0;
+
+ wchar_t *TMPDir = NULL;
+ wchar_t FileTMPDir[PATH_MAX];
+
+ if (strcmp(command, "") == 0)
+ {
+ // do nothing
+ return 1;
+ }
+
+ saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
+ saAttr.bInheritHandle = TRUE;
+ saAttr.lpSecurityDescriptor = NULL;
+
+ ZeroMemory( &piProcInfo, sizeof(PROCESS_INFORMATION) );
+
+ ZeroMemory( &siStartInfo, sizeof(STARTUPINFO) );
+ siStartInfo.cb = sizeof(STARTUPINFO);
+ siStartInfo.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
+ siStartInfo.wShowWindow = SW_HIDE;
+ siStartInfo.hStdInput = NULL;
+
+ siStartInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
+ siStartInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
+
+ GetEnvironmentVariableW(L"ComSpec", shellCmd, PATH_MAX);
+ TMPDir = getTMPDIRW();
+ swprintf(FileTMPDir, PATH_MAX, L"%s\\DOS.OK", TMPDir);
+ if (TMPDir)
+ {
+ FREE(TMPDir);
+ TMPDir = NULL;
+ }
+
+ wcommand = to_wide_string(command);
+ iCmdSize = (wcslen(shellCmd) + wcslen(wcommand) + wcslen(FileTMPDir) + wcslen(L"%s /a /c \"%s\" && echo DOS>%s") + 1);
+ CmdLine = (wchar_t*)MALLOC(iCmdSize * sizeof(wchar_t));
+ swprintf(CmdLine, iCmdSize, L"%s /a /c \"%s\" && echo DOS>%s", shellCmd, wcommand, FileTMPDir);
+
+ if (CreateProcessW(NULL, CmdLine, NULL, NULL, TRUE, 0, NULL, NULL, &siStartInfo, &piProcInfo))
+ {
+ WaitForSingleObject(piProcInfo.hProcess, INFINITE);
+
+ if ( GetExitCodeProcess(piProcInfo.hProcess, &ExitCode) == STILL_ACTIVE )
+ {
+ TerminateProcess(piProcInfo.hProcess, 0);
+ }
+
+ CloseHandle(piProcInfo.hProcess);
+
+ if (CmdLine)
+ {
+ FREE(CmdLine);
+ CmdLine = NULL;
+ }
+
+ if (FileExistW(FileTMPDir))
+ {
+ DeleteFileW(FileTMPDir);
+ }
+
+ returnedExitCode = (int)ExitCode;
+ }
+ else
+ {
+ CloseHandle(piProcInfo.hProcess);
+ if (CmdLine)
+ {
+ FREE(CmdLine);
+ CmdLine = NULL;
+ }
+ }
+ return returnedExitCode;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/spawncommand.h b/modules/windows_tools/src/c/scilab_windows/spawncommand.h
new file mode 100755
index 000000000..fbbfa1431
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/spawncommand.h
@@ -0,0 +1,79 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - Allan CORNET
+* Copyright (C) DIGITEO - 2010 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __SPAWNCOMMAND_H__
+#define __SPAWNCOMMAND_H__
+/*--------------------------------------------------------------------------*/
+#include <Windows.h>
+#include "dynlib_scilab_windows.h"
+#include "BOOL.h" /* BOOL */
+/*--------------------------------------------------------------------------*/
+typedef struct pipeinfo
+{
+ HANDLE pipe;
+ unsigned char *OutputBuffer;
+ int NumberOfLines;
+} pipeinfo;
+
+#ifndef SCILAB_WINDOWS_EXPORTS
+pipeinfo SCILAB_WINDOWS_IMPEXP pipeSpawnOut;
+pipeinfo SCILAB_WINDOWS_IMPEXP pipeSpawnErr;
+#endif
+/*--------------------------------------------------------------------------*/
+/**
+* spawn a command
+* @param[in] command
+* @param[in] DetachProcess (if we want detach to scilab process)
+* @return 0
+*/
+SCILAB_WINDOWS_IMPEXP int spawncommand(wchar_t *command, BOOL DetachProcess);
+
+/**
+* ReadFromPipe (in or out)
+* @param[in] pipe handle
+* @return 0
+*/
+SCILAB_WINDOWS_IMPEXP DWORD WINAPI ReadFromPipe (LPVOID args);
+
+/**
+* check if we have a '&' (detach process)
+* @param[in] command
+* @return TRUE or FALSE
+*/
+SCILAB_WINDOWS_IMPEXP BOOL DetectDetachProcessInCommandLine(wchar_t *command);
+
+/**
+* CreateOuput
+* @param[in] pipe
+* @param[in] DetachProcess
+* @return output
+*/
+SCILAB_WINDOWS_IMPEXP char **CreateOuput(pipeinfo *pipe, BOOL DetachProcess);
+
+/**
+* Close pipe
+* @param[in] pipe
+* @return 0
+*/
+SCILAB_WINDOWS_IMPEXP int ClosePipeInfo (pipeinfo pipe);
+
+/**
+* Call cmd.exe windows shell
+* @param[in] command to execute
+* @param[out] exit code returned by cmd
+*/
+SCILAB_WINDOWS_IMPEXP int CallWindowsShell(char *command);
+
+#endif /* __SPAWNCOMMAND_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/splashScreen.cpp b/modules/windows_tools/src/c/scilab_windows/splashScreen.cpp
new file mode 100755
index 000000000..6efcb380b
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/splashScreen.cpp
@@ -0,0 +1,231 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - Allan CORNET
+* Copyright (C) DIGITEO - 2012 - 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.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#pragma comment (lib, "gdiplus.lib")
+/*--------------------------------------------------------------------------*/
+#include <Windows.h>
+#include <stdio.h>
+#include <string>
+#include <CommCtrl.h>
+#include <GdiPlus.h>
+extern "C"
+{
+#include "splashScreen.h"
+#include "localization.h"
+#include "resource.h"
+#include "version.h"
+#include "WndThread.h"
+#include "charEncoding.h"
+#include "getScilabDirectory.h"
+#include "InnosetupMutex.h"
+#include "MALLOC.h"
+};
+/*--------------------------------------------------------------------------*/
+#define SPLASH_WINDOW_CLASSNAME "Scilab splashscreen"
+#define FORMAT_FULLPATH_SPLASH_IMAGE "%s/modules/gui/images/icons/aboutScilab.png"
+/*--------------------------------------------------------------------------*/
+static DWORD WINAPI ThreadSplashScreen(LPVOID lpParam);
+static BOOL stopSplashScreen(UINT _time, UINT _timeMax);
+static BOOL haveConsoleWindow(void);
+/*--------------------------------------------------------------------------*/
+static UINT timeSplashScreen = 0;
+static Gdiplus::Image* pImage = NULL;
+/*--------------------------------------------------------------------------*/
+void splashScreen(void)
+{
+ DWORD dwThreadId, dwThrdParam = 0;
+
+ if (!haveConsoleWindow() && !haveInnosetupMutex())
+ {
+ HANDLE hThreadSplashScreen = CreateThread(NULL, 0, ThreadSplashScreen, &dwThrdParam, 0, &dwThreadId);
+ }
+}
+/*--------------------------------------------------------------------------*/
+LRESULT CALLBACK SplashWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_PAINT:
+ {
+ if (pImage)
+ {
+ Gdiplus::Graphics gdip(hwnd);
+ gdip.DrawImage(pImage, 0, 0, pImage->GetWidth(), pImage->GetHeight());
+ }
+ ValidateRect(hwnd, NULL);
+ return 0;
+ }
+ break;
+ case WM_DESTROY:
+ {
+ if (pImage)
+ {
+ delete pImage;
+ pImage = NULL;
+ }
+ }
+ }
+
+ return DefWindowProc(hwnd, uMsg, wParam, lParam);
+}
+/*--------------------------------------------------------------------------*/
+static DWORD WINAPI ThreadSplashScreen(LPVOID lpParam)
+{
+ char *ScilabDirectory = NULL;
+ char *ImageFilename = NULL;
+ wchar_t *wImageFilename = NULL;
+
+ size_t len = 0;
+ Gdiplus::GdiplusStartupInput gdiplusStartupInput;
+
+ ULONG_PTR gdiplusToken = NULL;
+ Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
+
+ HINSTANCE hInstanceThisDll = (HINSTANCE)GetModuleHandle("scilab_windows");
+
+ ScilabDirectory = getScilabDirectory(TRUE);
+ if (ScilabDirectory == NULL)
+ {
+ return 0;
+ }
+
+ len = strlen(FORMAT_FULLPATH_SPLASH_IMAGE) + strlen(ScilabDirectory) + 1;
+ ImageFilename = (char*)MALLOC(sizeof(char) * len);
+ if (ImageFilename == NULL)
+ {
+ return 0;
+ }
+
+ sprintf(ImageFilename, FORMAT_FULLPATH_SPLASH_IMAGE, ScilabDirectory);
+ FREE(ScilabDirectory);
+ ScilabDirectory = NULL;
+
+ wImageFilename = to_wide_string(ImageFilename);
+ FREE(ImageFilename);
+ ImageFilename = NULL;
+ if (wImageFilename == NULL)
+ {
+ return 0;
+ }
+
+ pImage = Gdiplus::Image::FromFile((const WCHAR *)wImageFilename);
+ FREE(wImageFilename);
+ wImageFilename = NULL;
+ if (pImage == NULL)
+ {
+ return 0;
+ }
+
+ WNDCLASS wndcls = {0};
+
+ wndcls.style = CS_HREDRAW | CS_VREDRAW;
+ wndcls.lpfnWndProc = SplashWndProc;
+ wndcls.hInstance = GetModuleHandle(NULL);
+ wndcls.hCursor = LoadCursor(NULL, IDC_APPSTARTING);
+ wndcls.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
+ wndcls.lpszClassName = SPLASH_WINDOW_CLASSNAME;
+ wndcls.hIcon = LoadIcon(wndcls.hInstance, (char*)MAKEINTRESOURCE(IDI_APPLICATION));
+
+ if (!RegisterClass(&wndcls))
+ {
+ if (GetLastError() != 0x00000582) // already registered
+ {
+ return 0;
+ }
+ }
+
+ // try to find monitor where mouse was last time
+ POINT point = {0};
+ MONITORINFO mi = {sizeof(MONITORINFO), 0};
+ HMONITOR hMonitor = 0;
+ RECT rcArea = {0};
+
+ ::GetCursorPos(&point);
+ hMonitor = ::MonitorFromPoint(point, MONITOR_DEFAULTTONEAREST);
+ if (::GetMonitorInfo(hMonitor, &mi))
+ {
+ rcArea.left = (mi.rcMonitor.right + mi.rcMonitor.left - pImage->GetWidth()) / 2;
+ rcArea.top = (mi.rcMonitor.top + mi.rcMonitor.bottom - pImage->GetHeight()) / 2;
+ }
+ else
+ {
+ SystemParametersInfo(SPI_GETWORKAREA, NULL, &rcArea, NULL);
+ rcArea.left = (rcArea.right + rcArea.left - pImage->GetWidth()) / 2;
+ rcArea.top = (rcArea.top + rcArea.bottom - pImage->GetHeight()) / 2;
+ }
+
+ HWND hdlg = CreateWindowEx(WS_EX_TOOLWINDOW,
+ SPLASH_WINDOW_CLASSNAME,
+ SPLASH_WINDOW_CLASSNAME,
+ WS_CLIPCHILDREN | WS_POPUP,
+ rcArea.left,
+ rcArea.top,
+ pImage->GetWidth(),
+ pImage->GetHeight(),
+ NULL,
+ NULL,
+ wndcls.hInstance,
+ NULL);
+
+ if (hdlg == NULL)
+ {
+ return 0;
+ }
+
+ ShowWindow(hdlg, SW_SHOWNORMAL);
+ UpdateWindow(hdlg);
+ SetWindowPos(hdlg, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
+
+ while (!stopSplashScreen(20, 1000))
+ {
+ Sleep(20);
+ }
+
+ DestroyWindow(hdlg);
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
+static BOOL stopSplashScreen(UINT _time, UINT _timeMax)
+{
+ if (haveConsoleWindow() || (timeSplashScreen >= _timeMax))
+ {
+ return TRUE;
+ }
+ else
+ {
+ if (timeSplashScreen < _timeMax)
+ {
+ timeSplashScreen = timeSplashScreen + _time;
+ }
+ }
+ return FALSE;
+}
+/*--------------------------------------------------------------------------*/
+static BOOL haveConsoleWindow(void)
+{
+ HWND hWndMainScilab = NULL;
+ char titleMainWindow[MAX_PATH];
+ int id = getCurrentScilabId();
+
+ wsprintf(titleMainWindow, "%s (%d)", SCI_VERSION_STRING, id);
+ hWndMainScilab = FindWindow(NULL, titleMainWindow);
+
+ if (hWndMainScilab == NULL)
+ {
+ wsprintf(titleMainWindow, _("Scilab %s Console"), std::string(SCI_VERSION_STRING).substr(strlen("scilab-"), std::string::npos).c_str());
+ hWndMainScilab = FindWindow(NULL, titleMainWindow);
+ }
+
+ return (hWndMainScilab == NULL) ? FALSE : TRUE;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/splashScreen.h b/modules/windows_tools/src/c/scilab_windows/splashScreen.h
new file mode 100755
index 000000000..36a6f88b5
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/splashScreen.h
@@ -0,0 +1,23 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __SPLASHSCREEN_H__
+#define __SPLASHSCREEN_H__
+
+#include "dynlib_scilab_windows.h"
+
+/* Display splashscreen */
+SCILAB_WINDOWS_IMPEXP void splashScreen(void);
+
+#endif /* __SPLASHSCREEN_H__ */
+/*--------------------------------------------------------------------------*/ \ No newline at end of file
diff --git a/modules/windows_tools/src/c/scilab_windows/strdup_windows.c b/modules/windows_tools/src/c/scilab_windows/strdup_windows.c
new file mode 100755
index 000000000..92a56cf6d
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/strdup_windows.c
@@ -0,0 +1,48 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <string.h>
+#include "dynlib_scilab_windows.h"
+#include "MALLOC.h"
+/*--------------------------------------------------------------------------*/
+/* strdup is deprecated on windows*/
+/* required to fix warnings about strdup */
+/*--------------------------------------------------------------------------*/
+SCILAB_WINDOWS_IMPEXP char *strdup_windows(const char *strSource)
+{
+ char *retStr = NULL;
+ if (strSource)
+ {
+ retStr = (char *)MALLOC(sizeof(char) * ((int)strlen(strSource) + 1));
+ if (retStr)
+ {
+ strcpy(retStr, strSource);
+ }
+ }
+ return retStr;
+}
+/*--------------------------------------------------------------------------*/
+SCILAB_WINDOWS_IMPEXP wchar_t *wstrdup_windows(const wchar_t *strSource)
+{
+ wchar_t *retStr = NULL;
+ if (strSource)
+ {
+ retStr = (wchar_t *)MALLOC(sizeof(wchar_t) * ((int)wcslen(strSource) + 1));
+ if (retStr)
+ {
+ wcscpy(retStr, strSource);
+ }
+ }
+ return retStr;
+}
+/*--------------------------------------------------------------------------*/ \ No newline at end of file
diff --git a/modules/windows_tools/src/c/scilab_windows/windows_main.c b/modules/windows_tools/src/c/scilab_windows/windows_main.c
new file mode 100755
index 000000000..73a2fd7f8
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/windows_main.c
@@ -0,0 +1,271 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - Allan CORNET
+* Copyright (C) DIGITEO - 2010-2012 - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <Windows.h>
+#include <shellapi.h>
+#include "windows_main.h"
+#include "core_math.h"
+#include "getcommandlineargs.h"
+#include "scilabmode.h"
+#include "forbiddenToUseScilab.h"
+#include "realmain.h"
+#include "version.h"
+#include "PATH_MAX.h"
+#include "getScilabDirectory.h"
+#include "MALLOC.h"
+#include "FilesAssociations.h"
+#include "sciquit.h"
+#include "scilab_main.h"
+#include "stristr.h"
+#include "console.h"
+#include "WinConsole.h"
+#include "splashScreen.h"
+#include "WndThread.h"
+#include "strdup_windows.h"
+#include "InnosetupMutex.h"
+#include "charEncoding.h"
+#include "WindowShow.h"
+#include "LanguagePreferences_Windows.h"
+/*--------------------------------------------------------------------------*/
+#define MIN_STACKSIZE 180000
+#define WSCILEX "wscilex.exe"
+/*--------------------------------------------------------------------------*/
+static LPSTR my_argv[MAXCMDTOKENS];
+static int my_argc = -1;
+static int startupf = 0; /** 0 if we execute startup else 1 **/
+static int memory = MIN_STACKSIZE;
+/*--------------------------------------------------------------------------*/
+extern int sci_show_banner ;
+/*--------------------------------------------------------------------------*/
+int Windows_Main (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
+{
+ BOOL ShortCircuitExec = FALSE;
+ BOOL LaunchAFile = FALSE;
+ char *ScilabDirectory = NULL;
+ LPWSTR *szArglist = NULL;
+ char FileName[PATH_MAX * 2];
+ int nArgs = 0;
+ int i = 0;
+ int argcount = 0, lpath = 0;
+ InitScriptType pathtype = SCILAB_SCRIPT;
+ char *path = NULL;
+ BOOL bHideConsole = TRUE;
+
+ forbiddenToUseScilab();
+
+ setScilabMode(SCILAB_STD);
+ setWindowShowMode(iCmdShow);
+
+ ScilabDirectory = getScilabDirectory(FALSE);
+
+ if (ScilabDirectory == NULL)
+ {
+ // This message must never occur, but ...
+ MessageBox (NULL, "ERROR" , "Cannot determine the Scilab directory (SCI).", MB_ICONSTOP | MB_OK);
+ exit(1);
+ }
+ else
+ {
+ FREE(ScilabDirectory);
+ ScilabDirectory = NULL;
+ }
+
+ szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);
+ if (szArglist)
+ {
+ for (i = 0; i < nArgs; i++)
+ {
+ my_argv[i] = wide_string_to_UTF8(szArglist[i]);
+ }
+ my_argc = nArgs;
+ LocalFree(szArglist);
+ }
+
+ setCommandLineArgs(my_argv, my_argc);
+
+ for (i = 1; i < my_argc; i++)
+ {
+ if ( (_stricmp (my_argv[i], "-NW") == 0) || (_stricmp (my_argv[i], "-NWI") == 0) || (_stricmp (my_argv[i], "-TEXMACS") == 0) || (_stricmp (my_argv[i], "-NOGUI") == 0) )
+ {
+ MessageBox(NULL, "Not with Windows Console", "Error", MB_ICONINFORMATION);
+ exit(1);
+ }
+
+ if ( (_stricmp (my_argv[i], "-VERSION") == 0) ||
+ (_stricmp (my_argv[i], "-VER") == 0) )
+ {
+ disp_scilab_version();
+ exit(1);
+ }
+
+ if ( (_stricmp (my_argv[i], "-H") == 0) ||
+ (_stricmp (my_argv[i], "-?") == 0) ||
+ (_stricmp (my_argv[i], "-HELP") == 0) )
+ {
+ char Msg[2048];
+ strcpy(Msg, "Wscilex <Options>: run Scilab.\n");
+ strcat(Msg, "Arguments: passes Arguments to Scilab, This Arguments can be retreived\n by the Scilab function sciargs.\n");
+ strcat(Msg, "-e Instruction: execute the scilab instruction given in Instruction argument.\n");
+ strcat(Msg, "-f File: execute the scilab script given in File argument.\n");
+ strcat(Msg, " '-e' and '-f' options are mutually exclusive.\n\n");
+ strcat(Msg, "-l lang: it fixes the user language.\n\n" );
+ strcat(Msg, "-mem N: set the initial stacksize.\n");
+ strcat(Msg, "-ns: if this option is present the startup file scilab.start is not executed.\n");
+ strcat(Msg, "-nb: if this option is present then Scilab loading message is not displayed.\n");
+ strcat(Msg, "-nouserstartup: don't execute user startup files SCIHOME/.scilab or SCIHOME/scilab.ini.\n");
+ strcat(Msg, "-nw: start Scilab without specialized Scilab Window.\n");
+ strcat(Msg, "-nwni: start Scilab without user interaction (batch mode).\n");
+ strcat(Msg, "-nogui: start Scilab without GUI,tcl/tk and user interaction (batch mode).\n");
+ strcat(Msg, "-texmacs: reserved for WinTeXMacs.\n");
+ strcat(Msg, "-version: print product version and exit.\n");
+ strcat(Msg, "-keepconsole: keep native console box opened.\n");
+
+ MessageBox(NULL, Msg, "Help", MB_ICONINFORMATION);
+ exit(1);
+ }
+ }
+
+ argcount = my_argc;
+ if (argcount > 2)
+ {
+ if ( (_stricmp (my_argv[1], "-X") == 0) ||
+ (_stricmp (my_argv[1], "-O") == 0) ||
+ (_stricmp (my_argv[1], "-P") == 0) )
+ {
+ char *Commande = NULL;
+ int CodeAction = -1;
+
+ LaunchAFile = TRUE;
+ strcpy(FileName, my_argv[2]);
+
+ if (_stricmp (my_argv[1], "-O") == 0)
+ {
+ CodeAction = 0;
+ }
+ if (_stricmp (my_argv[1], "-X") == 0)
+ {
+ CodeAction = 1;
+ }
+ if (_stricmp (my_argv[1], "-P") == 0)
+ {
+ CodeAction = 2;
+ }
+
+ Commande = (char*)MALLOC(((PATH_MAX * 2) + 1) * sizeof(char));
+ strcpy(Commande, "empty");
+ CommandByFileExtension(FileName, CodeAction, Commande);
+
+ if (
+ ( ( IsAScicosFile(FileName) == TRUE ) && (CodeAction == 1) ) ||
+ ( ( IsABinOrSavFile(FileName) == TRUE ) && (CodeAction == 1) ) ||
+ ( ( IsASciNotesFile(FileName) == TRUE ) )
+ )
+ {
+ my_argc = -1;
+ my_argv[++my_argc] = Commande;
+ argcount = my_argc;
+ ShortCircuitExec = TRUE;
+ }
+ else
+ {
+ my_argc = -1;
+ my_argv[++my_argc] = strtok (Commande, " ");
+ while (my_argv[my_argc] != NULL)
+ {
+ my_argv[++my_argc] = strtok(NULL, " ");
+ }
+ argcount = my_argc;
+ }
+ }
+ }
+
+
+ if ( ShortCircuitExec == TRUE)
+ {
+ char PathWScilex[PATH_MAX * 2];
+ int lenPathWScilex = 0;
+ GetModuleFileName ((HINSTANCE)GetModuleHandle(NULL), PathWScilex, PATH_MAX);
+ lenPathWScilex = (int)strlen(PathWScilex);
+ path = my_argv[argcount] + lenPathWScilex + 3;
+ lpath = (int)strlen (my_argv[argcount] + lenPathWScilex + 3);
+ pathtype = SCILAB_CODE;
+ LaunchAFile = TRUE;
+ }
+ else while (argcount > 0)
+ {
+ char ArgTmp[PATH_MAX * 2];
+
+ argcount--;
+ strcpy(ArgTmp, my_argv[argcount]);
+
+ if (_stricmp (ArgTmp, "-NS") == 0)
+ {
+ startupf = 1;
+ }
+ else if ( _stricmp(ArgTmp, "-NB") == 0)
+ {
+ sci_show_banner = 0;
+ }
+ else if (_stricmp (ArgTmp, "-F") == 0 && argcount + 1 < my_argc)
+ {
+ path = my_argv[argcount + 1];
+ lpath = (int)strlen (my_argv[argcount + 1]);
+ }
+ else if (_stricmp (ArgTmp, "-E") == 0 && argcount + 1 < my_argc)
+ {
+ path = my_argv[argcount + 1];
+ lpath = (int)strlen (my_argv[argcount + 1]);
+ pathtype = SCILAB_CODE;
+ }
+ else if ( _stricmp(ArgTmp, "-MEM") == 0 && argcount + 1 < my_argc)
+ {
+ memory = Max(atoi( my_argv[argcount + 1]), MIN_STACKSIZE );
+ }
+ else if ( _stricmp(ArgTmp, "-L") == 0 && argcount + 1 < my_argc)
+ {
+ char *language = my_argv[argcount + 1];
+ setLanguageFromCommandLine(language);
+ }
+ else if ( _stricmp(ArgTmp, "-keepconsole") == 0)
+ {
+ bHideConsole = FALSE;
+ }
+ }
+
+#ifndef _DEBUG
+ if ( (iCmdShow != SW_HIDE) && (iCmdShow != SW_MINIMIZE) && (iCmdShow != SW_SHOWMINNOACTIVE) )
+ {
+ if ( (sci_show_banner) && (LaunchAFile == FALSE) )
+ {
+ splashScreen();
+ }
+ }
+#endif
+
+ CreateScilabHiddenWndThread();
+ CreateScilabConsole(sci_show_banner);
+
+ if (bHideConsole)
+ {
+ HideScilex(); /* hide console window */
+ }
+ else
+ {
+ ShowScilex();
+ }
+
+ createInnosetupMutex();
+ return sci_windows_main (&startupf, path, (InitScriptType)pathtype, &lpath, memory);
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/windows_main.h b/modules/windows_tools/src/c/scilab_windows/windows_main.h
new file mode 100755
index 000000000..26bca09b7
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/windows_main.h
@@ -0,0 +1,31 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __WINDOWS_MAIN_H__
+#define __WINDOWS_MAIN_H__
+
+#include <Windows.h>
+#include "dynlib_scilab_windows.h"
+
+/**
+* Main for scilab with GUI
+* @param [in] current instance of the application.
+* @param [in] previous instance of the application
+* @param [in] command line for the application
+* @param [in] Specifies how the window is to be shown
+* @return 0
+*/
+SCILAB_WINDOWS_IMPEXP int Windows_Main (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow);
+
+#endif /* __WINDOWS_MAIN_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/windows_tools_Import.def b/modules/windows_tools/src/c/scilab_windows/windows_tools_Import.def
new file mode 100755
index 000000000..2351b305f
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/windows_tools_Import.def
@@ -0,0 +1,6 @@
+LIBRARY windows_tools.dll
+
+
+EXPORTS
+;windows_tools
+SetConsoleState \ No newline at end of file
diff --git a/modules/windows_tools/src/c/scilab_windows/wmcopydata.c b/modules/windows_tools/src/c/scilab_windows/wmcopydata.c
new file mode 100755
index 000000000..bc14efe28
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/wmcopydata.c
@@ -0,0 +1,92 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include "wmcopydata.h"
+/*--------------------------------------------------------------------------*/
+static char LineFromAnotherScilab[PATH_MAX];
+static BOOL ReceiveDatafromAnotherScilab = FALSE;
+static char TitleScilabSend[PATH_MAX];
+/*--------------------------------------------------------------------------*/
+BOOL GetCommandFromAnotherScilab(char *TitleWindowSend, char *CommandLine)
+{
+ BOOL Retour = FALSE;
+
+ if (ReceiveDatafromAnotherScilab)
+ {
+ if (wsprintf(CommandLine, "%s", LineFromAnotherScilab) <= 0)
+ {
+ return FALSE;
+ }
+ wsprintf(TitleWindowSend, "%s", TitleScilabSend);
+
+ ReceiveDatafromAnotherScilab = FALSE;
+ Retour = TRUE;
+ }
+ else
+ {
+ Retour = FALSE;
+ }
+
+ return Retour;
+}
+/*--------------------------------------------------------------------------*/
+BOOL SendCommandToAnotherScilab(char *ScilabWindowNameSource, char *ScilabWindowNameDestination, char *CommandLine)
+{
+ COPYDATASTRUCT MyCDS;
+ MYREC MyRec;
+ HWND hWndSource = NULL;
+ HWND hWndDestination = NULL;
+
+ if (wsprintf(MyRec.CommandFromAnotherScilab, "%s", CommandLine) <= 0)
+ {
+ return FALSE;
+ }
+
+ MyCDS.dwData = 0;
+ MyCDS.cbData = sizeof( MyRec );
+ MyCDS.lpData = &MyRec;
+
+ hWndSource = FindWindow(NULL, ScilabWindowNameSource);
+ hWndDestination = FindWindow(NULL, ScilabWindowNameDestination);
+
+ if ( (hWndDestination != NULL) )
+ {
+ SendMessage( hWndDestination,
+ WM_COPYDATA,
+ (WPARAM)(HWND) hWndDestination,
+ (LPARAM) (LPVOID) &MyCDS );
+ }
+ else
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+/*--------------------------------------------------------------------------*/
+BOOL ReceiveFromAnotherScilab(HWND hWndSend, PCOPYDATASTRUCT MyCopyDataStruct)
+{
+ BOOL Retour = FALSE;
+
+ if (wsprintf(LineFromAnotherScilab, "%s", (LPSTR) ((MYREC *)(MyCopyDataStruct->lpData))->CommandFromAnotherScilab) <= 0)
+ {
+ return FALSE;
+ }
+
+ GetWindowText(hWndSend, TitleScilabSend, PATH_MAX);
+ ReceiveDatafromAnotherScilab = TRUE;
+ Retour = TRUE;
+
+ return Retour;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows/wmcopydata.h b/modules/windows_tools/src/c/scilab_windows/wmcopydata.h
new file mode 100755
index 000000000..0b7b549c9
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows/wmcopydata.h
@@ -0,0 +1,54 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __WMCOPYDATA_H__
+#define __WMCOPYDATA_H__
+
+#include <windows.h>
+#include "dynlib_scilab_windows.h"
+#include "PATH_MAX.h"
+#include "BOOL.h"
+
+typedef struct tagMYREC
+{
+ char CommandFromAnotherScilab[PATH_MAX];
+}
+MYREC;
+
+/**
+* Send a command to another Scilab
+* @param[in] Title Window source
+* @param[in] Title Window destination
+* @param[in] command to send
+* @return TRUE or FALSE
+*/
+SCILAB_WINDOWS_IMPEXP BOOL SendCommandToAnotherScilab(char *ScilabWindowNameSource, char *ScilabWindowNameDestination, char *CommandLine);
+
+/**
+* Get a command from another scilab
+* @param[in] Title
+* @param[in] command to send
+* @return TRUE or FALSE
+*/
+SCILAB_WINDOWS_IMPEXP BOOL GetCommandFromAnotherScilab(char *TitleWindowSend, char *CommandLine);
+
+/**
+* Receive data from another scilab
+* @param[in] Handle on Window
+* @param[in] COPYDATASTRUCT
+* @return TRUE or FALSE
+*/
+SCILAB_WINDOWS_IMPEXP BOOL ReceiveFromAnotherScilab(HWND hWndSend, PCOPYDATASTRUCT MyCopyDataStruct);
+
+#endif /*__WMCOPYDATA_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/scilab_windows_Import.def b/modules/windows_tools/src/c/scilab_windows_Import.def
new file mode 100755
index 000000000..62f018bbd
--- /dev/null
+++ b/modules/windows_tools/src/c/scilab_windows_Import.def
@@ -0,0 +1,19 @@
+LIBRARY scilab_windows.dll
+
+
+EXPORTS
+; ---------------------------------------
+; scilab_windows
+; ---------------------------------------
+strdup_windows
+ClosePipeInfo
+pipeSpawnOut
+CreateOuput
+pipeSpawnErr
+spawncommand
+DetectDetachProcessInCommandLine
+RestoreExitButton
+RestoreConsoleColors
+closeInnosetupMutex
+CloseScilabConsole
+getScilexConsoleName
diff --git a/modules/windows_tools/src/c/windows_tools.rc b/modules/windows_tools/src/c/windows_tools.rc
new file mode 100755
index 000000000..5ea52b601
--- /dev/null
+++ b/modules/windows_tools/src/c/windows_tools.rc
@@ -0,0 +1,97 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+//#include "afxres.h"
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// French (France) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
+#ifdef _WIN32
+LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 5,5,2,0
+ PRODUCTVERSION 5,5,2,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040c04b0"
+ BEGIN
+ VALUE "FileDescription", "windows_tools module"
+ VALUE "FileVersion", "5, 5, 2, 0"
+ VALUE "InternalName", "windows_tools module"
+ VALUE "LegalCopyright", "Copyright (C) 2017"
+ VALUE "OriginalFilename", "windows_tools.dll"
+ VALUE "ProductName", " windows_tools"
+ VALUE "ProductVersion", "5, 5, 2, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x40c, 1200
+ END
+END
+
+#endif // French (France) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/modules/windows_tools/src/c/windows_tools.vcxproj b/modules/windows_tools/src/c/windows_tools.vcxproj
new file mode 100755
index 000000000..4d0bab0aa
--- /dev/null
+++ b/modules/windows_tools/src/c/windows_tools.vcxproj
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9594AC02-20EE-4FBF-95B4-BFA5865ED7CA}</ProjectGuid>
+ <RootNamespace>windows_tools</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>.;../../includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../fileio/includes;../../../../libs/intl;../../../../libs/GetWindowsVersion;../../../call_scilab/src/c;../../../call_scilab/includes;./scilab_windows;../../../api_scilab/includes;../../../string/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;WINDOWS_TOOLS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <PreLinkEvent>
+ <Message>Make dependencies</Message>
+ <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)scilab_windows_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scilab_windows.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scilocalization.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)Call_scilab_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)call_scilab.lib" 1&gt;NUL 2&gt;NUL
+</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>core.lib;scilab_windows.lib;scilocalization.lib;call_scilab.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>.;../../includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../fileio/includes;../../../../libs/intl;../../../../libs/GetWindowsVersion;../../../call_scilab/src/c;../../../call_scilab/includes;./scilab_windows;../../../api_scilab/includes;../../../string/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;WINDOWS_TOOLS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <PreLinkEvent>
+ <Message>Make dependencies</Message>
+ <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)scilab_windows_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scilab_windows.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scilocalization.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)Call_scilab_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)call_scilab.lib" 1&gt;NUL 2&gt;NUL
+</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>core.lib;scilab_windows.lib;scilocalization.lib;call_scilab.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>.;../../includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../fileio/includes;../../../../libs/intl;../../../../libs/GetWindowsVersion;../../../call_scilab/src/c;../../../call_scilab/includes;./scilab_windows;../../../api_scilab/includes;../../../string/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;WINDOWS_TOOLS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <PreLinkEvent>
+ <Message>Make dependencies</Message>
+ <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)scilab_windows_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scilab_windows.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scilocalization.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)Call_scilab_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)call_scilab.lib" 1&gt;NUL 2&gt;NUL
+</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>core.lib;scilab_windows.lib;scilocalization.lib;call_scilab.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>.;../../includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../fileio/includes;../../../../libs/intl;../../../../libs/GetWindowsVersion;../../../call_scilab/src/c;../../../call_scilab/includes;./scilab_windows;../../../api_scilab/includes;../../../string/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;WINDOWS_TOOLS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <PreLinkEvent>
+ <Message>Make dependencies</Message>
+ <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)scilab_windows_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scilab_windows.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)scilocalization.lib" 1&gt;NUL 2&gt;NUL
+lib /DEF:"$(ProjectDir)Call_scilab_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)call_scilab.lib" 1&gt;NUL 2&gt;NUL
+</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>core.lib;scilab_windows.lib;scilocalization.lib;call_scilab.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="createGUID.c" />
+ <ClCompile Include="DllmainWindows_Tools.c" />
+ <ClCompile Include="FindFileAssociation.c" />
+ <ClCompile Include="..\..\sci_gateway\c\gw_windows_tools.c" />
+ <ClCompile Include="httpdownloadfile.c" />
+ <ClCompile Include="InitializeWindows_tools.c" />
+ <ClCompile Include="registry.c" />
+ <ClCompile Include="..\..\sci_gateway\c\sci_consolebox.c" />
+ <ClCompile Include="..\..\sci_gateway\c\sci_createGUID.c" />
+ <ClCompile Include="..\..\sci_gateway\c\sci_dos.c" />
+ <ClCompile Include="..\..\sci_gateway\c\sci_findfileassociation.c" />
+ <ClCompile Include="..\..\sci_gateway\c\sci_getsystemmetrics.c" />
+ <ClCompile Include="..\..\sci_gateway\c\sci_istssession.c" />
+ <ClCompile Include="..\..\sci_gateway\c\sci_mcisendstring.c" />
+ <ClCompile Include="..\..\sci_gateway\c\sci_win64.c" />
+ <ClCompile Include="..\..\sci_gateway\c\sci_winopen.c" />
+ <ClCompile Include="..\..\sci_gateway\c\sci_winqueryreg.c" />
+ <ClCompile Include="TerminateWindows_tools.c" />
+ <ClCompile Include="WinConsole.c" />
+ <ClCompile Include="winopen.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\includes\ConvertSlash.h" />
+ <ClInclude Include="..\..\includes\FocusOnConsole.h" />
+ <ClInclude Include="..\..\includes\MutexClosingScilab.h" />
+ <ClInclude Include="..\..\includes\strdup_windows.h" />
+ <ClInclude Include="createGUID.h" />
+ <ClInclude Include="..\..\includes\dynlib_windows_tools.h" />
+ <ClInclude Include="FindFileAssociation.h" />
+ <ClInclude Include="..\..\includes\gw_windows_tools.h" />
+ <ClInclude Include="httpdownloadfile.h" />
+ <ClInclude Include="..\..\includes\InitializeWindows_tools.h" />
+ <ClInclude Include="registry.h" />
+ <ClInclude Include="resource.h" />
+ <ClInclude Include="..\..\includes\TerminateWindows_tools.h" />
+ <ClInclude Include="WinConsole.h" />
+ <ClInclude Include="winopen.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\locales\windows_tools.pot" />
+ <None Include="Call_scilab_Import.def" />
+ <None Include="core_import.def" />
+ <None Include="localization_Import.def" />
+ <None Include="scilab_windows_Import.def" />
+ <None Include="..\..\Makefile.am" />
+ <None Include="..\..\windows_tools.iss" />
+ <None Include="..\..\sci_gateway\windows_tools_gateway.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="windows_tools.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\libs\GetWindowsVersion\GetWindowsVersion.vcxproj">
+ <Project>{982bf37f-42c4-4d37-8d14-60521b141503}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj">
+ <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\api_scilab\api_scilab.vcxproj">
+ <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\fileio\fileio.vcxproj">
+ <Project>{4fc72d4a-80ee-4b1a-8724-0201c1a35621}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj">
+ <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/modules/windows_tools/src/c/windows_tools.vcxproj.filters b/modules/windows_tools/src/c/windows_tools.vcxproj.filters
new file mode 100755
index 000000000..df1b8c91e
--- /dev/null
+++ b/modules/windows_tools/src/c/windows_tools.vcxproj.filters
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{6b897292-8de0-4852-afaf-f445f3eb2f00}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{a19b6de5-a578-4b32-badf-de1fbf9f0773}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="localization">
+ <UniqueIdentifier>{24ae625f-c135-4f8f-b127-eee116430079}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{8b8c75c2-9ebc-4ade-b38a-6790a5eb898f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Libraries Dependencies">
+ <UniqueIdentifier>{dc56d296-fa41-4dd0-aec2-a6db08bb93ae}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Libraries Dependencies\Imports">
+ <UniqueIdentifier>{28fc6a90-3106-4a95-b4df-600a1c72bd91}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="createGUID.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="DllmainWindows_Tools.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="FindFileAssociation.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\c\gw_windows_tools.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="httpdownloadfile.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="InitializeWindows_tools.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="registry.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\c\sci_consolebox.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\c\sci_createGUID.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\c\sci_dos.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\c\sci_findfileassociation.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\c\sci_getsystemmetrics.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\c\sci_istssession.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\c\sci_mcisendstring.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\c\sci_win64.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\c\sci_winopen.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\c\sci_winqueryreg.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TerminateWindows_tools.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="WinConsole.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="winopen.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="createGUID.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\dynlib_windows_tools.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="FindFileAssociation.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\gw_windows_tools.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="httpdownloadfile.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\InitializeWindows_tools.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="registry.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\TerminateWindows_tools.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="WinConsole.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="winopen.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\ConvertSlash.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\FocusOnConsole.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\MutexClosingScilab.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\strdup_windows.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Call_scilab_Import.def">
+ <Filter>Libraries Dependencies\Imports</Filter>
+ </None>
+ <None Include="core_import.def">
+ <Filter>Libraries Dependencies\Imports</Filter>
+ </None>
+ <None Include="localization_Import.def">
+ <Filter>Libraries Dependencies\Imports</Filter>
+ </None>
+ <None Include="scilab_windows_Import.def">
+ <Filter>Libraries Dependencies\Imports</Filter>
+ </None>
+ <None Include="..\..\Makefile.am" />
+ <None Include="..\..\windows_tools.iss" />
+ <None Include="..\..\sci_gateway\windows_tools_gateway.xml" />
+ <None Include="..\..\locales\windows_tools.pot">
+ <Filter>localization</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="windows_tools.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
diff --git a/modules/windows_tools/src/c/winopen.c b/modules/windows_tools/src/c/winopen.c
new file mode 100755
index 000000000..ea685920c
--- /dev/null
+++ b/modules/windows_tools/src/c/winopen.c
@@ -0,0 +1,51 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#include <stdio.h>
+#include <Windows.h>
+#include "winopen.h"
+#include "expandPathVariable.h"
+#include "Scierror.h"
+#include "PATH_MAX.h"
+#include "charEncoding.h"
+#include "MALLOC.h"
+/*--------------------------------------------------------------------------*/
+BOOL winopen(char *scilabfilename)
+{
+ BOOL bOK = FALSE;
+ char *filename = NULL;
+ wchar_t *wcfilename = NULL;
+ HINSTANCE error = NULL;
+
+ filename = expandPathVariable(scilabfilename);
+ if (filename)
+ {
+ wcfilename = to_wide_string(filename);
+ FREE(filename);
+ filename = NULL;
+ if (wcfilename)
+ {
+ error = ShellExecuteW(NULL, L"open", wcfilename, NULL, NULL, SW_SHOWNORMAL);
+ if ( error <= (HINSTANCE)32)
+ {
+ bOK = FALSE;
+ }
+ else
+ {
+ bOK = TRUE;
+ }
+ }
+ }
+ return bOK;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/c/winopen.h b/modules/windows_tools/src/c/winopen.h
new file mode 100755
index 000000000..144421369
--- /dev/null
+++ b/modules/windows_tools/src/c/winopen.h
@@ -0,0 +1,28 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) INRIA - 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.1-en.txt
+*
+*/
+
+
+/*--------------------------------------------------------------------------*/
+#ifndef __WINOPEN_H__
+#define __WINOPEN_H__
+
+#include "BOOL.h" /* BOOL */
+
+/**
+* Opens the item specified by the filename parameter. The item can be a file or folder
+* @param[in] a filename. SCI is converted
+* @return TRUE or FALSE
+*/
+BOOL winopen(char *scilabfilename);
+
+#endif /* __WINOPEN_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/windows_tools/src/nowindows_tools/.deps/.dirstamp b/modules/windows_tools/src/nowindows_tools/.deps/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/windows_tools/src/nowindows_tools/.deps/.dirstamp
diff --git a/modules/windows_tools/src/nowindows_tools/.deps/libsciwindows_tools_la-nowindows_tools.Plo b/modules/windows_tools/src/nowindows_tools/.deps/libsciwindows_tools_la-nowindows_tools.Plo
new file mode 100755
index 000000000..66cb4b6bf
--- /dev/null
+++ b/modules/windows_tools/src/nowindows_tools/.deps/libsciwindows_tools_la-nowindows_tools.Plo
@@ -0,0 +1,21 @@
+src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo: \
+ src/nowindows_tools/nowindows_tools.c /usr/include/stdc-predef.h \
+ includes/gw_windows_tools.h includes/dynlib_windows_tools.h \
+ ../../modules/output_stream/includes/Scierror.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \
+ ../../modules/output_stream/includes/do_error_number.h \
+ ../../modules/core/includes/machine.h
+
+/usr/include/stdc-predef.h:
+
+includes/gw_windows_tools.h:
+
+includes/dynlib_windows_tools.h:
+
+../../modules/output_stream/includes/Scierror.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
+
+../../modules/output_stream/includes/do_error_number.h:
+
+../../modules/core/includes/machine.h:
diff --git a/modules/windows_tools/src/nowindows_tools/.dirstamp b/modules/windows_tools/src/nowindows_tools/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/windows_tools/src/nowindows_tools/.dirstamp
diff --git a/modules/windows_tools/src/nowindows_tools/.libs/libsciwindows_tools_la-nowindows_tools.o b/modules/windows_tools/src/nowindows_tools/.libs/libsciwindows_tools_la-nowindows_tools.o
new file mode 100755
index 000000000..e25e0a416
--- /dev/null
+++ b/modules/windows_tools/src/nowindows_tools/.libs/libsciwindows_tools_la-nowindows_tools.o
Binary files differ
diff --git a/modules/windows_tools/src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo b/modules/windows_tools/src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo
new file mode 100755
index 000000000..69836c53f
--- /dev/null
+++ b/modules/windows_tools/src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo
@@ -0,0 +1,12 @@
+# src/nowindows_tools/libsciwindows_tools_la-nowindows_tools.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libsciwindows_tools_la-nowindows_tools.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/windows_tools/src/nowindows_tools/nowindows_tools.c b/modules/windows_tools/src/nowindows_tools/nowindows_tools.c
new file mode 100755
index 000000000..c71e3f342
--- /dev/null
+++ b/modules/windows_tools/src/nowindows_tools/nowindows_tools.c
@@ -0,0 +1,20 @@
+/*--------------------------------------------------------------------------*/
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - 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.1-en.txt
+/*--------------------------------------------------------------------------*/
+#include "gw_windows_tools.h"
+#include "Scierror.h"
+/*--------------------------------------------------------------------------*/
+int gw_windows_tools(void)
+{
+ Scierror(999, "Scilab windows_tools module not installed.\n");
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
+
diff --git a/modules/windows_tools/src/nowindows_tools/nowindows_tools.rc b/modules/windows_tools/src/nowindows_tools/nowindows_tools.rc
new file mode 100755
index 000000000..e3032f5a8
--- /dev/null
+++ b/modules/windows_tools/src/nowindows_tools/nowindows_tools.rc
@@ -0,0 +1,97 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+//#include "afxres.h"
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// French (France) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
+#ifdef _WIN32
+LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 5,5,2,0
+ PRODUCTVERSION 5,5,2,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040c04b0"
+ BEGIN
+ VALUE "FileDescription", "nowindows_tools module"
+ VALUE "FileVersion", "5, 5, 2, 0"
+ VALUE "InternalName", "nowindows_tools module"
+ VALUE "LegalCopyright", "Copyright (C) 2017"
+ VALUE "OriginalFilename", "nowindows_tools.dll"
+ VALUE "ProductName", " nowindows_tools"
+ VALUE "ProductVersion", "5, 5, 2, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x40c, 1200
+ END
+END
+
+#endif // French (France) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/modules/windows_tools/src/nowindows_tools/nowindows_tools.vcxproj b/modules/windows_tools/src/nowindows_tools/nowindows_tools.vcxproj
new file mode 100755
index 000000000..99e780a6f
--- /dev/null
+++ b/modules/windows_tools/src/nowindows_tools/nowindows_tools.vcxproj
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{73E14CE1-E24C-4AFB-BD0C-BC8643730D62}</ProjectGuid>
+ <RootNamespace>nowindows_tools</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../output_stream/includes;../../../../libs/intl;../../../api_scilab/includes;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;WINDOWS_TOOLS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../output_stream/includes;../../../../libs/intl;../../../api_scilab/includes;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;WINDOWS_TOOLS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../output_stream/includes;../../../../libs/intl;../../../api_scilab/includes;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;WINDOWS_TOOLS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../core/includes;../../../output_stream/includes;../../../../libs/intl;../../../api_scilab/includes;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;WINDOWS_TOOLS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="nowindows_tools.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="nowindows_tools.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj">
+ <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj">
+ <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/modules/windows_tools/src/nowindows_tools/nowindows_tools.vcxproj.filters b/modules/windows_tools/src/nowindows_tools/nowindows_tools.vcxproj.filters
new file mode 100755
index 000000000..0eaf28523
--- /dev/null
+++ b/modules/windows_tools/src/nowindows_tools/nowindows_tools.vcxproj.filters
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Libraries Dependencies">
+ <UniqueIdentifier>{92cd13d4-57b2-4804-8452-fd293bc9697e}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="nowindows_tools.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="nowindows_tools.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/modules/windows_tools/src/nowindows_tools/resource.h b/modules/windows_tools/src/nowindows_tools/resource.h
new file mode 100755
index 000000000..328b8d6ba
--- /dev/null
+++ b/modules/windows_tools/src/nowindows_tools/resource.h
@@ -0,0 +1,21 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by windows_tools.rc
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - 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.1-en.txt
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_12062.dia.ref b/modules/windows_tools/tests/nonreg_tests/bug_12062.dia.ref
new file mode 100755
index 000000000..2e20ca08a
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_12062.dia.ref
@@ -0,0 +1,18 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - Scilab Enterprises - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Non-regression test for bug 12062 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=12062
+//
+// <-- Short Description -->
+// getsystemmetrics() failed for some properties such as 'SM_CXMAXIMIZED'.
+ierr = execstr("getsystemmetrics(""SM_CXMAXIMIZED"")", "errcatch");
+assert_checkequal(ierr, 0);
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_12062.tst b/modules/windows_tools/tests/nonreg_tests/bug_12062.tst
new file mode 100755
index 000000000..4f99a93f1
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_12062.tst
@@ -0,0 +1,19 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - Scilab Enterprises - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Non-regression test for bug 12062 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=12062
+//
+// <-- Short Description -->
+// getsystemmetrics() failed for some properties such as 'SM_CXMAXIMIZED'.
+
+ierr = execstr("getsystemmetrics(""SM_CXMAXIMIZED"")", "errcatch");
+assert_checkequal(ierr, 0);
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_3672.tst b/modules/windows_tools/tests/nonreg_tests/bug_3672.tst
new file mode 100755
index 000000000..1a371ae07
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_3672.tst
@@ -0,0 +1,26 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 3672 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=3672
+//
+// <-- Short Description -->
+// When Scilab crashes, a zombie Scilab process (Wscilex.exe) lies in the background. And it is no longer possible to launch Scilab by right clicking on a Scilab script file.
+
+// <-- INTERACTIVE TEST -->
+
+// opens scilab.quit & add a command with some errors
+// example : blbalflallafl
+// save this file
+// launch scilab
+// quit scilab
+// click on associated file .sci or .sce
+// a new scilab will be open
+// dont forget to remove line in scilab.quit after ;)
+
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_3789.tst b/modules/windows_tools/tests/nonreg_tests/bug_3789.tst
new file mode 100755
index 000000000..20530809a
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_3789.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 3789 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=3789
+//
+// <-- Short Description -->
+// When Scilab crashes, on windows 2000 with a Pentium II
+
+// <-- INTERACTIVE TEST -->
+
+// You need to have a Pentium II with windows 2000
+// install scilab on this pc
+// try to launch scilab
+// Enjoy !
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_3992.tst b/modules/windows_tools/tests/nonreg_tests/bug_3992.tst
new file mode 100755
index 000000000..6a638579e
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_3992.tst
@@ -0,0 +1,30 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 3992 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=3992
+//
+// <-- Short Description -->
+// fix some invalid dependencies on external libraries
+
+// <-- INTERACTIVE TEST -->
+
+// checks that we don't have a dependency on libmmd.dll
+
+// dumpbin /IMPORTS hashtable.dll
+// dumpbin /IMPORTS integer.dll
+// dumpbin /IMPORTS interpolation.dll
+// dumpbin /IMPORTS randlib.dll
+// dumpbin /IMPORTS scicos.dll
+// dumpbin /IMPORTS scicos_blocks.dll
+// dumpbin /IMPORTS scicos_sundials.dll
+// dumpbin /IMPORTS scigraphic_export.dll
+
+// checks that we don't have a dependency on user32.dll
+// dumpbin /IMPORTS io.dll
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_4030.tst b/modules/windows_tools/tests/nonreg_tests/bug_4030.tst
new file mode 100755
index 000000000..28b88a377
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_4030.tst
@@ -0,0 +1,19 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 4030 -->
+//
+// <-- INTERACTIVE TEST -->
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4030
+//
+// <-- Short Description -->
+// unix_w('dir /s') displays strange matrix
+
+unix_w('dir /s')
+
+// see output
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_4584.dia.ref b/modules/windows_tools/tests/nonreg_tests/bug_4584.dia.ref
new file mode 100755
index 000000000..0e317e9a4
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_4584.dia.ref
@@ -0,0 +1,14 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- Non-regression test for bug 4584 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4584
+//
+// <-- Short Description -->
+// home value is wrong on Windows
+if home <> getenv('USERPROFILE',SCI) then bugmes();quit;end
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_4584.tst b/modules/windows_tools/tests/nonreg_tests/bug_4584.tst
new file mode 100755
index 000000000..df23cb648
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_4584.tst
@@ -0,0 +1,17 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 4584 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4584
+//
+// <-- Short Description -->
+// home value is wrong on Windows
+
+if home <> getenv('USERPROFILE',SCI) then pause,end
+
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_4702.dia.ref b/modules/windows_tools/tests/nonreg_tests/bug_4702.dia.ref
new file mode 100755
index 000000000..d6263b466
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_4702.dia.ref
@@ -0,0 +1,16 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- Non-regression test for bug 4702 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4702
+//
+// <-- Short Description -->
+// on some case, dos(cmd) does not return results
+[output, bStat] = dos('ipconfig');
+if bStat == %f then bugmes();quit;end
+if output == [] then bugmes();quit;end
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_4702.tst b/modules/windows_tools/tests/nonreg_tests/bug_4702.tst
new file mode 100755
index 000000000..0ddb9bbc9
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_4702.tst
@@ -0,0 +1,20 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 4702 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4702
+//
+// <-- Short Description -->
+// on some case, dos(cmd) does not return results
+
+[output, bStat] = dos('ipconfig');
+if bStat == %f then pause,end
+if output == [] then pause,end
+
+
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_5155.tst b/modules/windows_tools/tests/nonreg_tests/bug_5155.tst
new file mode 100755
index 000000000..7181ee128
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_5155.tst
@@ -0,0 +1,25 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 5155 -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5155
+//
+// <-- Short Description -->
+// Scilab windows 32 bits version requires CPU SSE 2 instructions.
+
+// Install Scilab on an old pentium without SSE 2 instructions and try to launch it.
+
+// 1+1
+
+
+
+
+
+
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_6387.tst b/modules/windows_tools/tests/nonreg_tests/bug_6387.tst
new file mode 100755
index 000000000..a63dd5adc
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_6387.tst
@@ -0,0 +1,28 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 6387 -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=6387
+//
+// <-- Short Description -->
+// 'dos' failed to execute very long command line and returns an msg error : line too long
+
+// try as very long command as (example)
+
+dos("""D:\GIT-SC~2\scilab\scilab\bin\translator.exe"" -lib
+""C:\Users\toto\AppData\Local\Temp\SCI_TMP_6196_\MYMOPACKAGE.mo"" -lib
+""C:\Users\toto\AppData\Local\Temp\SCI_TMP_6196_\RLC_circuit_im.mo"" -o
+""C:\Users\toto\AppData\Local\Temp\SCI_TMP_6196_\RLC_circuit_imf.mo"" -with-init-command ""RLC_circuit_im
+RLC_circuit_imf;"" > ""C:\Users\toto\AppData\Local\Temp\SCI_TMP_6196_\S_translator.err""")
+
+
+
+
+
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_6447.dia.ref b/modules/windows_tools/tests/nonreg_tests/bug_6447.dia.ref
new file mode 100755
index 000000000..62e76b837
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_6447.dia.ref
@@ -0,0 +1,26 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- Non-regression test for bug 6447 -->
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=6447
+//
+// <-- Short Description -->
+// unix_g() does not support properly neither UTF8 nor ANSI encoded output
+// unix_g uses dos on Windows.
+cd("SCI\modules\windows_tools\tests\nonreg_tests");
+ref1 = "Les caractères accentués ne sont supportés pas par unix_g() lorsqu''ils sont encodés en UTF8 comme ici";
+[a, b] = dos("type text_UTF8.txt");
+if b <> %t then bugmes();quit;end
+if a <> ref1 then bugmes();quit;end
+[c, d] = unix_g("type text_UTF8.txt");
+if d <> 0 then bugmes();quit;end
+if c <> ref1 then bugmes();quit;end
+[e, f] = dos("type text_ANSI.txt");
+if f <> %t then bugmes();quit;end
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_6447.tst b/modules/windows_tools/tests/nonreg_tests/bug_6447.tst
new file mode 100755
index 000000000..ff9826251
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_6447.tst
@@ -0,0 +1,31 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 6447 -->
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=6447
+//
+// <-- Short Description -->
+// unix_g() does not support properly neither UTF8 nor ANSI encoded output
+// unix_g uses dos on Windows.
+
+cd("SCI\modules\windows_tools\tests\nonreg_tests");
+ref1 = "Les caractères accentués ne sont supportés pas par unix_g() lorsqu''ils sont encodés en UTF8 comme ici";
+
+[a, b] = dos("type text_UTF8.txt");
+if b <> %t then pause,end
+if a <> ref1 then pause,end
+
+[c, d] = unix_g("type text_UTF8.txt");
+if d <> 0 then pause,end
+if c <> ref1 then pause,end
+
+[e, f] = dos("type text_ANSI.txt");
+if f <> %t then pause,end
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_6489.dia.ref b/modules/windows_tools/tests/nonreg_tests/bug_6489.dia.ref
new file mode 100755
index 000000000..aa38100f0
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_6489.dia.ref
@@ -0,0 +1,19 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- Non-regression test for bug 6387 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=6489
+//
+// <-- Short Description -->
+// removed a wrong dependendy on Wininet.dll
+if getos() == 'Windows' then
+ r = dllinfo(SCI+'/bin/windows_tools.dll','imports');
+ for i = 1 : size(r)
+ if grep(r(i)(1),'/WININET.DLL/i','r') <> [] then bugmes();quit;end
+ end
+end
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_6489.tst b/modules/windows_tools/tests/nonreg_tests/bug_6489.tst
new file mode 100755
index 000000000..f05256e27
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_6489.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 6387 -->
+
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=6489
+//
+// <-- Short Description -->
+// removed a wrong dependendy on Wininet.dll
+if getos() == 'Windows' then
+ r = dllinfo(SCI+'/bin/windows_tools.dll','imports');
+ for i = 1 : size(r)
+ if grep(r(i)(1),'/WININET.DLL/i','r') <> [] then pause,end
+ end
+end
+
+
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_6740.tst b/modules/windows_tools/tests/nonreg_tests/bug_6740.tst
new file mode 100755
index 000000000..eb0fc9a9e
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_6740.tst
@@ -0,0 +1,32 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 6740 -->
+
+// <-- INTERACTIVE TEST -->
+
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=6740
+//
+// <-- Short Description -->
+// It was not possible to launch Scilab as Minimized or Maximized Window.
+
+// Creates or uses Scilab shorcut on Desktop
+// Properties on Icon
+// Modify Start As Minimized
+// Start scilab
+// it must be minimized
+
+// Modify Start As Maximized
+// Start scilab
+// it must be maximized
+
+// Modify Start As Normal
+// Start scilab
+// it must be Normal
+
+
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_6964.tst b/modules/windows_tools/tests/nonreg_tests/bug_6964.tst
new file mode 100755
index 000000000..9585fb2c1
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_6964.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 6964 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=6964
+//
+// <-- Short Description -->
+// Scilab detected a wrong SCI path.
+
+// install scilab in a no ascii directory
+// example c:\Guanhuà\scilab-5.3 or c:\中国语文\scilab-5.3
+
+// start scilab and check SCI value in scilab
+ \ No newline at end of file
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_7021.tst b/modules/windows_tools/tests/nonreg_tests/bug_7021.tst
new file mode 100755
index 000000000..d76ba8a85
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_7021.tst
@@ -0,0 +1,19 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 7021 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7021
+//
+// <-- Short Description -->
+// Scilab did not start and returned a error system (193) on Windows
+
+// <-- INTERACTIVE TEST -->
+
+// install scilab without tclsci module
+// start scilab
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_7291.dia.ref b/modules/windows_tools/tests/nonreg_tests/bug_7291.dia.ref
new file mode 100755
index 000000000..a55d50520
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_7291.dia.ref
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Non-regression test for bug 7291 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7291
+//
+// <-- Short Description -->
+// unix('') and dos('') returned a wrong messsage in console
+r = unix('');
+if r <> 1 then bugmes();quit;end
+[a,b] = dos('');
+if b <> %f then bugmes();quit;end
+if a <> [] then bugmes();quit;end
+[a,b] = dos('', '-echo');
+if b <> %f then bugmes();quit;end
+if a <> [] then bugmes();quit;end
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_7291.tst b/modules/windows_tools/tests/nonreg_tests/bug_7291.tst
new file mode 100755
index 000000000..90a3f6c27
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_7291.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Non-regression test for bug 7291 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7291
+//
+// <-- Short Description -->
+// unix('') and dos('') returned a wrong messsage in console
+
+r = unix('');
+if r <> 1 then pause,end
+
+[a,b] = dos('');
+if b <> %f then pause,end
+if a <> [] then pause,end
+
+[a,b] = dos('', '-echo');
+if b <> %f then pause,end
+if a <> [] then pause,end
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_8218.tst b/modules/windows_tools/tests/nonreg_tests/bug_8218.tst
new file mode 100755
index 000000000..1894eb2ef
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_8218.tst
@@ -0,0 +1,44 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- JVM MANDATORY -->
+//
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 8218 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=8218
+//
+// <-- Short Description -->
+// file association with filename accentued characters did not work
+//
+
+// install a binary version with file association enabled
+
+tab_ref = [
+"dédé",
+"世界您好",
+"азеазея",
+"ハロー・ワールド",
+"เฮลโลเวิลด์",
+"حريات وحقوق"];
+
+// Creates files to check if we can open files
+
+tab_ref = tab_ref + '.sce';
+
+cd TMPDIR;
+disp('Go to directory with Windows Explorer: ' + TMPDIR);
+
+for i = 1:size(tab_ref, "*")
+ mputl('if you see this text it is OK', tab_ref(i));
+end
+
+//click on localized filenames
+// it must be opened by scilab
+
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_8424.tst b/modules/windows_tools/tests/nonreg_tests/bug_8424.tst
new file mode 100755
index 000000000..43839cc2f
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_8424.tst
@@ -0,0 +1,31 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- JVM MANDATORY -->
+//
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 8424 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=8424
+//
+// <-- Short Description -->
+// [a, b] = dos("git 1>&2") returned a wrong error.
+//
+// git without parameter returns same thing git --help.
+// except that it is in stderr and not in stdout
+// Here dos failed and returned [] and a error in api_scilab.
+// This test is interactive because it is require git.
+
+[a1, b1] = dos("git 1>&2");
+if b1 <> %f then pause, end
+
+[a2, b2] = dos("git --help");
+if b2 <> %t then pause, end
+
+if ~or(a1 == a2) then pause, end
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_8959.dia.ref b/modules/windows_tools/tests/nonreg_tests/bug_8959.dia.ref
new file mode 100755
index 000000000..335880518
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_8959.dia.ref
@@ -0,0 +1,19 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Non-regression test for bug 8959 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=8959
+//
+// <-- Short Description -->
+// winqueryreg returned an incorrect value if the value name was false.
+ierr = execstr("r = winqueryreg(""HKEY_LOCAL_MACHINE"", ""Software\Microsoft\Microsoft SDKs\Windows"", ""foo"")", "errcatch");
+if ierr <> 999 then bugmes();quit;end
+if lasterror() <> msprintf(_("%s: Cannot query value of this type.\n"), "winqueryreg") then bugmes();quit;end
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_8959.tst b/modules/windows_tools/tests/nonreg_tests/bug_8959.tst
new file mode 100755
index 000000000..7bb87138c
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_8959.tst
@@ -0,0 +1,20 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Non-regression test for bug 8959 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=8959
+//
+// <-- Short Description -->
+// winqueryreg returned an incorrect value if the value name was false.
+
+ierr = execstr("r = winqueryreg(""HKEY_LOCAL_MACHINE"", ""Software\Microsoft\Microsoft SDKs\Windows"", ""foo"")", "errcatch");
+if ierr <> 999 then pause, end
+if lasterror() <> msprintf(_("%s: Cannot query value of this type.\n"), "winqueryreg") then pause, end
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_9920.dia.ref b/modules/windows_tools/tests/nonreg_tests/bug_9920.dia.ref
new file mode 100755
index 000000000..56cf937f8
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_9920.dia.ref
@@ -0,0 +1,18 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Non-regression test for bug 9920 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=9920
+//
+// <-- Short Description -->
+// winqueryreg did not manage HKEY_CURRENT_CONFIG.
+ierr = execstr('winqueryreg(''HKEY_CURRENT_CONFIG'', ''Software\Fonts\'',''LogPixels'')', 'errcatch');
+assert_checkequal(ierr, 0);
diff --git a/modules/windows_tools/tests/nonreg_tests/bug_9920.tst b/modules/windows_tools/tests/nonreg_tests/bug_9920.tst
new file mode 100755
index 000000000..e8c668f29
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/bug_9920.tst
@@ -0,0 +1,19 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Non-regression test for bug 9920 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=9920
+//
+// <-- Short Description -->
+// winqueryreg did not manage HKEY_CURRENT_CONFIG.
+
+ierr = execstr('winqueryreg(''HKEY_CURRENT_CONFIG'', ''Software\Fonts\'',''LogPixels'')', 'errcatch');
+assert_checkequal(ierr, 0);
diff --git a/modules/windows_tools/tests/nonreg_tests/text_ANSI.txt b/modules/windows_tools/tests/nonreg_tests/text_ANSI.txt
new file mode 100755
index 000000000..6e611531a
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/text_ANSI.txt
@@ -0,0 +1 @@
+Les caractres accentus ne sont pas supports par unix_g() lorsqu'ils sont encods en ANSI comme ici
diff --git a/modules/windows_tools/tests/nonreg_tests/text_UTF8.txt b/modules/windows_tools/tests/nonreg_tests/text_UTF8.txt
new file mode 100755
index 000000000..ffadb1fe2
--- /dev/null
+++ b/modules/windows_tools/tests/nonreg_tests/text_UTF8.txt
@@ -0,0 +1 @@
+Les caractères accentués ne sont supportés pas par unix_g() lorsqu'ils sont encodés en UTF8 comme ici
diff --git a/modules/windows_tools/tests/unit_tests/createGUID.dia.ref b/modules/windows_tools/tests/unit_tests/createGUID.dia.ref
new file mode 100755
index 000000000..67e7e3ba9
--- /dev/null
+++ b/modules/windows_tools/tests/unit_tests/createGUID.dia.ref
@@ -0,0 +1,11 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - INRIA - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+res = createGUID(1);
+if length(res) <> 36 then bugmes();quit;end;
+if size(tokens(res,'-'),'*') <> 5 then bugmes();quit;end;
+res = createGUID(100);
+if size(res,'*') <> 100 then bugmes();quit;end;
diff --git a/modules/windows_tools/tests/unit_tests/createGUID.tst b/modules/windows_tools/tests/unit_tests/createGUID.tst
new file mode 100755
index 000000000..40604badf
--- /dev/null
+++ b/modules/windows_tools/tests/unit_tests/createGUID.tst
@@ -0,0 +1,13 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - INRIA - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+res = createGUID(1);
+if length(res) <> 36 then pause,end;
+if size(tokens(res,'-'),'*') <> 5 then pause,end;
+
+res = createGUID(100);
+if size(res,'*') <> 100 then pause,end;
diff --git a/modules/windows_tools/tests/unit_tests/findfileassociation.dia.ref b/modules/windows_tools/tests/unit_tests/findfileassociation.dia.ref
new file mode 100755
index 000000000..1477d47c0
--- /dev/null
+++ b/modules/windows_tools/tests/unit_tests/findfileassociation.dia.ref
@@ -0,0 +1,14 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// Please be sure that current scilab is associated with .sce & .sci extensions
+//
+if getos() == 'Windows' then
+ r = findfileassociation('.sce');
+ if r == [] then bugmes();quit;end
+ r = findfileassociation('.sci');
+ if r == [] then bugmes();quit;end
+end
diff --git a/modules/windows_tools/tests/unit_tests/findfileassociation.tst b/modules/windows_tools/tests/unit_tests/findfileassociation.tst
new file mode 100755
index 000000000..269ab566c
--- /dev/null
+++ b/modules/windows_tools/tests/unit_tests/findfileassociation.tst
@@ -0,0 +1,16 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// Please be sure that current scilab is associated with .sce & .sci extensions
+//
+if getos() == 'Windows' then
+ r = findfileassociation('.sce');
+ if r == [] then pause,end
+
+ r = findfileassociation('.sci');
+ if r == [] then pause,end
+end
diff --git a/modules/windows_tools/tests/unit_tests/getsystemmetrics.dia.ref b/modules/windows_tools/tests/unit_tests/getsystemmetrics.dia.ref
new file mode 100755
index 000000000..aa61119b0
--- /dev/null
+++ b/modules/windows_tools/tests/unit_tests/getsystemmetrics.dia.ref
@@ -0,0 +1,67 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - INRIA - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+getsystemmetrics('SM_ARRANGE');
+getsystemmetrics('SM_CLEANBOOT');
+getsystemmetrics('SM_CMONITORS');
+getsystemmetrics('SM_CMOUSEBUTTONS');
+getsystemmetrics('SM_CXBORDER');
+getsystemmetrics('SM_CXCURSOR');
+getsystemmetrics('SM_CXDLGFRAME');
+getsystemmetrics('SM_CXDOUBLECLK');
+getsystemmetrics('SM_CXDRAG');
+getsystemmetrics('SM_CXEDGE');
+getsystemmetrics('SM_CXFIXEDFRAME');
+getsystemmetrics('SM_CXFOCUSBORDER');
+getsystemmetrics('SM_CXFRAME');
+getsystemmetrics('SM_CXFULLSCREEN');
+getsystemmetrics('SM_CXHSCROLL');
+getsystemmetrics('SM_CXHTHUMB');
+getsystemmetrics('SM_CYICON');
+getsystemmetrics('SM_CYICONSPACING');
+getsystemmetrics('SM_CYKANJIWINDOW');
+getsystemmetrics('SM_CYMAXIMIZED');
+getsystemmetrics('SM_CYMAXTRACK');
+getsystemmetrics('SM_CYMENU');
+getsystemmetrics('SM_CYMENUCHECK');
+getsystemmetrics('SM_CYMENUSIZE');
+getsystemmetrics('SM_CYMIN');
+getsystemmetrics('SM_CYMINIMIZED');
+getsystemmetrics('SM_CYMINSPACING');
+getsystemmetrics('SM_CYMINTRACK');
+getsystemmetrics('SM_CYSCREEN');
+getsystemmetrics('SM_CYSIZE');
+getsystemmetrics('SM_CYSIZEFRAME');
+getsystemmetrics('SM_CYSMCAPTION');
+getsystemmetrics('SM_CYSMICON');
+getsystemmetrics('SM_CYSMSIZE');
+getsystemmetrics('SM_CYVIRTUALSCREEN');
+getsystemmetrics('SM_CYVSCROLL');
+getsystemmetrics('SM_CYVTHUMB');
+getsystemmetrics('SM_DBCSENABLED');
+getsystemmetrics('SM_DEBUG');
+getsystemmetrics('SM_IMMENABLED');
+getsystemmetrics('SM_MEDIACENTER');
+getsystemmetrics('SM_MENUDROPALIGNMENT');
+getsystemmetrics('SM_MIDEASTENABLED');
+getsystemmetrics('SM_MOUSEPRESENT');
+getsystemmetrics('SM_MOUSEHORIZONTALWHEELPRESENT');
+getsystemmetrics('SM_MOUSEWHEELPRESENT');
+getsystemmetrics('SM_NETWORK');
+getsystemmetrics('SM_PENWINDOWS');
+getsystemmetrics('SM_REMOTECONTROL');
+getsystemmetrics('SM_REMOTESESSION');
+getsystemmetrics('SM_SAMEDISPLAYFORMAT');
+getsystemmetrics('SM_SECURE');
+getsystemmetrics('SM_SERVERR2');
+getsystemmetrics('SM_SHOWSOUNDS');
+getsystemmetrics('SM_SHUTTINGDOWN');
+getsystemmetrics('SM_SLOWMACHINE');
+getsystemmetrics('SM_STARTER');
+getsystemmetrics('SM_SWAPBUTTON');
+getsystemmetrics('SM_TABLETPC');
+getsystemmetrics('SM_XVIRTUALSCREEN');
+getsystemmetrics('SM_YVIRTUALSCREEN');
diff --git a/modules/windows_tools/tests/unit_tests/getsystemmetrics.tst b/modules/windows_tools/tests/unit_tests/getsystemmetrics.tst
new file mode 100755
index 000000000..59ec873e8
--- /dev/null
+++ b/modules/windows_tools/tests/unit_tests/getsystemmetrics.tst
@@ -0,0 +1,68 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - INRIA - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+getsystemmetrics('SM_ARRANGE');
+getsystemmetrics('SM_CLEANBOOT');
+getsystemmetrics('SM_CMONITORS');
+getsystemmetrics('SM_CMOUSEBUTTONS');
+getsystemmetrics('SM_CXBORDER');
+getsystemmetrics('SM_CXCURSOR');
+getsystemmetrics('SM_CXDLGFRAME');
+getsystemmetrics('SM_CXDOUBLECLK');
+getsystemmetrics('SM_CXDRAG');
+getsystemmetrics('SM_CXEDGE');
+getsystemmetrics('SM_CXFIXEDFRAME');
+getsystemmetrics('SM_CXFOCUSBORDER');
+getsystemmetrics('SM_CXFRAME');
+getsystemmetrics('SM_CXFULLSCREEN');
+getsystemmetrics('SM_CXHSCROLL');
+getsystemmetrics('SM_CXHTHUMB');
+getsystemmetrics('SM_CYICON');
+getsystemmetrics('SM_CYICONSPACING');
+getsystemmetrics('SM_CYKANJIWINDOW');
+getsystemmetrics('SM_CYMAXIMIZED');
+getsystemmetrics('SM_CYMAXTRACK');
+getsystemmetrics('SM_CYMENU');
+getsystemmetrics('SM_CYMENUCHECK');
+getsystemmetrics('SM_CYMENUSIZE');
+getsystemmetrics('SM_CYMIN');
+getsystemmetrics('SM_CYMINIMIZED');
+getsystemmetrics('SM_CYMINSPACING');
+getsystemmetrics('SM_CYMINTRACK');
+getsystemmetrics('SM_CYSCREEN');
+getsystemmetrics('SM_CYSIZE');
+getsystemmetrics('SM_CYSIZEFRAME');
+getsystemmetrics('SM_CYSMCAPTION');
+getsystemmetrics('SM_CYSMICON');
+getsystemmetrics('SM_CYSMSIZE');
+getsystemmetrics('SM_CYVIRTUALSCREEN');
+getsystemmetrics('SM_CYVSCROLL');
+getsystemmetrics('SM_CYVTHUMB');
+getsystemmetrics('SM_DBCSENABLED');
+getsystemmetrics('SM_DEBUG');
+getsystemmetrics('SM_IMMENABLED');
+getsystemmetrics('SM_MEDIACENTER');
+getsystemmetrics('SM_MENUDROPALIGNMENT');
+getsystemmetrics('SM_MIDEASTENABLED');
+getsystemmetrics('SM_MOUSEPRESENT');
+getsystemmetrics('SM_MOUSEHORIZONTALWHEELPRESENT');
+getsystemmetrics('SM_MOUSEWHEELPRESENT');
+getsystemmetrics('SM_NETWORK');
+getsystemmetrics('SM_PENWINDOWS');
+getsystemmetrics('SM_REMOTECONTROL');
+getsystemmetrics('SM_REMOTESESSION');
+getsystemmetrics('SM_SAMEDISPLAYFORMAT');
+getsystemmetrics('SM_SECURE');
+getsystemmetrics('SM_SERVERR2');
+getsystemmetrics('SM_SHOWSOUNDS');
+getsystemmetrics('SM_SHUTTINGDOWN');
+getsystemmetrics('SM_SLOWMACHINE');
+getsystemmetrics('SM_STARTER');
+getsystemmetrics('SM_SWAPBUTTON');
+getsystemmetrics('SM_TABLETPC');
+getsystemmetrics('SM_XVIRTUALSCREEN');
+getsystemmetrics('SM_YVIRTUALSCREEN');
diff --git a/modules/windows_tools/tests/unit_tests/intelcompiler.dia.ref b/modules/windows_tools/tests/unit_tests/intelcompiler.dia.ref
new file mode 100755
index 000000000..ddb52b85d
--- /dev/null
+++ b/modules/windows_tools/tests/unit_tests/intelcompiler.dia.ref
@@ -0,0 +1,13 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// Checks that Scilab:
+// - has been compiled using Intel C++ Compiler version 14
+// - and uses MKL
+[a,b]=getdebuginfo();
+assert_checkequal(b(5), "Compiled with Intel compiler (1400)");
+assert_checkequal(b(6), "BLAS library optimized version: MKL");
+
diff --git a/modules/windows_tools/tests/unit_tests/intelcompiler.tst b/modules/windows_tools/tests/unit_tests/intelcompiler.tst
new file mode 100755
index 000000000..a45817dcd
--- /dev/null
+++ b/modules/windows_tools/tests/unit_tests/intelcompiler.tst
@@ -0,0 +1,14 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// Checks that Scilab:
+// - has been compiled using Intel C++ Compiler version 14
+// - and uses MKL
+
+[a,b]=getdebuginfo();
+assert_checkequal(b(5), "Compiled with Intel compiler (1400)");
+assert_checkequal(b(6), "BLAS library optimized version: MKL");
diff --git a/modules/windows_tools/tests/unit_tests/powershell.dia.ref b/modules/windows_tools/tests/unit_tests/powershell.dia.ref
new file mode 100755
index 000000000..a0ee70603
--- /dev/null
+++ b/modules/windows_tools/tests/unit_tests/powershell.dia.ref
@@ -0,0 +1,11 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - INRIA - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+if getos() == 'Windows' then
+ cd('SCI/bin');
+ r = powershell('ls');
+ if r == [] then bugmes();quit;end
+end
diff --git a/modules/windows_tools/tests/unit_tests/powershell.tst b/modules/windows_tools/tests/unit_tests/powershell.tst
new file mode 100755
index 000000000..710828bf0
--- /dev/null
+++ b/modules/windows_tools/tests/unit_tests/powershell.tst
@@ -0,0 +1,11 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - INRIA - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+if getos() == 'Windows' then
+ cd('SCI/bin');
+ r = powershell('ls');
+ if r == [] then pause,end
+end \ No newline at end of file
diff --git a/modules/windows_tools/tests/unit_tests/winqueryreg.dia.ref b/modules/windows_tools/tests/unit_tests/winqueryreg.dia.ref
new file mode 100755
index 000000000..6b5b68188
--- /dev/null
+++ b/modules/windows_tools/tests/unit_tests/winqueryreg.dia.ref
@@ -0,0 +1,19 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - INRIA - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- WINDOWS ONLY -->
+assert_checkerror('winqueryreg()', [], 77);
+assert_checkerror('winqueryreg(''name'', ''HKEY_CURRENT_USER'')', [], 999);
+mousechar = winqueryreg('name', 'HKEY_CURRENT_USER','control panel\mouse');
+assert_checktrue(size(mousechar,'*') <> 0);
+cpu = winqueryreg('HKEY_LOCAL_MACHINE','HARDWARE\DESCRIPTION\System\CentralProcessor\0\','ProcessorNameString');
+assert_checktrue(length(cpu) <> 0);
+software1 = winqueryreg('key', 'HKEY_LOCAL_MACHINE','Software');
+assert_checktrue(size(software1, "*") <> 0);
+software2 = winqueryreg('key', 'HKLM','Software');
+assert_checktrue(size(software2, "*") <> 0);
+assert_checkequal(software1, software2);
diff --git a/modules/windows_tools/tests/unit_tests/winqueryreg.tst b/modules/windows_tools/tests/unit_tests/winqueryreg.tst
new file mode 100755
index 000000000..f874c394f
--- /dev/null
+++ b/modules/windows_tools/tests/unit_tests/winqueryreg.tst
@@ -0,0 +1,26 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2008 - INRIA - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- WINDOWS ONLY -->
+
+
+assert_checkerror('winqueryreg()', [], 77);
+assert_checkerror('winqueryreg(''name'', ''HKEY_CURRENT_USER'')', [], 999);
+
+mousechar = winqueryreg('name', 'HKEY_CURRENT_USER','control panel\mouse');
+assert_checktrue(size(mousechar,'*') <> 0);
+
+cpu = winqueryreg('HKEY_LOCAL_MACHINE','HARDWARE\DESCRIPTION\System\CentralProcessor\0\','ProcessorNameString');
+assert_checktrue(length(cpu) <> 0);
+
+software1 = winqueryreg('key', 'HKEY_LOCAL_MACHINE','Software');
+assert_checktrue(size(software1, "*") <> 0);
+
+software2 = winqueryreg('key', 'HKLM','Software');
+assert_checktrue(size(software2, "*") <> 0);
+
+assert_checkequal(software1, software2);
diff --git a/modules/windows_tools/windows_tools.iss b/modules/windows_tools/windows_tools.iss
new file mode 100755
index 000000000..c7737f37c
--- /dev/null
+++ b/modules/windows_tools/windows_tools.iss
@@ -0,0 +1,49 @@
+;
+; Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+; Copyright (C) INRIA - Allan CORNET
+; Copyright (C) DIGITEO - 2010 - 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.1-en.txt
+;
+;--------------------------------------------------------------------------------------------------------------
+; Inno Setup Script (5.3 and more) for Scilab (UNICODE version required)
+;
+;--------------------------------------------------------------------------------------------------------------
+; windows_tools module
+;--------------------------------------------------------------------------------------------------------------
+;
+#define WINDOWS_TOOLS "windows_tools"
+;
+Source: bin\windows_tools.dll; DestDir: {app}\bin; Components: {#COMPN_SCILAB}
+;
+;Source: java\jar\modules\org.scilab.modules.{#WINDOWS_TOOLS}.jar;DestDir: {app}\java\jar\modules; Components: {#COMPN_SCILAB}
+;
+;Source: bin\no{#WINDOWS_TOOLS}.dll; DestDir: {app}\bin; DestName: windows_tools.dll; Components: not ({#COMPN_SCILAB})
+;
+Source: modules\{#WINDOWS_TOOLS}\license.txt; DestDir: {app}\modules\{#WINDOWS_TOOLS}; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#WINDOWS_TOOLS}\sci_gateway\{#WINDOWS_TOOLS}_gateway.xml; DestDir: {app}\modules\{#WINDOWS_TOOLS}\sci_gateway; Components: {#COMPN_SCILAB}
+;
+;Source: modules\{#WINDOWS_TOOLS}\includes\*.h; DestDir: {app}\modules\{#WINDOWS_TOOLS}\includes; Components: {#COMPN_SCILAB}
+Source: modules\{#WINDOWS_TOOLS}\includes\strdup_windows.h; DestDir: {app}\modules\{#WINDOWS_TOOLS}\includes; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#WINDOWS_TOOLS}\etc\{#WINDOWS_TOOLS}.quit; DestDir: {app}\modules\{#WINDOWS_TOOLS}\etc; Components: {#COMPN_SCILAB}
+Source: modules\{#WINDOWS_TOOLS}\etc\{#WINDOWS_TOOLS}.start; DestDir: {app}\modules\{#WINDOWS_TOOLS}\etc; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#WINDOWS_TOOLS}\macros\buildmacros.sce; DestDir: {app}\modules\{#WINDOWS_TOOLS}\macros; Components: {#COMPN_SCILAB}
+Source: modules\{#WINDOWS_TOOLS}\macros\buildmacros.bat; DestDir: {app}\modules\{#WINDOWS_TOOLS}\macros; Components: {#COMPN_SCILAB}
+Source: modules\{#WINDOWS_TOOLS}\macros\cleanmacros.bat; DestDir: {app}\modules\{#WINDOWS_TOOLS}\macros; Components: {#COMPN_SCILAB}
+Source: modules\{#WINDOWS_TOOLS}\macros\*.bin; DestDir: {app}\modules\{#WINDOWS_TOOLS}\macros; Components: {#COMPN_SCILAB}
+Source: modules\{#WINDOWS_TOOLS}\macros\*.sci; DestDir: {app}\modules\{#WINDOWS_TOOLS}\macros; Components: {#COMPN_SCILAB}
+Source: modules\{#WINDOWS_TOOLS}\macros\lib; DestDir: {app}\modules\{#WINDOWS_TOOLS}\macros; Components: {#COMPN_SCILAB}
+Source: modules\{#WINDOWS_TOOLS}\macros\names; DestDir: {app}\modules\{#WINDOWS_TOOLS}\macros; Components: {#COMPN_SCILAB}
+;
+;Source: modules\{#WINDOWS_TOOLS}\demos\*.*; DestDir: {app}\modules\{#WINDOWS_TOOLS}\demos; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+;
+Source: modules\{#WINDOWS_TOOLS}\tests\*.*; DestDir: {app}\modules\{#WINDOWS_TOOLS}\tests; Flags: recursesubdirs; Components: {#COMPN_SCILAB} and {#COMPN_TESTS}
+;
+;--------------------------------------------------------------------------------------------------------------