Opened 10 years ago
Last modified 10 years ago
#2597 new enhancement
Need to display invaild command line option messages
Reported by: | kanetaka | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Backlog |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description
Pyrogenesis.exe has some command line options, but it just ignores invalid command line options and returns no reply. Users who fail to load mods get confused if they don't receive any error messages.
Change History (5)
comment:1 by , 10 years ago
Keywords: | simple added |
---|
comment:2 by , 10 years ago
Keywords: | simple removed |
---|
follow-up: 4 comment:3 by , 10 years ago
Not all users run the game from the command line, notably those on Windows and OS X, so they will still be confused :) The best option is to not require the command line for enabling basic game functionality (mod selection should have a GUI).
That said, it's not a terrible idea to have command line checking and help displayed, but I'm sure we don't need to "roll our own", we should be able to find a decent existing solution for managing such options, instead of scattering the logic all over.
follow-up: 5 comment:4 by , 10 years ago
Replying to historic_bruno:
Not all users run the game from the command line, notably those on Windows and OS X, so they will still be confused :) The best option is to not require the command line for enabling basic game functionality (mod selection should have a GUI).
GUI feedback is also required, I agree with you. But the command line is still useful; robust, minimum dependency, portable, and easy for automation.
That said, it's not a terrible idea to have command line checking and help displayed, but I'm sure we don't need to "roll our own", we should be able to find a decent existing solution for managing such options, instead of scattering the logic all over.
I suppose using both GUI and command line doesn't scatter the logic.
comment:5 by , 10 years ago
Replying to kanetaka:
I suppose using both GUI and command line doesn't scatter the logic.
I'm referring to how it's implemented now, there is no central definition of valid command line options. The engine doesn't validate them until it needs them, which is bad, and adding a help message at each point would be a bad idea. Instead, there should be a library which handles this for us (preferably with options and help defined in some flexible, standard format stored in data file). As options get parsed and validated, they go into a centralized config system, later the program can use them knowing that they are OK.
Doing this for all options probably isn't that simple. Doing it for just mods is though (especially checking if that folder is actually present).