summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-12-26 15:56:45 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-12-27 23:06:53 (GMT)
commit5a89265623214164fa7ce36721de05183d53058d (patch)
tree1cb061f1c314668396dd0e16047d995641631d4f /Sluift/SConscript
parent806efd2603a4083ca433501dcd6e5b8479db0b39 (diff)
downloadswift-contrib-5a89265623214164fa7ce36721de05183d53058d.zip
swift-contrib-5a89265623214164fa7ce36721de05183d53058d.tar.bz2
Sluift: Refactoring
- Rename boot.lua to core.lua - Support Lua 5.2 - Support version prefixes for sluift module - Add Client:process_events Change-Id: I3fa6d06d1dbdf86f65b9f4203bd2ec5b5526b104
Diffstat (limited to 'Sluift/SConscript')
-rw-r--r--Sluift/SConscript8
1 files changed, 5 insertions, 3 deletions
diff --git a/Sluift/SConscript b/Sluift/SConscript
index 1a29e43..c8f1108 100644
--- a/Sluift/SConscript
+++ b/Sluift/SConscript
@@ -32,7 +32,7 @@ elif env["SCONS_STAGE"] == "build" :
"ElementConvertors/CommandConvertor.cpp",
"ClientHelpers.cpp",
"SluiftClient.cpp",
- "boot.c",
+ "core.c",
"client.cpp",
"sluift.cpp"
]
@@ -42,6 +42,8 @@ elif env["SCONS_STAGE"] == "build" :
sluift_env.UseFlags(env.get("LUA_FLAGS", {}))
sluift_env.UseFlags(env["SWIFTEN_FLAGS"])
sluift_env.UseFlags(env["SWIFTEN_DEP_FLAGS"])
+ # Support compilation on both Lua 5.1 and Lua 5.2
+ sluift_env.Append(CPPDEFINES = ["LUA_COMPAT_ALL"])
if sluift_env["PLATFORM"] == "win32" :
sluift_env.Append(CPPDEFINES = ["SLUIFT_BUILD_DLL"])
@@ -62,7 +64,7 @@ elif env["SCONS_STAGE"] == "build" :
f.close()
sluift_env.Command("lua.c", ["#/3rdParty/Lua/src/lua.c", sluift_env.Value(sluift_env["SLUIFT_VERSION"])], env.Action(patchLua, cmdstr = "$GENCOMSTR"))
- # Generate boot.cpp
+ # Generate core.cpp
def generate_embedded_lua(env, target, source) :
f = open(source[0].abspath, "r")
data = f.read()
@@ -70,7 +72,7 @@ elif env["SCONS_STAGE"] == "build" :
f = open(target[0].abspath, "w")
f.write('const char ' + source[0].name.replace(".", "_") + "[] = \"" + data.replace("\\", "\\\\").replace("\n", "\\n").replace('"', '\\"') + "\";")
f.close()
- sluift_env.Command("boot.c", ["boot.lua"], env.Action(generate_embedded_lua, cmdstr="$GENCOMSTR"))
+ sluift_env.Command("core.c", ["core.lua"], env.Action(generate_embedded_lua, cmdstr="$GENCOMSTR"))
if sluift_env.get("HAVE_READLINE", False) :
sluift_env.Append(CPPDEFINES = ["LUA_USE_READLINE"])