Even though the data="path/to/mod/or/main/data/folder" lines in the config files are supposed to require quotation marks around the path, some users have reported that the opposite behaviour occurs for them - they only work when the quote marks are not present.
This has mostly been discussed in two threads: The two users with this issue are:
- SteveOdom using Linux Mint 18 (Sarah) 64-bit and 17 32-bit, with builds from the Ubuntu PPA.
- Erasmus using OSX El Capitan 10.11.5, using builds from GitHub
I've made a minimal example of what I think is broken, which should compile on any machine with boost, so if anyone reporting the issue (or who thinks they could potentially be a victim) could please build and run it, then post the output, that might well help debug this a lot faster.
Note: If anyone thinks they've got this issue, it's likely you won't be able to do anything with OpenMW, as the launcher and wizard both add the quotes, so OpenMW won't even be able to see your main data directory. If you've successfully downloaded, installed, run the launcher and wizard for, and then the main engine of OpenMW, all without having to tweak the config files manually, then it's pretty much certain that this doesn't affect you.
The test stuff:
BoostPathTest.cpp
Code: Select all
#include <iostream>
#include <boost/program_options.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
void readConfiguration(boost::program_options::variables_map & variables, boost::program_options::options_description & description)
{
boost::filesystem::path cfgFile("config.cfg");
if (boost::filesystem::is_regular_file(cfgFile))
{
boost::filesystem::ifstream cfgStream(cfgFile);
if (cfgStream.is_open())
{
boost::program_options::store(boost::program_options::parse_config_file(cfgStream, description, true), variables);
}
}
}
int main()
{
namespace bpo = boost::program_options;
bpo::options_description desc("This is a string what I writ");
desc.add_options()("filepath", bpo::value<std::vector<boost::filesystem::path>>()->default_value(std::vector<boost::filesystem::path>(), "astring")->multitoken()->composing(), "A third string");
bpo::variables_map variables;
readConfiguration(variables, desc);
std::vector<boost::filesystem::path> paths(variables["filepath"].as<std::vector<boost::filesystem::path>>());
for (boost::filesystem::path path : paths)
{
std::cout << path << ", " << path.string() << std::endl;
}
return 0;
}
Code: Select all
filepath="this is a / string / what/i/wrote/"
filepath="C:\Program Files\Thing Simulator\res\"
filepath="~/wibble/wobble"
Code: Select all
filepath=this is a / string / what/i/wrote/
filepath=C:\Program Files\Thing Simulator\res\
filepath=~/wibble/wobble
EDIT 2: I realised I'd missed out the second test.