Fix Pierre's bug in the compilation of the doc
Sylvestre Ledru [Mon, 15 Sep 2008 11:49:49 +0000 (11:49 +0000)]
scilab/modules/helptools/macros/xmltoformat.sci
scilab/modules/helptools/src/java/org/scilab/modules/helptools/BuildDocObject.java
scilab/modules/helptools/src/java/org/scilab/modules/helptools/BuildJavaHelp.java

index 92278c4..78c7286 100644 (file)
@@ -378,13 +378,10 @@ function xmltoformat(output_format,dirs,titles,directory_language,default_langua
                mprintf(_("\nBuilding the scilab manual file ["+output_format+"] (Please wait building ... this can take up to 10 minutes)\n"));
                
                // Create output directory if does not exist
-               outDir = SCI+"/modules/helptools/build/doc/scilab_" + getlanguage() + "_help/";
+               outDir = SCI+"/modules/helptools/"+output_format+"/scilab_" + getlanguage() + "_help/";
                if  ~isdir(outDir)
-                 if  ~isdir(outDir+"../..") then
-                   mkdir(SCI+"/modules/helptools/build/");
-                 end
-                 if ~isdir(outDir+"../") then
-                   mkdir(SCI+"/modules/helptools/build/doc");
+                 if  ~isdir(outDir+"../") then
+                   mkdir(SCI+"/modules/helptools/"+output_format+"/");
                  end
            mkdir(outDir);
                end
@@ -403,8 +400,8 @@ function xmltoformat(output_format,dirs,titles,directory_language,default_langua
                                mprintf(_("\nBuilding the manual file [%s] in %s. (Please wait building ... this can take up to 10 minutes)\n"),output_format,strsubst(dirs_c(k),SCI_long,"SCI"));
                                
                                // Create output directory if does not exist
-                               if output_format=="javaHelp" & ~isdir(dirs_c(k)+"/../../jar/")
-                                       mkdir(dirs_c(k)+"/../../jar/")
+                               if output_format=="javaHelp" & ~isdir(dirs_c(k)+"/../jar/")
+                                       mkdir(dirs_c(k)+"/../jar/")
                                end
                                outDir = dirs_c(k) + "/scilab_" + directory_language_c(k) + "_help/";
                                if  ~isdir(outDir)
@@ -436,8 +433,8 @@ function xmltoformat(output_format,dirs,titles,directory_language,default_langua
                                        mprintf(_("\nBuilding the manual file [%s] in %s. (Please wait building ... this can take up to 10 minutes)\n"),output_format,strsubst(dirs(k),SCI_long,"SCI"));
                                end
                                // Create output directory if does not exist
-                               if output_format=="javaHelp" & ~isdir(dirs(k)+"/../../jar/")
-                                       mkdir(dirs(k)+"/../../jar/")
+                               if output_format=="javaHelp" & ~isdir(dirs(k)+"/../jar/")
+                                       mkdir(dirs(k)+"/../jar/")
                                end
                                outDir = dirs(k) + "/scilab_" + directory_language(k) + "_help/";
                                if  ~isdir(outDir)
index 1e589f7..fa4f0b8 100644 (file)
@@ -270,7 +270,11 @@ public class BuildDocObject extends StyleSheet {
                args.add("base.dir=" + this.outputDirectory);
                args.add("html.stylesheet=" + new File(styleSheet).getName());
                args.addAll(specificArgs);
-               
+               /**
+                * We are calling directly the method as we were using a command line
+                * program because it is much easier ... 
+                * However, this should be rewritted using the API 
+                */
                doMain(args.toArray(new String [args.size()]), new StyleSheet(), "java com.icl.saxon.StyleSheet");
 
                if (new File(sourceDocProcessed).isDirectory()) {
index 307322c..459d286 100644 (file)
@@ -73,7 +73,7 @@ public final class BuildJavaHelp {
                FileOutputStream fileOutputStream = null;
                final int compressionLevel = 5;
                /* Stored into SCI/modules/helptools/jar */
-               String fileName = outputDirectory + "/../../../jar/" + baseName + ".jar";
+               String fileName = outputDirectory + "/../../jar/" + baseName + ".jar";
 
                try {