1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-25 21:27:45 +00:00
novus/mapeditor/src/main.cpp

34 lines
1 KiB
C++
Raw Normal View History

// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#include <QApplication>
#include <physis.hpp>
#include <physis_logger.h>
#include "aboutdata.h"
#include "mainwindow.h"
#include "settings.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
customizeAboutData(QStringLiteral("mapeditor"),
QStringLiteral("zone.xiv.mapeditor"),
QStringLiteral("Map Editor"),
QStringLiteral("Program to view FFXIV maps."));
// Default to a sensible message pattern
if (qEnvironmentVariableIsEmpty("QT_MESSAGE_PATTERN")) {
qputenv("QT_MESSAGE_PATTERN", "[%{time yyyy-MM-dd h:mm:ss.zzz}] %{if-category}[%{category}] %{endif}[%{type}] %{message}");
}
setup_physis_logging();
const QString gameDir{getGameDirectory()};
const std::string gameDirStd{gameDir.toStdString()};
MainWindow w(physis_gamedata_initialize(gameDirStd.c_str()));
w.show();
return app.exec();
}