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