Showing the changes to interface/src/main.cpp (1 of 2 files). Show all
Unified · Split
| @@ -73,12 +73,14 @@ int main(int argc, const char* argv[]) { · 72 unmodified lines | ||
| 73 | 73 | QCommandLineOption serverContentPathOption("serverContentPath", "Where to find server content", "serverContentPath"); |
| 74 | 74 | QCommandLineOption allowMultipleInstancesOption("allowMultipleInstances", "Allow multiple instances to run"); |
| 75 | 75 | QCommandLineOption overrideAppLocalDataPathOption("cache", "set test cache <dir>", "dir"); |
| 76 | + QCommandLineOption overrideScriptsPathOption("scripts", "set scripts <path>", "path"); | |
| 76 | 77 | parser.addOption(urlOption); |
| 77 | 78 | parser.addOption(noUpdaterOption); |
| 78 | 79 | parser.addOption(checkMinSpecOption); |
| 79 | 80 | parser.addOption(runServerOption); |
| 80 | 81 | parser.addOption(serverContentPathOption); |
| 81 | 82 | parser.addOption(overrideAppLocalDataPathOption); |
| 83 | + parser.addOption(overrideScriptsPathOption); | |
| 82 | 84 | parser.addOption(allowMultipleInstancesOption); |
| 83 | 85 | parser.parse(arguments); |
| 84 | 86 | |
| @@ -99,6 +101,14 @@ int main(int argc, const char* argv[]) { · 14 unmodified lines | ||
| 99 | 101 | if (allowMultipleInstances) { |
| 100 | 102 | instanceMightBeRunning = false; |
| 101 | 103 | } |
| 104 | + | |
| 105 | + if (parser.isSet(overrideScriptsPathOption)) { | |
| 106 | + QDir scriptsPath(parser.value(overrideScriptsPathOption)); | |
| 107 | + if (scriptsPath.exists()) { | |
| 108 | + PathUtils::defaultScriptsLocation(scriptsPath.path()); | |
| 109 | + } | |
| 110 | + } | |
| 111 | + | |
| 102 | 112 | if (parser.isSet(overrideAppLocalDataPathOption)) { |
| 103 | 113 | // get dir to use for cache |
| 104 | 114 | QString cacheDir = parser.value(overrideAppLocalDataPathOption); |