Changeset 7616 in orxonox.OLD for branches/qt_gui/src/orxonox.cc
- Timestamp:
- May 15, 2006, 2:41:51 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/qt_gui/src/orxonox.cc
r7608 r7616 32 32 #include "gui/qt_gui/qt_gui.h" 33 33 34 #include "file.h" 34 35 #include "parser/ini_parser/ini_parser.h" 35 36 #include "util/loading/game_loader.h" … … 189 190 const std::string& Orxonox::getConfigFile () 190 191 { 191 if (ResourceManager::isFile("orxonox.conf")) 192 File orxConfFile("orxonox.conf"); 193 if (orxConfFile.isFile()) 192 194 { 193 195 this->configFileName = "orxonox.conf"; 194 196 } 195 197 else 196 this->configFileName = ResourceManager::homeDirCheck(DEFAULT_CONFIG_FILE);198 this->configFileName = File(DEFAULT_CONFIG_FILE).name(); 197 199 198 200 PRINTF(3)("Parsed Config File: '%s'\n", this->configFileName); … … 426 428 CmdLinePrefsReader prefs; 427 429 428 IniFilePrefsReader ini( ResourceManager::homeDirCheck(DEFAULT_CONFIG_FILE));429 Preferences::getInstance()->setUserIni( ResourceManager::homeDirCheck(DEFAULT_CONFIG_FILE));430 IniFilePrefsReader ini(File(DEFAULT_CONFIG_FILE).name()); 431 Preferences::getInstance()->setUserIni(File(DEFAULT_CONFIG_FILE).name()); 430 432 431 433 prefs.parse(argc, argv); … … 503 505 { 504 506 // checking for existence of the configuration-files, or if the lock file is still used 505 if (showGui || (! ResourceManager::isFile("./orxonox.conf") &&506 !ResourceManager::isFile(DEFAULT_CONFIG_FILE))507 if (showGui || (!File("./orxonox.conf").isFile() && 508 !File(DEFAULT_CONFIG_FILE).isFile()) 507 509 #if DEBUG < 3 // developers do not need to see the GUI, when orxonox fails 508 510 || ResourceManager::isFile(DEFAULT_LOCK_FILE) … … 510 512 ) 511 513 { 512 if (ResourceManager::isFile(DEFAULT_LOCK_FILE)) 513 ResourceManager::deleteFile(DEFAULT_LOCK_FILE); 514 File lockFile(DEFAULT_LOCK_FILE); 515 if (lockFile.isFile()) 516 lockFile.remove(); 514 517 515 518 // starting the GUI … … 524 527 PRINT(0)(">>> Starting Orxonox <<<\n"); 525 528 526 ResourceManager::touchFile(DEFAULT_LOCK_FILE);529 File(DEFAULT_LOCK_FILE).touch(); 527 530 528 531 Orxonox *orx = Orxonox::getInstance(); … … 538 541 539 542 delete orx; 540 ResourceManager::deleteFile("~/.orxonox/orxonox.lock");541 } 543 File("~/.orxonox/orxonox.lock").remove(); 544 }
Note: See TracChangeset
for help on using the changeset viewer.