mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core: Add support for compiling core in a cygwin-environment
- rename/readd/add G3D-patches - give a history on the changes (some G3D-changes didn't even HAVE a patch - boo!) DON'T MESS ABOUT WITH CHANGING DEP/* LIBRARIES AND NOT LEAVING A DIFF IN THE SOURCETRE, MKAY!?
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
diff -urN g3d-beta4/include/G3D/debugAssert.h g3d-mangos/include/G3D/debugAssert.h
|
||||
--- g3d-beta4/include/G3D/debugAssert.h 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ g3d-mangos/include/G3D/debugAssert.h 2010-08-26 21:36:32.000000000 +0200
|
||||
diff -urN a/dep/g3dlite/include/G3D/debugAssert.h b/dep/g3dlite/include/G3D/debugAssert.h
|
||||
--- a/dep/g3dlite/include/G3D/debugAssert.h 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ b/dep/g3dlite/include/G3D/debugAssert.h 2010-08-26 21:36:32.000000000 +0200
|
||||
@@ -39,10 +39,12 @@
|
||||
#ifdef G3D_LINUX
|
||||
// Needed so we can define a global display
|
||||
@@ -30,9 +30,9 @@ diff -urN g3d-beta4/include/G3D/debugAssert.h g3d-mangos/include/G3D/debugAssert
|
||||
|
||||
/**
|
||||
Pops up an assertion dialog or prints an assertion
|
||||
diff -urN g3d-beta4/include/G3D/g3dmath.h g3d-mangos/include/G3D/g3dmath.h
|
||||
--- g3d-beta4/include/G3D/g3dmath.h 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ g3d-mangos/include/G3D/g3dmath.h 2010-08-26 21:36:32.000000000 +0200
|
||||
diff -urN a/dep/g3dlite/include/G3D/g3dmath.h b/dep/g3dlite/include/G3D/g3dmath.h
|
||||
--- a/dep/g3dlite/include/G3D/g3dmath.h 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ b/dep/g3dlite/include/G3D/g3dmath.h 2010-08-26 21:36:32.000000000 +0200
|
||||
@@ -65,6 +65,8 @@
|
||||
return ::rand() / double(RAND_MAX);
|
||||
}
|
||||
@@ -62,9 +62,9 @@ diff -urN g3d-beta4/include/G3D/g3dmath.h g3d-mangos/include/G3D/g3dmath.h
|
||||
#endif
|
||||
|
||||
|
||||
diff -urN g3d-beta4/include/G3D/platform.h g3d-mangos/include/G3D/platform.h
|
||||
--- g3d-beta4/include/G3D/platform.h 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ g3d-mangos/include/G3D/platform.h 2010-08-26 21:36:32.000000000 +0200
|
||||
diff -urN a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h
|
||||
--- a/dep/g3dlite/include/G3D/platform.h 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ b/dep/g3dlite/include/G3D/platform.h 2010-08-26 21:36:32.000000000 +0200
|
||||
@@ -56,12 +57,15 @@
|
||||
// pi as a constant, which creates a conflict with G3D
|
||||
#define __FP__
|
||||
@@ -97,9 +97,9 @@ diff -urN g3d-beta4/include/G3D/platform.h g3d-mangos/include/G3D/platform.h
|
||||
|
||||
/** @def G3D_CHECK_PRINTF_METHOD_ARGS()
|
||||
Enables printf parameter validation on gcc. */
|
||||
diff -urN g3d-beta4/include/G3D/System.h g3d-mangos/include/G3D/System.h
|
||||
--- g3d-beta4/include/G3D/System.h 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ g3d-mangos/include/G3D/System.h 2010-08-26 21:36:32.000000000 +0200
|
||||
diff -urN a/dep/g3dlite/include/G3D/System.h b/dep/g3dlite/include/G3D/System.h
|
||||
--- a/dep/g3dlite/include/G3D/System.h 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ b/dep/g3dlite/include/G3D/System.h 2010-08-26 21:36:32.000000000 +0200
|
||||
@@ -375,10 +375,10 @@
|
||||
// count now contains the cycle count for the intervening operation.
|
||||
</PRE>
|
||||
@@ -141,9 +141,9 @@ diff -urN g3d-beta4/include/G3D/System.h g3d-mangos/include/G3D/System.h
|
||||
|
||||
} // namespace
|
||||
|
||||
diff -urN g3d-beta4/source/BinaryInput.cpp g3d-mangos/source/BinaryInput.cpp
|
||||
--- g3d-beta4/source/BinaryInput.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ g3d-mangos/source/BinaryInput.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
diff -urN a/dep/g3dlite/source/BinaryInput.cpp b/dep/g3dlite/source/BinaryInput.cpp
|
||||
--- a/dep/g3dlite/source/BinaryInput.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ b/dep/g3dlite/source/BinaryInput.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
@@ -39,7 +39,9 @@
|
||||
#include "G3D/Log.h"
|
||||
#include "G3D/FileSystem.h"
|
||||
@@ -171,9 +171,9 @@ diff -urN g3d-beta4/source/BinaryInput.cpp g3d-mangos/source/BinaryInput.cpp
|
||||
|
||||
// Figure out how big the file is and verify that it exists.
|
||||
m_length = FileSystem::size(m_filename);
|
||||
diff -urN g3d-beta4/source/debugAssert.cpp g3d-mangos/source/debugAssert.cpp
|
||||
--- g3d-beta4/source/debugAssert.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ g3d-mangos/source/debugAssert.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
diff -urN a/dep/g3dlite/source/debugAssert.cpp b/dep/g3dlite/source/debugAssert.cpp
|
||||
--- a/dep/g3dlite/source/debugAssert.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ b/dep/g3dlite/source/debugAssert.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
@@ -37,9 +37,11 @@
|
||||
AssertionHook _failureHook = _handleErrorCheck_;
|
||||
|
||||
@@ -202,9 +202,9 @@ diff -urN g3d-beta4/source/debugAssert.cpp g3d-mangos/source/debugAssert.cpp
|
||||
#elif defined(G3D_OSX)
|
||||
// TODO: OS X
|
||||
#endif
|
||||
diff -urN g3d-beta4/source/FileSystem.cpp g3d-mangos/source/FileSystem.cpp
|
||||
--- g3d-beta4/source/FileSystem.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ g3d-mangos/source/FileSystem.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
diff -urN a/dep/g3dlite/source/FileSystem.cpp b/dep/g3dlite/source/FileSystem.cpp
|
||||
--- a/dep/g3dlite/source/FileSystem.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ b/dep/g3dlite/source/FileSystem.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
@@ -12,7 +12,9 @@
|
||||
#include "G3D/fileutils.h"
|
||||
#include <sys/stat.h>
|
||||
@@ -252,9 +252,9 @@ diff -urN g3d-beta4/source/FileSystem.cpp g3d-mangos/source/FileSystem.cpp
|
||||
}
|
||||
|
||||
return st.st_size;
|
||||
diff -urN g3d-beta4/source/fileutils.cpp g3d-mangos/source/fileutils.cpp
|
||||
--- g3d-beta4/source/fileutils.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ g3d-mangos/source/fileutils.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
diff -urN a/dep/g3dlite/source/fileutils.cpp b/dep/g3dlite/source/fileutils.cpp
|
||||
--- a/dep/g3dlite/source/fileutils.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ b/dep/g3dlite/source/fileutils.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
@@ -20,7 +20,9 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
@@ -368,9 +368,9 @@ diff -urN g3d-beta4/source/fileutils.cpp g3d-mangos/source/fileutils.cpp
|
||||
}
|
||||
|
||||
|
||||
diff -urN g3d-beta4/source/prompt.cpp g3d-mangos/source/prompt.cpp
|
||||
--- g3d-beta4/source/prompt.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ g3d-mangos/source/prompt.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
diff -urN a/dep/g3dlite/source/prompt.cpp b/dep/g3dlite/source/prompt.cpp
|
||||
--- a/dep/g3dlite/source/prompt.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ b/dep/g3dlite/source/prompt.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
@@ -21,6 +21,7 @@
|
||||
# define _getch getchar
|
||||
#endif
|
||||
@@ -433,9 +433,9 @@ diff -urN g3d-beta4/source/prompt.cpp g3d-mangos/source/prompt.cpp
|
||||
return textPrompt(windowTitle, prompt, choice, numChoices);
|
||||
}
|
||||
|
||||
diff -urN g3d-beta4/source/RegistryUtil.cpp g3d-mangos/source/RegistryUtil.cpp
|
||||
--- g3d-beta4/source/RegistryUtil.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ g3d-mangos/source/RegistryUtil.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
diff -urN a/dep/g3dlite/source/RegistryUtil.cpp b/dep/g3dlite/source/RegistryUtil.cpp
|
||||
--- a/dep/g3dlite/source/RegistryUtil.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ b/dep/g3dlite/source/RegistryUtil.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
@@ -257,7 +257,7 @@
|
||||
|
||||
|
||||
@@ -445,9 +445,9 @@ diff -urN g3d-beta4/source/RegistryUtil.cpp g3d-mangos/source/RegistryUtil.cpp
|
||||
debugAssert(str);
|
||||
|
||||
if (str) {
|
||||
diff -urN g3d-beta4/source/System.cpp g3d-mangos/source/System.cpp
|
||||
--- g3d-beta4/source/System.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ g3d-mangos/source/System.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
diff -urN a/dep/g3dlite/source/System.cpp b/dep/g3dlite/source/System.cpp
|
||||
--- a/dep/g3dlite/source/System.cpp 2010-02-07 23:39:20.000000000 +0100
|
||||
+++ b/dep/g3dlite/source/System.cpp 2010-08-15 11:37:26.000000000 +0200
|
||||
@@ -80,8 +80,9 @@
|
||||
#endif
|
||||
|
||||
14
dep/g3dlite/G3D-v8.0_hotfix2.diff
Normal file
14
dep/g3dlite/G3D-v8.0_hotfix2.diff
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git a/dep/g3dlite/source/g3dmath.cpp b/dep/g3dlite/source/g3dmath.cpp
|
||||
index e846f8c..84e8345 100644
|
||||
--- a/dep/g3dlite/source/g3dmath.cpp
|
||||
+++ b/dep/g3dlite/source/g3dmath.cpp
|
||||
@@ -41,7 +41,7 @@ double inf() {
|
||||
}
|
||||
|
||||
bool isNaN(float x) {
|
||||
- static const float n = nan();
|
||||
+ static const float n = fnan();
|
||||
return memcmp(&x, &n, sizeof(float)) == 0;
|
||||
}
|
||||
|
||||
|
||||
12
dep/g3dlite/G3D-v8.0_hotfix3.diff
Normal file
12
dep/g3dlite/G3D-v8.0_hotfix3.diff
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/dep/g3dlite/include/G3D/GMutex.h b/dep/g3dlite/include/G3D/GMutex.h
|
||||
index 3469b81..9fe098d 100644
|
||||
--- a/dep/g3dlite/include/G3D/GMutex.h
|
||||
+++ b/dep/g3dlite/include/G3D/GMutex.h
|
||||
@@ -16,6 +16,7 @@
|
||||
#ifndef G3D_WIN32
|
||||
# include <pthread.h>
|
||||
# include <signal.h>
|
||||
+# include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
diff --git a/dep/g3dlite/include/G3D/GMutex.h b/dep/g3dlite/include/G3D/GMutex.h
|
||||
index 3469b81..9fe098d 100644
|
||||
--- a/dep/g3dlite/include/G3D/GMutex.h
|
||||
+++ b/dep/g3dlite/include/G3D/GMutex.h
|
||||
@@ -16,6 +16,7 @@
|
||||
#ifndef G3D_WIN32
|
||||
# include <pthread.h>
|
||||
# include <signal.h>
|
||||
+# include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h
|
||||
index c8d2f0b..11093f4 100644
|
||||
--- a/dep/g3dlite/include/G3D/platform.h
|
||||
71
dep/g3dlite/G3D-v8.0_hotfix5.diff
Normal file
71
dep/g3dlite/G3D-v8.0_hotfix5.diff
Normal file
@@ -0,0 +1,71 @@
|
||||
diff --git a/dep/g3dlite/include/G3D/System.h b/dep/g3dlite/include/G3D/System.h
|
||||
index 1c0cf99..f160774 100644
|
||||
--- a/dep/g3dlite/include/G3D/System.h
|
||||
+++ b/dep/g3dlite/include/G3D/System.h
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "G3D/G3DGameUnits.h"
|
||||
#include "G3D/BinaryFormat.h"
|
||||
#include <string>
|
||||
+#include <sys/socket.h>
|
||||
|
||||
#ifdef G3D_OSX
|
||||
# include <CoreServices/CoreServices.h>
|
||||
diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h
|
||||
index 11093f4..614c0ed 100644
|
||||
--- a/dep/g3dlite/include/G3D/platform.h
|
||||
+++ b/dep/g3dlite/include/G3D/platform.h
|
||||
@@ -56,6 +56,8 @@
|
||||
#define G3D_LINUX
|
||||
#elif defined(__linux__)
|
||||
#define G3D_LINUX
|
||||
+#elif defined(__CYGWIN__)
|
||||
+ #define G3D_LINUX
|
||||
#elif defined(__APPLE__)
|
||||
#define G3D_LINUX
|
||||
|
||||
diff --git a/dep/g3dlite/source/BinaryOutput.cpp b/dep/g3dlite/source/BinaryOutput.cpp
|
||||
index 054211d..81fa982 100644
|
||||
--- a/dep/g3dlite/source/BinaryOutput.cpp
|
||||
+++ b/dep/g3dlite/source/BinaryOutput.cpp
|
||||
@@ -22,6 +22,10 @@
|
||||
# include <errno.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __CYGWIN__
|
||||
+# include <errno.h>
|
||||
+#endif
|
||||
+
|
||||
// Largest memory buffer that the system will use for writing to
|
||||
// disk. After this (or if the system runs out of memory)
|
||||
// chunks of the file will be dumped to disk.
|
||||
diff --git a/dep/g3dlite/source/FileSystem.cpp b/dep/g3dlite/source/FileSystem.cpp
|
||||
index 2cf890a..76a3611 100644
|
||||
--- a/dep/g3dlite/source/FileSystem.cpp
|
||||
+++ b/dep/g3dlite/source/FileSystem.cpp
|
||||
@@ -35,6 +35,10 @@
|
||||
# define _stat stat
|
||||
#endif
|
||||
|
||||
+#ifdef __CYGWIN__
|
||||
+#define stat64 stat
|
||||
+#endif
|
||||
+
|
||||
namespace G3D {
|
||||
|
||||
static FileSystem* common = NULL;
|
||||
diff --git a/dep/g3dlite/source/System.cpp b/dep/g3dlite/source/System.cpp
|
||||
index 809f05c..f6b0e03 100644
|
||||
--- a/dep/g3dlite/source/System.cpp
|
||||
+++ b/dep/g3dlite/source/System.cpp
|
||||
@@ -888,7 +888,11 @@ void System::initTime() {
|
||||
|
||||
if (localTimeVals) {
|
||||
// tm_gmtoff is already corrected for daylight savings.
|
||||
+ #ifdef __CYGWIN__
|
||||
+ local = local + _timezone;
|
||||
+ #else
|
||||
local = local + localTimeVals->tm_gmtoff;
|
||||
+ #endif
|
||||
}
|
||||
|
||||
m_realWorldGetTickTime0 = local;
|
||||
@@ -1,3 +1,8 @@
|
||||
Due to issues with G3D (normally requiring X11 and the ZIP-library), the
|
||||
sourcetree version contains a modified version. The applied patch is
|
||||
commited to the repository for future reference.
|
||||
Due to issues with G3D normally requiring X11 and the ZIP-library, the library version in this sourcetree contains a modified version.
|
||||
The applied patches are added as .diff-files to the repository for future reference (knowing what was changed is quite handy).
|
||||
|
||||
G3D-v8.0_hotfix1.diff - 2010-08-27 - remove dependency on zip/z11 libraries, add support for 64-bit arch
|
||||
G3D-v8.0_hotfix2.diff - 2012-01-14 - fix typo in isNaN(float x)
|
||||
G3D-v8.0_hotfix3.diff - 2012-08-26 - fix compilation on Fedora Linux
|
||||
G3D-v8.0_hotfix4.diff - 2012-11-09 - fix compilation on OSX
|
||||
G3D-v8.0_hotfix5.diff - 2013-02-27 - fix compilation in cygwin environments
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "G3D/G3DGameUnits.h"
|
||||
#include "G3D/BinaryFormat.h"
|
||||
#include <string>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#ifdef G3D_OSX
|
||||
# include <CoreServices/CoreServices.h>
|
||||
|
||||
@@ -56,6 +56,8 @@
|
||||
#define G3D_LINUX
|
||||
#elif defined(__linux__)
|
||||
#define G3D_LINUX
|
||||
#elif defined(__CYGWIN__)
|
||||
#define G3D_LINUX
|
||||
#elif defined(__APPLE__)
|
||||
#define G3D_LINUX
|
||||
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
# include <errno.h>
|
||||
#endif
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
# include <errno.h>
|
||||
#endif
|
||||
|
||||
// Largest memory buffer that the system will use for writing to
|
||||
// disk. After this (or if the system runs out of memory)
|
||||
// chunks of the file will be dumped to disk.
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
# define _stat stat
|
||||
#endif
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
#define stat64 stat
|
||||
#endif
|
||||
|
||||
namespace G3D {
|
||||
|
||||
static FileSystem* common = NULL;
|
||||
|
||||
@@ -888,7 +888,11 @@ void System::initTime() {
|
||||
|
||||
if (localTimeVals) {
|
||||
// tm_gmtoff is already corrected for daylight savings.
|
||||
#ifdef __CYGWIN__
|
||||
local = local + _timezone;
|
||||
#else
|
||||
local = local + localTimeVals->tm_gmtoff;
|
||||
#endif
|
||||
}
|
||||
|
||||
m_realWorldGetTickTime0 = local;
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#if defined __APPLE__
|
||||
#define isnan std::isnan
|
||||
#elif defined __CYGWIN__
|
||||
#define isnan std::isnan
|
||||
#elif defined _MSC_VER
|
||||
#define isnan _isnan
|
||||
#endif
|
||||
|
||||
@@ -170,7 +170,7 @@ enum LocaleConstant
|
||||
};
|
||||
|
||||
const uint8 TOTAL_LOCALES = 9;
|
||||
const LocaleConstant DEFAULT_LOCALE = LOCALE_enUS;
|
||||
#define DEFAULT_LOCALE LOCALE_enUS
|
||||
|
||||
#define MAX_LOCALES 8
|
||||
#define MAX_ACCOUNT_TUTORIAL_VALUES 8
|
||||
|
||||
Reference in New Issue
Block a user