Showing the changes to interface/src/Application.cpp (1 of 8 files). Show all
Unified · Split
| @@ -903,6 +903,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 902 unmodified lines | |||
| 903 | _saveAvatarOverrideUrl = true; | 903 | _saveAvatarOverrideUrl = true; |
| 904 | } | 904 | } |
| 905 | 905 | ||
| 906 | QString defaultScriptsLocation = getCmdOption(argc, constArgv, "--scripts"); | ||
| 907 | if (!defaultScriptsLocation.isEmpty()) { | ||
| 908 | PathUtils::defaultScriptsLocation(defaultScriptsLocation); | ||
| 909 | } | ||
| 910 | |||
| 906 | _glWidget = new GLCanvas(); | 911 | _glWidget = new GLCanvas(); |
| 907 | getApplicationCompositor().setRenderingWidget(_glWidget); | 912 | getApplicationCompositor().setRenderingWidget(_glWidget); |
| 908 | _window->setCentralWidget(_glWidget); | 913 | _window->setCentralWidget(_glWidget); |
| @@ -1167,7 +1172,15 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 258 unmodified lines | |||
| 1167 | // force the model the look at the correct directory (weird order of operations issue) | 1172 | // force the model the look at the correct directory (weird order of operations issue) |
| 1168 | scriptEngines->setScriptsLocation(scriptEngines->getScriptsLocation()); | 1173 | scriptEngines->setScriptsLocation(scriptEngines->getScriptsLocation()); |
| 1169 | // do this as late as possible so that all required subsystems are initialized | 1174 | // do this as late as possible so that all required subsystems are initialized |
| 1170 | scriptEngines->loadScripts(); | 1175 | // If we've overridden the default scripts location, just load default scripts |
| 1176 | // otherwise, load 'em all | ||
| 1177 | if (!defaultScriptsLocation.isEmpty()) { | ||
| 1178 | scriptEngines->loadDefaultScripts(); | ||
| 1179 | scriptEngines->defaultScriptsLocationOverridden(true); | ||
| 1180 | } else { | ||
| 1181 | scriptEngines->loadScripts(); | ||
| 1182 | } | ||
| 1183 | |||
| 1171 | // Make sure we don't time out during slow operations at startup | 1184 | // Make sure we don't time out during slow operations at startup |
| 1172 | updateHeartbeat(); | 1185 | updateHeartbeat(); |
| 1173 | 1186 | ||
| @@ -5855,7 +5868,7 @@ void Application::showDialog(const QUrl& widgetUrl, const QUrl& tabletUrl, const · 4681 unmodified lines | |||
| 5855 | 5868 | ||
| 5856 | void Application::showScriptLogs() { | 5869 | void Application::showScriptLogs() { |
| 5857 | auto scriptEngines = DependencyManager::get<ScriptEngines>(); | 5870 | auto scriptEngines = DependencyManager::get<ScriptEngines>(); |
| 5858 | QUrl defaultScriptsLoc = defaultScriptsLocation(); | 5871 | QUrl defaultScriptsLoc = PathUtils::defaultScriptsLocation(); |
| 5859 | defaultScriptsLoc.setPath(defaultScriptsLoc.path() + "developer/debugging/debugWindow.js"); | 5872 | defaultScriptsLoc.setPath(defaultScriptsLoc.path() + "developer/debugging/debugWindow.js"); |
| 5860 | scriptEngines->loadScript(defaultScriptsLoc.toString()); | 5873 | scriptEngines->loadScript(defaultScriptsLoc.toString()); |
| 5861 | } | 5874 | } |