From 0e493346b8ca9842946343ef43af1fbe2fd85fce Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sat, 30 Mar 2024 20:44:45 +0100 Subject: Resolved issues with winver.h The configured file wasn't actually being used, because it was not in the include path. Instead, a checked in version was used. In addition, winver.h is an existing Windows header, which was conflicting with the generated file. Instead, now mana.rc itself is configured. We didn't actually need winver.h anywhere else, anyway. --- CMakeLists.txt | 1 - src/CMakeLists.txt | 3 ++- src/main.h | 8 -------- src/mana.rc | 23 ----------------------- src/mana.rc.in | 21 +++++++++++++++++++++ src/winver.h | 26 -------------------------- src/winver.h.in | 5 ----- 7 files changed, 23 insertions(+), 64 deletions(-) delete mode 100644 src/mana.rc create mode 100644 src/mana.rc.in delete mode 100644 src/winver.h delete mode 100644 src/winver.h.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 756a823f..889d8482 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,6 @@ IF (WIN32) SET(PKG_DATADIR ".") SET(PKG_BINDIR ".") SET(LOCALEDIR ".") - CONFIGURE_FILE(src/winver.h.in src/winver.h) ELSE (WIN32) SET(PKG_DATADIR ${CMAKE_INSTALL_PREFIX}/share/mana CACHE PATH "Mana datadir") SET(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e57d5e3f..91afadb1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -622,11 +622,12 @@ SET(SRCS_MANA ) IF (WIN32) + CONFIGURE_FILE(mana.rc.in mana.rc) SET(SRCS ${SRCS} utils/specialfolder.cpp utils/specialfolder.h - mana.rc + ${CMAKE_CURRENT_BINARY_DIR}/mana.rc ) ENDIF (WIN32) diff --git a/src/main.h b/src/main.h index 5a663646..b0917e2a 100644 --- a/src/main.h +++ b/src/main.h @@ -50,14 +50,6 @@ * different interfaces, which have different implementations for each server. */ -#ifdef HAVE_CONFIG_H -#include "../config.h" -#elif defined _WIN32 -#include "winver.h" -#elif defined __APPLE__ -#define PACKAGE_VERSION "0.6.1" -#endif - #ifdef PACKAGE_VERSION #define FULL_VERSION "v" PACKAGE_VERSION #else diff --git a/src/mana.rc b/src/mana.rc deleted file mode 100644 index 1da5f41d..00000000 --- a/src/mana.rc +++ /dev/null @@ -1,23 +0,0 @@ -#include // include for version info constants - -#include "winver.h" - -A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "../data/icons/mana.ico" - -1 VERSIONINFO -FILEVERSION VER_MAJOR,VER_MINOR,VER_RELEASE,VER_BUILD -PRODUCTVERSION VER_MAJOR,VER_MINOR,VER_RELEASE,VER_BUILD -//FILETYPE VFT_APP -{ - BLOCK "StringFileInfo" { - BLOCK "040904E4" { - VALUE "CompanyName", "The Mana Development Team" - VALUE "FileVersion", PACKAGE_VERSION - VALUE "FileDescription", "Mana" - VALUE "LegalCopyright", "2004-2010 (C)" - VALUE "OriginalFilename", "mana.exe" - VALUE "ProductName", "Mana MMORPG Client" - VALUE "ProductVersion", PACKAGE_VERSION - } - } -} diff --git a/src/mana.rc.in b/src/mana.rc.in new file mode 100644 index 00000000..69c607e1 --- /dev/null +++ b/src/mana.rc.in @@ -0,0 +1,21 @@ +#include // include for version info constants + +A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "../data/icons/mana.ico" + +1 VERSIONINFO +FILEVERSION ${PROJECT_VERSION_MAJOR},${PROJECT_VERSION_MINOR},${PROJECT_VERSION_PATCH},0 +PRODUCTVERSION ${PROJECT_VERSION_MAJOR},${PROJECT_VERSION_MINOR},${PROJECT_VERSION_PATCH},0 +//FILETYPE VFT_APP +{ + BLOCK "StringFileInfo" { + BLOCK "040904E4" { + VALUE "CompanyName", "The Mana Development Team" + VALUE "FileVersion", "${PROJECT_VERSION}" + VALUE "FileDescription", "Mana" + VALUE "LegalCopyright", "2004-2010 (C)" + VALUE "OriginalFilename", "mana.exe" + VALUE "ProductName", "Mana MMORPG Client" + VALUE "ProductVersion", "${PROJECT_VERSION}" + } + } +} diff --git a/src/winver.h b/src/winver.h deleted file mode 100644 index 4c33fe29..00000000 --- a/src/winver.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * The Mana Client - * Copyright (C) 2012 The Mana Developers - * - * This file is part of The Mana Client. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/* VERSION DEFINITIONS */ -#define VER_MAJOR 0 -#define VER_MINOR 6 -#define VER_RELEASE 1 -#define VER_BUILD 0 -#define PACKAGE_VERSION "0.6.1.0" diff --git a/src/winver.h.in b/src/winver.h.in deleted file mode 100644 index 8ce64032..00000000 --- a/src/winver.h.in +++ /dev/null @@ -1,5 +0,0 @@ -/* VERSION DEFINITIONS */ -#define VER_MAJOR ${PROJECT_VERSION_MAJOR} -#define VER_MINOR ${PROJECT_VERSION_MINOR} -#define VER_RELEASE ${PROJECT_VERSION_PATCH} -#define VER_BUILD ${PROJECT_VERSION_TWEAK} -- cgit v1.2.3-70-g09d2