mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-22 18:55:23 +00:00
scons: fix paths when compiling .rc files
Previous way of addressing compiled .rc files led to stale intermediate targets leading to issue #7441
This commit is contained in:
parent
23678b247b
commit
9df0a5943f
@ -8,12 +8,11 @@ binaries = ["wesnoth", "wesnothd"]
|
|||||||
for bin in binaries:
|
for bin in binaries:
|
||||||
try:
|
try:
|
||||||
env["RCCOM"] = '$RC $_CPPDEFFLAGS $RCINCFLAGS ${RCINCPREFIX} ${SOURCE.dir} $RCFLAGS -i $SOURCE -o $TARGET'
|
env["RCCOM"] = '$RC $_CPPDEFFLAGS $RCINCFLAGS ${RCINCPREFIX} ${SOURCE.dir} $RCFLAGS -i $SOURCE -o $TARGET'
|
||||||
res = [env.RES(bin + ".rc", CPPPATH=["#/"])]
|
res = env.RES(bin + ".rc", CPPPATH=["#/"])
|
||||||
|
if bin == "wesnoth":
|
||||||
|
Depends(res, File("wesnoth.exe.manifest"))
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
res = []
|
pass
|
||||||
env[bin + "_res"] = res
|
|
||||||
|
|
||||||
Depends(env["wesnoth_res"], File("wesnoth.exe.manifest"))
|
|
||||||
|
|
||||||
def WindowsInstaller(env, files):
|
def WindowsInstaller(env, files):
|
||||||
files = [Entry(file) for file in Flatten(files)]
|
files = [Entry(file) for file in Flatten(files)]
|
||||||
|
@ -163,14 +163,14 @@ for env in [test_env, client_env, env]:
|
|||||||
env.AddMethod(WesnothProgram)
|
env.AddMethod(WesnothProgram)
|
||||||
|
|
||||||
#---wesnoth---
|
#---wesnoth---
|
||||||
# for wesnoth_res and wesnothd_res, see packaging/windows/SConscript
|
# for packaging/windows/wesnoth?.o, see packaging/windows/SConscript
|
||||||
# used to set the executable icon for wesnoth and wesnothd
|
# used to set the executable icon for wesnoth and wesnothd
|
||||||
libwesnoth_objects = libwesnoth_client + liblua + libwesnoth_core + libwesnoth_game + libwesnoth_sdl + libwesnoth_client
|
libwesnoth_objects = libwesnoth_client + liblua + libwesnoth_core + libwesnoth_game + libwesnoth_sdl + libwesnoth_client
|
||||||
if env["PLATFORM"] == 'darwin':
|
if env["PLATFORM"] == 'darwin':
|
||||||
wesnoth = client_env.WesnothProgram("wesnoth", ["wesnoth.cpp"] + libwesnoth_objects + ["macosx/SDLMain.mm"], have_client_prereqs)
|
wesnoth = client_env.WesnothProgram("wesnoth", ["wesnoth.cpp"] + libwesnoth_objects + ["macosx/SDLMain.mm"], have_client_prereqs)
|
||||||
client_env.Append(LINKFLAGS=['-Wl,-force_load', libwesnoth_widgets])
|
client_env.Append(LINKFLAGS=['-Wl,-force_load', libwesnoth_widgets])
|
||||||
elif env["PLATFORM"] == 'win32':
|
elif env["PLATFORM"] == 'win32':
|
||||||
wesnoth = client_env.WesnothProgram("wesnoth", ["wesnoth.cpp"] + libwesnoth_objects + env["wesnoth_res"], have_client_prereqs)
|
wesnoth = client_env.WesnothProgram("wesnoth", ["wesnoth.cpp"] + libwesnoth_objects + ["#/packaging/windows/wesnoth.o"], have_client_prereqs)
|
||||||
client_env.Append(LINKFLAGS=['-Wl,--whole-archive', libwesnoth_widgets, '-Wl,--no-whole-archive'])
|
client_env.Append(LINKFLAGS=['-Wl,--whole-archive', libwesnoth_widgets, '-Wl,--no-whole-archive'])
|
||||||
else:
|
else:
|
||||||
wesnoth = client_env.WesnothProgram("wesnoth", ["wesnoth.cpp"] + libwesnoth_objects, have_client_prereqs)
|
wesnoth = client_env.WesnothProgram("wesnoth", ["wesnoth.cpp"] + libwesnoth_objects, have_client_prereqs)
|
||||||
@ -181,7 +181,7 @@ if have_client_prereqs:
|
|||||||
#---wesnothd---
|
#---wesnothd---
|
||||||
wesnothd_sources = GetSources("wesnothd")
|
wesnothd_sources = GetSources("wesnothd")
|
||||||
if env["PLATFORM"] == 'win32':
|
if env["PLATFORM"] == 'win32':
|
||||||
env.WesnothProgram("wesnothd", wesnothd_sources + libwesnoth_core + env["wesnothd_res"], have_server_prereqs)
|
env.WesnothProgram("wesnothd", wesnothd_sources + libwesnoth_core + ["#/packaging/windows/wesnothd.o"], have_server_prereqs)
|
||||||
elif env["forum_user_handler"]:
|
elif env["forum_user_handler"]:
|
||||||
env.WesnothProgram("wesnothd", wesnothd_sources + libwesnoth_core + libmariadbpp, have_server_prereqs)
|
env.WesnothProgram("wesnothd", wesnothd_sources + libwesnoth_core + libmariadbpp, have_server_prereqs)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user