OGS
Utils/OGSFileConverter/main.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#include <tclap/CmdLine.h>
5
6#include <QApplication>
7#include <clocale>
8
9#include "BaseLib/Logging.h"
11#include "InfoLib/GitInfo.h"
12#include "OGSFileConverter.h"
13
14int main(int argc, char* argv[])
15{
16 TCLAP::CmdLine cmd(
17 "A conversion tool for ogs5 and ogs6 files.\n\n"
18 "OpenGeoSys-6 software, version " +
20 ".\n"
21 "Copyright (c) 2012-2026, OpenGeoSys Community "
22 "(http://www.opengeosys.org)",
24 TCLAP::ValueArg<std::string> gmsh_path_arg(
25 "g", "gmsh-path",
26 "Input (.msh). The path to the input gmsh binary file", false, "",
27 "INPUT_FILE");
28 cmd.add(gmsh_path_arg);
29 auto log_level_arg = BaseLib::makeLogLevelArg();
30 cmd.add(log_level_arg);
31 cmd.parse(argc, argv);
32 BaseLib::initOGSLogger(log_level_arg.getValue());
33 QApplication app(argc, argv);
34 setlocale(LC_NUMERIC, "C");
35 auto* fc = new OGSFileConverter(gmsh_path_arg.getValue());
36 fc->setWindowTitle(fc->windowTitle());
37 fc->show();
38 int returncode = QApplication::exec();
39 delete fc;
40
41 return returncode;
42}
int main(int argc, char *argv[])
TCLAP::ValueArg< std::string > makeLogLevelArg()
void initOGSLogger(std::string const &log_level)
Definition Logging.cpp:56
GITINFOLIB_EXPORT const std::string ogs_version