diff --git a/src/core/gui/VRGuiManager.cpp b/src/core/gui/VRGuiManager.cpp index 1a75bca5d..f4b930115 100644 --- a/src/core/gui/VRGuiManager.cpp +++ b/src/core/gui/VRGuiManager.cpp @@ -78,7 +78,12 @@ string VRGuiManager::genUUID() { void VRGuiManager::init() { cout << "Init VRGuiManager.." << endl; mtx = new VRMutex(); - standalone = VROptions::get()->getOption("standalone") || nogtk; + standalone = VROptions::get()->getOption("standalone"); + headless = VROptions::get()->getOption("headless"); + + if (headless) { + return; + } //VRGuiBuilder::get(standalone); if (standalone) { diff --git a/src/core/gui/VRGuiManager.h b/src/core/gui/VRGuiManager.h index 3e2ad2a0a..63273b3ca 100644 --- a/src/core/gui/VRGuiManager.h +++ b/src/core/gui/VRGuiManager.h @@ -22,7 +22,7 @@ void saveScene(string path = "", bool saveas = false, string encryptionKey = "") class VRGuiManager { private: - bool nogtk = false; + bool headless = false; bool standalone = false; VRUpdateCbPtr updatePtr; VRThreadCbPtr gtkUpdateCb; diff --git a/src/core/scripting/VRScriptManager.cpp b/src/core/scripting/VRScriptManager.cpp index 1c2f91d29..04948e258 100644 --- a/src/core/scripting/VRScriptManager.cpp +++ b/src/core/scripting/VRScriptManager.cpp @@ -277,7 +277,7 @@ void VRScriptManager::initPyModules() { sceneModules.setup(this, pModVR); cout << " Added scene modules" << endl; - if (!VROptions::get()->getOption("standalone") && !VROptions::get()->getOption("nogtk")) { + if (!VROptions::get()->getOption("standalone") && !VROptions::get()->getOption("headless")) { redirectPyOutput("stdout", "Console"); redirectPyOutput("stderr", "Errors"); } diff --git a/src/core/utils/VROptions.cpp b/src/core/utils/VROptions.cpp index 657e2af47..b0ac1f280 100644 --- a/src/core/utils/VROptions.cpp +++ b/src/core/utils/VROptions.cpp @@ -18,7 +18,7 @@ VROptions::VROptions() : desc("Configuration ") { addOption(false, "fullscreen", "start with fullscreen GL window"); addOption(false, "ignoreHMD", "ignore HMD if present"); addOption(false, "active_stereo", "use active_stereo or not"); - addOption(false, "nogtk", "start without UI, even without GL canvas, you should add a glut window in the setup file"); + addOption(false, "headless", "start without UI, even without a window, run application with --application=\"path/to/app\""); addOption("", "application", "specify an application file to load at startup"); addOption("", "decryption", "pass information to decrypt a secured application, \"key:YOURKEY\""); addOption("", "setup", "specify the hardware setup file to load, ommiting this will load the last setup"); @@ -59,8 +59,9 @@ void VROptions::parse(int _argc, char** _argv) { cout << desc << endl; } + // for testing + //setOption("headless", true); //setOption("maximized", true); - //setOption("application", "C:\\Users\\victo\\Projects\\lernfabrik\\factory.pvr"); cout << endl; }