#include #include #include using namespace bbtk; //========================================================================== int main(int argc, char **argv) { if (argc!=2) { std::cout << "usage : bbPlugPackage " << std::endl; return 0; } std::string path(argv[1]); std::string fname = path + "/bbtkPackage"; if ( ! Utilities::FileExists( fname ) ) { std::cout << "* ERROR : The directory '"<> pname; f.close(); ConfigurationFile::GetInstance().AddPackagePathsAndWrite( path ); std::string command; #if defined(WIN32) command = "\""; #endif command += ConfigurationFile::GetInstance().Get_bin_path(); command += ConfigurationFile::GetInstance().Get_file_separator(); command += "bbRegeneratePackageDoc"; #if defined(WIN32) command += "\""; #endif command += " " + pname + " -q"; if ( system ( command.c_str() ) ) { std::cout << "An error occured while running '" << command << "'" << std::endl; // return 1; Feature #1676 - DFGO } command = ""; #if defined(WIN32) command = "\""; #endif command += ConfigurationFile::GetInstance().Get_bin_path(); command += ConfigurationFile::GetInstance().Get_file_separator(); command += "bbRegenerateBoxesLists"; #if defined(WIN32) command += "\""; #endif command += " -q"; if ( ! system ( command.c_str() ) ) { std::cout << "Package '" << pname << "' successfully plugged in" << std::endl; } else { std::cout << "An error occured while running '" << command << "'" << std::endl; //return 1; Feature #1676 - DFGO } return 0; } //==========================================================================