Celestia icon indicating copy to clipboard operation
Celestia copied to clipboard

common command line parser

Open 375gnu opened this issue 3 years ago • 4 comments

@levinli303 what do you think about this? my attempt is to remove copy-pasted command line parsing and keep the its common part to celestiacore. it's tested with qt/gtk/win. not finished yet. i want to hear your feedback. it also contains some tiny unrelated changes i will file them as separate prs.

375gnu avatar Jul 04 '21 17:07 375gnu

since my frontends do not really accept command line arguments, im fine with the changes as long as we still expose interfaces to load from specific .cfg and extra dirs.

Also I wonder if we can move away from current directory to load from, would it make sense for all files to be loaded according to an absolute path?

levinli303 avatar Jul 07 '21 08:07 levinli303

Also I wonder if we can move away from current directory to load from, would it make sense for all files to be loaded according to an absolute path?

We can use absolute paths in many (or even all) places of celestia.cfg. Or do you mean something else?

375gnu avatar Jul 08 '21 08:07 375gnu

I'm saying now (on my frontends), I need to call chdir (or similar APIs) to change working directory so the relative path in data files in cfg can be correctly loaded. is it possible to avoid it. (maybe store a value of the root path for relative paths to load from?)

levinli303 avatar Jul 08 '21 14:07 levinli303

chdir approach is much simpler, in this pr i want to move it to CelestiaCore

375gnu avatar Jul 09 '21 08:07 375gnu