to build scilab on Windows (temp.)
Allan Cornet [Thu, 18 Oct 2007 08:45:23 +0000 (08:45 +0000)]
scilab/modules/core/src/c/ExceptionMessage.c
scilab/modules/core/src/c/GetExceptionCode.c
scilab/modules/core/src/c/callFunctionFromGateway.c
scilab/modules/linear_algebra/src/c/linear_algebra.vcproj
scilab/modules/localization/includes/localization.h
scilab/modules/localization/src/c/InitializeLocalization.c
scilab/modules/localization/src/localization.vcproj
scilab/modules/tclsci/src/c/EnvTclTk.c

index a764624..6d36c98 100644 (file)
@@ -14,11 +14,11 @@ void ExceptionMessage(DWORD ExceptionCode,char *functionname)
        char *ExceptionString=GetExceptionString(ExceptionCode);
        if (functionname)
        {
-               message_scilab(_("Warning !!! exception 2"),ExceptionString,functionname);
+               message_scilab("Warning !!! exception 2",ExceptionString,functionname);
        }
        else
        {
-               message_scilab(_("Warning !!! exception 1"),ExceptionString);
+               message_scilab("Warning !!! exception 1",ExceptionString);
        }
        if (ExceptionString) {FREE(ExceptionString);ExceptionString=NULL;}
 }
index 298f577..c2fbdcf 100644 (file)
@@ -76,7 +76,7 @@ char *GetExceptionString(DWORD ExceptionCode)
                        wsprintf(StringOuput,"%s","EXCEPTION_FLT_UNDERFLOW");
                break;
                default:
-               wsprintf(StringOuput,"%s",_("Unknown exception"));
+               wsprintf(StringOuput,"%s","Unknown exception");
                break;                          
   }
 
