aboutsummaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/Auth/CMakeLists.txt17
-rw-r--r--src/shared/CMakeLists.txt29
-rw-r--r--src/shared/Config/CMakeLists.txt15
-rw-r--r--src/shared/Database/CMakeLists.txt38
-rw-r--r--src/shared/Makefile.am3
-rw-r--r--src/shared/SystemConfig.h22
-rw-r--r--src/shared/SystemConfig.h.in2
-rw-r--r--src/shared/WheatyExceptionReport.cpp33
-rw-r--r--src/shared/revision.h.in4
-rw-r--r--src/shared/vmap/CMakeLists.txt35
10 files changed, 180 insertions, 18 deletions
diff --git a/src/shared/Auth/CMakeLists.txt b/src/shared/Auth/CMakeLists.txt
new file mode 100644
index 00000000000..f0714509e1d
--- /dev/null
+++ b/src/shared/Auth/CMakeLists.txt
@@ -0,0 +1,17 @@
+
+########### next target ###############
+
+SET(trinityauth_STAT_SRCS
+ AuthCrypt.cpp
+ AuthCrypt.h
+ BigNumber.cpp
+ BigNumber.h
+ Hmac.cpp
+ Hmac.h
+ Sha1.cpp
+ Sha1.h
+ md5.c
+ md5.h
+)
+
+add_library(trinityauth STATIC ${trinityauth_STAT_SRCS})
diff --git a/src/shared/CMakeLists.txt b/src/shared/CMakeLists.txt
new file mode 100644
index 00000000000..006fa284c5d
--- /dev/null
+++ b/src/shared/CMakeLists.txt
@@ -0,0 +1,29 @@
+
+add_subdirectory(vmap)
+add_subdirectory(Auth)
+add_subdirectory(Config)
+add_subdirectory(Database)
+
+########### next target ###############
+
+SET(shared_STAT_SRCS
+ Base.cpp
+ Base.h
+ ByteBuffer.h
+ Common.cpp
+ Common.h
+ Errors.h
+ Log.cpp
+ Log.h
+ Mthread.cpp
+ Mthread.h
+ ProgressBar.cpp
+ ProgressBar.h
+ Timer.h
+ Util.cpp
+ Util.h
+ WorldPacket.h
+ SystemConfig.h
+)
+
+add_library(shared STATIC ${shared_STAT_SRCS})
diff --git a/src/shared/Config/CMakeLists.txt b/src/shared/Config/CMakeLists.txt
new file mode 100644
index 00000000000..54c3d80b869
--- /dev/null
+++ b/src/shared/Config/CMakeLists.txt
@@ -0,0 +1,15 @@
+
+########### next target ###############
+
+SET(trinityconfig_STAT_SRCS
+ dotconfpp/dotconfpp.cpp
+ dotconfpp/dotconfpp.h
+ dotconfpp/mempool.cpp
+ dotconfpp/mempool.h
+ Config.cpp
+ Config.h
+ ConfigEnv.h
+)
+
+add_library(trinityconfig STATIC ${trinityconfig_STAT_SRCS})
+
diff --git a/src/shared/Database/CMakeLists.txt b/src/shared/Database/CMakeLists.txt
new file mode 100644
index 00000000000..a819a66dec7
--- /dev/null
+++ b/src/shared/Database/CMakeLists.txt
@@ -0,0 +1,38 @@
+SET(trinitydatabase_STAT_SRCS
+ DBCStores.cpp
+ DBCStores.h
+ DBCStructure.h
+ DBCfmt.cpp
+ Database.cpp
+ Database.h
+ DatabaseEnv.h
+ DatabaseImpl.h
+ DatabaseMysql.cpp
+ DatabasePostgre.cpp
+ DatabaseMysql.h
+ DatabasePostgre.h
+ DatabaseSqlite.cpp
+ DatabaseSqlite.h
+#Brian likes men
+ Field.cpp
+ Field.h
+ MySQLDelayThread.h
+ PGSQLDelayThread.h
+ QueryResult.h
+ QueryResultMysql.cpp
+ QueryResultMysql.h
+ QueryResultPostgre.cpp
+ QueryResultPostgre.h
+ QueryResultSqlite.cpp
+ QueryResultSqlite.h
+ SQLStorage.cpp
+ SQLStorage.h
+ SqlDelayThread.cpp
+ SqlDelayThread.h
+ SqlOperations.cpp
+ SqlOperations.h
+ dbcfile.cpp
+ dbcfile.h
+)
+
+add_library(trinitydatabase STATIC ${trinitydatabase_STAT_SRCS})
diff --git a/src/shared/Makefile.am b/src/shared/Makefile.am
index 4862253a8e1..dcb13ab78c0 100644
--- a/src/shared/Makefile.am
+++ b/src/shared/Makefile.am
@@ -50,8 +50,10 @@ libmangosshared_a_SOURCES = \
WorldPacket.h \
revision_nr.h \
revision.h
+$(srcdir)/revision.h
# Get revision (git or svn)
+# Get HG revision
REVISION_FILE = revision.h
BUILT_SOURCES = $(REVISION_FILE)
@@ -61,6 +63,7 @@ FORCE:
$(REVISION_FILE) : $(top_builddir)/src/tools/genrevision/genrevision FORCE
$(top_builddir)/src/tools/genrevision/genrevision $(top_srcdir)
+ cp $(top_builddir)/src/shared/revision.h $(top_srcdir)/src/shared
## Additional files to include when running 'make dist'
# Disabled packet logger
diff --git a/src/shared/SystemConfig.h b/src/shared/SystemConfig.h
index 262aa9e6355..aeb38891c11 100644
--- a/src/shared/SystemConfig.h
+++ b/src/shared/SystemConfig.h
@@ -25,9 +25,27 @@
#define TRINITY_SYSTEMCONFIG_H
#include "Platform/Define.h"
+#include "revision.h" //-----here u are ------ _REVISION is the magic key
-// THIS IS TEMP :)
-#define _FULLVERSION "Trinity"
+
+#define _PACKAGENAME "TrinityCore "
+#define _CODENAME "YUME"
+
+#if TRINITY_ENDIAN == TRINITY_BIGENDIAN
+# define _ENDIAN_STRING "big-endian"
+#else
+# define _ENDIAN_STRING "little-endian"
+#endif
+
+#if PLATFORM == PLATFORM_WINDOWS
+# ifdef _WIN64
+# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " (Win64," _ENDIAN_STRING ")"
+# else
+# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " (Win32," _ENDIAN_STRING ")"
+# endif
+#else
+# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " (Unix," _ENDIAN_STRING ")"
+#endif
#define DEFAULT_PLAYER_LIMIT 100
#define DEFAULT_WORLDSERVER_PORT 8085 //8129
diff --git a/src/shared/SystemConfig.h.in b/src/shared/SystemConfig.h.in
index c8349805401..189a7270e1c 100644
--- a/src/shared/SystemConfig.h.in
+++ b/src/shared/SystemConfig.h.in
@@ -27,6 +27,7 @@
#endif
#include "Platform/Define.h"
+#include "revision.h" //-----here u are ------ _REVISION is the magic key
#ifndef _VERSION
#if PLATFORM == PLATFORM_WINDOWS
@@ -70,7 +71,6 @@
# define _REALMD_CONFIG SYSCONFDIR"realmd.conf"
#endif
-#define _FULLVERSION "Trinity"
#define DEFAULT_PLAYER_LIMIT 100
#define DEFAULT_WORLDSERVER_PORT 8085 //8129
diff --git a/src/shared/WheatyExceptionReport.cpp b/src/shared/WheatyExceptionReport.cpp
index 6a4276cca0f..5aa4a19d583 100644
--- a/src/shared/WheatyExceptionReport.cpp
+++ b/src/shared/WheatyExceptionReport.cpp
@@ -14,6 +14,8 @@
#define _NO_CVCONST_H
#include <dbghelp.h>
#include "WheatyExceptionReport.h"
+#include "SystemConfig.h"
+#include "revision.h"
#define CrashFolder _T("Crashes")
//#pragma comment(linker, "/defaultlib:dbghelp.lib")
@@ -329,22 +331,22 @@ void WheatyExceptionReport::PrintSystemInfo()
//===========================================================================
void WheatyExceptionReport::printTracesForAllThreads()
{
- HANDLE hThreadSnap = INVALID_HANDLE_VALUE;
- THREADENTRY32 te32;
-
+ HANDLE hThreadSnap = INVALID_HANDLE_VALUE;
+ THREADENTRY32 te32;
+
DWORD dwOwnerPID = GetCurrentProcessId();
m_hProcess = GetCurrentProcess();
- // Take a snapshot of all running threads
- hThreadSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
- if( hThreadSnap == INVALID_HANDLE_VALUE )
- return;
-
- // Fill in the size of the structure before using it.
- te32.dwSize = sizeof(THREADENTRY32 );
-
+ // Take a snapshot of all running threads
+ hThreadSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
+ if( hThreadSnap == INVALID_HANDLE_VALUE )
+ return;
+
+ // Fill in the size of the structure before using it.
+ te32.dwSize = sizeof(THREADENTRY32 );
+
// Retrieve information about the first thread,
// and exit if unsuccessful
- if( !Thread32First( hThreadSnap, &te32 ) )
+ if( !Thread32First( hThreadSnap, &te32 ) )
{
CloseHandle( hThreadSnap ); // Must clean up the
// snapshot object!
@@ -354,8 +356,8 @@ void WheatyExceptionReport::printTracesForAllThreads()
// Now walk the thread list of the system,
// and display information about each thread
// associated with the specified process
- do
- {
+ do
+ {
if( te32.th32OwnerProcessID == dwOwnerPID )
{
CONTEXT context;
@@ -367,7 +369,7 @@ void WheatyExceptionReport::printTracesForAllThreads()
}
CloseHandle(threadHandle);
}
- } while( Thread32Next(hThreadSnap, &te32 ) );
+ } while( Thread32Next(hThreadSnap, &te32 ) );
// Don't forget to clean up the snapshot object.
CloseHandle( hThreadSnap );
@@ -385,6 +387,7 @@ PEXCEPTION_POINTERS pExceptionInfo )
GetLocalTime(&systime);
// Start out with a banner
+ _tprintf(_T("Revision: %s\r\n"), _FULLVERSION);
_tprintf(_T("Date %u:%u:%u. Time %u:%u \r\n"), systime.wDay, systime.wMonth, systime.wYear, systime.wHour, systime.wMinute);
PEXCEPTION_RECORD pExceptionRecord = pExceptionInfo->ExceptionRecord;
diff --git a/src/shared/revision.h.in b/src/shared/revision.h.in
new file mode 100644
index 00000000000..a84170529eb
--- /dev/null
+++ b/src/shared/revision.h.in
@@ -0,0 +1,4 @@
+#ifndef __SVN_REVISION_H__
+#define __SVN_REVISION_H__
+ #define _REVISION "794" //change this to your current revision
+#endif // __SVN_REVISION_H__
diff --git a/src/shared/vmap/CMakeLists.txt b/src/shared/vmap/CMakeLists.txt
new file mode 100644
index 00000000000..9ed30c0b44f
--- /dev/null
+++ b/src/shared/vmap/CMakeLists.txt
@@ -0,0 +1,35 @@
+
+########### next target ###############
+
+SET(vmaps_STAT_SRCS
+ AABSPTree.h
+ BaseModel.cpp
+ BaseModel.h
+ CoordModelMapping.cpp
+ CoordModelMapping.h
+ DebugCmdLogger.cpp
+ DebugCmdLogger.h
+ IVMapManager.h
+ ManagedModelContainer.cpp
+ ManagedModelContainer.h
+ ModelContainer.cpp
+ ModelContainer.h
+ NodeValueAccess.h
+ ShortBox.h
+ ShortVector.h
+ SubModel.cpp
+ SubModel.h
+ TileAssembler.cpp
+ TileAssembler.h
+ TreeNode.cpp
+ TreeNode.h
+ VMapDefinitions.h
+ VMapFactory.cpp
+ VMapFactory.h
+ VMapManager.cpp
+ VMapManager.h
+ VMapTools.h
+)
+
+add_library(vmaps STATIC ${vmaps_STAT_SRCS})
+