Przeglądaj źródła

Moved networking module into the core

Ivan Safrin 13 lat temu
rodzic
commit
634df503e7

+ 2 - 2
Bindings/Scripts/create_lua_library/create_lua_library.py

@@ -87,7 +87,7 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 		if inputPathIsDir:
 		if inputPathIsDir:
 			fileName = "%s/%s" % (inputPath, fileName)
 			fileName = "%s/%s" % (inputPath, fileName)
 		head, tail = os.path.split(fileName)
 		head, tail = os.path.split(fileName)
-		ignore = ["PolyGLSLProgram", "PolyGLSLShader", "PolyGLSLShaderModule", "PolyWinCore", "PolyCocoaCore", "PolyAGLCore", "PolySDLCore", "Poly_iPhone", "PolyGLES1Renderer", "PolyGLRenderer", "tinyxml", "tinystr", "OpenGLCubemap", "PolyiPhoneCore", "PolyGLES1Texture", "PolyGLTexture", "PolyGLVertexBuffer", "PolyThreaded", "PolyGLHeaders", "GLee"]
+		ignore = ["PolyGLSLProgram", "PolyGLSLShader", "PolyGLSLShaderModule", "PolyWinCore", "PolyCocoaCore", "PolyAGLCore", "PolySDLCore", "Poly_iPhone", "PolyGLES1Renderer", "PolyGLRenderer", "tinyxml", "tinystr", "OpenGLCubemap", "PolyiPhoneCore", "PolyGLES1Texture", "PolyGLTexture", "PolyGLVertexBuffer", "PolyThreaded", "PolyGLHeaders", "GLee", "PolyPeer", "PolySocket", "PolyClient", "PolyServer", "PolyServerWorld"]
 		if tail.split(".")[1] == "h" and tail.split(".")[0] not in ignore:
 		if tail.split(".")[1] == "h" and tail.split(".")[0] not in ignore:
 			filteredFiles.append(fileName)
 			filteredFiles.append(fileName)
 			wrappersHeaderOut += "#include \"%s\"\n" % (tail)
 			wrappersHeaderOut += "#include \"%s\"\n" % (tail)
@@ -615,4 +615,4 @@ if len(sys.argv) < 10:
 	print ("Usage:\n%s [input path] [prefix] [main include] [lib small name] [lib name] [api path] [api class-path] [include path] [source path] [inherit-in-module-file path (optional)]" % (sys.argv[0]))
 	print ("Usage:\n%s [input path] [prefix] [main include] [lib small name] [lib name] [api path] [api class-path] [include path] [source path] [inherit-in-module-file path (optional)]" % (sys.argv[0]))
 	sys.exit(1)
 	sys.exit(1)
 else:
 else:
-	createLUABindings(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7], sys.argv[8], sys.argv[9], sys.argv[10] if len(sys.argv)>10 else None)
+	createLUABindings(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7], sys.argv[8], sys.argv[9], sys.argv[10] if len(sys.argv)>10 else None)

+ 9 - 0
Core/Contents/CMakeLists.txt

