Merge with develop

This commit is contained in:
kaetemi 2015-02-24 12:51:16 +01:00
parent 976415461d
commit fe96d344df
18 changed files with 230 additions and 71 deletions

View file

@ -22,6 +22,21 @@
#ifdef NL_OS_WINDOWS // for win32 os only #ifdef NL_OS_WINDOWS // for win32 os only
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
#ifndef _WIN32_WINDOWS
# define _WIN32_WINDOWS 0x0410
#endif
#ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
#endif
#ifndef WINVER
# define WINVER 0x0400
#endif
#ifndef NOMINMAX
# define NOMINMAX
#endif
#include <windows.h> #include <windows.h>

View file

@ -27,6 +27,21 @@
#include "nel/misc/mem_stream.h" #include "nel/misc/mem_stream.h"
#include "nel/misc/dummy_window.h" #include "nel/misc/dummy_window.h"
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
#ifndef _WIN32_WINDOWS
# define _WIN32_WINDOWS 0x0410
#endif
#ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
#endif
#ifndef WINVER
# define WINVER 0x0400
#endif
#ifndef NOMINMAX
# define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
namespace NLMISC namespace NLMISC

View file

@ -21,8 +21,19 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #ifndef WIN32_LEAN_AND_MEAN
#ifndef NL_COMP_MINGW # define WIN32_LEAN_AND_MEAN
#endif
#ifndef _WIN32_WINDOWS
# define _WIN32_WINDOWS 0x0410
#endif
#ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
#endif
#ifndef WINVER
# define WINVER 0x0400
#endif
#ifndef NOMINMAX
# define NOMINMAX # define NOMINMAX
#endif #endif
#include <windows.h> #include <windows.h>

View file

