mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:27:48 +02:00
cr feedback
This commit is contained in:
parent
9417a176a1
commit
48de8011b2
3 changed files with 7 additions and 3 deletions
|
@ -1185,7 +1185,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
// we just want to see if --scripts was set, we've already parsed it and done
|
// we just want to see if --scripts was set, we've already parsed it and done
|
||||||
// the change in PathUtils. Rather than pass that in the constructor, lets just
|
// the change in PathUtils. Rather than pass that in the constructor, lets just
|
||||||
// look (this could be debated)
|
// look (this could be debated)
|
||||||
QDir defaultScriptsLocation(getCmdOption(argc, constArgv, "--scripts"));
|
QString scriptsSwitch = QString("--").append(SCRIPTS_SWITCH);
|
||||||
|
QDir defaultScriptsLocation(getCmdOption(argc, constArgv, scriptsSwitch.toStdString().c_str()));
|
||||||
if (!defaultScriptsLocation.exists()) {
|
if (!defaultScriptsLocation.exists()) {
|
||||||
scriptEngines->loadDefaultScripts();
|
scriptEngines->loadDefaultScripts();
|
||||||
scriptEngines->defaultScriptsLocationOverridden(true);
|
scriptEngines->defaultScriptsLocationOverridden(true);
|
||||||
|
|
|
@ -95,6 +95,7 @@ static const UINT UWM_SHOW_APPLICATION =
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const QString RUNNING_MARKER_FILENAME = "Interface.running";
|
static const QString RUNNING_MARKER_FILENAME = "Interface.running";
|
||||||
|
static const QString SCRIPTS_SWITCH = "scripts";
|
||||||
|
|
||||||
class Application;
|
class Application;
|
||||||
#if defined(qApp)
|
#if defined(qApp)
|
||||||
|
|
|
@ -73,7 +73,7 @@ int main(int argc, const char* argv[]) {
|
||||||
QCommandLineOption serverContentPathOption("serverContentPath", "Where to find server content", "serverContentPath");
|
QCommandLineOption serverContentPathOption("serverContentPath", "Where to find server content", "serverContentPath");
|
||||||
QCommandLineOption allowMultipleInstancesOption("allowMultipleInstances", "Allow multiple instances to run");
|
QCommandLineOption allowMultipleInstancesOption("allowMultipleInstances", "Allow multiple instances to run");
|
||||||
QCommandLineOption overrideAppLocalDataPathOption("cache", "set test cache <dir>", "dir");
|
QCommandLineOption overrideAppLocalDataPathOption("cache", "set test cache <dir>", "dir");
|
||||||
QCommandLineOption overrideScriptsPathOption("scripts", "set scripts <path>", "path");
|
QCommandLineOption overrideScriptsPathOption(SCRIPTS_SWITCH, "set scripts <path>", "path");
|
||||||
parser.addOption(urlOption);
|
parser.addOption(urlOption);
|
||||||
parser.addOption(noUpdaterOption);
|
parser.addOption(noUpdaterOption);
|
||||||
parser.addOption(checkMinSpecOption);
|
parser.addOption(checkMinSpecOption);
|
||||||
|
@ -101,7 +101,9 @@ int main(int argc, const char* argv[]) {
|
||||||
if (allowMultipleInstances) {
|
if (allowMultipleInstances) {
|
||||||
instanceMightBeRunning = false;
|
instanceMightBeRunning = false;
|
||||||
}
|
}
|
||||||
|
// this needs to be done here in main, as the mechanism for setting the
|
||||||
|
// scripts directory appears not to work. See the bug report
|
||||||
|
// https://highfidelity.fogbugz.com/f/cases/5759/Issues-changing-scripts-directory-in-ScriptsEngine
|
||||||
if (parser.isSet(overrideScriptsPathOption)) {
|
if (parser.isSet(overrideScriptsPathOption)) {
|
||||||
QDir scriptsPath(parser.value(overrideScriptsPathOption));
|
QDir scriptsPath(parser.value(overrideScriptsPathOption));
|
||||||
if (scriptsPath.exists()) {
|
if (scriptsPath.exists()) {
|
||||||
|
|
Loading…
Reference in a new issue