Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5424 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Oct 22, 2005, 5:50:30 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Config-File can now also be directly in the Executable-directory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/orxonox.cc

    r5423 r5424  
    162162const char* Orxonox::getConfigFile ()
    163163{
    164   this->configFileName = ResourceManager::homeDirCheck(DEFAULT_CONFIG_FILE);
     164  if (ResourceManager::isFile("orxonox.conf"))
     165  {
     166    this->configFileName = new char[strlen("orxonox.conf")+1];
     167    strcpy(this->configFileName, "orxonox.conf");
     168  }
     169  else
     170    this->configFileName = ResourceManager::homeDirCheck(DEFAULT_CONFIG_FILE);
    165171  this->iniParser = new IniParser(this->configFileName);
     172  PRINTF(3)("Parsed Config File: '%s'\n", this->configFileName);
    166173}
    167174
     
    275282              "  Please Change in File %s Section %s Entry %s to a suitable value\n",
    276283              ResourceManager::getInstance()->getDataDir(),
    277               DEFAULT_CONFIG_FILE,
     284              this->configFileName,
    278285              CONFIG_SECTION_DATA,
    279286              CONFIG_NAME_DATADIR);
     
    392399{
    393400  // checking for existence of the configuration-files, or if the lock file is still used
    394   if (showGui ||
    395       !ResourceManager::isFile(DEFAULT_CONFIG_FILE)
    396 #if DEBUG < 3
     401  if (showGui || (!ResourceManager::isFile("./orxonox.conf") &&
     402      !ResourceManager::isFile(DEFAULT_CONFIG_FILE))
     403#if DEBUG < 3 // developers do not need to see the GUI, when orxonox fails
    397404       || ResourceManager::isFile(DEFAULT_LOCK_FILE)
    398405#endif
Note: See TracChangeset for help on using the changeset viewer.