]> Creatis software - bbtk.git/commitdiff
Windows compilation
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 18 Feb 2008 10:41:02 +0000 (10:41 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 18 Feb 2008 10:41:02 +0000 (10:41 +0000)
13 files changed:
kernel/doc/bbtkWebSite/bbtk-make-index.bat.in [new file with mode: 0644]
kernel/src/bbtkBlackBox.cxx
kernel/src/bbtkBlackBoxDescriptor.cxx
kernel/src/bbtkComplexBlackBox.cxx
kernel/src/bbtkComplexBlackBoxDescriptor.cxx
kernel/src/bbtkConfigurationFile.cxx
kernel/src/bbtkFactory.cxx
kernel/src/bbtkInterpreter.cxx
kernel/src/bbtkPackage.cxx
kernel/src/bbtkTranscriptor.cxx
kernel/src/bbtkUtilities.cxx
kernel/src/bbtkUtilities.h
kernel/src/xmlParser.cpp

diff --git a/kernel/doc/bbtkWebSite/bbtk-make-index.bat.in b/kernel/doc/bbtkWebSite/bbtk-make-index.bat.in
new file mode 100644 (file)
index 0000000..865ece9
--- /dev/null
@@ -0,0 +1,16 @@
+@echo off
+echo "** Recreating bbtk doc index **"
+
+echo EED> "TMP=$(which $0|rev)"
+echo EED>"TMP2=$(echo ${TMP#*/}|rev)"
+echo EED">DIR=${TMP2}/../"
+
+echo "> cd ${DIR}/doc/bbdoc"
+echo cd ${DIR}/doc/bbdoc
+
+echo "> bbi -n ./make-index"
+..\..\bin\bbi -n .\make-index
+..\..\bin\Debug\bbi -n .\make-index
+..\..\bin\Release\bbi -n .\make-index
+
+echo "** Done ! **"
index ae3ea1f770e2cdaa517a3cf27417b44510e70796..1c980b724347e203b128f68531361b2f0ec09f6d 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkBlackBox.cxx,v $
 Language:  C++
-Date:      $Date: 2008/02/08 10:05:38 $
-Version:   $Revision: 1.3 $
+Date:      $Date: 2008/02/18 10:41:02 $
+Version:   $Revision: 1.4 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See doc/license.txt or
@@ -758,17 +758,19 @@ namespace bbtk
                                        bool instanceOrtype,
                                        bool relative_link )
 
-  {
+  { 
     InputConnectorMapType::iterator i;
     // label
     std::string labelStr;
     std::string valueStr("");
-    if (detail==0)
-      {
-       labelStr = bbGetName() ; 
-      } else {
-      labelStr = bbGetName();
-      labelStr = labelStr + "   [" +this->bbGetDescriptor()->GetPackage()->GetName()+"::"+ bbGetTypeName() + "]  ";
+
+       if (detail==0) {
+               labelStr = bbGetName() ; 
+//EED 18 Fev 2008
+               labelStr = labelStr + "\\n[" +this->bbGetDescriptor()->GetPackage()->GetName()+"::"+ bbGetTypeName() + "]";
+       } else {
+               labelStr = bbGetName();
+               labelStr = labelStr + "   [" +this->bbGetDescriptor()->GetPackage()->GetName()+"::"+ bbGetTypeName() + "]  ";
     }
 
     SubsBrackets(labelStr);
index 04ede1c4a7717f3efe2bb9fecca3b88816cbe9e0..705197e17667a1731bcf16c48d9dbe744f67f13e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxDescriptor.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/08 07:39:49 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2008/02/18 10:41:02 $
+  Version:   $Revision: 1.13 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -215,6 +215,7 @@ namespace bbtk
                                            const std::string& output_dir,
                                            bool relative_link )
   {
+printf("BlackBoxDescriptor::InsertHtmlHelp  01 lllllllllllllllllllllllllllllllllllllllllllllllll \n");
     bbtkDebugMessageInc("Kernel",9,"BlackBoxDescriptor::InsertHtmlHelp() ["<<GetTypeName()<<"]"<<std::endl);
     
     //-------------
@@ -401,6 +402,7 @@ namespace bbtk
     // End
 
     bbtkDebugDecTab("Kernel",9);
+printf("BlackBoxDescriptor::InsertHtmlHelp  02 lllllllllllllllllllllllllllllllllllllllllllllllll \n");
    }
   //=========================================================================
  
index 8da8dadc19772309ca462eac88eb7564cd38dc96..116c503674369064da5777fbc734ab32df316119 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkComplexBlackBox.cxx,v $
 Language:  C++
-Date:      $Date: 2008/02/08 10:05:38 $
-Version:   $Revision: 1.4 $
+Date:      $Date: 2008/02/18 10:41:02 $
+Version:   $Revision: 1.5 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See Doc/License.txt or
@@ -725,6 +725,7 @@ namespace bbtk
                                               bool instanceOrtype,
                                               bool relative_link )   
   {
+printf("EED ComplexBlackBox::bbWriteDotFileBlackBox 01\n");
     std::string tmp1;
     std::string valueStr("");
     Package *package = this->bbGetDescriptor()->GetPackage(); 
@@ -953,7 +954,7 @@ namespace bbtk
            } // if second
        } // for
     } // if parentblackbox
