summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct1
-rw-r--r--modules/enet/SCsub27
-rw-r--r--modules/enet/config.py7
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp28
-rw-r--r--modules/enet/networked_multiplayer_enet.h28
-rw-r--r--platform/x11/detect.py3
-rw-r--r--thirdparty/README.md17
-rw-r--r--thirdparty/enet/LICENSE7
-rw-r--r--thirdparty/enet/callbacks.c (renamed from modules/enet/callbacks.c)0
-rw-r--r--thirdparty/enet/compress.c (renamed from modules/enet/compress.c)0
-rw-r--r--thirdparty/enet/enet/callbacks.h (renamed from modules/enet/enet/callbacks.h)0
-rw-r--r--thirdparty/enet/enet/enet.h (renamed from modules/enet/enet/enet.h)0
-rw-r--r--thirdparty/enet/enet/list.h (renamed from modules/enet/enet/list.h)0
-rw-r--r--thirdparty/enet/enet/protocol.h (renamed from modules/enet/enet/protocol.h)0
-rw-r--r--thirdparty/enet/enet/time.h (renamed from modules/enet/enet/time.h)0
-rw-r--r--thirdparty/enet/enet/types.h (renamed from modules/enet/enet/types.h)0
-rw-r--r--thirdparty/enet/enet/unix.h (renamed from modules/enet/enet/unix.h)0
-rw-r--r--thirdparty/enet/enet/utility.h (renamed from modules/enet/enet/utility.h)0
-rw-r--r--thirdparty/enet/enet/win32.h (renamed from modules/enet/enet/win32.h)0
-rw-r--r--thirdparty/enet/host.c (renamed from modules/enet/host.c)0
-rw-r--r--thirdparty/enet/list.c (renamed from modules/enet/list.c)0
-rw-r--r--thirdparty/enet/packet.c (renamed from modules/enet/packet.c)0
-rw-r--r--thirdparty/enet/peer.c (renamed from modules/enet/peer.c)0
-rw-r--r--thirdparty/enet/protocol.c (renamed from modules/enet/protocol.c)0
-rw-r--r--thirdparty/enet/unix.c (renamed from modules/enet/unix.c)0
-rw-r--r--thirdparty/enet/win32.c (renamed from modules/enet/win32.c)0
26 files changed, 107 insertions, 11 deletions
diff --git a/SConstruct b/SConstruct
index 3f2f1e5b23..19c62a9d15 100644
--- a/SConstruct
+++ b/SConstruct
@@ -135,6 +135,7 @@ opts.Add('etc1','etc1 Texture compression support (yes/no)','yes')
opts.Add('builtin_zlib','Use built-in zlib (yes/no)','yes')
opts.Add('openssl','Use OpenSSL (yes/no/builtin)','no')
opts.Add('musepack','Musepack Audio (yes/no)','yes')
+opts.Add('enet','ENet library (system/builtin)','builtin')
opts.Add("CXX", "C++ Compiler")
opts.Add("CC", "C Compiler")
opts.Add("CCFLAGS", "Custom flags for the C++ compiler");
diff --git a/modules/enet/SCsub b/modules/enet/SCsub
index d2bc8801e4..79231c63e5 100644
--- a/modules/enet/SCsub
+++ b/modules/enet/SCsub
@@ -1,8 +1,27 @@
Import('env')
+Import('env_modules')
-env.add_source_files(env.modules_sources,"*.cpp")
-env.add_source_files(env.modules_sources,"*.c")
-#TODO: Make it possible to build against system enet
-env.Append(CPPPATH = ["#modules/enet"])
+# Thirdparty source files
+if (env["enet"] != "system"): # builtin
+ thirdparty_dir = "#thirdparty/enet/"
+ thirdparty_enet_sources = [
+ "callbacks.c",
+ "compress.c",
+ "host.c",
+ "list.c",
+ "packet.c",
+ "peer.c",
+ "protocol.c",
+ "unix.c",
+ "win32.c",
+ ]
+ thirdparty_enet_sources = [thirdparty_dir + file for file in thirdparty_enet_sources]
+
+ env_modules.add_source_files(env.modules_sources, thirdparty_enet_sources)
+ env_modules.Append(CPPPATH = [thirdparty_dir])
+
+env_modules.add_source_files(env.modules_sources, "*.cpp")
+
+Export('env_modules')
Export('env')
diff --git a/modules/enet/config.py b/modules/enet/config.py
index ea7e83378a..368e97e152 100644
--- a/modules/enet/config.py
+++ b/modules/enet/config.py
@@ -1,11 +1,6 @@
-
def can_build(platform):
- return True
-
+ return True
def configure(env):
pass
-
-
-
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index ac89c0e9e9..b4dfa9c62e 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -1,3 +1,31 @@
+/*************************************************************************/
+/* networked_multiplayer_enet.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
#include "os/os.h"
#include "io/marshalls.h"
#include "networked_multiplayer_enet.h"
diff --git a/modules/enet/networked_multiplayer_enet.h b/modules/enet/networked_multiplayer_enet.h
index f64db4561e..3db318c96a 100644
--- a/modules/enet/networked_multiplayer_enet.h
+++ b/modules/enet/networked_multiplayer_enet.h
@@ -1,3 +1,31 @@
+/*************************************************************************/
+/* networked_multiplayer_enet.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
#ifndef NETWORKED_MULTIPLAYER_ENET_H
#define NETWORKED_MULTIPLAYER_ENET_H
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 98774e8555..10e44976ca 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -149,7 +149,8 @@ def configure(env):
if (env["freetype"]=="yes"):
env.ParseConfig('pkg-config freetype2 --cflags --libs')
-
+ if (env["enet"] == "system"):
+ env.ParseConfig('pkg-config libenet --cflags --libs')
env.Append(CPPFLAGS=['-DOPENGL_ENABLED'])
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 0e512fb867..5c8208b9a5 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -1,6 +1,23 @@
# Third party libraries
+## enet
+
+- Upstream: http://enet.bespin.org
+- Version: 1.3.13
+- License: MIT
+
+Files extracted from upstream source:
+
+- all *.c files in the main directory
+- the include/enet/ folder as enet/
+- LICENSE file
+
+Important: Some files have been modified by Godot developers so that they work
+for all platforms (especially WinRT). Check the diff with the 1.3.13 tarball
+before the next update.
+
+
## jpeg-compressor
- Upstream: https://github.com/richgel999/jpeg-compressor
diff --git a/thirdparty/enet/LICENSE b/thirdparty/enet/LICENSE
new file mode 100644
index 0000000000..39af84a8f6
--- /dev/null
+++ b/thirdparty/enet/LICENSE
@@ -0,0 +1,7 @@
+Copyright (c) 2002-2016 Lee Salzman
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/modules/enet/callbacks.c b/thirdparty/enet/callbacks.c
index b3990af1fb..b3990af1fb 100644
--- a/modules/enet/callbacks.c
+++ b/thirdparty/enet/callbacks.c
diff --git a/modules/enet/compress.c b/thirdparty/enet/compress.c
index 784489a787..784489a787 100644
--- a/modules/enet/compress.c
+++ b/thirdparty/enet/compress.c
diff --git a/modules/enet/enet/callbacks.h b/thirdparty/enet/enet/callbacks.h
index 340a4a9896..340a4a9896 100644
--- a/modules/enet/enet/callbacks.h
+++ b/thirdparty/enet/enet/callbacks.h
diff --git a/modules/enet/enet/enet.h b/thirdparty/enet/enet/enet.h
index 650b199ee5..650b199ee5 100644
--- a/modules/enet/enet/enet.h
+++ b/thirdparty/enet/enet/enet.h
diff --git a/modules/enet/enet/list.h b/thirdparty/enet/enet/list.h
index d7b2600848..d7b2600848 100644
--- a/modules/enet/enet/list.h
+++ b/thirdparty/enet/enet/list.h
diff --git a/modules/enet/enet/protocol.h b/thirdparty/enet/enet/protocol.h
index f8c73d8a66..f8c73d8a66 100644
--- a/modules/enet/enet/protocol.h
+++ b/thirdparty/enet/enet/protocol.h
diff --git a/modules/enet/enet/time.h b/thirdparty/enet/enet/time.h
index c82a546035..c82a546035 100644
--- a/modules/enet/enet/time.h
+++ b/thirdparty/enet/enet/time.h
diff --git a/modules/enet/enet/types.h b/thirdparty/enet/enet/types.h
index ab010a4b13..ab010a4b13 100644
--- a/modules/enet/enet/types.h
+++ b/thirdparty/enet/enet/types.h
diff --git a/modules/enet/enet/unix.h b/thirdparty/enet/enet/unix.h
index a59e340606..a59e340606 100644
--- a/modules/enet/enet/unix.h
+++ b/thirdparty/enet/enet/unix.h
diff --git a/modules/enet/enet/utility.h b/thirdparty/enet/enet/utility.h
index e48a476be3..e48a476be3 100644
--- a/modules/enet/enet/utility.h
+++ b/thirdparty/enet/enet/utility.h
diff --git a/modules/enet/enet/win32.h b/thirdparty/enet/enet/win32.h
index e73ca9d052..e73ca9d052 100644
--- a/modules/enet/enet/win32.h
+++ b/thirdparty/enet/enet/win32.h
diff --git a/modules/enet/host.c b/thirdparty/enet/host.c
index 3be6c0922c..3be6c0922c 100644
--- a/modules/enet/host.c
+++ b/thirdparty/enet/host.c
diff --git a/modules/enet/list.c b/thirdparty/enet/list.c
index 1c1a8dfaaf..1c1a8dfaaf 100644
--- a/modules/enet/list.c
+++ b/thirdparty/enet/list.c
diff --git a/modules/enet/packet.c b/thirdparty/enet/packet.c
index 5fa78b28ae..5fa78b28ae 100644
--- a/modules/enet/packet.c
+++ b/thirdparty/enet/packet.c
diff --git a/modules/enet/peer.c b/thirdparty/enet/peer.c
index e2d0872bd3..e2d0872bd3 100644
--- a/modules/enet/peer.c
+++ b/thirdparty/enet/peer.c
diff --git a/modules/enet/protocol.c b/thirdparty/enet/protocol.c
index 4a2a4ed185..4a2a4ed185 100644
--- a/modules/enet/protocol.c
+++ b/thirdparty/enet/protocol.c
diff --git a/modules/enet/unix.c b/thirdparty/enet/unix.c
index 3138cc04b6..3138cc04b6 100644
--- a/modules/enet/unix.c
+++ b/thirdparty/enet/unix.c
diff --git a/modules/enet/win32.c b/thirdparty/enet/win32.c
index 15edd7acbb..15edd7acbb 100644
--- a/modules/enet/win32.c
+++ b/thirdparty/enet/win32.c