set(VERSION_MAJOR 0)
set(VERSION_MINOR 4)
set(VERSION_PATCH 9)
+set(VERSION_PATCH_ORIG ${VERSION_PATCH})
+
if(VERSION_EXTRA)
set(VERSION_PATCH ${VERSION_PATCH}-${VERSION_EXTRA})
else()
#include <windows.h>\r
#include <commctrl.h>\r
#include <richedit.h>\r
+#define USE_CMAKE_CONFIG_H\r
+#include "config.h"\r
+#undef USE_CMAKE_CONFIG_H\r
+\r
+#if RUN_IN_PLACE == 1\r
+ #define BUILDMODE "RUN_IN_PLACE=1\0"\r
+#else\r
+ #define BUILDMODE "RUN_IN_PLACE=0\0"\r
+#endif\r
+\r
LANGUAGE 0, SUBLANG_NEUTRAL\r
130 ICON "minetest-icon.ico"\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Version\r
+//\r
+\r
+1 VERSIONINFO\r
+ FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH_ORIG,0\r
+ PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH_ORIG,0\r
+ FILEFLAGSMASK 0x3fL\r
+#ifndef NDEBUG\r
+ FILEFLAGS 0x1L\r
+#else\r
+ FILEFLAGS 0x0L\r
+#endif\r
+ FILEOS VOS_NT_WINDOWS32\r
+ FILETYPE VFT_APP\r
+ FILESUBTYPE 0x0L\r
+BEGIN\r
+ BLOCK "StringFileInfo"\r
+ BEGIN\r
+ BLOCK "040904b0"\r
+ BEGIN\r
+ VALUE "Comments", "\0"\r
+ VALUE "CompanyName", "Minetest Community\0"\r
+ VALUE "FileDescription", "Minetest engine core main application\0"\r
+ VALUE "FileVersion", VERSION_STRING\r
+ VALUE "InternalName", "Minetest engine\0"\r
+ VALUE "LegalCopyright", "(c) 2014 celeron55\0"\r
+ VALUE "LegalTrademarks", """Minetest"" is property of Minetest community, don't use the name for your application without permission!\0"\r
+ VALUE "OriginalFilename", "minetest.exe\0"\r
+ VALUE "PrivateBuild", VERSION_EXTRA_STRING\r
+ VALUE "ProductName", "Minetest\0"\r
+ VALUE "ProductVersion", PRODUCT_VERSION_STRING\r
+ VALUE "SpecialBuild", BUILDMODE\r
+ END\r
+END\r
+BLOCK "VarFileInfo"\r
+BEGIN\r
+ VALUE "Translation", 0x409, 1200\r
+END\r
+END\r
${UTIL_SRCS}
)
-# This gives us the icon
+# This gives us the icon and file version information
if(WIN32)
set(WINRESOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../misc/winresource.rc)
if(MINGW)
COMMAND ${CMAKE_RC_COMPILER} -I${CMAKE_CURRENT_SOURCE_DIR}
-i${WINRESOURCE_FILE}
-o ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ DEPENDS ${WINRESOURCE_FILE})
SET(common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o)
else(MINGW) # Probably MSVC
set(common_SRCS ${common_SRCS} ${WINRESOURCE_FILE})
#define CMAKE_PROJECT_NAME "@PROJECT_NAME@"
#define CMAKE_VERSION_STRING "@VERSION_STRING@"
+#define CMAKE_PRODUCT_VERSION_STRING "@VERSION_MAJOR@.@VERSION_MINOR@"
#define CMAKE_RUN_IN_PLACE @RUN_IN_PLACE@
#define CMAKE_USE_GETTEXT @USE_GETTEXT@
#define CMAKE_USE_CURL @USE_CURL@
#define CMAKE_STATIC_SHAREDIR "@SHAREDIR@"
#define CMAKE_USE_LEVELDB @USE_LEVELDB@
#define CMAKE_USE_LUAJIT @USE_LUAJIT@
+#define CMAKE_VERSION_MAJOR @VERSION_MAJOR@
+#define CMAKE_VERSION_MINOR @VERSION_MINOR@
+#define CMAKE_VERSION_PATCH @VERSION_PATCH@
+#define CMAKE_VERSION_PATCH_ORIG @VERSION_PATCH_ORIG@
+#define CMAKE_VERSION_EXTRA_STRING "@VERSION_EXTRA@"
#ifdef NDEBUG
#define CMAKE_BUILD_TYPE "Release"
#define USE_LEVELDB CMAKE_USE_LEVELDB
#undef USE_LUAJIT
#define USE_LUAJIT CMAKE_USE_LUAJIT
+ #undef VERSION_MAJOR
+ #define VERSION_MAJOR CMAKE_VERSION_MAJOR
+ #undef VERSION_MINOR
+ #define VERSION_MINOR CMAKE_VERSION_MINOR
+ #undef VERSION_PATCH
+ #define VERSION_PATCH CMAKE_VERSION_PATCH
+ #undef VERSION_PATCH_ORIG
+ #define VERSION_PATCH_ORIG CMAKE_VERSION_PATCH_ORIG
+ #undef VERSION_STRING
+ #define VERSION_STRING CMAKE_VERSION_STRING
+ #undef PRODUCT_VERSION_STRING
+ #define PRODUCT_VERSION_STRING CMAKE_PRODUCT_VERSION_STRING
+ #undef VERSION_EXTRA_STRING
+ #define VERSION_EXTRA_STRING CMAKE_VERSION_EXTRA_STRING
#endif
#endif