Fix Windows toolbox compilation 27/16527/3
Vincent COUVERT [Fri, 29 May 2015 07:42:20 +0000 (09:42 +0200)]
This reverts commit 55082a682eab6172472d243c5d03c9aad161cfcd.

Change-Id: I707596aafbd89645412d8b07874a2ea036ef7060

scilab/contrib/toolbox_skeleton/builder.sce
scilab/modules/ast/ast.iss
scilab/modules/core/macros/isRelease.sci
scilab/modules/dynamic_link/macros/ilib_gen_gateway.sci

index 7c080d9..c96c577 100644 (file)
@@ -7,8 +7,6 @@ mode(-1);
 lines(0);
 
 function main_builder()
-
-    setenv('DEBUG_SCILAB_DYNAMIC_LINK','YES')
     TOOLBOX_NAME  = "toolbox_skeleton";
     TOOLBOX_TITLE = "Toolbox Skeleton";
     toolbox_dir   = get_absolute_file_path("builder.sce");
index a27c129..c23df9d 100644 (file)
 Source: bin\{#AST}.dll; DestDir: {app}\bin; Components: {#COMPN_SCILAB}
 Source: bin\{#AST}.lib; DestDir: {app}\bin; Components: {#COMPN_SCILAB}
 ;
-Source: modules\{#AST}\includes\analysis\*.*; DestDir: {app}\modules\{#AST}\includes\analysis; Components: {#COMPN_SCILAB}
-Source: modules\{#AST}\includes\ast\*.*; DestDir: {app}\modules\{#AST}\includes\ast; Components: {#COMPN_SCILAB}
-Source: modules\{#AST}\includes\exps\*.*; DestDir: {app}\modules\{#AST}\includes\exps; Components: {#COMPN_SCILAB}
-Source: modules\{#AST}\includes\operations\*.*; DestDir: {app}\modules\{#AST}\includes\operations; Components: {#COMPN_SCILAB}
-Source: modules\{#AST}\includes\parse\*.*; DestDir: {app}\modules\{#AST}\includes\parse; Components: {#COMPN_SCILAB}
-Source: modules\{#AST}\includes\symbol\*.*; DestDir: {app}\modules\{#AST}\includes\symbol; Components: {#COMPN_SCILAB}
-Source: modules\{#AST}\includes\system_env\*.*; DestDir: {app}\modules\{#AST}\includes\system_env; Components: {#COMPN_SCILAB}
-Source: modules\{#AST}\includes\types\*.*; DestDir: {app}\modules\{#AST}\includes\types; Components: {#COMPN_SCILAB}
+Source: modules\{#AST}\includes\*.*; DestDir: {app}\modules\{#AST}\includes; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
 ;
 Source: modules\{#AST}\etc\{#AST}.quit; DestDir: {app}\modules\{#AST}\etc; Components: {#COMPN_SCILAB}
 Source: modules\{#AST}\etc\{#AST}.start; DestDir: {app}\modules\{#AST}\etc; Components: {#COMPN_SCILAB}
 ;
-Source: modules\{#AST}\macros\buildmacros.sce; DestDir: {app}\modules\{#AST}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
-Source: modules\{#AST}\macros\buildmacros.bat; DestDir: {app}\modules\{#AST}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
-Source: modules\{#AST}\macros\cleanmacros.bat; DestDir: {app}\modules\{#AST}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
-Source: modules\{#AST}\macros\lib; DestDir: {app}\modules\{#AST}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+Source: modules\{#AST}\macros\buildmacros.sce; DestDir: {app}\modules\{#AST}\macros; Components: {#COMPN_SCILAB}
+Source: modules\{#AST}\macros\buildmacros.bat; DestDir: {app}\modules\{#AST}\macros; Components: {#COMPN_SCILAB}
+Source: modules\{#AST}\macros\cleanmacros.bat; DestDir: {app}\modules\{#AST}\macros; Components: {#COMPN_SCILAB}
+Source: modules\{#AST}\macros\lib; DestDir: {app}\modules\{#AST}\macros; Components: {#COMPN_SCILAB}
 Source: modules\{#AST}\macros\*.sci; DestDir: {app}\modules\{#AST}\macros; Components: {#COMPN_SCILAB}
 Source: modules\{#AST}\macros\*.bin; DestDir: {app}\modules\{#AST}\macros; Components: {#COMPN_SCILAB}
 ;
index c3fb7ee..5b1a896 100644 (file)
@@ -6,5 +6,9 @@
 // =============================================================================
 function ret = isRelease()
     [a,b] = getversion();
-    ret = b(4) == "release";
+    if or(getscilabmode() == ["NWNI", "SCILAB_API"]) then
+        ret = b(4) == "release";
+    else
+        ret = b(5) == "release";
+    end
 endfunction
index 82cb725..d1d056c 100644 (file)
@@ -66,8 +66,15 @@ function gateway_filename = ilib_gen_gateway(name,tables)
         if ( nt <> 3 ) then
             error(msprintf(gettext("%s: Wrong size for input argument #%d: %d expected.\n"),"ilib_gen_gateway",2,3));
         end
-        [gate,names,cppCompilation] = new_names(table);
+
         global cppCompilation;
+        if isempty(cppCompilation) then
+            cppCompilation = %f;
+        end
+
+        [gate,names,cpp] = new_names(table);
+        cppCompilation = cppCompilation | cpp;
+
         //generate cpp interface file
         if  cppCompilation then
             t = [
@@ -155,7 +162,7 @@ function gateway_filename = ilib_gen_gateway(name,tables)
         "";
         "extern ""C"" " + TNAME + "_GW_IMPEXP int " + tname + "(wchar_t* _pwstFuncName);";
         "";
-        gate(:, 2);
+        unique(gate(:, 2));
         "";
         "#endif /* __" + TNAME + "_GW_HXX__ */"];
 
@@ -182,7 +189,7 @@ function gateway_filename = ilib_gen_gateway(name,tables)
         "";
         "#include ""c_gateway_prototype.h""";
         "";
-        gate(:, 1);
+        unique(gate(:, 1));
         "";
         "#endif /* __" + TNAME + "_GW_H__ */"];