mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 01:51:01 +00:00
BonsaiViewer: add --version cli option
Also useful for testing if all dependencies are found, without launching the viewer.
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
#include "ViewerSettings.h"
|
#include "ViewerSettings.h"
|
||||||
#include "components/Style.h"
|
#include "components/Style.h"
|
||||||
#include "modules/models/Commands.h"
|
#include "modules/models/Commands.h"
|
||||||
|
#include "../ifcparse/parse.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
@@ -55,6 +56,7 @@ int main(int argc, char* argv[]) {
|
|||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
app.setApplicationName("Bonsai Viewer");
|
app.setApplicationName("Bonsai Viewer");
|
||||||
app.setOrganizationName("IfcOpenShell");
|
app.setOrganizationName("IfcOpenShell");
|
||||||
|
app.setApplicationVersion(QString::fromUtf8(IFCOPENSHELL_VERSION));
|
||||||
|
|
||||||
// Clear any .rdbview extractions left in temp by a previous session.
|
// Clear any .rdbview extractions left in temp by a previous session.
|
||||||
bonsaiviewer::modules::models::commands::cleanupRdbviewCache();
|
bonsaiviewer::modules::models::commands::cleanupRdbviewCache();
|
||||||
@@ -70,6 +72,7 @@ int main(int argc, char* argv[]) {
|
|||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
parser.setApplicationDescription("Bonsai Viewer — IfcOpenShell IFC viewer");
|
parser.setApplicationDescription("Bonsai Viewer — IfcOpenShell IFC viewer");
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
|
parser.addVersionOption();
|
||||||
parser.process(app);
|
parser.process(app);
|
||||||
|
|
||||||
installUiFont();
|
installUiFont();
|
||||||
|
|||||||
Reference in New Issue
Block a user