Skip to content

Commit

Permalink
Clean up various projects, allow targeting client or server
Browse files Browse the repository at this point in the history
  • Loading branch information
Razish committed Nov 23, 2016
1 parent 3ddcb10 commit 3a85015
Show file tree
Hide file tree
Showing 13 changed files with 1,595 additions and 1,081 deletions.
25 changes: 4 additions & 21 deletions SConstruct
Expand Up @@ -23,7 +23,7 @@ no_sql = int( ARGUMENTS.get( 'no_sql', 0 ) )
no_crashhandler = int( ARGUMENTS.get( 'no_crashhandler', 0 ) )
toolStr = ARGUMENTS.get( 'tools', 'gcc,g++,ar,as,gnulink' )
tools = [x for x in toolStr.split( ',' )]
proj = ARGUMENTS.get( 'project', '')
proj = ARGUMENTS.get( 'project', 'game,cgame,ui' )

# compare semantic versions (1.0.2 < 1.0.10 < 1.2.0)
def cmp_version( v1, v2 ):
Expand Down Expand Up @@ -563,12 +563,10 @@ projects = [
'cgame',
'ui',
]

print(Dir('#').srcnode().abspath)

if proj != '' and (proj in projects):

for project in [p for p in projects if not proj or p in proj.split(',')]:
env.SConscript(
os.path.join( proj, 'SConscript' ),
os.path.join( project, 'SConscript' ),
exports = [
'arch',
'bits',
Expand All @@ -580,18 +578,3 @@ if proj != '' and (proj in projects):
'realcc',
]
)
else:
for project in projects:
env.SConscript(
os.path.join( project, 'SConscript' ),
exports = [
'arch',
'bits',
'configuration',
'env',
'no_crashhandler',
'no_sql',
'plat',
'realcc',
]
)
113 changes: 113 additions & 0 deletions codeblocks-client.cbp
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="Client" />
<Option makefile="SConstruct" />
<Option makefile_is_custom="1" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Option extended_obj_names="1" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 project=cgame,ui tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=0 debug=0 no_sql=1 project=cgame,ui tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 project=cgame,ui tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 project=cgame,ui tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
<Build>
<Target title="Debug">
<Option output="openjk" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="0" extension_auto="0" />
<Option working_dir="./" />
<Option object_output="build/Debug/" />
<Option type="3" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=0 debug=1 no_sql=1 project=cgame,ui tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=0 debug=1 no_sql=1 project=cgame,ui tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=0 debug=1 no_sql=1 project=cgame,ui tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=0 debug=1 no_sql=1 project=cgame,ui tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
</Target>
<Target title="Debug-32">
<Option output="openjk" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="0" extension_auto="0" />
<Option working_dir="./" />
<Option type="3" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 project=cgame,ui tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=1 debug=1 no_sql=1 project=cgame,ui tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 project=cgame,ui tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 project=cgame,ui tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
</Target>
<Target title="Optimised Debug">
<Option output="openjk" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="0" extension_auto="0" />
<Option working_dir="./" />
<Option type="3" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=0 debug=2 no_sql=1 project=cgame,ui tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=0 debug=2 no_sql=1 project=cgame,ui tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=0 debug=2 no_sql=1 project=cgame,ui tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=0 debug=2 no_sql=1 project=cgame,ui tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
</Target>
<Target title="Optimised Debug-32">
<Option output="openjk" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="0" extension_auto="0" />
<Option type="3" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 project=cgame,ui tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=1 debug=1 no_sql=1 project=cgame,ui tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 project=cgame,ui tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 project=cgame,ui tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
</Target>
<Target title="Release">
<Option output="openjk" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="0" extension_auto="0" />
<Option working_dir="./" />
<Option object_output="build/Release/" />
<Option type="3" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 project=cgame,ui tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=0 debug=0 no_sql=1 project=cgame,ui tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 project=cgame,ui tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 project=cgame,ui tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
</Target>
<Target title="Release-32">
<Option output="openjk" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="0" extension_auto="0" />
<Option working_dir="./" />
<Option type="3" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=1 debug=0 no_sql=1 project=cgame,ui tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=1 debug=0 no_sql=1 project=cgame,ui tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=1 debug=0 no_sql=1 project=cgame,ui tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=1 debug=0 no_sql=1 project=cgame,ui tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
</Target>
</Build>
<Extensions>
<code_completion />
<envvars />
<debugger />
<lib_finder disable_auto="1" />
</Extensions>
</Project>
</CodeBlocks_project_file>
58 changes: 29 additions & 29 deletions japp.cbp → codeblocks-server.cbp
Expand Up @@ -2,19 +2,19 @@
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="japp" />
<Option title="Server" />
<Option makefile="SConstruct" />
<Option makefile_is_custom="1" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Option extended_obj_names="1" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 tools=default" />
<Build command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 project=game tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=0 debug=0 no_sql=1 tools=default" />
<Clean command="scons -Qc -f $makefile force32=0 debug=0 no_sql=1 project=game tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 tools=default &gt; $(CMD_NULL)" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 project=game tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 project=game tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
<Build>
<Target title="Debug">
Expand All @@ -24,12 +24,12 @@
<Option type="3" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=0 debug=1 no_sql=1 tools=default" />
<Build command="scons -Q -f $makefile force32=0 debug=1 no_sql=1 project=game tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=0 debug=1 no_sql=1 tools=default" />
<Clean command="scons -Qc -f $makefile force32=0 debug=1 no_sql=1 project=game tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=0 debug=1 no_sql=1 tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=0 debug=1 no_sql=1 tools=default &gt; $(CMD_NULL)" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=0 debug=1 no_sql=1 project=game tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=0 debug=1 no_sql=1 project=game tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
</Target>
<Target title="Debug-32">
Expand All @@ -38,12 +38,12 @@
<Option type="3" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 tools=default" />
<Build command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 project=game tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=1 debug=1 no_sql=1 tools=default" />
<Clean command="scons -Qc -f $makefile force32=1 debug=1 no_sql=1 project=game tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 tools=default &gt; $(CMD_NULL)" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 project=game tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 project=game tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
</Target>
<Target title="Optimised Debug">
Expand All @@ -52,25 +52,25 @@
<Option type="3" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=0 debug=2 no_sql=1 tools=default" />
<Build command="scons -Q -f $makefile force32=0 debug=2 no_sql=1 project=game tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=0 debug=2 no_sql=1 tools=default" />
<Clean command="scons -Qc -f $makefile force32=0 debug=2 no_sql=1 project=game tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=0 debug=2 no_sql=1 tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=0 debug=2 no_sql=1 tools=default &gt; $(CMD_NULL)" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=0 debug=2 no_sql=1 project=game tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=0 debug=2 no_sql=1 project=game tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
</Target>
<Target title="Optimised Debug-32">
<Option output="openjk" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="0" extension_auto="0" />
<Option type="3" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 tools=default" />
<Build command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 project=game tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=1 debug=1 no_sql=1 tools=default" />
<Clean command="scons -Qc -f $makefile force32=1 debug=1 no_sql=1 project=game tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 tools=default &gt; $(CMD_NULL)" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 project=game tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=1 debug=1 no_sql=1 project=game tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
</Target>
<Target title="Release">
Expand All @@ -80,12 +80,12 @@
<Option type="3" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 tools=default" />
<Build command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 project=game tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=0 debug=0 no_sql=1 tools=default" />
<Clean command="scons -Qc -f $makefile force32=0 debug=0 no_sql=1 project=game tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 tools=default &gt; $(CMD_NULL)" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 project=game tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=0 debug=0 no_sql=1 project=game tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
</Target>
<Target title="Release-32">
Expand All @@ -94,12 +94,12 @@
<Option type="3" />
<Option compiler="gcc" />
<MakeCommands>
<Build command="scons -Q -f $makefile force32=1 debug=0 no_sql=1 tools=default" />
<Build command="scons -Q -f $makefile force32=1 debug=0 no_sql=1 project=game tools=default" />
<CompileFile command='echo &quot;ERROR: Compilation of single files is disabled, use build instead.&quot;; return 1' />
<Clean command="scons -Qc -f $makefile force32=1 debug=0 no_sql=1 tools=default" />
<Clean command="scons -Qc -f $makefile force32=1 debug=0 no_sql=1 project=game tools=default" />
<DistClean command="$make -f $makefile distclean$target" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=1 debug=0 no_sql=1 tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=1 debug=0 no_sql=1 tools=default &gt; $(CMD_NULL)" />
<AskRebuildNeeded command="scons -Q -f $makefile force32=1 debug=0 no_sql=1 project=game tools=default" />
<SilentBuild command="scons -Q -f $makefile force32=1 debug=0 no_sql=1 project=game tools=default &gt; $(CMD_NULL)" />
</MakeCommands>
</Target>
</Build>
Expand Down
7 changes: 7 additions & 0 deletions codeblocks.workspace
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="JA++">
<Project filename="codeblocks-client.cbp" />
<Project filename="codeblocks-server.cbp" />
</Workspace>
</CodeBlocks_workspace_file>

0 comments on commit 3a85015

Please sign in to comment.