@ -1,6 +1,176 @@
FILE(GLOB SRC *.cpp *.h config_file/*.cpp config_file/*.h) FILE(GLOB SRC *.cpp *.h config_file/*.cpp config_file/*.h)
FILE(GLOB HEADERS ../../include/nel/misc/*.h) FILE(GLOB HEADERS ../../include/nel/misc/*.h)
FILE(GLOB NLMISC_CDB
cdb.cpp ../../include/nel/misc/cdb.h
cdb_*.cpp ../../include/nel/misc/cdb_*.h
)
FILE(GLOB NLMISC_EVENT
events.cpp ../../include/nel/misc/events.h
event_*.cpp ../../include/nel/misc/event_*.h
*_event_*.cpp ../../include/nel/misc/*_event_*.h
)
FILE(GLOB NLMISC_DEBUG
debug.cpp ../../include/nel/misc/debug.h
report.cpp ../../include/nel/misc/report.h
log.cpp ../../include/nel/misc/log.h
)
FILE(GLOB NLMISC_FILESYSTEM
async_file_manager.cpp ../../include/nel/misc/async_file_manager.h
file.cpp ../../include/nel/misc/file.h
path.cpp ../../include/nel/misc/path.h
big_file.cpp ../../include/nel/misc/big_file.h
*_xml.cpp ../../include/nel/misc/*_xml.h
xml_*.cpp ../../include/nel/misc/xml_*.h
)
FILE(GLOB NLMISC_STREAM
*_stream.cpp ../../include/nel/misc/*_stream.h
stream.cpp ../../include/nel/misc/stream.h
stream_*.cpp ../../include/nel/misc/stream_*.h
)
FILE(GLOB NLMISC_DISPLAYER
displayer.cpp ../../include/nel/misc/displayer.h
*_displayer.cpp ../../include/nel/misc/*_displayer.h
)
FILE(GLOB NLMISC_MATH
plane.cpp ../../include/nel/misc/plane.h
../../include/nel/misc/plane_inline.h
polygon.cpp ../../include/nel/misc/polygon.h
quad.cpp ../../include/nel/misc/quad.h
quat.cpp ../../include/nel/misc/quat.h
rect.cpp ../../include/nel/misc/rect.h
rgba.cpp ../../include/nel/misc/rgba.h
triangle.cpp ../../include/nel/misc/triangle.h
uv.cpp ../../include/nel/misc/uv.h
vector*.cpp ../../include/nel/misc/vector*.h
aabbox.cpp ../../include/nel/misc/aabbox.h
algo.cpp ../../include/nel/misc/algo.h
bsphere.cpp ../../include/nel/misc/bsphere.h
fast_floor.cpp ../../include/nel/misc/fast_floor.h
geom_ext.cpp ../../include/nel/misc/geom_ext.h
line.cpp ../../include/nel/misc/line.h
matrix.cpp ../../include/nel/misc/matrix.h
)
FILE(GLOB NLMISC_PLATFORM
*_nl.cpp ../../include/nel/misc/*_nl.h
common.cpp ../../include/nel/misc/common.h
app_context.cpp ../../include/nel/misc/app_context.h
check_fpu.cpp ../../include/nel/misc/check_fpu.h
cpu_time_stat.cpp ../../include/nel/misc/cpu_time_stat.h
dummy_window.cpp ../../include/nel/misc/dummy_window.h
dynloadlib.cpp ../../include/nel/misc/dynloadlib.h
fast_mem.cpp ../../include/nel/misc/fast_mem.h
inter_window_msg_queue.cpp ../../include/nel/misc/inter_window_msg_queue.h
system_*.cpp ../../include/nel/misc/system_*.h
win32_util.cpp ../../include/nel/misc/win32_util.h
win_tray.cpp ../../include/nel/misc/win_tray.h
)
FILE(GLOB NLMISC_GENERIC
../../include/nel/misc/array_2d.h
*_memory.cpp ../../include/nel/misc/*_memory.h
buf_fifo.cpp ../../include/nel/misc/buf_fifo.h
../../include/nel/misc/callback.h
*_allocator.cpp ../../include/nel/misc/*_allocator.h
../../include/nel/misc/enum_bitset.h
fast_id_map.cpp ../../include/nel/misc/fast_id_map.h
hierarchical_timer.cpp ../../include/nel/misc/hierarchical_timer.h
../../include/nel/misc/historic.h
../../include/nel/misc/mutable_container.h
../../include/nel/misc/random.h
smart_ptr.cpp ../../include/nel/misc/smart_ptr.h
../../include/nel/misc/smart_ptr_inline.h
../../include/nel/misc/resource_ptr.h
../../include/nel/misc/resource_ptr_inline.h
bit_set.cpp ../../include/nel/misc/bit_set.h
stop_watch.cpp ../../include/nel/misc/stop_watch.h
../../include/nel/misc/twin_map.h
object_vector.cpp ../../include/nel/misc/object_vector.h
../../include/nel/misc/singleton.h
speaker_listener.cpp ../../include/nel/misc/speaker_listener.h
../../include/nel/misc/static_map.h
stl_block_list.cpp ../../include/nel/misc/stl_block_list.h
)
FILE(GLOB NLMISC_UTILITY
config_file.cpp ../../include/nel/misc/config_file.h
cf_*.cpp ../../include/nel/misc/cf_*.h
config_file/config_file.cpp config_file/config_file.h
config_file/cf_*.cpp config_file/cf_*.h
class_id.cpp ../../include/nel/misc/class_id.h
class_registry.cpp ../../include/nel/misc/class_registry.h
cmd_args.cpp ../../include/nel/misc/cmd_args.h
command.cpp ../../include/nel/misc/command.h
eid_translator.cpp ../../include/nel/misc/eid_translator.h
entity_id.cpp ../../include/nel/misc/entity_id.h
eval_num_expr.cpp ../../include/nel/misc/eval_num_expr.h
factory.cpp ../../include/nel/misc/factory.h
grid_traversal.cpp ../../include/nel/misc/grid_traversal.h
mouse_smoother.cpp ../../include/nel/misc/mouse_smoother.h
noise_value.cpp ../../include/nel/misc/noise_value.h
progress_callback.cpp ../../include/nel/misc/progress_callback.h
sheet_id.cpp ../../include/nel/misc/sheet_id.h
variable.cpp ../../include/nel/misc/variable.h
value_smoother.cpp ../../include/nel/misc/value_smoother.h
)
FILE(GLOB NLMISC_STRING
string_*.cpp ../../include/nel/misc/string_*.h
../../include/nel/misc/ucstring.h
unicode.cpp
sstring.cpp ../../include/nel/misc/sstring.h
)
FILE(GLOB NLMISC_I18N
diff_tool.cpp ../../include/nel/misc/diff_tool.h
i18n.cpp ../../include/nel/misc/i18n.h
words_dictionary.cpp ../../include/nel/misc/words_dictionary.h
)
FILE(GLOB NLMISC_THREAD
co_task.cpp ../../include/nel/misc/co_task.h
mutex.cpp ../../include/nel/misc/mutex.h
*_thread.cpp ../../include/nel/misc/*_thread.h
task_*.cpp ../../include/nel/misc/task_*.h
reader_writer.cpp ../../include/nel/misc/reader_writer.h
tds.cpp ../../include/nel/misc/tds.h
thread.cpp ../../include/nel/misc/thread.h
)
FILE(GLOB NLMISC_BITMAP
bitmap.cpp ../../include/nel/misc/bitmap.h
bitmap_*.cpp
)
FILE(GLOB NLMISC_CRYPT
md5.cpp ../../include/nel/misc/md5.h
sha1.cpp ../../include/nel/misc/sha1.h
)
SOURCE_GROUP("" FILES ${SRC} ${HEADERS})
SOURCE_GROUP("cdb" FILES ${NLMISC_CDB})
SOURCE_GROUP("event" FILES ${NLMISC_EVENT})
SOURCE_GROUP("debug" FILES ${NLMISC_DEBUG})
SOURCE_GROUP("platform" FILES ${NLMISC_PLATFORM})
SOURCE_GROUP("filesystem" FILES ${NLMISC_FILESYSTEM})
SOURCE_GROUP("stream" FILES ${NLMISC_STREAM})
SOURCE_GROUP("displayer" FILES ${NLMISC_DISPLAYER})
SOURCE_GROUP("math" FILES ${NLMISC_MATH})
SOURCE_GROUP("generic" FILES ${NLMISC_GENERIC})
SOURCE_GROUP("utility" FILES ${NLMISC_UTILITY})
SOURCE_GROUP("bitmap" FILES ${NLMISC_BITMAP})
SOURCE_GROUP("thread" FILES ${NLMISC_THREAD})
SOURCE_GROUP("i18n" FILES ${NLMISC_I18N})
SOURCE_GROUP("crypt" FILES ${NLMISC_CRYPT})
SOURCE_GROUP("string" FILES ${NLMISC_STRING})
NL_TARGET_LIB(nelmisc ${HEADERS} ${SRC}) NL_TARGET_LIB(nelmisc ${HEADERS} ${SRC})
IF(WITH_GTK) IF(WITH_GTK)

View file

@ -43,20 +43,7 @@
#else //NL_USE_THREAD_COTASK #else //NL_USE_THREAD_COTASK
// some platform specifics // some platform specifics
#if defined (NL_OS_WINDOWS) #if defined (NL_OS_WINDOWS)
//# define _WIN32_WINNT 0x0500
# define NL_WIN_CALLBACK CALLBACK # define NL_WIN_CALLBACK CALLBACK
// Visual .NET won't allow Fibers for a Windows version older than 2000. However the basic features are sufficient for us, we want to compile them for all Windows >= 95
# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0400)
# ifdef _WIN32_WINNT
# undef _WIN32_WINNT
# endif
# define _WIN32_WINNT 0x0400
# endif
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
#elif defined (NL_OS_UNIX) #elif defined (NL_OS_UNIX)
# define NL_WIN_CALLBACK # define NL_WIN_CALLBACK
# include <ucontext.h> # include <ucontext.h>

View file

@ -20,10 +20,7 @@
#include "nel/misc/common.h" #include "nel/misc/common.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW # include <ShellAPI.h>
# define NOMINMAX
# endif
# include <windows.h>
# include <io.h> # include <io.h>
# include <tchar.h> # include <tchar.h>
#elif defined NL_OS_UNIX #elif defined NL_OS_UNIX

View file

@ -19,11 +19,7 @@
#include "nel/misc/log.h" #include "nel/misc/log.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <process.h> # include <process.h>
# include <windows.h>
#else #else
# include <unistd.h> # include <unistd.h>
#endif #endif

View file

@ -24,10 +24,6 @@
#include "nel/misc/debug.h" #include "nel/misc/debug.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
# include <imagehlp.h> # include <imagehlp.h>
# pragma comment(lib, "imagehlp.lib") # pragma comment(lib, "imagehlp.lib")
# ifdef NL_OS_WIN64 # ifdef NL_OS_WIN64

View file

@ -25,10 +25,6 @@
#include "nel/misc/xml_pack.h" #include "nel/misc/xml_pack.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
# include <sys/types.h> # include <sys/types.h>
# include <sys/stat.h> # include <sys/stat.h>
# include <direct.h> # include <direct.h>

View file

@ -25,10 +25,6 @@
#include "nel/misc/path.h" #include "nel/misc/path.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
# include <windowsx.h> # include <windowsx.h>
# include <winuser.h> # include <winuser.h>
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS

View file

@ -19,12 +19,7 @@
#include "nel/misc/shared_memory.h" #include "nel/misc/shared_memory.h"
#include "nel/misc/debug.h" #include "nel/misc/debug.h"
#ifdef NL_OS_WINDOWS #ifndef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
#else
# include <sys/types.h> # include <sys/types.h>
# include <sys/ipc.h> # include <sys/ipc.h>
# include <sys/shm.h> # include <sys/shm.h>

View file

@ -42,14 +42,20 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#ifdef _WIN32 #include <nel/misc/types_nl.h>
#ifdef NL_OS_WINDOWS
# define WIN32_LEAN_AND_MEAN
# define _WIN32_WINDOWS 0x0410 # define _WIN32_WINDOWS 0x0410
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
# endif
# ifndef NL_COMP_MINGW # ifndef NL_COMP_MINGW
# define WINVER 0x0400 # define WINVER 0x0400
# define NOMINMAX # define NOMINMAX
# endif # endif
# include <WinSock2.h> # include <WinSock2.h>
# include <windows.h> # include <Windows.h>
#endif #endif
#endif // NL_STDMISC_H #endif // NL_STDMISC_H

View file

@ -19,10 +19,6 @@
#include "nel/misc/system_info.h" #include "nel/misc/system_info.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW
# define NOMINMAX
# endif
# include <windows.h>
# include <WinNT.h> # include <WinNT.h>
# include <tchar.h> # include <tchar.h>
# include <intrin.h> # include <intrin.h>

View file

@ -18,11 +18,7 @@
#include "nel/misc/system_utils.h" #include "nel/misc/system_utils.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#ifndef NL_COMP_MINGW # include <ObjBase.h>
#define NOMINMAX
#endif
#include <windows.h>
# ifdef _WIN32_WINNT_WIN7 # ifdef _WIN32_WINNT_WIN7
// only supported by Windows 7 Platform SDK // only supported by Windows 7 Platform SDK
# include <ShObjIdl.h> # include <ShObjIdl.h>

View file

@ -21,10 +21,7 @@
#include "nel/misc/thread.h" #include "nel/misc/thread.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# ifndef NL_COMP_MINGW # include <MMSystem.h>
# define NOMINMAX
# endif
# include <windows.h>
#elif defined (NL_OS_UNIX) #elif defined (NL_OS_UNIX)
# include <sys/time.h> # include <sys/time.h>
# include <unistd.h> # include <unistd.h>

View file

@ -20,8 +20,6 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#include <windows.h>
#ifdef DEBUG_NEW #ifdef DEBUG_NEW
#define new DEBUG_NEW #define new DEBUG_NEW
#endif #endif

View file

@ -18,10 +18,6 @@
#include "nel/misc/win_displayer.h" #include "nel/misc/win_displayer.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#ifndef NL_COMP_MINGW
# define NOMINMAX
#endif
#include <windows.h>
#include <windowsx.h> #include <windowsx.h>
#include <winuser.h> #include <winuser.h>
#include <cstring> #include <cstring>

View file

@ -22,10 +22,6 @@
#include "nel/misc/event_server.h" #include "nel/misc/event_server.h"
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
#ifndef NL_COMP_MINGW
#define NOMINMAX
#endif
#include <windows.h>
#include <windowsx.h> #include <windowsx.h>
/** /**