]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Wed, 15 Oct 2008 15:09:45 +0000 (15:09 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Wed, 15 Oct 2008 15:09:45 +0000 (15:09 +0000)
kernel/src/bbtkBlackBox.cxx
kernel/src/bbtkConfigurationFile.cxx
kernel/src/bbtkWxGUIScriptingInterface.cxx
kernel/src/bbtkWxGUIScriptingInterface.h

index 49321eed2d2d639e78cab3a8f556c90ae39f0d37..2a6528ac74f30dfc263324798bc3a128d0e46ceb 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkBlackBox.cxx,v $
 Language:  C++
-Date:      $Date: 2008/07/24 14:37:05 $
-Version:   $Revision: 1.23 $
+Date:      $Date: 2008/10/15 15:09:45 $
+Version:   $Revision: 1.24 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See doc/license.txt or
@@ -147,7 +147,8 @@ namespace bbtk
                        "=> BlackBox::bbExecute() ["
                        <<bbGetFullName()<<"]"<<std::endl);
  
-    Wx::BusyCursor wait;
+//    Wx::BusyCursor wait;
+       wxBusyCursor wait;
 
     // If execution frozen : return
     if (bbGlobalGetFreezeExecution()) 
index f19f5075f6bc7fc11b7a1bed711ed20a40a7fd5c..1d8334755f2cff5800459b8a0ab414c6746f55c7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkConfigurationFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/15 13:02:14 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2008/10/15 15:09:45 $
+  Version:   $Revision: 1.17 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -502,7 +502,6 @@ namespace bbtk
  
 #ifdef _WIN32
     std::string pack_path = path + "/bin";
-    std::string pack_path = path + "/lib";
 #else
     std::string pack_path = path ;
 #endif
@@ -510,7 +509,21 @@ namespace bbtk
     PACKPATH.addText((XMLCSTR)pack_path.c_str());
     Utilities::replace(pack_path,INVALID_FILE_SEPARATOR,VALID_FILE_SEPARATOR);
     mPackage_paths.push_back(pack_path);
-      
+
+#ifdef _WIN32
+    pack_path = path + "/Debug";
+    PACKPATH = BB.addChild((XMLCSTR)"package_path");
+    PACKPATH.addText((XMLCSTR)pack_path.c_str());
+    Utilities::replace(pack_path,INVALID_FILE_SEPARATOR,VALID_FILE_SEPARATOR);
+    mPackage_paths.push_back(pack_path);
+    pack_path = path + "/Release";
+    PACKPATH = BB.addChild((XMLCSTR)"package_path");
+    PACKPATH.addText((XMLCSTR)pack_path.c_str());
+    Utilities::replace(pack_path,INVALID_FILE_SEPARATOR,VALID_FILE_SEPARATOR);
+    mPackage_paths.push_back(pack_path);
+#endif
+
+
     XMLError err = BB.writeToFile((XMLCSTR)Get_config_xml_full_path().c_str());
     if ( err != eXMLErrorNone ) 
       {
index ad1d963e75d1ea9d1ddc14c3d1a4c48d56a67542..673a8244b51a391fcd6a7b1e2d1a3d345d5b2355 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/15 13:02:14 $
-  Version:   $Revision: 1.26 $
+  Date:      $Date: 2008/10/15 15:09:45 $
+  Version:   $Revision: 1.27 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -438,24 +438,25 @@ namespace bbtk
   }
   //================================================================
 
-  //================================================================
-  void WxGUIScriptingInterface::OnMenuRegeneratePackageDoc(wxCommandEvent& WXUNUSED(event))
+  void WxGUIScriptingInterface::DoRegeneratePackageDoc( const std::string& pack )
   {
-    wxString name = wxGetTextFromUser(_T("Enter package name (-a for all)"),
-                                     _T("Regenerate package doc"),
-                                     _T(""));
-    if (name.IsEmpty()) return;
-    std::string pack = bbtk::wx2std(name);
-    
-    std::string command;
-    command = ConfigurationFile::GetInstance().Get_bin_path();
+           std::string command;
+#if defined(WIN32)
+       command = "\"";
+#endif
+       command += ConfigurationFile::GetInstance().Get_bin_path();
     command += ConfigurationFile::GetInstance().Get_file_separator();
-    command += "bbRegeneratePackageDoc " + pack + " -q";
+    command += "bbRegeneratePackageDoc";
+#if defined(WIN32)
+       command += "\"";
+#endif
+       command += " " + pack + " -q";
     bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
     
+
     if ( ! system ( command.c_str() ) )
       {
-       wxMessageBox(_T("Done !"),_T("Regenerate package '")+name+_T("' doc"),
+       wxMessageBox(_T("Done !"),_T("Regenerate package '")+pack+_T("' doc"),
                     wxOK | wxICON_INFORMATION);
       }
     else 
@@ -465,15 +466,35 @@ namespace bbtk
        wxMessageBox(err,_T("Regenerate package doc"),wxOK | wxICON_ERROR);      
       }
   }
