Application: AnyOldName3
Re: Application: AnyOldName3
Please note that openmw.cfg is parsed via boost program option. I guess these are limitations of that library. So the way around it would be to encode the problematic characters in a different way; for example like space can be encoded as %20 in an URL.
- AnyOldName3
- Posts: 2676
- Joined: 26 Nov 2015, 03:25
Re: Application: AnyOldName3
Thanks. I'll get investigating.
Re: Application: AnyOldName3
Another problem with boost's program options is that multi-value options are parsed in the wrong order when you load several files. This is why I marked #2976 related. Maybe it's time to toss out boost and write our own config parser that does exactly what we need.
Re: Application: AnyOldName3
There would appear to be two implementations for reading ini-like files. One using Qt in components/config/settingbase.hpp and one using boost in components/settings/settings.hpp. You may want to look into that. I agree with scrawl. Anyway, good luck.
Re: Application: AnyOldName3
Although some should not re-invent the wheel, writing a config parser isn't that hard, so maybe go for it instead of fighting the existing libraries
- AnyOldName3
- Posts: 2676
- Joined: 26 Nov 2015, 03:25
Re: Application: AnyOldName3
I'll see what can be done without totally overhauling everything before I decide to gut a whole system that mostly works. A parser for this kind of thing isn't beyond what I should be able to do - I've written a simple ini file reader for a university project before, and technically have written a general SLR parser generator, too, although that's both totally overkill for this, and also not hugely suited for the kind of data representation that would be useful here.
- AnyOldName3
- Posts: 2676
- Joined: 26 Nov 2015, 03:25
Re: Application: AnyOldName3
I've got one version of a solution to https://bugs.openmw.org/issues/3045 ready as a pull request, but I apparently completely missed the point of what Zini was suggesting. Now I have a better grasp on what's going on with boost::program_options, it shouldn't be too hard to implement something a little more desirable. I could jump ahead with what Zini suggested, but I feel I have a slightly better option, which is described in this github comment:
https://github.com/OpenMW/openmw/pull/9 ... -232140091
I'm asking here instead of just on GitHub so there's a bigger chance that people who are users rather than devs can weigh in an opinion if it's on the forums.
Thanks.
https://github.com/OpenMW/openmw/pull/9 ... -232140091
I'm asking here instead of just on GitHub so there's a bigger chance that people who are users rather than devs can weigh in an opinion if it's on the forums.
Thanks.