Include new entity files into DeathMatch SConscript file

Get technical support about the C++ source code and about Lua scripts for maps, entities, GUIs, the console, materials, etc. Also covered are the Cafu libraries and APIs, as well as compiling, linking, and the build system.
Post Reply
DarkStar
Posts: 11
Joined: 2010-05-13, 18:50

Include new entity files into DeathMatch SConscript file

Post by DarkStar » 2010-05-29, 19:16

as the wiki suggests i opened up the sconscript file and look for these:
[...]
gameEnv.SharedLibrary("DeathMatch", Split("""
GameImpl.cpp ScriptState.cpp EntityCreateParams.cpp

_ResourceManager.cpp BaseEntity.cpp ARGrenade.cpp Butterfly.cpp CompanyBot.cpp Corpse.cpp
cw.cpp cw_357.cpp cw_9mmAR.cpp cw_BattleScythe.cpp cw_CrossBow.cpp
cw_Egon.cpp cw_FaceHugger.cpp cw_Gauss.cpp cw_Grenade.cpp cw_Pistol.cpp
cw_RPG.cpp cw_Shotgun.cpp DeathMatch.cpp Eagle.cpp FaceHugger.cpp
FuncDoor.cpp FuncLadder.cpp HandGrenade.cpp HumanPlayer.cpp InfoPlayerStart.cpp Item.cpp
ItemAmmo357.cpp ItemAmmoArrow.cpp MonsterMaker.cpp Mover.cpp PointLightSource.cpp Rocket.cpp
StaticDetailModel.cpp Trigger.cpp Weapon.cpp Weapon357.cpp Weapon9mmAR.cpp WeaponBattleScythe.cpp
WeaponCrossbow.cpp WeaponEgon.cpp WeaponFaceHugger.cpp WeaponGauss.cpp WeaponGrenade.cpp
WeaponHornetGun.cpp WeaponPistol.cpp WeaponRPG.cpp WeaponShotgun.cpp WeaponTripmine.cpp
Speaker.cpp
Libs/LookupTables.cpp Libs/Physics.cpp"""))



But its not in the file instead the file contains this
import os, sys

Import('env', 'buildMode')

gameEnv = env.Clone()

gameEnv.Append(CPPPATH=['#/ExtLibs/bullet/src'])
gameEnv.Append(CPPPATH=['#/ExtLibs/lua/src'])

if sys.platform=="win32":
gameEnv.Append(LIBS=["ClipSys"]) # UHHHHHHH... this should be in cfsLib!!!
gameEnv.Append(LIBS=Split("MatSys SoundSys cfsLib bulletdynamics bulletcollision bulletmath lua lightwave z"))
elif sys.platform=="linux2":
# The LinkerScript is required to make sure that the game DLL only exports the GetGame() symbol (like a Windows DLL),
# rather than *all* sorts of symbols whose name strings don't need to appear in the final DSO.
gameEnv.Append(LINKFLAGS = ["-Wl,--version-script=Games/DeathMatch/Code/LinkerScript"])

gameEnv.SharedLibrary("DeathMatch", Glob("*.cpp")+Split("Libs/LookupTables.cpp Libs/Physics.cpp"))



Please explain how to add new entities :?: :?: :?:
thanks
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Include new entity files into DeathMatch SConscript file

Post by Carsten » 2010-05-30, 11:23

DarkStar wrote:

Code: Select all

gameEnv.SharedLibrary("DeathMatch", Glob("*.cpp")+Split("Libs/LookupTables.cpp Libs/Physics.cpp"))
Please explain how to add new entities :?: :?: :?:
Sorry, as so often, the code is already further than the documentation:
The last line does the job automatically: The cpp files are automatically detected and compiled and linked for the DeathMatch DLL.

I've also updated the documentation appropriately: Adding new Entities to the DeathMatch MOD. :up:
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests