diff options
author | Bernd Wachter <bwachter-mana@lart.info> | 2010-01-29 13:29:21 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2010-01-29 14:41:46 +0100 |
commit | e3d06d70fa2223d527e40ba74350cc732ca7e77b (patch) | |
tree | 8fa0c3c010d0d7ee5e91cdff9474a59190e5a228 | |
parent | 14c0615bceb6016f0ef4de257a6db4f253ed095e (diff) | |
download | manaserv-e3d06d70fa2223d527e40ba74350cc732ca7e77b.tar.gz manaserv-e3d06d70fa2223d527e40ba74350cc732ca7e77b.tar.xz manaserv-e3d06d70fa2223d527e40ba74350cc732ca7e77b.zip |
Add/fix win32 build rules
-rw-r--r-- | mana.ico | bin | 0 -> 353118 bytes | |||
-rw-r--r-- | src/CMakeLists.txt | 23 | ||||
-rw-r--r-- | src/manaserv-account.rc | 23 | ||||
-rw-r--r-- | src/manaserv-game.rc | 23 | ||||
-rw-r--r-- | src/winver.h.in | 6 |
5 files changed, 74 insertions, 1 deletions
diff --git a/mana.ico b/mana.ico Binary files differnew file mode 100644 index 0000000..60203d5 --- /dev/null +++ b/mana.ico diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f5ada93..2954242 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,6 +13,22 @@ IF (CMAKE_COMPILER_IS_GNUCXX) ENDIF() ENDIF() +# enable rc-handling with mingw +# most likely this part can be kicked out with some later cmake version +IF (MINGW) + FIND_PATH(MINGW_INCLUDE_DIR windows.h $ENV{INCLUDE}) + IF (MINGW_INCLUDE_DIR) + MESSAGE(STATUS "Found mingw headers: ${MINGW_INCLUDE_DIR}") + INCLUDE_DIRECTORIES(${MINGW_INCLUDE_DIR}) + ELSE() + MESSAGE(FATAL_ERROR "Unable to find mingw headers. Required for windres") + ENDIF() + SET(CMAKE_RC_COMPILER_INIT windres) + ENABLE_LANGUAGE(RC) + SET(CMAKE_RC_COMPILE_OBJECT + "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -O coff -o <OBJECT> <SOURCE>") +ENDIF() + SET(FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\"") SET(FLAGS "${FLAGS} -DPKG_DATADIR=\\\"${PKG_DATADIR}/\\\"") SET(FLAGS "${FLAGS} -DLOCALEDIR=\\\"${LOCALEDIR}/\\\"") @@ -59,7 +75,7 @@ ENDIF() IF (WIN32) SET(EXTRA_LIBRARIES ws2_32 winmm) - FIND_PACKAGE(LibIntl REQUIRED) + #FIND_PACKAGE(LibIntl REQUIRED) ELSEIF (CMAKE_SYSTEM_NAME STREQUAL SunOS) # explicit linking to libintl is required on Solaris SET(EXTRA_LIBRARIES intl) @@ -234,6 +250,11 @@ SET(SRCS_MANASERVGAME utils/zlib.cpp ) +IF (WIN32) + SET(SRCS_MANASERVACCOUNT ${SRCS_MANASERVACCOUNT} manaserv-account.rc) + SET(SRCS_MANASERVGAME ${SRCS_MANASERVGAME} manaserv-game.rc) +ENDIF () + IF (WITH_MYSQL) SET(SRCS_MANASERVACCOUNT ${SRCS_MANASERVACCOUNT} dal/mysqldataprovider.h diff --git a/src/manaserv-account.rc b/src/manaserv-account.rc new file mode 100644 index 0000000..3962269 --- /dev/null +++ b/src/manaserv-account.rc @@ -0,0 +1,23 @@ +#include <windows.h> // include for version info constants + +#include "winver.h" + +A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "../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", "Manaserv Account Server" + VALUE "LegalCopyright", "2004-2009 (C)" + VALUE "OriginalFilename", "manaserv-account.exe" + VALUE "ProductName", "Mana MMORPG Server" + VALUE "ProductVersion", PACKAGE_VERSION + } + } +} diff --git a/src/manaserv-game.rc b/src/manaserv-game.rc new file mode 100644 index 0000000..c743c5f --- /dev/null +++ b/src/manaserv-game.rc @@ -0,0 +1,23 @@ +#include <windows.h> // include for version info constants + +#include "winver.h" + +A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "../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", "Manaserv Game Server" + VALUE "LegalCopyright", "2004-2009 (C)" + VALUE "OriginalFilename", "manaserv-game.exe" + VALUE "ProductName", "Mana MMORPG Server" + VALUE "ProductVersion", PACKAGE_VERSION + } + } +} diff --git a/src/winver.h.in b/src/winver.h.in new file mode 100644 index 0000000..fb0aac2 --- /dev/null +++ b/src/winver.h.in @@ -0,0 +1,6 @@ +/* VERSION DEFINITIONS */ +#define VER_MAJOR ${VER_MAJOR} +#define VER_MINOR ${VER_MINOR} +#define VER_RELEASE ${VER_RELEASE} +#define VER_BUILD ${VER_BUILD} +#define PACKAGE_VERSION "${VERSION}" |