@@ -1987,6 +1987,8 @@ namespace {
19871987 using namespace GEO;
19881988 using namespace CmdLine;
19891989
1990+ std::string config_file_name = "geogram.ini";
1991+
19901992 int geo_argc = 0;
19911993 char** geo_argv = nil;
19921994
@@ -2121,12 +2123,14 @@ namespace {
21212123 return;
21222124 }
21232125 init = true;
2124- Logger::out("geogram.ini") << "Home directory:" << FileSystem::home_directory()
2125- << std::endl;
2126- std::string config_filename = FileSystem::home_directory() + "/geogram.ini";
2126+ Logger::out("config") << "Configuration file name:" << config_file_name
2127+ << std::endl;
2128+ Logger::out("config") << "Home directory:" << FileSystem::home_directory()
2129+ << std::endl;
2130+ std::string config_filename = FileSystem::home_directory() + "/" + config_file_name;
21272131 std::string section = "*";
21282132 if(FileSystem::is_file(config_filename)) {
2129- Logger::out("geogram.ini ") << "Using configuration file:"
2133+ Logger::out("config ") << "Using configuration file:"
21302134 << config_filename
21312135 << std::endl;
21322136 std::ifstream in(config_filename.c_str());
@@ -2142,7 +2146,7 @@ namespace {
21422146 if(CmdLine::arg_is_declared(argname)) {
21432147 CmdLine::set_arg(argname, argval);
21442148 } else {
2145- Logger::warn("geogram.ini ") << argname << "=" << argval << " ignored" << std::endl;
2149+ Logger::warn("config ") << argname << "=" << argval << " ignored" << std::endl;
21462150 }
21472151 }
21482152 }
@@ -2342,6 +2346,14 @@ namespace GEO {
23422346 char** argv() {
23432347 return geo_argv;
23442348 }
2349+
2350+ void set_config_file_name(const std::string& filename) {
2351+ config_file_name = filename;
2352+ }
2353+
2354+ std::string get_config_file_name() {
2355+ return config_file_name;
2356+ }
23452357
23462358 bool parse(
23472359 int argc, char** argv, std::vector<std::string>& unparsed_args,
@@ -3481,7 +3493,7 @@ namespace {
34813493 );
34823494 declare_arg(
34833495 "poly:generate_ids", false,
3484- "generate unique ids for vertices and cells (saved in geogram and geogram_ascii file formats only)"
3496+ "generate unique ids for vertices and cells (saved in geogram, geogram_ascii and ovm file formats only)"
34853497 );
34863498 declare_arg(
34873499 "poly:embedding_dim", 0,
0 commit comments