diff options
| -rw-r--r-- | default.bam | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/default.bam b/default.bam index a9a52928..ecd3a971 100644 --- a/default.bam +++ b/default.bam @@ -10,6 +10,11 @@ if family == "windows" then dat2c_compiler = "scripts\\dat2c.py" end +function rc(output, input) + print("rc " .. PathFilename(input)) + return os.execute("rc /fo " .. output .. " " .. input) +end + function dat2c(output, data, name) print("dat2c " .. PathFilename(output) .. " = " .. PathFilename(data)) return os.execute(dat2c_compiler .. " " .. data .. " " .. name .. " > " .. output) @@ -35,6 +40,14 @@ function dc_cdata(output, data, script) return os.execute(dc_compiler .. " " .. data .. " " .. script .. " -c " .. output) end +function ResCompile(scriptfile) + scriptfile = Path(scriptfile) + output = PathBase(scriptfile) .. ".res" + bam_add_job("rc", output, scriptfile) + bam_add_dependency(output, scriptfile) + return output +end + function Dat2c(datafile, sourcefile, arrayname) datafile = Path(datafile) sourcefile = Path(sourcefile) @@ -76,6 +89,12 @@ clientdata = DataCompile( "src/game/client/data/client_data.cpp", "src/game/client/data/client_internal.cpp") +client_link_other = {} +if family == "windows" then + client_link_other = {ResCompile("other/icons/teewars.rc")} +end + + function build(settings) settings.objdir = Path("objs") @@ -121,7 +140,7 @@ function build(settings) end -- build client, server and master server - client_exe = Link(settings, "teewars", engine, client, editor, game_shared, game_client) + client_exe = Link(settings, "teewars", engine, client, editor, game_shared, game_client, client_link_other) server_exe = Link(server_settings, "teewars_srv", engine, server, game_shared, game_server) masterserver_exe = Link(server_settings, "mastersrv", masterserver, engine) |