-  //================================================================
+
 
   //================================================================
-  void WxGUIScriptingInterface::OnMenuRegenerateBoxesLists(wxCommandEvent& WXUNUSED(event))
+  void WxGUIScriptingInterface::OnMenuRegeneratePackageDoc(wxCommandEvent& WXUNUSED(event))
+  {
+    wxString name = wxGetTextFromUser(_T("Enter package name (-a for all)"),
+                                     _T("Regenerate package doc"),
+                                     _T(""));
+    if (name.IsEmpty()) return;
+    std::string pack = bbtk::wx2std(name);
+    
+       DoRegeneratePackageDoc(pack);
+  }
+  //================================================================
+
+
+  void WxGUIScriptingInterface::DoRegenerateBoxesLists()
   {
     std::string command;
-    command = ConfigurationFile::GetInstance().Get_bin_path();
+#if defined(WIN32)
+       command = "\"";
+#endif
+    command += ConfigurationFile::GetInstance().Get_bin_path();
     command += ConfigurationFile::GetInstance().Get_file_separator();
-    command += "bbRegenerateBoxesLists -q";
+    command += "bbRegenerateBoxesLists";
+#if defined(WIN32)
+       command += "\"";
+#endif
+       command += " -q";
        bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
 
        if ( ! system ( command.c_str() ) )
@@ -488,31 +509,20 @@ namespace bbtk
        wxMessageBox(err,_T("Regenerate boxes lists"),wxOK | wxICON_ERROR);      
      }
   }
+
+  //================================================================
+  void WxGUIScriptingInterface::OnMenuRegenerateBoxesLists(wxCommandEvent& WXUNUSED(event))
+  {
+       DoRegenerateBoxesLists();
+  }
   //================================================================
 
   //================================================================
   void WxGUIScriptingInterface::OnMenuRegenerateAll(wxCommandEvent& WXUNUSED(event))
   {
-    std::string command;
-    command = ConfigurationFile::GetInstance().Get_bin_path();
-    command += ConfigurationFile::GetInstance().Get_file_separator();
-    command += "bbRegeneratePackageDoc -a -q && ";
-    command += ConfigurationFile::GetInstance().Get_bin_path();
-    command += ConfigurationFile::GetInstance().Get_file_separator();
-    command += "bbRegenerateBoxesLists -q ";
-       bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
-
-       if ( ! system ( command.c_str() ) )
-    {
-       wxMessageBox(_T("Done !"),_T("Regenerate all"),
-                   wxOK | wxICON_INFORMATION);
-     }
-   else 
-     {
-       wxString err(_T("An error occured while running '"));
-       err +=  bbtk::std2wx(command) + _T("'");
-       wxMessageBox(err,_T("Regenerate all"),wxOK | wxICON_ERROR);      
-     }
+       
+    DoRegeneratePackageDoc("-a");      
+       DoRegenerateBoxesLists();
   }
   //================================================================
 
@@ -547,30 +557,10 @@ namespace bbtk
        
        bbtk::ConfigurationFile::GetInstance().AddPackagePathsAndWrite( path );
        
-       std::string command;
-       command = ConfigurationFile::GetInstance().Get_bin_path();
-       command += ConfigurationFile::GetInstance().Get_file_separator();
-       command += "bbRegeneratePackageDoc " + pname + " -q && ";
-       command += ConfigurationFile::GetInstance().Get_bin_path();
-       command += ConfigurationFile::GetInstance().Get_file_separator();
-       command += "bbRegenerateBoxesLists -q ";
-       bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
-       
-       if ( ! system ( command.c_str() ) )
-         {
-           std::string mess("Package '");
-           mess += pname + "' successfully plugged in";
-           wxMessageBox(std2wx(mess),_T("Plug package"),
-                        wxOK | wxICON_INFORMATION);
-         }
-       else 
-         {
-           wxString err(_T("An error occured while running '"));
-           err +=  bbtk::std2wx(command) + _T("'");
-           wxMessageBox(err,_T("Regenerate all"),wxOK | wxICON_ERROR);      
-         }
-      }
+       DoRegeneratePackageDoc(pname);
+       DoRegenerateBoxesLists();
 
+         }     
   }
   //================================================================
 
index b16878687dd50158398fcd477a5724bd13f4a100..edea6942346ad5229288a672cdb4e4204f605f4c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIScriptingInterface.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/15 13:02:14 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2008/10/15 15:09:45 $
+  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
@@ -124,6 +124,10 @@ namespace bbtk
     
     // WxGUIHtmlBrowser callbacks
     bool WxGUIHtmlBrowserUserOnLinkClicked(const std::string& target);
+
+
+       void DoRegeneratePackageDoc(const std::string& pack);
+       void DoRegenerateBoxesLists();
   private:
     wxAuiManager m_mgr;
     Interpreter::Pointer mInterpreter;