Revert "modify order in help chapter without modify modules.xml" 68/2568/1
Sylvestre Ledru [Tue, 23 Nov 2010 09:16:31 +0000 (10:16 +0100)]
This commit was causing some fail to build from source because, under
some OS, PVM & Tcl/Tk were not available.
We should improve this commit and avoid the crash when not available.

This reverts commit 2dd5602eb0e464019141308ced6d434e7879a1e6.

Change-Id: 2dd5602eb0e464f19141308ced6d434e7879a1e6

scilab/modules/helptools/Makefile.am
scilab/modules/helptools/Makefile.in
scilab/modules/helptools/etc/MAIN_CHAPTERS [deleted file]
scilab/modules/helptools/helptools.iss
scilab/modules/helptools/macros/xmltoformat.sci

index 726c9ee..b449ecd 100644 (file)
@@ -69,7 +69,7 @@ libscihelptools_la_root_DATA = changelog.txt license.txt readme.txt version.xml
 
 #### helptools : init scripts ####
 libscihelptools_la_etcdir = $(mydatadir)/etc
-libscihelptools_la_etc_DATA = etc/helptools.quit etc/helptools.start etc/MAIN_CHAPTERS
+libscihelptools_la_etc_DATA = etc/helptools.quit etc/helptools.start
 
 #### helptools : bin files ####
 libscihelptools_la_bindir = $(mydatadir)/bin
index 2006de5..c522b9b 100644 (file)
@@ -471,7 +471,7 @@ libscihelptools_la_root_DATA = changelog.txt license.txt readme.txt version.xml
 
 #### helptools : init scripts ####
 libscihelptools_la_etcdir = $(mydatadir)/etc
-libscihelptools_la_etc_DATA = etc/helptools.quit etc/helptools.start etc/MAIN_CHAPTERS
+libscihelptools_la_etc_DATA = etc/helptools.quit etc/helptools.start
 
 #### helptools : bin files ####
 libscihelptools_la_bindir = $(mydatadir)/bin
