mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-25 21:27:45 +00:00
Use better default message pattern and physis logging everywhere
This commit is contained in:
parent
5dc63ba6dc
commit
6a42c81393
7 changed files with 31 additions and 4 deletions
|
@ -9,6 +9,6 @@ target_include_directories(novus-karuku
|
|||
PUBLIC
|
||||
include)
|
||||
|
||||
target_link_libraries(novus-karuku PRIVATE physis z Qt6::Core Qt6::Widgets exdpart novus-common)
|
||||
target_link_libraries(novus-karuku PRIVATE physis physis-logger z Qt6::Core Qt6::Widgets exdpart novus-common)
|
||||
|
||||
install(TARGETS novus-karuku ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <QApplication>
|
||||
#include <physis.hpp>
|
||||
#include <physis_logger.h>
|
||||
|
||||
#include "aboutdata.h"
|
||||
#include "mainwindow.h"
|
||||
|
@ -14,6 +15,13 @@ int main(int argc, char *argv[])
|
|||
|
||||
customizeAboutData(QStringLiteral("karuku"), QStringLiteral("Karuku"), QStringLiteral("Program to view FFXIV Excel files."));
|
||||
|
||||
// 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()));
|
||||
|
|
|
@ -19,6 +19,11 @@ int main(int argc, char *argv[])
|
|||
QStringLiteral("SDK Launcher"),
|
||||
QStringLiteral("Handles setting up and launching various Novus SDK components."));
|
||||
|
||||
// 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}");
|
||||
}
|
||||
|
||||
KConfig config(QStringLiteral("novusrc"));
|
||||
KConfigGroup game = config.group(QStringLiteral("Game"));
|
||||
|
||||
|
|
|
@ -8,6 +8,6 @@ target_sources(novus-mdlviewer PRIVATE
|
|||
target_include_directories(novus-mdlviewer
|
||||
PUBLIC
|
||||
include)
|
||||
target_link_libraries(novus-mdlviewer PRIVATE physis z Qt6::Core Qt6::Widgets KF6::XmlGui mdlpart novus-common)
|
||||
target_link_libraries(novus-mdlviewer PRIVATE physis physis-logger z Qt6::Core Qt6::Widgets KF6::XmlGui mdlpart novus-common)
|
||||
|
||||
install(TARGETS novus-mdlviewer ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <QApplication>
|
||||
#include <physis.hpp>
|
||||
#include <physis_logger.h>
|
||||
|
||||
#include "aboutdata.h"
|
||||
#include "mainwindow.h"
|
||||
|
@ -14,6 +15,13 @@ int main(int argc, char *argv[])
|
|||
|
||||
customizeAboutData(QStringLiteral("mdlviewer"), QStringLiteral("MDLViewer"), QStringLiteral("Program to view FFXIV MDL files."));
|
||||
|
||||
// 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()));
|
||||
|
|
|
@ -22,6 +22,6 @@ target_sources(novus-sagasu PRIVATE
|
|||
src/filepropertieswindow.cpp
|
||||
src/filetreemodel.cpp)
|
||||
target_include_directories(novus-sagasu PRIVATE include)
|
||||
target_link_libraries(novus-sagasu PRIVATE Qt6::Concurrent sklbpart cmppart shpkpart hexpart exlpart mdlpart exdpart texpart novus-sagasu-static)
|
||||
target_link_libraries(novus-sagasu PRIVATE Qt6::Concurrent physis-logger sklbpart cmppart shpkpart hexpart exlpart mdlpart exdpart texpart novus-sagasu-static)
|
||||
|
||||
install(TARGETS novus-sagasu ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <QApplication>
|
||||
|
||||
#include <physis.hpp>
|
||||
#include <physis_logger.h>
|
||||
|
||||
#include "aboutdata.h"
|
||||
#include "mainwindow.h"
|
||||
|
@ -15,7 +16,12 @@ int main(int argc, char *argv[])
|
|||
|
||||
customizeAboutData(QStringLiteral("sagasu"), QStringLiteral("Sagasu"), QStringLiteral("Program to explore FFXIV data archives."));
|
||||
|
||||
physis_initialize_logging();
|
||||
// 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()};
|
||||
|
|
Loading…
Add table
Reference in a new issue