- Timestamp:
- 11/18/04 14:46:13 (9 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osglauncher/osglauncher.cpp
r3656 r3664 31 31 32 32 #include <osgDB/ReadFile> 33 #include <osgDB/FileUtils> 33 34 34 35 int runApp(std::string xapp); … … 221 222 { 222 223 std::cout << "Start reading confFile" << std::endl; 223 224 std::ifstream in(confFile); 224 225 std::string fileName = osgDB::findDataFile(confFile); 226 if (fileName.empty()) 227 { 228 std::cout << "Config file not found"<<confFile << std::endl; 229 return; 230 } 231 232 233 std::ifstream in(fileName.c_str()); 225 234 if (!in) 226 235 { 227 std::cout << "File " << confFile << " can not be opened!" << std::endl;236 std::cout << "File " << fileName << " can not be opened!" << std::endl; 228 237 exit(1); 229 238 } … … 380 389 if (argc<=1) 381 390 { 382 std::cout << "Error: First argument missing!" << std::endl << "First argument -> confFile" << std::endl; 383 return 0; 384 } 385 386 readConfFile(argv[1]); // read ConfigFile 1 387 391 readConfFile("osg.conf"); // read ConfigFile 1 392 } 393 else 394 { 395 readConfFile(argv[1]); // read ConfigFile 1 396 } 397 388 398 // construct the viewer. 389 399 osgProducer::Viewer viewer;
