Changeset 467

Show
Ignore:
Timestamp:
01/16/12 22:13:20 (4 months ago)
Author:
Carsten
Message:

Update the SConstruct build script to automatically take all games in the Games/ directory into account, rather than only the previously hard-wired ones.

References #93.
Closes #94.

Thanks to Haimi for the report!

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cafu/trunk/SConstruct

    r464 r467  
    386386    if "p" in BVs: buildMode = "prf"; SConscript('SConscript', exports=[{'env':envProfile_Cafu}, 'buildMode', 'compiler'], variant_dir=""+my_build_dir_prf, duplicate=0) 
    387387 
    388 if os.path.exists("Games/DeathMatch/Code/SConscript"): 
    389     # Build the DeathMatch DLL. 
    390     if "d" in BVs: buildMode = "dbg"; SConscript('Games/DeathMatch/Code/SConscript', exports=[{'env':envDebug_Cafu},   'buildMode'], variant_dir="Games/DeathMatch/Code/"+my_build_dir_dbg, duplicate=0) 
    391     if "r" in BVs: buildMode = "rel"; SConscript('Games/DeathMatch/Code/SConscript', exports=[{'env':envRelease_Cafu}, 'buildMode'], variant_dir="Games/DeathMatch/Code/"+my_build_dir_rel, duplicate=0) 
    392     if "p" in BVs: buildMode = "prf"; SConscript('Games/DeathMatch/Code/SConscript', exports=[{'env':envProfile_Cafu}, 'buildMode'], variant_dir="Games/DeathMatch/Code/"+my_build_dir_prf, duplicate=0) 
    393  
    394 if os.path.exists("Games/VSWM/Code/SConscript"): 
    395     # Build the VSWM DLL. 
    396     if "d" in BVs: buildMode = "dbg"; SConscript('Games/VSWM/Code/SConscript', exports=[{'env':envDebug_Cafu},   'buildMode'], variant_dir="Games/VSWM/Code/"+my_build_dir_dbg, duplicate=0) 
    397     if "r" in BVs: buildMode = "rel"; SConscript('Games/VSWM/Code/SConscript', exports=[{'env':envRelease_Cafu}, 'buildMode'], variant_dir="Games/VSWM/Code/"+my_build_dir_rel, duplicate=0) 
    398     if "p" in BVs: buildMode = "prf"; SConscript('Games/VSWM/Code/SConscript', exports=[{'env':envProfile_Cafu}, 'buildMode'], variant_dir="Games/VSWM/Code/"+my_build_dir_prf, duplicate=0) 
     388# Build the game DLLs. 
     389for GameName in os.listdir("Games/"): 
     390    CodeDir = "Games/" + GameName + "/Code/" 
     391 
     392    if os.path.exists(CodeDir + "SConscript"): 
     393        if "d" in BVs: buildMode = "dbg"; SConscript(CodeDir + "SConscript", exports=[{'env':envDebug_Cafu},   'buildMode'], variant_dir=CodeDir + my_build_dir_dbg, duplicate=0) 
     394        if "r" in BVs: buildMode = "rel"; SConscript(CodeDir + "SConscript", exports=[{'env':envRelease_Cafu}, 'buildMode'], variant_dir=CodeDir + my_build_dir_rel, duplicate=0) 
     395        if "p" in BVs: buildMode = "prf"; SConscript(CodeDir + "SConscript", exports=[{'env':envProfile_Cafu}, 'buildMode'], variant_dir=CodeDir + my_build_dir_prf, duplicate=0)