From c1f5b3336836e15d193582e9b8f3e044f7d8bc1b Mon Sep 17 00:00:00 2001 From: saturneric Date: Thu, 29 Feb 2024 18:15:57 +0800 Subject: feat: add module controller and continue to work on module system 1. speed up building by reducing build info sheader including 2. add module controller 3. continue to work on module system --- src/cmd.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/cmd.cpp') diff --git a/src/cmd.cpp b/src/cmd.cpp index cef0a984..d41b6de0 100644 --- a/src/cmd.cpp +++ b/src/cmd.cpp @@ -28,13 +28,13 @@ #include "cmd.h" +#include "core/utils/BuildInfoUtils.h" #include "main.h" // std #include // GpgFrontend -#include "GpgFrontendBuildInfo.h" #include "GpgFrontendContext.h" #include "test/GpgFrontendTest.h" @@ -42,19 +42,19 @@ namespace GpgFrontend { auto PrintVersion() -> int { QTextStream stream(stdout); - stream << PROJECT_NAME << " " - << "v" << VERSION_MAJOR << "." << VERSION_MINOR << "." << VERSION_PATCH - << '\n'; + stream << PROJECT_NAME << " " << GetProjectVersion() << '\n'; stream << "Copyright (©) 2021 Saturneric " << '\n' << QCoreApplication::tr( "This is free software; see the source for copying conditions.") << '\n' << '\n'; - stream << QCoreApplication::tr("Build DateTime: ") << BUILD_TIMESTAMP << '\n' - << QCoreApplication::tr("Build Version: ") << BUILD_VERSION << '\n' - << QCoreApplication::tr("Source Code Version: ") << GIT_VERSION - << '\n'; + stream << QCoreApplication::tr("Build DateTime: ") + << QLocale().toString(GetProjectBuildTimestamp()) << '\n' + << QCoreApplication::tr("Build Version: ") << GetProjectBuildVersion() + << '\n' + << QCoreApplication::tr("Source Code Version: ") + << GetProjectBuildGitVersion() << '\n'; stream << Qt::endl; return 0; -- cgit v1.2.3