Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/builder_init.cpp

    r748fc7 r15e197  
    126126  // if we have python, autoexecute a molecuilder script in current folder
    127127#ifdef HAVE_PYTHON
    128   const std::string pythonfilename_string("./molecuilder.py");
    129   executePythonScript(pythonfilename_string);
     128  const boost::filesystem::path pythonfilename("./molecuilder.py");
     129  executePythonScriptFile(pythonfilename);
    130130#endif
    131131
    132132  // handle remaining arguments by CommandLineParser
    133   if (argc>1) {
     133  // first argument of "--test" initializes special molecuilder gui test mode
     134  if ((argc>1)
     135#ifdef USE_GUI_QT
     136      && !QtUIFactory::isTestMode(argv[1])
     137#endif
     138  ) {
    134139    LOG(0, "Setting UI to CommandLine.");
    135140    CommandLineParser::getInstance().InitializeCommandArguments();
     
    139144  } else {
    140145    // In the interactive mode, we can leave the user the choice in case of error
    141     ASSERT_DO(Assert::Ask);
    142146    #ifdef USE_GUI_QT
     147    if ((argc>1) && (QtUIFactory::isTestMode(argv[1])))
     148      ASSERT_DO(Assert::Abort);
     149    else
     150      ASSERT_DO(Assert::Ask);
    143151      LOG(0, "Setting UI to Qt4.");
    144       UIFactory::registerFactory(new QtUIFactory::description());
     152      UIFactory::registerFactory(new QtUIFactory::description(argc, argv));
    145153      UIFactory::makeUserInterface("Qt4");
    146154    #else
     155      ASSERT_DO(Assert::Ask);
    147156      LOG(0, "Setting UI to Text.");
    148157      cout << MOLECUILDERVERSION << endl;
Note: See TracChangeset for help on using the changeset viewer.