Changeset 1664 for code/branches/gui/src/orxonox/Main.cc
- Timestamp:
- Aug 21, 2008, 9:23:11 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/Main.cc
r1663 r1664 41 41 #include "core/SignalHandler.h" 42 42 #include "core/Debug.h" 43 #include "core/CommandLine.h"44 //#include "Orxonox.h"45 43 46 44 #include "gamestates/GSRoot.h" … … 85 83 int main(int argc, char** argv) 86 84 { 87 try88 {89 orxonox::CommandLine::parse(argc, argv);90 }91 catch (orxonox::ArgumentException& ex)92 {93 COUT(1) << ex.what() << std::endl;94 COUT(0) << "Usage:" << std::endl << "orxonox [--mode client|server|dedicated|standalone] "95 << "[--data PATH] [--ip IP] [--port PORT]" << std::endl;96 }97 98 99 85 // create a signal handler (only works for linux) 100 86 SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log"); 101 102 87 103 88 … … 144 129 graphics.addChild(&gui); 145 130 146 root.requestState("gui"); 131 root.feedCommandLine(argc, argv); 132 root.requestState("root"); 147 133 root.tick(0.0f); 148 134 root.requestState(""); 149 150 151 //Orxonox orxonoxInstance;152 153 try154 {155 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE156 orxonoxInstance.start(macBundlePath());157 #else158 //orxonoxInstance.start();159 #endif160 }161 catch (std::exception& ex)162 {163 COUT(1) << ex.what() << std::endl;164 COUT(1) << "Abort." << std::endl;165 }166 135 167 136 return 0;
Note: See TracChangeset
for help on using the changeset viewer.