mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 17:37:54 +00:00
27 lines
1.0 KiB
Python
27 lines
1.0 KiB
Python
# 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")
|
|
|
|
if "windows-release" in COMMAND_LINE_TARGETS:
|
|
env.Tool("scanreplace", toolpath = ["../../scons"])
|
|
env["packaging_dir"] = Dir(".").abspath
|
|
iss = env.ScanReplace(join(env["destdir"], "Wesnoth.iss"), "Wesnoth.iss.in")
|
|
Depends(iss, Value(env.Dictionary()))
|
|
Alias("windows-release", iss)
|
|
|
|
docs = [ File(doc, "../..") for doc in Split("README COPYING COPYRIGHT") ]
|
|
datadirs = [ Dir(dir, "../..") for dir in Split("data fonts images sounds translations") ]
|
|
Alias("windows-release", env.Install(env["destdir"], docs + datadirs))
|