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
#ifdef _WIN32
std::string pack_path = path + "/bin";
- std::string pack_path = path + "/lib";
#else
std::string pack_path = path ;
#endif
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 )
{
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
}
//================================================================
- //================================================================
- 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
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() ) )
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();
}
//================================================================
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();
+ }
}
//================================================================