+
+ // bbs_paths
+ // 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
+//EED std::string toolsappli_rel_path(mFile_separator);
+ std::string toolsappli_rel_path("/");
+//EED toolsappli_rel_path += "toolsbbtk" + mFile_separator + "appli";
+ toolsappli_rel_path += "toolsbbtk/appli";
+ //
+ //-----------------------------------------------------------
+ // LG : REMOVE BUGGY PATH WITH include *:
+ //
+ // mBbs_paths.push_back(mBbs_path + toolsappli_rel_path);
+ //-----------------------------------------------------------
+ int iStrVec,sizeStrVec;
+
+ sizeStrVec = mBbs_paths.size();
+ for (iStrVec=0;iStrVec<sizeStrVec;iStrVec++){
+ Utilities::replace( mBbs_paths[iStrVec] , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
+ }
+
+
+ // always add "." (current working directory) at the begining
+ mPackage_paths.push_back(".");
+ // add system bin path (for build tree / standalone folder install)
+ mPackage_paths.push_back(mBin_path);
+ // add system lib path (for install tree)
+ //EED mPackage_paths.push_back(mInstall_path + mFile_separator + "lib");
+ mPackage_paths.push_back(mInstall_path + "/lib");
+#ifdef WIN32
+ // add bin/Debug bin/Release paths (for build/install tree)
+ //EED mPackage_paths.push_back(mBin_path + mFile_separator + "Debug");
+ mPackage_paths.push_back(mBin_path + "/Debug");
+ //EED mPackage_paths.push_back(mBin_path + mFile_separator + "Release");
+ mPackage_paths.push_back(mBin_path + "/Release");
+#endif
+
+ sizeStrVec = mPackage_paths.size();
+ for (iStrVec=0;iStrVec<sizeStrVec;iStrVec++){
+ Utilities::replace( mPackage_paths[iStrVec] , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
+ }
+
+
+
+ GetHelp(2);
+
+ // ==> First we look for bbtk_config.xml in "."
+ char buf[2048];
+ const char *currentDir = getcwd(buf, 2048);
+
+ if( !currentDir )
+ {
+ std::cerr << "Path was too long to fit on 2048 bytes ?!?" << std::endl;
+ // \todo : what else?
+ // How abort a constructor and warn the caller function?
+ // LG : throw an exception
+ }
+
+ // std::string configXmlFullPathName = currentDir + mFile_separator + "bbtk_config.xml";
+ std::string configXmlFullPathName = currentDir ;
+ configXmlFullPathName += "/bbtk_config.xml";
+ Utilities::replace( configXmlFullPathName , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
+
+ if ( Utilities::FileExists( configXmlFullPathName ))
+ {
+ bbtkMessage("config",1, "ConfigurationFile : [" << configXmlFullPathName <<
+ "] found in current directory" << std::endl);
+ //Read(configXmlFullPathName.c_str());
+ // traiter le fichier local
+ }
+
+ // ==> Then we look for bbtk_config.xml in ".bbtk"
+ else
+ {
+ configXmlFullPathName = Utilities::MakeUserSettingsFullFileName("bbtk_config.xml");
+ if (!Utilities::FileExists( configXmlFullPathName ))
+ {
+ // ==> Nothing found, we create bbtk_config.xml in ".bbtk"
+ InstallPath ();
+ }
+ }
+
+ // In any case, deal with bbtk_config.xml!
+ Read(configXmlFullPathName.c_str());
+ }
+ //=========================================================================