about summary refs log tree commit diff
path: root/default.bam
diff options
context:
space:
mode:
authorJohan Althoff <teetow@gmail.com>2007-08-07 17:46:04 +0000
committerJohan Althoff <teetow@gmail.com>2007-08-07 17:46:04 +0000
commitd13c8c728c2fd8ccf52b7d3467a2232a7bd7dc02 (patch)
tree517bf929595078128cb0ba1968492f114900c6e4 /default.bam
parent443b7a36f95b28d2bf8e48f7e5b475a3e34541d3 (diff)
downloadzcatch-d13c8c728c2fd8ccf52b7d3467a2232a7bd7dc02.tar.gz
zcatch-d13c8c728c2fd8ccf52b7d3467a2232a7bd7dc02.zip
updated bam-file so it compiles the icon for windows aswell.
Diffstat (limited to 'default.bam')
-rw-r--r--default.bam21
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)