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 | QCommandLineOption serverContentPathOption("serverContentPath", "Where to find server content", "serverContentPath"); | 73 | QCommandLineOption serverContentPathOption("serverContentPath", "Where to find server content", "serverContentPath"); |
| 74 | QCommandLineOption allowMultipleInstancesOption("allowMultipleInstances", "Allow multiple instances to run"); | 74 | QCommandLineOption allowMultipleInstancesOption("allowMultipleInstances", "Allow multiple instances to run"); |
| 75 | QCommandLineOption overrideAppLocalDataPathOption("cache", "set test cache <dir>", "dir"); | 75 | QCommandLineOption overrideAppLocalDataPathOption("cache", "set test cache <dir>", "dir"); |
| 76 | QCommandLineOption overrideScriptsPathOption("scripts", "set scripts <path>", "path"); | ||
| 76 | parser.addOption(urlOption); | 77 | parser.addOption(urlOption); |
| 77 | parser.addOption(noUpdaterOption); | 78 | parser.addOption(noUpdaterOption); |
| 78 | parser.addOption(checkMinSpecOption); | 79 | parser.addOption(checkMinSpecOption); |
| 79 | parser.addOption(runServerOption); | 80 | parser.addOption(runServerOption); |
| 80 | parser.addOption(serverContentPathOption); | 81 | parser.addOption(serverContentPathOption); |
| 81 | parser.addOption(overrideAppLocalDataPathOption); | 82 | parser.addOption(overrideAppLocalDataPathOption); |
| 83 | parser.addOption(overrideScriptsPathOption); | ||
| 82 | parser.addOption(allowMultipleInstancesOption); | 84 | parser.addOption(allowMultipleInstancesOption); |
| 83 | parser.parse(arguments); | 85 | parser.parse(arguments); |
| 84 | 86 | ||
| @@ -99,6 +101,14 @@ int main(int argc, const char* argv[]) { · 14 unmodified lines | |||
| 99 | if (allowMultipleInstances) { | 101 | if (allowMultipleInstances) { |
| 100 | instanceMightBeRunning = false; | 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 | if (parser.isSet(overrideAppLocalDataPathOption)) { | 112 | if (parser.isSet(overrideAppLocalDataPathOption)) { |
| 103 | // get dir to use for cache | 113 | // get dir to use for cache |
| 104 | QString cacheDir = parser.value(overrideAppLocalDataPathOption); | 114 | QString cacheDir = parser.value(overrideAppLocalDataPathOption); |