@@ -87,6 +87,10 @@ SET(polycore_SRCS
     Source/tinyxml.cpp
     Source/tinyxml.cpp
     Source/tinyxmlerror.cpp
     Source/tinyxmlerror.cpp
     Source/tinyxmlparser.cpp
     Source/tinyxmlparser.cpp
+    Source/PolySocket.cpp
+    Source/PolyPeer.cpp
+    Source/PolyClient.cpp
+    Source/PolyServer.cpp
 )
 )
 
 
 SET(polycore_HDRS
 SET(polycore_HDRS
@@ -177,6 +181,11 @@ SET(polycore_HDRS
     Include/PolyVertex.h
     Include/PolyVertex.h
     Include/tinystr.h
     Include/tinystr.h
     Include/tinyxml.h
     Include/tinyxml.h
+    Include/PolySocket.h
+    Include/PolyPeer.h
+    Include/PolyClient.h
+    Include/PolyServer.h
+    Include/PolyServerWorld.h
 )
 )
 
 
 SET(CMAKE_DEBUG_POSTFIX "_d")
 SET(CMAKE_DEBUG_POSTFIX "_d")

+ 0 - 0
Modules/Contents/Networking/Include/PolyClient.h → Core/Contents/Include/PolyClient.h


+ 0 - 0
Modules/Contents/Networking/Include/PolyPeer.h → Core/Contents/Include/PolyPeer.h


+ 0 - 0
Modules/Contents/Networking/Include/PolyServer.h → Core/Contents/Include/PolyServer.h


+ 0 - 0
Modules/Contents/Networking/Include/PolyServerWorld.h → Core/Contents/Include/PolyServerWorld.h


+ 0 - 0
Modules/Contents/Networking/Include/PolySocket.h → Core/Contents/Include/PolySocket.h


+ 6 - 0
Core/Contents/Include/Polycode.h

@@ -88,6 +88,12 @@
 #include "PolySoundManager.h"
 #include "PolySoundManager.h"
 #include "PolySceneSound.h"
 #include "PolySceneSound.h"
 #include "PolyScreenSound.h"
 #include "PolyScreenSound.h"
+#include "PolyClient.h"
+#include "PolyPeer.h"
+#include "PolyServer.h"
+#include "PolyServerWorld.h"
+#include "PolySocket.h"
+
 #ifdef _WINDOWS
 #ifdef _WINDOWS
 #include "PolyWinCore.h"
 #include "PolyWinCore.h"
 #endif
 #endif

+ 0 - 0
Modules/Contents/Networking/Source/PolyClient.cpp → Core/Contents/Source/PolyClient.cpp


+ 0 - 0
Modules/Contents/Networking/Source/PolyPeer.cpp → Core/Contents/Source/PolyPeer.cpp


+ 0 - 0
Modules/Contents/Networking/Source/PolyServer.cpp → Core/Contents/Source/PolyServer.cpp


+ 0 - 0
Modules/Contents/Networking/Source/PolySocket.cpp → Core/Contents/Source/PolySocket.cpp


+ 0 - 1
Examples/C++/Contents/Networking_Client/HelloPolycodeApp.h

@@ -1,6 +1,5 @@
 #include <Polycode.h>
 #include <Polycode.h>
 #include "PolycodeView.h"
 #include "PolycodeView.h"
-#include "PolycodeNetworking.h"
 #include "NetworkingExampleGlobals.h"
 #include "NetworkingExampleGlobals.h"
 
 
 using namespace Polycode;
 using namespace Polycode;

+ 0 - 1
Examples/C++/Contents/Networking_Server/HelloPolycodeApp.h

@@ -1,6 +1,5 @@
 #include <Polycode.h>
 #include <Polycode.h>
 #include "PolycodeView.h"
 #include "PolycodeView.h"
-#include "PolycodeNetworking.h"
 #include "NetworkingExampleGlobals.h"
 #include "NetworkingExampleGlobals.h"
 
 
 using namespace Polycode;
 using namespace Polycode;

+ 0 - 1
Modules/Contents/CMakeLists.txt

@@ -16,7 +16,6 @@ IF(FREENECT_FOUND)
 ENDIF(FREENECT_FOUND)
 ENDIF(FREENECT_FOUND)
  
  
 ADD_SUBDIRECTORY(UI)
 ADD_SUBDIRECTORY(UI)
-ADD_SUBDIRECTORY(Networking)
 
 
 IF(APPLE OR MSVC) # In other words: Not mingw, not linux.
 IF(APPLE OR MSVC) # In other words: Not mingw, not linux.
 ADD_SUBDIRECTORY(TUIO)
 ADD_SUBDIRECTORY(TUIO)

+ 0 - 48
Modules/Contents/Networking/CMakeLists.txt

@@ -1,48 +0,0 @@
-INCLUDE(PolycodeIncludes)
-
-SET(polycodeNetworking_SRCS
-    Source/PolyClient.cpp
-    Source/PolyPeer.cpp
-    Source/PolyServer.cpp
-    Source/PolySocket.cpp
-)
-
-SET(polycodeNetworking_HDRS
-    Include/PolycodeNetworking.h
-    Include/PolyClient.h
-    Include/PolyPeer.h
-    Include/PolyServer.h
-    Include/PolyServerWorld.h
-    Include/PolySocket.h
-)
-
-INCLUDE_DIRECTORIES(
-    Include
-)
-
-SET(CMAKE_DEBUG_POSTFIX "_d")
-
-ADD_LIBRARY(PolycodeNetworking ${polycodeNetworking_SRCS} ${polycodeNetworking_HDRS})
-
-TARGET_LINK_LIBRARIES(PolycodeNetworking 
-    Polycore 
-    ${BOX2D_LIBRARIES}
-    ${OPENGL_LIBRARIES}
-    ${OPENAL_LIBRARY}
-    ${PNG_LIBRARIES}
-    ${FREETYPE_LIBRARIES}
-    ${PHYSFS_LIBRARY}
-    ${VORBISFILE_LIBRARY})
-IF(APPLE)
-    TARGET_LINK_LIBRARIES(PolycodeNetworking "-framework Cocoa")
-ENDIF(APPLE)
-
-IF(POLYCODE_INSTALL_FRAMEWORK)
-    
-    # install headers
-    INSTALL(FILES ${polycodeNetworking_HDRS} DESTINATION Modules/include)
-    # install libraries
-    INSTALL(TARGETS PolycodeNetworking DESTINATION Modules/lib)
-    
-ENDIF(POLYCODE_INSTALL_FRAMEWORK)
-

+ 0 - 9
Modules/Contents/Networking/Include/PolycodeNetworking.h

@@ -1,9 +0,0 @@
-#pragma once
-
-#include "PolyClient.h"
-#include "PolyPeer.h"
-#include "PolyServer.h"
-#include "PolyServerWorld.h"
-#include "PolySocket.h"
-
-