summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-30 20:44:45 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-08 16:29:46 +0200
commit0e493346b8ca9842946343ef43af1fbe2fd85fce (patch)
tree40361bcfb687af76a919b51a90305ba4c7e8cb5e
parentdc99410902b9eade9e408389e49f09d5163b6caf (diff)
downloadmana-0e493346b8ca9842946343ef43af1fbe2fd85fce.tar.gz
mana-0e493346b8ca9842946343ef43af1fbe2fd85fce.tar.bz2
mana-0e493346b8ca9842946343ef43af1fbe2fd85fce.tar.xz
mana-0e493346b8ca9842946343ef43af1fbe2fd85fce.zip
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.
-rw-r--r--CMakeLists.txt1
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/main.h8
-rw-r--r--src/mana.rc.in (renamed from src/mana.rc)10
-rw-r--r--src/winver.h26
-rw-r--r--src/winver.h.in5
6 files changed, 6 insertions, 47 deletions
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.in
index 1da5f41d..69c607e1 100644
--- a/src/mana.rc
+++ b/src/mana.rc.in
@@ -1,23 +1,21 @@
#include <windows.h> // 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
+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", PACKAGE_VERSION
+ VALUE "FileVersion", "${PROJECT_VERSION}"
VALUE "FileDescription", "Mana"
VALUE "LegalCopyright", "2004-2010 (C)"
VALUE "OriginalFilename", "mana.exe"
VALUE "ProductName", "Mana MMORPG Client"
- VALUE "ProductVersion", PACKAGE_VERSION
+ 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 <http://www.gnu.org/licenses/>.
- */
-
-/* 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}