index ce53dd9..f255d64 100644 (file)
@@ -16,17 +16,17 @@ void callFunctionFromGateway(gw_generic_table *Tab)
 #ifndef _DEBUG
        _try
        {
-               (*(Tab[Fin-1].f)) (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
+               if (*(Tab[Fin-1].f) != NULL) (*(Tab[Fin-1].f)) (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
        }
        _except (EXCEPTION_EXECUTE_HANDLER)
        {       
                ExceptionMessage(GetExceptionCode(),Tab[Fin-1].name);
        }
 #else
-       (*(Tab[Fin-1].f)) (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
+       if (*(Tab[Fin-1].f) != NULL) (*(Tab[Fin-1].f)) (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
 #endif
 #else
-       (*(Tab[Fin-1].f)) (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
+       if (*(Tab[Fin-1].f) != NULL) (*(Tab[Fin-1].f)) (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
 #endif
 }
 /*-----------------------------------------------------------------------------------*/
index 323e517..223484c 100644 (file)
@@ -40,7 +40,7 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="../../includes;../../../../libs/MALLOC/includes;../../../core/includes;../../../../libs/hashtable;"
+                               AdditionalIncludeDirectories="../../includes;../../../../libs/MALLOC/includes;../../../core/includes;../../../core/src/c"
                                PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WITH_TK;FORDLL;WIN32;_DEBUG;_WINDOWS;_USRDLL;SCICOS_EXPORTS"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="0"
                                InlineFunctionExpansion="1"
                                FavorSizeOrSpeed="1"
                                WholeProgramOptimization="false"
-                               AdditionalIncludeDirectories="../../includes;../../../../libs/MALLOC/includes;../../../core/includes;../../../../libs/hashtable"
+                               AdditionalIncludeDirectories="../../includes;../../../../libs/MALLOC/includes;../../../core/includes;../../../core/src/c"
                                PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WITH_TK;FORDLL;WIN32;NDEBUG;_WINDOWS;_USRDLL;SCICOS_EXPORTS"
                                StringPooling="true"
                                RuntimeLibrary="2"
index f84042f..67a417a 100644 (file)
@@ -6,11 +6,12 @@
 #ifndef __LOCALIZATION_H__
 #define __LOCALIZATION_H__
 /*-----------------------------------------------------------------------------------*/ 
+#ifndef _MSC_VER
 #include <libintl.h>
 #include <locale.h>
 
 #define _(String) gettext (String)
 #define _t(String1,String2,n) ngettext (String1,String2,n)
-
+#endif
 #endif /* __LOCALIZATION_H__ */
 /*-----------------------------------------------------------------------------------*/ 
index d0a7c26..81b96cf 100644 (file)
@@ -11,6 +11,9 @@
 #include "inisci-c.h"
 #include "machine.h"
 #include "scilabDefaults.h"
+#ifdef _MSC_VER
+#define _putenv putenv
+#endif
 /*-----------------------------------------------------------------------------------*/ 
 
 /**
index d3cc94a..a8c97f9 100644 (file)
                        <File
                                RelativePath=".\c\getentrieshashtable.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath="..\sci_gateway\c\gw_localization.c"
                        <File
                                RelativePath=".\c\hashtable_localization.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\c\InitializeLocalization.c"
                        <File
                                RelativePath=".\c\loadhashtableslocalization.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\c\loadsavelanguage.c"
                        <File
                                RelativePath=".\c\localization.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\c\org_scilab_modules_localization_QueryString.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath="..\sci_gateway\c\sci_addtext.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath="..\sci_gateway\c\sci_getlanguage.c"
                        <File
                                RelativePath="..\sci_gateway\c\sci_getlanguagealias.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath="..\sci_gateway\c\sci_getlanguagestable.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath="..\sci_gateway\c\sci_gettext.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath="..\sci_gateway\c\sci_removetext.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath="..\sci_gateway\c\sci_setlanguage.c"
                        <File
                                RelativePath=".\c\TerminateLocalization.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
                        </File>
                </Filter>
                <Filter
index 69dc320..6808901 100644 (file)
@@ -11,7 +11,7 @@
 #include "tcl.h"
 #include "tk.h"
 #include "MALLOC.h"
-#include "../../localization/includes/QueryStringError.h"
+//#include "../../localization/includes/QueryStringError.h"
 #include "../../fileio/includes/ConvertPathUnixToWindows.h"
 /*-----------------------------------------------------------------------------------*/
 BOOL Set_TCL_LIBRARY_PATH(char *DefaultPath)
@@ -37,12 +37,12 @@ BOOL Set_TCL_LIBRARY_PATH(char *DefaultPath)
        /* c:\progra~1\scilab-5.0\modules\tclsci\tcl\tcl8.4 */
        if (GetShortPathName(DefaultPath,ShortPath,PATH_MAX)==0)
        {
-               char *msg1=QueryStringError("Incorrect TCL_LIBRARY environment variable");
-               char *msg2=QueryStringError("TCL_LIBRARY has been redefined to ");
-               fprintf(stderr,"\n%s\n%s%s.\n",msg1,msg2,DefaultPath);
+               //char *msg1=QueryStringError("Incorrect TCL_LIBRARY environment variable");
+               //char *msg2=QueryStringError("TCL_LIBRARY has been redefined to ");
+               fprintf(stderr,"\n%s\n%s%s.\n","Incorrect TCL_LIBRARY environment variable","TCL_LIBRARY has been redefined to ",DefaultPath);
                if (CopyOfDefaultPath) {FREE(CopyOfDefaultPath);CopyOfDefaultPath=NULL;}
-               if (msg1) {FREE(msg1);msg1=NULL;}
-               if (msg2) {FREE(msg2);msg2=NULL;}
+//             if (msg1) {FREE(msg1);msg1=NULL;}
+//             if (msg2) {FREE(msg2);msg2=NULL;}
 
                ConvertPathUnixToWindowsFormat(ShortPath,CopyOfDefaultPath);
                wsprintf (env, "TCL_LIBRARY=%s\\modules\\tclsci\\tcl\\tcl%d.%d",CopyOfDefaultPath,major,minor);
@@ -89,12 +89,12 @@ BOOL Set_TK_LIBRARY_PATH(char *DefaultPath)
        /* c:\progra~1\scilab-3.1\modules\tclsci\tcl\tk8.4 */
        if (GetShortPathName(DefaultPath,ShortPath,PATH_MAX)==0)
        {
-               char *msg1=QueryStringError("Incorrect TK_LIBRARY environment variable");
-               char *msg2=QueryStringError("TK_LIBRARY has been redefined to ");
-               fprintf(stderr,"\n%s\n%s%s.\n",msg1,msg2,DefaultPath);
+               //char *msg1=QueryStringError("Incorrect TK_LIBRARY environment variable");
+               //char *msg2=QueryStringError("TK_LIBRARY has been redefined to ");
+               fprintf(stderr,"\n%s\n%s%s.\n","Incorrect TK_LIBRARY environment variable","TK_LIBRARY has been redefined to ",DefaultPath);
                if (CopyOfDefaultPath) {FREE(CopyOfDefaultPath);CopyOfDefaultPath=NULL;}
-               if (msg1){FREE(msg1);msg1=NULL;}
-               if (msg2){FREE(msg2);msg2=NULL;}
+               //if (msg1){FREE(msg1);msg1=NULL;}
+               //if (msg2){FREE(msg2);msg2=NULL;}
 
                ConvertPathUnixToWindowsFormat(ShortPath,CopyOfDefaultPath);
                wsprintf (env, "TK_LIBRARY=%s\\modules\\tclsci\\tcl\\tk%d.%d",CopyOfDefaultPath,major,minor);