diff --git a/CMakeLists.txt b/CMakeLists.txt index d4b9b9b59..84faa5eb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,6 +95,9 @@ project( DESCRIPTION "Mouse and keyboard sharing utility" LANGUAGES C CXX) +#Used for embedded copyright on binaries, limited space. +set(CMAKE_PROJECT_COPYRIGHT "(C) 2024-2025 Deskflow Devs") + message(STATUS "Building ${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}") # Set lib versions diff --git a/src/apps/deskflow-gui/CMakeLists.txt b/src/apps/deskflow-gui/CMakeLists.txt index b3d13919d..e4d4d3bc5 100644 --- a/src/apps/deskflow-gui/CMakeLists.txt +++ b/src/apps/deskflow-gui/CMakeLists.txt @@ -27,7 +27,7 @@ set(BUNDLE_DISPLAY_NAME "${target}") set(BUNDLE_GUI_IDENTIFIER "org.deskflow.deskflow") set(BUNDLE_ICON_FILE ${target}.icns) set(BUNDLE_INFO_STRING "${CMAKE_PROJECT_DESCRIPTION}") -set(BUNDLE_COPYRIGHT "© 2024 Deskflow Developers") +set(BUNDLE_COPYRIGHT "${CMAKE_PROJECT_COPYRIGHT}") configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../res/deskflow.plist.in diff --git a/src/apps/res/version.rc.in b/src/apps/res/version.rc.in index 815bbee79..73f466576 100644 --- a/src/apps/res/version.rc.in +++ b/src/apps/res/version.rc.in @@ -15,7 +15,7 @@ https://learn.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource?redi #define VER_COMPANYNAME_STR "Deskflow\0" #define VER_FILEDESCRIPTION_STR "Deskflow\0" #define VER_INTERNALNAME_STR "Deskflow\0" -#define VER_LEGALCOPYRIGHT_STR "© 2024 Deskflow Developers\0" +#define VER_LEGALCOPYRIGHT_STR "@CMAKE_PROJECT_COPYRIGHT@\0" #define VER_LEGALTRADEMARKS1_STR "All Rights Reserved\0" #define VER_LEGALTRADEMARKS2_STR "\0" #define VER_ORIGINALFILENAME_STR "\0" diff --git a/src/lib/common/constants.h.in b/src/lib/common/constants.h.in index 486f9d9a0..d8c4fedc1 100644 --- a/src/lib/common/constants.h.in +++ b/src/lib/common/constants.h.in @@ -13,7 +13,7 @@ const auto kVersion = "@CMAKE_PROJECT_VERSION@"; const auto kVersionGitSha = "@GIT_SHA_SHORT@"; const auto kCopyright = // - "Copyright (C) 2024 Deskflow Developers\n" + "Copyright @CMAKE_PROJECT_COPYRIGHT@\n" "Copyright (C) 2012-2024 Symless Ltd.\n" "Copyright (C) 2009-2012 Nick Bolton\n" "Copyright (C) 2002-2009 Chris Schoeneman"; diff --git a/src/test/unittests/deskflow/ServerAppTests.cpp b/src/test/unittests/deskflow/ServerAppTests.cpp index 7edddfd47..7aa862784 100644 --- a/src/test/unittests/deskflow/ServerAppTests.cpp +++ b/src/test/unittests/deskflow/ServerAppTests.cpp @@ -58,9 +58,9 @@ TEST(ServerAppTests, version_printsYear) #ifdef WIN32 // regex is god awful on windows, so just check that there is a copyright - EXPECT_THAT(buffer.str(), testing::HasSubstr("Symless Ltd.")); + EXPECT_THAT(buffer.str(), testing::HasSubstr("Deskflow Devs")); #else - std::string expectedPattern = ".*Copyright \\(C\\) [0-9]{4}-[0-9]{4} Symless Ltd.*"; + std::string expectedPattern = ".*[0-9]{4}-[0-9]{4} Deskflow Devs.*"; EXPECT_THAT(buffer.str(), testing::MatchesRegex(expectedPattern)); #endif // WIN32 }