diff --git a/tools/Info/main.cpp b/tools/Info/main.cpp index 3d39cac593..ad993e4bdf 100644 --- a/tools/Info/main.cpp +++ b/tools/Info/main.cpp @@ -26,7 +26,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include -#include +#include #include #include @@ -59,6 +59,7 @@ void showUsage() " Options:\n" " --diff Show only modified parameters.\n" " --diff \"other_map.db\" Compare parameters with other database.\n" + " --dump \"config.ini\" Dump parameters in ini file.\n" "\n"); exit(1); } @@ -81,19 +82,33 @@ int main(int argc, char * argv[]) } std::string otherDatabasePath; + std::string dumpFilePath; bool diff = false; for(int i=1; igetLastParameters(); + if(!dumpFilePath.empty()) + { + Parameters::writeINI(dumpFilePath, parameters); + printf("%ld parameters exported to \"%s\".\n", parameters.size(), dumpFilePath.c_str()); + return 0; + } ParametersMap defaultParameters = Parameters::getDefaultParameters(); ParametersMap removedParameters = Parameters::getBackwardCompatibilityMap(); std::string otherDatabasePathName;