SCons recipe: added support for using windows resource files.
This commit is contained in:
parent
48c79cf7c7
commit
a57b3912dc
7 changed files with 23 additions and 4 deletions
|
@ -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 = {
|
||||
|
|
15
packaging/windows/SConscript
Normal file
15
packaging/windows/SConscript
Normal 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")
|
BIN
packaging/windows/wesnoth-icon.ico
Normal file
BIN
packaging/windows/wesnoth-icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
2
packaging/windows/wesnoth.rc
Normal file
2
packaging/windows/wesnoth.rc
Normal file
|
@ -0,0 +1,2 @@
|
|||
WESNOTH_ICON ICON DISCARDABLE "wesnoth-icon.ico"
|
||||
|
BIN
packaging/windows/wesnoth_editor-icon.ico
Normal file
BIN
packaging/windows/wesnoth_editor-icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
2
packaging/windows/wesnoth_editor.rc
Normal file
2
packaging/windows/wesnoth_editor.rc
Normal file
|
@ -0,0 +1,2 @@
|
|||
WESNOTH_EDITOR_ICON ICON DISCARDABLE "wesnoth_editor-icon.ico"
|
||||
|
|
@ -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")
|
||||
|
|
Loading…
Add table
Reference in a new issue