-
+printf("EED ComplexBlackBox::bbWriteDotFileBlackBox 02\n");
   }
   //=========================================================================
 
index 99133dace43038feb6fed70eff5dfd8ca21f921c..6faae520dbb8ddd47d8d86c2a1e2bcdb90a40424 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkComplexBlackBoxDescriptor.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/08 11:56:10 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/02/18 10:41:02 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -260,6 +260,7 @@ namespace bbtk
                                                   int detail, int level,
                                                   const std::string& output_dir, bool relative_link)
   {
+printf("ComplexBlackBoxDescriptor::InsertHtmlHelp  01  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n");
     bbtkDebugMessageInc("Kernel",9,
                        "ComplexBlackBoxDescriptor::InsertHtmlHelp() ["
                        <<GetTypeName()<<"]"<<std::endl);
@@ -427,6 +428,7 @@ namespace bbtk
     // End
 
     bbtkDebugDecTab("Kernel",9);
+printf("ComplexBlackBoxDescriptor::InsertHtmlHelp  02  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n");
    }
   //=========================================================================
  
index 6b6dab611c124cfc2b3d54cbd875efee59f90434..811bccbfdca9d6e31dff502cdc27fcd7dcc8f7db 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkConfigurationFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/15 08:46:17 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2008/02/18 10:41:02 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -75,16 +75,20 @@ namespace bbtk
     // always add "." (current working directory) at the begining
     mBbs_paths.push_back("."); 
     // add system bbs path 
+#ifdef WIN32
+//EED for windows BUILD tree
+    mBbs_paths.push_back(mInstall_path + mFile_separator + ".." + mFile_separator + mBbs_rel_path);
+#endif
     mBbs_paths.push_back(mBbs_path);
+
     
     // always add "." (current working directory) at the begining
     mPackage_paths.push_back(".");   
-#ifndef WIN32
     // add system bin path (for build tree / standalone folder install)
     mPackage_paths.push_back(mBin_path);
     // add system lib path (for install tree)
     mPackage_paths.push_back(mInstall_path + mFile_separator + "lib");
-#else 
+#ifdef WIN32
     // add bin/Debug bin/Release paths (for build/install tree)
     mPackage_paths.push_back(mBin_path + mFile_separator + "Debug");
     mPackage_paths.push_back(mBin_path + mFile_separator + "Release");
index 5095c0e81b452368b4aca8f68f53464aa4cf40cc..7cda690e1aaa71d50690300928fefc2d9ef88d46 100644 (file)
@@ -4,8 +4,8 @@ Program:   bbtk
 Module:    $RCSfile: bbtkFactory.cxx,v $
 Language:  C++
 
