/****************************************************************************
**
****************************************************************************/

#include <QApplication>

#include "Window.h"
#include "AppEnvironment.h"

int main(int argc, char *argv[])
{
  // setup environment
  Environment *environment = new AppEnvironment;

  cout<<"Hello"<<endl;
  // register all basic options
  environment->RegisterOptions();

  if (!environment->Parse(argc, argv, ENVIRONMENT_FILE_IN_EXE_PATH)) {
    cerr<<"Error: when parsing environment file!";
	environment->PrintUsage(cout);
	exit(1);
  }
  Environment::SetSingleton(environment);

  QApplication app(argc, argv);
  Window window;
  //window.showMaximized();
  window.show();
  return app.exec();
}
