Author: loonycyborg
Date: Wed May 21 11:42:36 2008
New Revision: 26746
URL: http://svn.gna.org/viewcvs/wesnoth?rev=26746&view=rev
Log:
SCons recipe: added support for using windows resource files.
Added:
trunk/packaging/windows/SConscript
trunk/packaging/windows/wesnoth-icon.ico (with props)
trunk/packaging/windows/wesnoth.rc
trunk/packaging/windows/wesnoth_editor-icon.ico (with props)
trunk/packaging/windows/wesnoth_editor.rc
Modified:
trunk/SConstruct
trunk/src/SConscript
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=26746&r1=26745&r2=26746&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Wed May 21 11:42:36 2008
@@ -287,7 +287,7 @@
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 = {
Added: trunk/packaging/windows/SConscript
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/packaging/windows/SConscript?rev=26746&view=auto
==============================================================================
--- trunk/packaging/windows/SConscript (added)
+++ trunk/packaging/windows/SConscript Wed May 21 11:42:36 2008
@@ -1,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")
Added: trunk/packaging/windows/wesnoth-icon.ico
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/packaging/windows/wesnoth-icon.ico?rev=26746&view=auto
==============================================================================
Binary file - no diff available.
Propchange: trunk/packaging/windows/wesnoth-icon.ico
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: trunk/packaging/windows/wesnoth.rc
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/packaging/windows/wesnoth.rc?rev=26746&view=auto
==============================================================================
--- trunk/packaging/windows/wesnoth.rc (added)
+++ trunk/packaging/windows/wesnoth.rc Wed May 21 11:42:36 2008
@@ -1,0 +1,2 @@
+WESNOTH_ICON ICON DISCARDABLE "wesnoth-icon.ico"
+
Added: trunk/packaging/windows/wesnoth_editor-icon.ico
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/packaging/windows/wesnoth_editor-icon.ico?rev=26746&view=auto
==============================================================================
Binary file - no diff available.
Propchange: trunk/packaging/windows/wesnoth_editor-icon.ico
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: trunk/packaging/windows/wesnoth_editor.rc
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/packaging/windows/wesnoth_editor.rc?rev=26746&view=auto
==============================================================================
--- trunk/packaging/windows/wesnoth_editor.rc (added)
+++ trunk/packaging/windows/wesnoth_editor.rc Wed May 21 11:42:36 2008
@@ -1,0 +1,2 @@
+WESNOTH_EDITOR_ICON ICON DISCARDABLE "wesnoth_editor-icon.ico"
+
Modified: trunk/src/SConscript
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/SConscript?rev=26746&r1=26745&r2=26746&view=diff
==============================================================================
--- trunk/src/SConscript (original)
+++ trunk/src/SConscript Wed May 21 11:42:36 2008
@@ -4,7 +4,7 @@
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 @@
#
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 @@
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")
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits