Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul command-line parameter functionality. #66

Merged
merged 23 commits into from
Jun 4, 2022

Conversation

Penguin-Guru
Copy link

See discussion on original pull request here: vircadia/vircadia-native-core#1428

Also see this for possible future work: vircadia/vircadia-native-core#1461

As before, I do not know how to test all of the parameters but I did test the ones I could.

@Penguin-Guru
Copy link
Author

As far as I can tell, Qt does not offer any better formatting for the --help output. They do offer a method of extracting the output as a string, which we could then output ourselves before terminating the program. I'm not sure why the output of showHelp is so compact.

@JulianGro
Copy link
Member

Oh wow, this seems great.
You are on Linux, right? Did the ones you test all work? Because the main problem we have on Linux currently is that most of the command line options don't actually work.

@Penguin-Guru
Copy link
Author

Oh wow, this seems great. You are on Linux, right? Did the ones you test all work? Because the main problem we have on Linux currently is that most of the command line options don't actually work.

Yes, this fixes several of those cases. All of the ones I tested did work, but I'm not sure what some of them are supposed to do or how they are supposed to be used. Please do test and let me know if any of them don't work. :)

QString scriptsSwitch = QString("--").append(SCRIPTS_SWITCH);
_defaultScriptsLocation.setPath(getCmdOption(argc, constArgv, scriptsSwitch.toStdString().c_str()));
if (parser.isSet("scripts")) {
_defaultScriptsLocation.setPath(parser.value("scripts")); // Might need to be done in "main.cpp".
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to leave this comment in until someone has confirmed that this parameter works.

@@ -705,6 +709,8 @@ private slots:
QPointer<LogDialog> _logDialog;
QPointer<EntityScriptServerLogDialog> _entityScriptServerLogDialog;
QDir _defaultScriptsLocation;
// If above is only set by parameter, below is unnecessary.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try to check if it is set anywhere else, but it would take considerable time for me to be confident.

);
QCommandLineOption serverContentPathOption(
"serverContentPath",
"Path to find server content.", // What content??
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this description is too vague. Can someone write a more clear description?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. I am pretty sure it refers to the domain server "content". That content is what you actually see in world. Assets and their position. It doesn't contain configuration files.

Copy link
Author

@Penguin-Guru Penguin-Guru May 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JulianGro

How about "path to directory containing domain assets"?

"forceCrashReporting",
"Force crash reporting to initialize."
);
// The documented "--disable-lod" does not seem to exist.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I remove these now or should the documentation be updated first?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it actually doesn't exist, I think we should remove it.
When someone implements that, it should be trivial to add this back in.
Note that currently the "LOD" system is turned off (in a fairly hacky way if I remember correctly).

"clockSkew",
"Forces client instance's clock to skew for demonstration purposes.",
"integer"
); // This should probably be removed.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will leave this comment unless someone thinks we might want this parameter for something.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds useful for debugging actually.
Some applications run into issues when the system clock isn't reliable. For example there is a bug in Windows that has never been fixed where the clock does something like a "hiccup". On VRChat for example that breaks outbound voice data.

@daleglass daleglass merged commit 1283c52 into overte-org:master Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants