]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWxGUIScriptingInterface.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkWxGUIScriptingInterface.cxx
index 1b48a2c9ab44a6e07cbf17c44b4e4f0be58b0a30..e0b39e2657a90ed279d9c06f50be126b86de6d44 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/08 12:19:56 $
-  Version:   $Revision: 1.23 $
+  Date:      $Date: 2008/10/08 14:46:42 $
+  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
@@ -439,37 +439,39 @@ namespace bbtk
   //================================================================
   void WxGUIScriptingInterface::OnMenuRegeneratePackageDoc(wxCommandEvent& WXUNUSED(event))
   {
-    wxString name = wxGetTextFromUser(_T("Enter package name (* for all)"),
-                            _T("Regenerate package doc"),
-                            _T(""));
-       if (name.IsEmpty()) return;
-       std::string pack = bbtk::wx2std(name);
-
-       std::string command("cd \"");
-       command += ConfigurationFile::GetInstance().Get_bin_path();
-    command += "\" && bbRegeneratePackageDoc " + pack;
-       bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
-       
-       if ( ! system ( command.c_str() ) )
-    {
-       wxMessageBox(_T("Done !"),_T("Regenerate package '")+name+_T("' doc"),
-                   wxOK | wxICON_INFORMATION);
-     }
-   else 
-     {
-       wxString err(_T("An error occured while running '"));
-       err +=  bbtk::std2wx(command) + _T("'");
-       wxMessageBox(err,_T("Regenerate package doc"),wxOK | wxICON_ERROR);      
-     }
+    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();
+    command += ConfigurationFile::GetInstance().Get_file_separator();
+    command += "bbRegeneratePackageDoc " + pack;
+    bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
+    
+    if ( ! system ( command.c_str() ) )
+      {
+       wxMessageBox(_T("Done !"),_T("Regenerate package '")+name+_T("' doc"),
+                    wxOK | wxICON_INFORMATION);
+      }
+    else 
+      {
+       wxString err(_T("An error occured while running '"));
+       err +=  bbtk::std2wx(command) + _T("'");
+       wxMessageBox(err,_T("Regenerate package doc"),wxOK | wxICON_ERROR);      
+      }
   }
   //================================================================
 
   //================================================================
   void WxGUIScriptingInterface::OnMenuRegenerateBoxesLists(wxCommandEvent& WXUNUSED(event))
   {
-       std::string command("cd \"");
-       command += ConfigurationFile::GetInstance().Get_bin_path();
-    command += "\" && bbRegenerateBoxesLists";
+    std::string command;
+    command = ConfigurationFile::GetInstance().Get_bin_path();
+    command += ConfigurationFile::GetInstance().Get_file_separator();
+    command += "bbRegenerateBoxesLists";
        bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
 
        if ( ! system ( command.c_str() ) )
@@ -489,9 +491,13 @@ namespace bbtk
   //================================================================
   void WxGUIScriptingInterface::OnMenuRegenerateAll(wxCommandEvent& WXUNUSED(event))
   {
-       std::string command("cd \"");
-       command += ConfigurationFile::GetInstance().Get_bin_path();
-    command += "\" && bbRegeneratePackageDoc * && bbRegenerateBoxesLists";
+    std::string command;
+    command = ConfigurationFile::GetInstance().Get_bin_path();
+    command += ConfigurationFile::GetInstance().Get_file_separator();
+    command += "bbRegeneratePackageDoc * && ";
+    command = ConfigurationFile::GetInstance().Get_bin_path();
+    command += ConfigurationFile::GetInstance().Get_file_separator();
+    command += "bbRegenerateBoxesLists";
        bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
 
        if ( ! system ( command.c_str() ) )