SCons recipe: added support for using windows resource files.

This commit is contained in:
Sergey Popov 2008-05-21 09:42:36 +00:00
parent 48c79cf7c7
commit a57b3912dc
7 changed files with 23 additions and 4 deletions

View file

@ -287,7 +287,7 @@ except:
env["svnrev"] = ""
Export(Split("env have_client_prereqs have_X have_server_prereqs"))
SConscript(dirs = Split("po doc"))
SConscript(dirs = Split("po doc packaging/windows"))
binaries = Split("wesnoth wesnoth_editor wesnothd cutter exploder campaignd")
builds = {

View file

@ -0,0 +1,15 @@
# vi: syntax=python:et:ts=4
from os.path import join
Import("env")
env["IM_CONVERT"] = '"' + WhereIs("convert") + '"'
binaries = ["wesnoth", "wesnoth_editor"]
for bin in binaries:
#icon = env.Command(bin + "-icon.ico", join("../../icons", bin + "-icon.png"), "$IM_CONVERT $SOURCE $TARGET")
try:
res = [env.RES(bin + ".rc")]
#env.Depends(res, icon)
except AttributeError:
res = []
locals()[bin + "_res"] = res
Export(bin + "_res")

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -0,0 +1,2 @@
WESNOTH_ICON ICON DISCARDABLE "wesnoth-icon.ico"

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -0,0 +1,2 @@
WESNOTH_EDITOR_ICON ICON DISCARDABLE "wesnoth_editor-icon.ico"

View file

@ -4,7 +4,7 @@ import commands, os
from subprocess import Popen, PIPE
from glob import glob
Import(Split("env test_env have_client_prereqs have_X have_server_prereqs"))
Import("*")
#color_range.cpp should be removed, but game_config depends on it.
#game_config has very few things that are needed elsewhere, it should be
@ -201,7 +201,7 @@ wesnoth_sources = Split("""
#
if have_client_prereqs:
wesnoth = env.Program("wesnoth", ["game.cpp"] + wesnoth_sources + [libwesnoth_core, libwesnoth_sdl, libwesnoth, libcampaignd])
wesnoth = env.Program("wesnoth", ["game.cpp"] + wesnoth_sources + [libwesnoth_core, libwesnoth_sdl, libwesnoth, libcampaignd] + wesnoth_res)
else:
wesnoth = None
Export("wesnoth")
@ -218,7 +218,7 @@ wesnoth_editor_sources = Split("""
animated_editor.cpp
""")
if have_client_prereqs and have_X:
wesnoth_editor = env.Program("wesnoth_editor", wesnoth_editor_sources + [libwesnoth_core, libwesnoth_sdl, libwesnoth])
wesnoth_editor = env.Program("wesnoth_editor", wesnoth_editor_sources + [libwesnoth_core, libwesnoth_sdl, libwesnoth] + wesnoth_editor_res)
else:
wesnoth_editor = None
Export("wesnoth_editor")