]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Mon, 3 Mar 2008 08:06:36 +0000 (08:06 +0000)
committerguigues <guigues>
Mon, 3 Mar 2008 08:06:36 +0000 (08:06 +0000)
kernel/install/linux/bbtk-uninstall.sh
kernel/src/CMakeLists.txt
kernel/src/bbtkConfigurationFile.cxx
kernel/src/bbtkFactory.cxx
kernel/src/bbtkFactory.h
kernel/src/bbtkInterpreter.cxx
kernel/src/bbtkInterpreter.h
kernel/src/bbtkWxConsole.h

index 8a05ef581596081e077c8b321aac283d62f0a676..2c7e2bb9e307fcc615f7fd3b72d180ab8e1a9b99 100644 (file)
@@ -1,5 +1,5 @@
 echo "****** WARNING : THIS IS A BRUTE FORCE **UNSAFE** UNINSTALLER ******"
-echo "****** WILL REMOVES ALL FILES AND FOLDERS STARTING WITH bb    ******"
+echo "****** WILL REMOVE ALL FILES AND FOLDERS STARTING WITH bb     ******"
 
 TMP=$(which bbtk-uninstall.sh|rev)
 TMP2=$(echo ${TMP#*/}|rev)
@@ -28,4 +28,5 @@ rm -Rf ${PREFIX}/lib/bb*
 rm -Rf ${PREFIX}/lib/libbb*
 rm -Rf ${PREFIX}/include/bb*
 rm -Rf ${PREFIX}/share/bbtk
+echo "DONE !"
 fi
index 32b8cb26e0396554c8f0441354e2f1d8ee43041b..b519e3239d1766c33805fd10bd9ce34646f8dec4 100644 (file)
@@ -189,7 +189,11 @@ TARGET_LINK_LIBRARIES(bbtk ${BBTK_LINK_LIBRARIES})
 #-----------------------------------------------------------------------------
 FILE(GLOB BBTK_HEADERS "*.h")
 INSTALL(FILES ${BBTK_HEADERS} DESTINATION include/bbtk)
-INSTALL(TARGETS bbtk DESTINATION bin)
+IF(UNIX)
+  INSTALL(TARGETS bbtk DESTINATION lib)
+ELSE(UNIX)
+  INSTALL(TARGETS bbtk DESTINATION bin)
+ENDIF(UNIX)
 #-----------------------------------------------------------------------------
 
 #-----------------------------------------------------------------------------
index b1292caca398d61c99a4b385b9805ee129516eb9..8181a6aef371991c66bfa01cfe4a7a0eaf9ab4a8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkConfigurationFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/22 17:36:42 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2008/03/03 08:06:36 $
+  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
@@ -36,6 +36,7 @@ namespace bbtk
   /// Constructor
   ConfigurationFile::ConfigurationFile()
   {
+
     // file separator
 #if defined(_WIN32)
     mFile_separator = "\\";
@@ -68,7 +69,6 @@ namespace bbtk
     bbtkMessage("Config",1," ==> prefix : '"<<mInstall_path<<"'"<<std::endl);
     bbtkMessage("Config",1," ==> doc    : '"<<mDoc_path<<"'"<<std::endl);
     bbtkMessage("Config",1," ==> bbs    : '"<<mBbs_path<<"'"<<std::endl);
-    //   bbtkMessage("Config",1," ==> rsc    : '"<<mRsc_path<<"'"<<std::endl);
     bbtkMessage("Config",1," ==> data   : '"<<mData_path<<"'"<<std::endl);
     
     
@@ -76,12 +76,20 @@ namespace bbtk
     // always add "." (current working directory) at the begining
     mBbs_paths.push_back("."); 
     // add system bbs path 
+    mBbs_paths.push_back(mBbs_path);
+    // add toolsbbtk/appli 
+    std::string toolsappli_rel_path(mFile_separator);
+    toolsappli_rel_path +=  "toolsbbtk" + mFile_separator + "appli";
+    mBbs_paths.push_back(mBbs_path + toolsappli_rel_path);
 #ifdef WIN32
-//EED for windows BUILD tree
-    mBbs_paths.push_back(mInstall_path + mFile_separator + ".." + mFile_separator + mBbs_rel_path);
+    //EED for windows BUILD tree
+    std::string winbbspath = mInstall_path + mFile_separator + ".." + mFile_separator + mBbs_rel_path;
+    mBbs_paths.push_back(winbbspath);
+    // add toolsbbtk/appli 
+    mBbs_paths.push_back(winbbspath + toolsappli_rel_path);
 #endif
-    mBbs_paths.push_back(mBbs_path);
 
+   
     
     // always add "." (current working directory) at the begining
     mPackage_paths.push_back(".");   
index aa3ee5c2fbc3073d45e7c036de6f89594ca99e43..0d76d0fa40d8b2dcc3b217c4e8df412c0fd99348 100644 (file)
@@ -4,8 +4,8 @@ Program:   bbtk
 Module:    $RCSfile: bbtkFactory.cxx,v $
 Language:  C++
 
-Date:      $Date: 2008/02/21 09:37:23 $
-Version:   $Revision: 1.23 $
+Date:      $Date: 2008/03/03 08:06:36 $
+Version:   $Revision: 1.24 $
                                                                                 
 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
@@ -261,8 +261,7 @@ namespace bbtk
   
 
   
-  void Factory::LoadPackage( const std::string& name,
-                             bool use_configuration_file)
+  void Factory::LoadPackage( const std::string& name )
   {
   // Note : in the following :
   // name : the user supplied name
@@ -275,8 +274,6 @@ namespace bbtk
 
     bbtkDebugMessageInc("Kernel",7,"Factory::LoadPackage(\""<<name<<"\")"<<std::endl);
     bbtkMessage("Debug",1,"Factory::LoadPackage(\""<<name<<"\")"<<std::endl);
-    bbtkMessage("Debug",1,"use_configuration_file ["
-                 << use_configuration_file << "]" << std::endl);
 
     std::vector<std::string> package_paths;
     std::string libname;  // full path library name
index c5433cc7af73a9f544db4c8c20898a761e42ca6c..8cf02be971c5e34d4c4c631440b0bcf5c5388d17 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkFactory.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/14 13:44:25 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2008/03/03 08:06:36 $
+  Version:   $Revision: 1.8 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -43,8 +43,7 @@ namespace bbtk
     Factory();
     ~Factory();
 
-    void LoadPackage( const std::string& name, 
-                      bool use_configuration_file = true );
+    void LoadPackage( const std::string& name );
     void UnLoadPackage( const std::string& name );
     void PrintPackages(bool details = true, bool adaptors = false) const;
     void HelpPackage(const std::string& name, bool adaptors = false) const;
@@ -139,10 +138,9 @@ namespace bbtk
     }
   }
 
-  inline void LoadPackage( const std::string& name, 
-                           bool use_configuration_file = true)
+  inline void LoadPackage( const std::string& name )
   {
-    GetGlobalFactory()->LoadPackage(name,use_configuration_file);
+    GetGlobalFactory()->LoadPackage(name);
   }
 
   inline void UnLoadPackage( const std::string& name )
index 951c40db00b1831324f4edfaaedc523db8a6afde..c572234691dbe69bb29dea3c1a2779d03f736467 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/21 07:30:20 $
-  Version:   $Revision: 1.36 $
+  Date:      $Date: 2008/03/03 08:06:36 $
+  Version:   $Revision: 1.37 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -300,8 +300,7 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL;
   /**
    *  
    */
-  void Interpreter::InterpretFile( const std::string& filename,  
-                                   bool use_configuration_file)
+  void Interpreter::InterpretFile( const std::string& filename )
   {
     bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretFile(\""<<filename<<"\")"<<std::endl);
 
@@ -310,7 +309,7 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL;
 
     try 
     {
-      SwitchToFile(filename, use_configuration_file);
+      SwitchToFile(filename);
       bool insideComment = false; // for multiline comment
       while (mFile.size()>0) 
       {
@@ -563,11 +562,11 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
       case cInclude :
         if (mCommandLine)
         {
-           InterpretFile(words[1], true ); // true : better pass use_config_file
+           InterpretFile(words[1]); 
         }
         else
         {
-            SwitchToFile(words[1], true ); // true : better pass use_config_file
+            SwitchToFile(words[1]);
         }
        // if 'source' was given
        if (words.size()==3) 
@@ -577,7 +576,7 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
         break;
 
       case cLoad:
-        LoadPackage(words[1], true ); // true : better pass use_config_file
+        LoadPackage(words[1]);
         break;
 
       case cUnload:
@@ -728,8 +727,7 @@ void Interpreter::SplitLine ( const std::string& str, std::vector<std::string>&
 
 // ===================================================================================
 
-  void Interpreter::SwitchToFile( const std::string& name,
-                                  bool use_configuration_file )
+  void Interpreter::SwitchToFile( const std::string& name )
   {
   // Note : in the following :
   // name : the user supplied name 
@@ -749,16 +747,14 @@ void Interpreter::SplitLine ( const std::string& str, std::vector<std::string>&
     std::string pkgname;             // e.g. <scriptname>.bbs
     std::vector<std::string> Filenames;
 
-    if (use_configuration_file)
-    {
-        // The following is *NOT* a debug time message :
-        // It's a user intended message.
-        // Please don't remove it.
-      bbtkMessage("Interpreter",1,
-                 "look for : [" << name
-                 << "] (use_configuration_file == TRUE)" << std::endl);
-      script_paths = ConfigurationFile::GetInstance().Get_bbs_paths();
-    }
+    // The following is *NOT* a debug time message :
+    // It's a user intended message.
+    // Please don't remove it.
+    bbtkMessage("Interpreter",1,
+               "look for : [" << name
+                 << "]" << std::endl);
+    script_paths = ConfigurationFile::GetInstance().Get_bbs_paths();
+
     std::string upath;
     pkgname = Utilities::ExtractScriptName(name,upath);
 
index 0cd00f3fc237960b3a2628ac6ea39704a1273d99..124323be80bdc9ed46abdad1984b48e18dfa303a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/12 12:55:16 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2008/03/03 08:06:36 $
+  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
@@ -115,8 +115,7 @@ namespace bbtk
     void SetDialogMode(DialogModeType t) { mExecuter->SetDialogMode(t); }
 
     /// Runs the interpretation of a file
-    void InterpretFile( const std::string& filename, 
-                       bool use_configuration_file=true);
+    void InterpretFile( const std::string& filename);
 
     /// Interprets a line (either from a file or typed interactively)
     void InterpretLine( const std::string& line, bool &insideComment );
@@ -133,8 +132,7 @@ namespace bbtk
                            CommandInfoType& info );
 
     /// Switch to the interpretation of a file
-    void SwitchToFile( const std::string& filename, 
-                      bool use_configuration_file=true);
+    void SwitchToFile( const std::string& filename );
 
     /// Closes the currently open file
     void CloseCurrentFile();
index d45758931ca472cead8f6151ae5d263606f25f02..261f434ec7a2ea8068dd43149ed50acf2ea0a063 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxConsole.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/12 12:55:16 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/03/03 08:06:36 $
+  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
@@ -71,8 +71,8 @@ namespace bbtk
     void SetDialogMode(Interpreter::DialogModeType t) { mInterpreter->SetDialogMode(t); }
     
     /// Runs the interpretation of a file
-    void InterpretFile( const std::string& filename, bool use_configuration_file = true
-    { mInterpreter->InterpretFile(filename,use_configuration_file); }
+    void InterpretFile( const std::string& filename) 
+    { mInterpreter->InterpretFile(filename); }
 
     void OnMenuQuit(wxCommandEvent& event);
     void OnMenuAbout(wxCommandEvent& event);