-Date:      $Date: 2008/02/14 13:44:25 $
-Version:   $Revision: 1.21 $
+Date:      $Date: 2008/02/18 10:41:02 $
+Version:   $Revision: 1.22 $
                                                                                 
 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
@@ -823,6 +823,8 @@ namespace bbtk
   //===================================================================
   void Factory::WriteDotFilePackagesList(FILE *ff)
   {
+printf("EED Factory::WriteDotFilePackagesList 01\n");
+
     bbtkDebugMessageInc("Kernel",9,"Factory::WriteDotFilePackagesList()"
                          <<std::endl);
 
@@ -842,12 +844,15 @@ namespace bbtk
     }
     fprintf( ff , "}\n\n");
     bbtkDebugDecTab("Kernel",9);
+printf("EED Factory::WriteDotFilePackagesList 02\n");
   }
   //===================================================================
 
 
  void Factory::ShowGraphTypes(const std::string& name) const
  {
+printf("EED Factory::ShowGraphTypes 01\n");
+
    bool found = false;
    PackageMapType::const_iterator i;
    for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i )
@@ -888,6 +893,7 @@ namespace bbtk
       bbtkError("No package of the factory contains any black box <"
                 <<name<<">");
    }
+printf("EED Factory::ShowGraphTypes 02\n");
  }
     
 
index 7a7e08b47b0c25fd9827e64d4a6c0b2995808f85..ced11fa92b8f849e14231a4f293fb75c624e1ff8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/14 20:26:54 $
-  Version:   $Revision: 1.32 $
+  Date:      $Date: 2008/02/18 10:41:02 $
+  Version:   $Revision: 1.33 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -26,6 +26,7 @@
 #include "bbtkWxConsole.h"
 #include "bbtkUtilities.h"
 #include <sys/stat.h>
+#include <algorithm>
 #ifdef CMAKE_HAVE_TERMIOS_H
 #include <termios.h>
 #define BBTK_USE_TERMIOS_BASED_PROMPT
@@ -307,8 +308,11 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL;
     bool exm = mCommandLine;
     mCommandLine = false;
 
+
     try 
     {
+printf("EED: Interpreter::InterpretFile 01\n");
+InterpretLine("message ALL 9", exm);
       SwitchToFile(filename, use_configuration_file);
       bool insideComment = false; // for multiline comment
       while (mFile.size()>0) 
@@ -366,6 +370,7 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL;
     bbtkDecTab("Interpreter",9);
 
     mCommandLine = exm;
+ printf("EED: Interpreter::InterpretFile 02\n");
   }
   //=======================================================================
 
