made old build system to work too. the cmake one doesn't make working binaries for...
authorPerttu Ahola <celeron55@gmail.com>
Tue, 18 Jan 2011 13:05:29 +0000 (15:05 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 18 Jan 2011 13:05:29 +0000 (15:05 +0200)
--HG--
rename : src/config.h.in => src/cmake_config.h.in

doc/README.txt
makepackage_binary.sh
minetest.vcproj
src/CMakeLists.txt
src/cmake_config.h.in [new file with mode: 0644]
src/config.h [new file with mode: 0644]
src/config.h.in [deleted file]
src/main.cpp

index 93203b3db5b35c7b56dcad9a7a7837a5b935d8ca..5a8ce7203e63886dbb5f255a317bdf1942075374 100644 (file)
@@ -82,6 +82,9 @@ Compiling on GNU/Linux:
        $ ./bin/minetest
 
 Compiling on Windows:
+- NOTE: Seems that the CMake build system produces executables that don't work
+  for many people. The old build system is still included, but it's not
+  documented in here.
 - You need CMake, Irrlicht, Zlib and Visual Studio or MinGW
 - NOTE: Probably it will not work easily and you will need to fix some stuff.
 - Steps:
index 8474ba52d8b46e7607639226bccb46cc9c4f9d7b..72dc9a3f7e567c036d6f08ace0aa186b3f9bccad 100755 (executable)
@@ -15,10 +15,10 @@ cp bin/minetest.exe $PACKAGEPATH/bin/
 cp bin/Irrlicht.dll $PACKAGEPATH/bin/
 cp bin/zlibwapi.dll $PACKAGEPATH/bin/
 #cp bin/test $PACKAGEPATH/bin/
-cp bin/fasttest $PACKAGEPATH/bin/
-cp bin/server $PACKAGEPATH/bin/
-cp ../irrlicht/irrlicht-1.7.1/lib/Linux/libIrrlicht.a $PACKAGEPATH/bin/
-cp ../jthread/jthread-1.2.1/src/.libs/libjthread-1.2.1.so $PACKAGEPATH/bin/
+#cp bin/fasttest $PACKAGEPATH/bin/
+#cp bin/server $PACKAGEPATH/bin/
+#cp ../irrlicht/irrlicht-1.7.1/lib/Linux/libIrrlicht.a $PACKAGEPATH/bin/
+#cp ../jthread/jthread-1.2.1/src/.libs/libjthread-1.2.1.so $PACKAGEPATH/bin/
 
 cp -r data/fontlucida.png $PACKAGEPATH/data/
 cp -r data/player.png $PACKAGEPATH/data/
@@ -38,9 +38,6 @@ cp -r data/mud.png $PACKAGEPATH/data/
 cp -r data/torch.png $PACKAGEPATH/data/
 cp -r data/torch_on_floor.png $PACKAGEPATH/data/
 cp -r data/torch_on_ceiling.png $PACKAGEPATH/data/
-cp -r data/skybox1.png $PACKAGEPATH/data/
-cp -r data/skybox2.png $PACKAGEPATH/data/
-cp -r data/skybox3.png $PACKAGEPATH/data/
 cp -r data/tree_top.png $PACKAGEPATH/data/
 cp -r data/mud_with_grass.png $PACKAGEPATH/data/
 cp -r data/coalstone.png $PACKAGEPATH/data/
index a4e6cf9fd473620e02320adc42c60bede0a63fd3..c8961ff6e6e67ba454fadd2d08ef1131aa475c40 100644 (file)
                                OmitFramePointers="true"\r
                                WholeProgramOptimization="true"\r
                                AdditionalIncludeDirectories="&quot;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include&quot;;&quot;..\jthread\jthread-1.2.1\src&quot;;&quot;..\irrlicht\irrlicht-1.7.1\include&quot;;&quot;..\zlib\zlib-1.2.5&quot;"\r
-                               PreprocessorDefinitions="WIN32;_HAS_ITERATOR_DEBUGGING=0;UNITTEST_DISABLE;_CRT_SECURE_NO_DEPRECATE;RUN_IN_PLACE"\r
+                               PreprocessorDefinitions="WIN32;_HAS_ITERATOR_DEBUGGING=0;NDEBUG;_CRT_SECURE_NO_DEPRECATE;RUN_IN_PLACE"\r
                                ExceptionHandling="2"\r
                                BufferSecurityCheck="false"\r
                                EnableEnhancedInstructionSet="1"\r
index c55b238e107090a96aeb03ecc2efbaa3e5f3ec12..a9e3f2788aa7640bab676fd211abbadd0c9e11ef 100644 (file)
@@ -5,6 +5,9 @@ if(RUN_IN_PLACE)
        add_definitions ( -DRUN_IN_PLACE )
 endif(RUN_IN_PLACE)
 
+# Use cmake_config.h
+add_definitions ( -DUSE_CMAKE_CONFIG_H )
+
 if(WIN32)
        # Windows
        # Surpress some warnings
@@ -31,8 +34,8 @@ else()
 endif()
 
 configure_file(
-       "${PROJECT_SOURCE_DIR}/config.h.in"
-       "${PROJECT_BINARY_DIR}/config.h"
+       "${PROJECT_SOURCE_DIR}/cmake_config.h.in"
+       "${PROJECT_BINARY_DIR}/cmake_config.h"
 )
 
 set(minetest_SRCS
@@ -140,7 +143,7 @@ if(MSVC)
        # Visual Studio
 
        # EHa enables SEH exceptions (used for catching segfaults)
-       set(CMAKE_CXX_FLAGS_RELEASE "/EHa /MD /O2 /Ob2 /Oi /Ot /Oy /GL /FD /MT /GS- /arch:SSE /fp:fast")
+       set(CMAKE_CXX_FLAGS_RELEASE "/EHa /MD /O2 /Ob2 /Oi /Ot /Oy /GL /FD /MT /GS- /arch:SSE /fp:fast /D NDEBUG")
        set(CMAKE_CXX_FLAGS_DEBUG "/MDd /Zi /Ob0 /Od /RTC1")
        
        if(BUILD_SERVER)
diff --git a/src/cmake_config.h.in b/src/cmake_config.h.in
new file mode 100644 (file)
index 0000000..8635b4f
--- /dev/null
@@ -0,0 +1,16 @@
+// Filled in by the build system
+
+#ifndef CMAKE_CONFIG_H
+#define CMAKE_CONFIG_H
+
+#define INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
+#define VERSION_STRING "@VERSION_STRING@"
+#ifdef NDEBUG
+       #define BUILD_TYPE "Release"
+#else
+       #define BUILD_TYPE "Debug"
+#endif
+#define BUILD_INFO "VER="VERSION_STRING" BUILD_DATE=@BUILD_DATE@ RUN_IN_PLACE=@RUN_IN_PLACE@ INSTALL_PREFIX=@CMAKE_INSTALL_PREFIX@ BUILD_TYPE="BUILD_TYPE
+
+#endif
+
diff --git a/src/config.h b/src/config.h
new file mode 100644 (file)
index 0000000..b24cf6a
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+       If CMake is used, includes the cmake-generated cmake_config.h.
+       Otherwise use default values
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#ifdef USE_CMAKE_CONFIG_H
+       #include "cmake_config.h"
+#else
+       //#define INSTALL_PREFIX ""
+       #define VERSION_STRING "unknown"
+       #ifdef NDEBUG
+               #define BUILD_TYPE "Release"
+       #else
+               #define BUILD_TYPE "Debug"
+       #endif
+       #ifdef RUN_IN_PLACE
+               #define RUN_IN_PLACE_BOOLSTRING "1"
+       #else
+               #define RUN_IN_PLACE_BOOLSTRING "0"
+       #endif
+       #define BUILD_INFO "NON-CMAKE RUN_IN_PLACE="RUN_IN_PLACE_BOOLSTRING" BUILD_TYPE="BUILD_TYPE
+#endif
+
+#endif
+
diff --git a/src/config.h.in b/src/config.h.in
deleted file mode 100644 (file)
index 42deb4b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Filled in by the build system
-
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#define INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
-#define VERSION_STRING "@VERSION_STRING@"
-#ifdef NDEBUG
-       #define BUILD_TYPE "Release"
-#else
-       #define BUILD_TYPE "Debug"
-#endif
-#define BUILD_INFO "VER="VERSION_STRING" BUILD_DATE=@BUILD_DATE@ RUN_IN_PLACE=@RUN_IN_PLACE@ INSTALL_PREFIX=@CMAKE_INSTALL_PREFIX@ BUILD_TYPE="BUILD_TYPE
-
-#endif
-
index 69c6dfd675ef436ae29fb0d4aeb309a22d71cf18..08a48d6dd2fc0136d30ed01f9f17883a6dfef469 100644 (file)
@@ -151,6 +151,8 @@ TODO: Untie client network operations from framerate
       - Needs some input queues or something\r
          - Not really necessary?\r
 \r
+TODO: Make morning and evening shorter\r
+\r
 Server:\r
 \r
 TODO: When player dies, throw items on map\r