mail[Wesnoth-commits] r43636 - in /trunk: SConstruct src/SConscript src/ana/src/SConscript


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by loonycyborg on June 22, 2010 - 02:05:
Author: loonycyborg
Date: Tue Jun 22 02:05:01 2010
New Revision: 43636

URL: http://svn.gna.org/viewcvs/wesnoth?rev=43636&view=rev
Log:
Add use_network_ana option to scons.

Added:
    trunk/src/ana/src/SConscript   (with props)
Modified:
    trunk/SConstruct
    trunk/src/SConscript

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=43636&r1=43635&r2=43636&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Tue Jun 22 02:05:01 2010
@@ -82,6 +82,7 @@
     ('version_suffix', 'suffix that will be added to default values of 
prefsdir, program_suffix and datadirname', ""),
     BoolVariable('raw_sockets', 'Set to use raw receiving sockets in the 
multiplayer network layer rather than the SDL_net facilities', False),
     BoolVariable('forum_user_handler', 'Enable forum user handler in 
wesnothd', False),
+    BoolVariable('use_network_ana', 'Use the new network api', False),
     BoolVariable('pool_alloc', 'Enable custom pool malloc', False),
     ('server_gid', 'group id of the user who runs wesnothd', ""),
     ('server_uid', 'user id of the user who runs wesnothd', ""),
@@ -291,6 +292,11 @@
         conf.CheckBoost("smart_ptr", header_only = True) and \
         conf.CheckSDL(require_version = '1.2.7') and \
         conf.CheckSDL('SDL_net') or Warning("Base prerequisites are not 
met.")
+    if have_server_prereqs and env["use_network_ana"]:
+        have_server_prereqs = \
+            conf.CheckBoost("system") and \
+            conf.CheckBoost("thread") and \
+            conf.CheckBoost("asio", header_only = True) or Warning("Base 
prerequisites are not met.")
 
     env = conf.Finish()
     client_env = env.Clone()

Modified: trunk/src/SConscript
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/SConscript?rev=43636&r1=43635&r2=43636&view=diff
==============================================================================
--- trunk/src/SConscript (original)
+++ trunk/src/SConscript Tue Jun 22 02:05:01 2010
@@ -22,7 +22,6 @@
     map.cpp
     map_location.cpp
     md5.cpp
-    network.cpp
     thread.cpp
     tstring.cpp
     util.cpp
@@ -42,6 +41,14 @@
 
 libwesnoth_core_sources.extend(env.Object("network_worker.cpp", EXTRA_DEFINE 
= env['raw_sockets'] and "NETWORK_USE_RAW_SOCKETS" or None))
 
+if env["use_network_ana"]:
+    client_env.Append(CPPPATH = ["#/src/ana/api"])
+    libwesnoth_core_sources.append("network_ana.cpp")
+    ana = SConscript("ana/src/SConscript", exports = {"env" : client_env})
+else:
+    libwesnoth_core_sources.append("network.cpp")
+    ana = []
+
 game_config_env = env.Clone()
 filesystem_env = env.Clone()
 if env["PLATFORM"] != "win32":
@@ -58,7 +65,7 @@
     filesystem_env.Object("filesystem.cpp")
     ])
 
-libwesnoth_core = env.Library("wesnoth_core", libwesnoth_core_sources)
+libwesnoth_core = [env.Library("wesnoth_core", libwesnoth_core_sources), ana]
 
 libwesnoth_sources = Split("""
     arrow.cpp

Added: trunk/src/ana/src/SConscript
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ana/src/SConscript?rev=43636&view=auto
==============================================================================
--- trunk/src/ana/src/SConscript (added)
+++ trunk/src/ana/src/SConscript Tue Jun 22 02:05:01 2010
@@ -1,0 +1,11 @@
+# vi: syntax=python:et:ts=4
+
+Import("env")
+
+ana = env.Library("ana", Split("""
+    asio_listener.cpp
+    asio_server.cpp
+    asio_client.cpp
+    asio_proxy_connection.cpp
+    """))
+Return("ana")

Propchange: trunk/src/ana/src/SConscript
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/src/ana/src/SConscript
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: trunk/src/ana/src/SConscript
------------------------------------------------------------------------------
    svn:mime-type = text/x-python




Related Messages


Powered by MHonArc, Updated Tue Jun 22 02:20:26 2010