2023-08-06 08:48:11 -04:00
|
|
|
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2023-07-09 11:52:59 -04:00
|
|
|
#include <QApplication>
|
|
|
|
#include <physis.hpp>
|
2023-12-09 16:01:13 -05:00
|
|
|
#include <physis_logger.h>
|
2023-07-09 11:52:59 -04:00
|
|
|
|
2023-09-23 15:45:38 -04:00
|
|
|
#include "aboutdata.h"
|
2023-07-09 11:52:59 -04:00
|
|
|
#include "mainwindow.h"
|
2023-09-23 15:26:00 -04:00
|
|
|
#include "settings.h"
|
2023-07-09 11:52:59 -04:00
|
|
|
|
2023-10-12 23:45:13 -04:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2023-07-09 11:52:59 -04:00
|
|
|
QApplication app(argc, argv);
|
|
|
|
|
2023-10-12 23:45:13 -04:00
|
|
|
customizeAboutData(QStringLiteral("mdlviewer"), QStringLiteral("MDLViewer"), QStringLiteral("Program to view FFXIV MDL files."));
|
2023-09-23 15:45:38 -04:00
|
|
|
|
2023-12-09 16:01:13 -05:00
|
|
|
// 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();
|
|
|
|
|
2023-09-23 15:26:00 -04:00
|
|
|
const QString gameDir{getGameDirectory()};
|
|
|
|
const std::string gameDirStd{gameDir.toStdString()};
|
|
|
|
MainWindow w(physis_gamedata_initialize(gameDirStd.c_str()));
|
2023-07-09 11:52:59 -04:00
|
|
|
w.show();
|
|
|
|
|
|
|
|
return app.exec();
|
|
|
|
}
|