diff --git a/scilab/modules/helptools/etc/MAIN_CHAPTERS b/scilab/modules/helptools/etc/MAIN_CHAPTERS
deleted file mode 100644 (file)
index 3cddaac..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-core
-differential_equations
-elementary_functions
-linear_algebra
-interpolation
-cacsd
-polynomials
-signal_processing
-fftw
-special_functions
-randlib
-arnoldi
-statistics
-sparse
-umfpack
-optimization
-genetic_algorithms
-simulated_annealing
-symbolic
-fileio
-io
-graphics
-renderer
-graphic_export
-gui
-data_structures
-parameters
-boolean
-double
-integer
-string
-sound
-time
-output_stream
-xcos
-scicos
-scicos_blocks
-spreadsheet
-shell
-console
-completion
-history_manager
-matio
-m2sci
-mexlib
-compatibility_functions
-maple2scilab
-overloading
-functions
-development_tools
-demo_tools
-dynamic_link
-windows_tools
-atoms
-tclsci
-hdf5
-scinotes
-texmacs
-ui_data
-history_browser
-helptools
-parallel
-pvm
-modules_manager
-localization
-action_binding
-jvm
-api_scilab
-call_scilab
-javasci
-intersci
-graph
-commons
-types
\ No newline at end of file
index b8bf0b1..3381456 100644 (file)
@@ -78,7 +78,6 @@ Source: modules\{#HELPTOOLS}\data\*.*; DestDir: {app}\modules\{#HELPTOOLS}\data;
 ;
 Source: modules\{#HELPTOOLS}\etc\{#HELPTOOLS}.quit; DestDir: {app}\modules\{#HELPTOOLS}\etc; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 Source: modules\{#HELPTOOLS}\etc\{#HELPTOOLS}.start; DestDir: {app}\modules\{#HELPTOOLS}\etc; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
-Source: modules\{#HELPTOOLS}\etc\MAIN_CHAPTERS; DestDir: {app}\modules\{#HELPTOOLS}\etc; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 ;
 Source: modules\{#HELPTOOLS}\macros\buildmacros.sce; DestDir: {app}\modules\{#HELPTOOLS}\macros; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
 Source: modules\{#HELPTOOLS}\macros\buildmacros.bat; DestDir: {app}\modules\{#HELPTOOLS}\macros; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
index 6ecf6ed..6f8fb30 100644 (file)
@@ -28,15 +28,15 @@ function generated_files = xmltoformat(output_format,dirs,titles,directory_langu
     // if dirs is not specified or [] then standard scilab man are assumed and
     // titles are searched in %helps
     // =========================================================================
-    
-    my_wanted_language  = getlanguage(); // This variable is only need when
-                                         // build all scilab help
 
     global %helps;
     global %helps_modules;
 
     if %helps_modules == [] then
-       x2f_reset_help_mod_var(my_wanted_language);
+      moduleslist = getmodules();
+      for i = 1:size(moduleslist,'*')
+        add_module_help_chapter(moduleslist(i));
+      end
     end
 
     %HELPS = [%helps_modules; %helps];
@@ -55,6 +55,8 @@ function generated_files = xmltoformat(output_format,dirs,titles,directory_langu
     generated_files = [];
 
     all_scilab_help     = %F;
+    my_wanted_language  = getlanguage(); // This variable is only need when
+                                         // build all scilab help
 
     [lhs,rhs] = argn(0);
 
@@ -81,7 +83,7 @@ function generated_files = xmltoformat(output_format,dirs,titles,directory_langu
         if rhs == 4 then
             my_wanted_language = directory_language;
             x2f_reset_help_mod_var(my_wanted_language);
-            %HELPS = [%helps_modules; %helps];
+            %HELPS=[%helps_modules;%helps];
         end
 
         dirs_to_build          = %HELPS;
@@ -485,7 +487,7 @@ function generated_files = xmltoformat(output_format,dirs,titles,directory_langu
         if is_chm then
             final_help_file = pathconvert(buildDoc_dir + "htmlhelp.hhp",%f,%f);
         elseif is_html then
-            final_help_file = pathconvert(final_output_dir+"/index.html",%f,%f);
+            final_help_file = pathconvert(final_output_dir+"/index.html",%f,%f); 
        else
             final_help_file = pathconvert(final_output_dir+"/scilab_" + my_wanted_language + "_help." + output_format_ext,%f,%f);
         end
@@ -513,7 +515,7 @@ function generated_files = xmltoformat(output_format,dirs,titles,directory_langu
         else
           buildDoc(output_format,modules_tree("master_document"), my_wanted_language);
         end
-
+        
         // Check if the help file has been generated
         if fileinfo(buildDoc_file)==[] then
             error(msprintf(gettext("%s: %s has not been generated."),"xmltoformat",buildDoc_file));
@@ -611,7 +613,7 @@ function generated_files = xmltoformat(output_format,dirs,titles,directory_langu
             else
               buildDoc(output_format,this_tree("master_document"),directory_language_c(k),dirs_c(k));
             end
-
+            
             // Check if the help file has been generated
             if fileinfo(buildDoc_file)==[] then
                 error(msprintf(gettext("%s: %s has not been generated."),"xmltoformat",buildDoc_file));
@@ -834,39 +836,15 @@ function x2f_reset_help_mod_var(language)
 
     // Reset the variable in hand
     %helps_modules = [];
-    
-    modules_ordered_list = mgetl(SCI + "/modules/helptools/etc/MAIN_CHAPTERS");
-    // remove empty lines in MAIN_CHAPTERS
-    modules_ordered_list(modules_ordered_list == "") = [];
-      
-    // get current modules used by scilab
-    default_modules_list = getmodules();
-      
-    // windows_tools module only on Windows
-    if ~with_module("windows_tools") then
-      // remove windows_tools in modules_ordered_list
-      modules_ordered_list(modules_ordered_list == "windows_tools") = [];
-    end
-
-    // check size
-    if size(default_modules_list, "*") <> size(modules_ordered_list, "*") then
-      error(msprintf(gettext("%s: Please check %s, number of modules is invalid.\n"), "xmltoformat", SCI + "/modules/helptools/etc/MAIN_CHAPTERS"));
-    end
-
-    // check modules names
-    commons_modules = intersect(modules_ordered_list, default_modules_list);
-    if size(commons_modules, "*") <> size(default_modules_list, "*") then
-      error(msprintf(gettext("%s: Please check %s, there is (at least) a invalid module name.\n"), "xmltoformat", SCI + "/modules/helptools/etc/MAIN_CHAPTERS"));
-    end
-
-    clear commons_modules;
-    clear default_modules_list;
-    
+
+    // Get module list
+    module_list = getmodules();
+
     // Loop on modules
-    for k=1:size(modules_ordered_list, "*");
-        addchapter_path = getlongpathname(SCI+"/modules/" + modules_ordered_list(k) + "/help/" + language + "/addchapter.sce");
+    for k=1:size(module_list,'*');
+        addchapter_path = getlongpathname(SCI+"/modules/"+module_list(k)+"/help/"+language+"/addchapter.sce");
         if fileinfo(addchapter_path)<>[] then
-           exec(addchapter_path, -1);
+            exec(addchapter_path,-1);
         end
     end