$ ./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:
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/
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/
OmitFramePointers="true"\r
WholeProgramOptimization="true"\r
AdditionalIncludeDirectories=""C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include";"..\jthread\jthread-1.2.1\src";"..\irrlicht\irrlicht-1.7.1\include";"..\zlib\zlib-1.2.5""\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
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
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
# 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)
--- /dev/null
+// 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
+
--- /dev/null
+/*
+ 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
+
+++ /dev/null
-// 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
-
- 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