@@ -789,7 +794,7 @@ void Interpreter::SplitLine ( const std::string& str, std::vector<std::string>&
       std::string path;
       std::vector<std::string>::iterator i;
       std::string fullDirectoryName;
-      for (i=script_paths.begin();i!=script_paths.end();++i)// ==== relative name, iterate + load all .bbs files
+      for (i=script_paths.begin();i!=script_paths.end();i++)// ==== relative name, iterate + load all .bbs files
       {
         path = *i;
 
@@ -803,8 +808,12 @@ void Interpreter::SplitLine ( const std::string& str, std::vector<std::string>&
 
         fullDirectoryName = Utilities::MakePkgnameFromPath(path, upath, false);
 
+               //EED 18 Fev 2008
+               // without last slash "\"
+               std::string fullDirectoryNameClean = fullDirectoryName.substr(0,fullDirectoryName.size()-1);
+
       // Check if library exists
-        if ( ! Utilities::IsDirectory(fullDirectoryName) )
+        if ( ! Utilities::IsDirectory( fullDirectoryNameClean ) )
         {
         // The following is *NOT* a debug time message :
         // It's a user intended message.
@@ -821,7 +830,6 @@ void Interpreter::SplitLine ( const std::string& str, std::vector<std::string>&
         nbBssFiles = 0;
         for (std::vector<std::string>::iterator i = Filenames.begin(); i!= Filenames.end(); ++i)
         {
-
            if ((*i).substr((*i).size()-4, 4) != ".bbs")
               continue;      // ignore non .bbs files
            LoadScript(*i,name);
index 558d0b28e5977b684ce99dc05401d536516c96ac..7d70c2511faefa7bdbd63ba5935f5932b440996b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkPackage.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/12 12:55:16 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2008/02/18 10:41:02 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -602,9 +602,11 @@ namespace bbtk
     // Computes output directory from filename to pass it to 
     // BlackBoxDescriptor::InsertHtmlHelp
     std::string dir;
-    std::string::size_type slash_position = 
-      filename.find_last_of(ConfigurationFile::GetInstance().Get_file_separator ());
-    if (slash_position != std::string::npos) {
+
+    std::string::size_type slash_position = filename.find_last_of("/\\");
+
+
+       if (slash_position != std::string::npos) {
       if (slash_position == 0)
          slash_position = 1;  
       dir = filename.substr(0,slash_position);
index 65c947d7aa1fb39e7ab5c2c9c2b19672381c8f72..0609b5fb065e01d34a41f00a964f0f177436a93b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkTranscriptor.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/14 20:23:51 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2008/02/18 10:41:02 $
+  Version:   $Revision: 1.6 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -456,6 +456,8 @@ std::cout << "====================================================== delete Tran
        // b->bbSetInput(input,&v);
       }
 */
+// EED Windows
+return "";
   }
 
 
index 9a6b0283e3ca0fc0ea3f36ee5d04f7967aeb78dc..968853ff91b111f59a100382974cf1cb42f9eacb 100644 (file)
@@ -1,5 +1,5 @@
 #include "bbtkUtilities.h"
+
 
 namespace bbtk
 {
@@ -8,17 +8,23 @@ namespace bbtk
 bool Utilities::loosematch(std::string stdLine,std::string stdOptions) 
 {
        bool result=false;
-       char charTmp;
          std::vector<std::string> tokens;
          SplitString ( stdOptions,"|", tokens);
-                         int j,sizeStdLineTmp;
          int i,size=tokens.size();  
          for (i=0; i<size; i++)
          {               
+#ifdef WIN32
+                 if ( strcmpi(stdLine.c_str(),tokens[i].c_str())==0) 
+                 { 
+                         result=true; 
+                 }               
+#else
                  if ( strcasecmp(stdLine.c_str(),tokens[i].c_str())==0) 
                  { 
                          result=true; 
                  }               
+#endif
+
          }
          return result;
 }
index 8711393d233f267a2645ae01051ec1bddf8f92bb..bfad45561227dad6df11949bc2577822be9ce438 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkUtilities.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/08 14:58:31 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2008/02/18 10:41:02 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -128,7 +128,8 @@ namespace bbtk
        // WIN 32 mechanism
        // shared lib name = <name>.dll
 
-     // remove {bb} if any
+// EED Problem loading package call bbtkTools
+//     // remove {bb} if any
     if (memcmp (pkgname.c_str(), "bb", 2) == 0) {
        pkgname =  pkgname.substr(2, pkgname.length());  
     }
index 36857761c7b666511335f148ec9753da80375dba..49d05ca687fd4d02e96e0f1603c1365e7ad17b75 100644 (file)
@@ -404,6 +404,7 @@ static const char *XML_ByteTable=(const char *)XML_utf8ByteTable; // the default
 
 XMLError XMLNode::writeToFile(XMLCSTR filename, const char *encoding, char nFormat) const
 {
+printf("EED XMLNode::writeToFile 01\n");
     int i;
     XMLSTR t=createXMLString(nFormat,&i);
     FILE *f=_tfopen(filename,_T("wb"));
@@ -437,6 +438,7 @@ XMLError XMLNode::writeToFile(XMLCSTR filename, const char *encoding, char nForm
     }
 #endif
     if (!fwrite(t,sizeof(XMLCHAR)*i,1,f)) return eXMLErrorCannotWriteFile;
+printf("EED XMLNode::writeToFile 02\n");
     if (fclose(f)!=0) return eXMLErrorCannotWriteFile;
     free(t);
     return eXMLErrorNone;