diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-03-03 21:11:18 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-03-03 22:14:49 (GMT) |
commit | 12024229138787d7df91cb8101d0986996880e3d (patch) | |
tree | 575ef4bd2104ce4a0531580ac78381dbb94f6c6e /Sluift/SConscript | |
parent | a8cd6a5cbf74d0db4df0b7daa8e4b1b0e0bc00d0 (diff) | |
download | swift-12024229138787d7df91cb8101d0986996880e3d.zip swift-12024229138787d7df91cb8101d0986996880e3d.tar.bz2 |
Some more Sluift tweaks.
Diffstat (limited to 'Sluift/SConscript')
-rw-r--r-- | Sluift/SConscript | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Sluift/SConscript b/Sluift/SConscript index ec9f690..6f38693 100644 --- a/Sluift/SConscript +++ b/Sluift/SConscript @@ -1,3 +1,5 @@ +import Version + Import(["env", "conf_env"]) if env["SCONS_STAGE"] == "build" : @@ -21,17 +23,22 @@ if env["SCONS_STAGE"] == "build" : elif myenv["PLATFORM"] == "darwin" : myenv["SHLIBSUFFIX"] = ".so" + myenv["SLUIFT_VERSION"] = Version.getBuildVersion("sluift") def patchLua(env, target, source) : f = open(source[0].abspath, "r") contents = f.read() f.close() - contents = contents.replace("LUA_RELEASE", "\"== Sluift XMPP Console ==\"") + if env["PLATFORM"] == "windows" : + key = "Z" + else : + key = "D" + contents = contents.replace("LUA_RELEASE", "\"== Sluift XMPP Console (%(version)s) == \\nPress Ctrl-%(key)s to exit\"" % {"version": source[1].get_contents(), "key" : key}) contents = contents.replace("LUA_COPYRIGHT", "") f = open(target[0].abspath, "w") f.write(contents) f.close() - myenv.Command("lua.c", ["#/3rdParty/Lua/src/lua.c"], env.Action(patchLua, cmdstr = "$GENCOMSTR")) + myenv.Command("lua.c", ["#/3rdParty/Lua/src/lua.c", myenv.Value(myenv["SLUIFT_VERSION"])], env.Action(patchLua, cmdstr = "$GENCOMSTR")) if myenv.get("HAVE_READLINE", False) : myenv.Append(CPPDEFINES = ["LUA_USE_READLINE"]) myenv.MergeFlags(myenv["READLINE_FLAGS"]) @@ -40,4 +47,5 @@ if env["SCONS_STAGE"] == "build" : "linit.c", ]) - myenv.SharedLibrary("sluift", []); + myenv.WriteVal("dll.c", myenv.Value("")) + myenv.SharedLibrary("sluift", ["dll.c"]) |