Base: Auto-inject copyright year
This commit is contained in:
@@ -55,6 +55,7 @@ set(PACKAGE_VERSION_MINOR "2")
|
||||
set(PACKAGE_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
|
||||
set(PACKAGE_BUILD_VERSION "0") # used when the same FreeCAD version will be re-released (for example using an updated LibPack)
|
||||
string(TIMESTAMP PACKAGE_COPYRIGHT_YEAR "%Y")
|
||||
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
|
||||
set(PACKAGE_STRING "${PROJECT_NAME} ${PACKAGE_VERSION}")
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#define FCVersionName "${PACKAGE_VERSION_NAME}"
|
||||
#define FCVersionPoint "${PACKAGE_VERSION_PATCH}"
|
||||
#define FCVersionSuffix "${PACKAGE_VERSION_SUFFIX}"
|
||||
// Displayed Copyright Year (i.e. build year)
|
||||
#define FCCopyrightYear ${PACKAGE_COPYRIGHT_YEAR}
|
||||
// test: $Format:Hash (%H), Date: %ci$
|
||||
#define FCRevision "${PACKAGE_WCREF}" //Highest committed revision number
|
||||
#define FCRevisionDate "${PACKAGE_WCDATE}" //Date of highest committed revision
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
# include <config.h>
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
#include <Build/Version.h> // For FCCopyrightYear
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(disable : 4005)
|
||||
#endif
|
||||
@@ -338,7 +340,7 @@ PyMOD_INIT_FUNC(FreeCADGui)
|
||||
Base::Interpreter().loadModule("FreeCAD");
|
||||
App::Application::Config()["AppIcon"] = "freecad";
|
||||
App::Application::Config()["SplashScreen"] = "freecadsplash";
|
||||
App::Application::Config()["CopyrightInfo"] = "\xc2\xa9 Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2026\n";
|
||||
App::Application::Config()["CopyrightInfo"] = fmt::format("\xc2\xa9 Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-{}\n", FCCopyrightYear);
|
||||
App::Application::Config()["LicenseInfo"] = "FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.\n";
|
||||
App::Application::Config()["CreditsInfo"] = "FreeCAD would not be possible without the FreeCAD community.\n";
|
||||
// clang-format on
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
# include <config.h>
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
#include <Build/Version.h> // For FCCopyrightYear
|
||||
|
||||
#include <cstdio>
|
||||
#include <ostream>
|
||||
#include <QString>
|
||||
@@ -44,9 +46,11 @@
|
||||
using App::Application;
|
||||
using Base::Console;
|
||||
|
||||
const char sBanner[]
|
||||
= "(C) 2001-2026 FreeCAD contributors\n"
|
||||
"FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.\n\n";
|
||||
const auto sBanner = fmt::format(
|
||||
"(C) 2001-{} FreeCAD contributors\n"
|
||||
"FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.\n\n",
|
||||
FCCopyrightYear
|
||||
);
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
# include <config.h>
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
#include <Build/Version.h> // For FCCopyrightYear
|
||||
|
||||
#include <cstdio>
|
||||
#include <map>
|
||||
#include <stdexcept>
|
||||
@@ -52,9 +54,11 @@
|
||||
|
||||
void PrintInitHelp();
|
||||
|
||||
const char sBanner[]
|
||||
= "(C) 2001-2026 FreeCAD contributors\n"
|
||||
"FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.\n\n";
|
||||
const auto sBanner = fmt::format(
|
||||
"(C) 2001-{} FreeCAD contributors\n"
|
||||
"FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.\n\n",
|
||||
FCCopyrightYear
|
||||
);
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
void InitMiniDumpWriter(const std::string&);
|
||||
|
||||
Reference in New Issue
Block a user