Fixed installation of translations.
Made localedirname option actually affect the directory where translations are installed.
This commit is contained in:
parent
15e0575116
commit
31b4593e56
2 changed files with 11 additions and 3 deletions
|
@ -431,8 +431,11 @@ if env["dummy_locales"]:
|
|||
for d in installdirs:
|
||||
exec d + ' = os.path.join(env["destdir"], env[d].lstrip("/"))'
|
||||
installable_subs = Split('data fonts images sounds')
|
||||
if env['nls']:
|
||||
installable_subs.append("translations")
|
||||
if os.path.isabs(env["localedirname"]):
|
||||
env["localedir"] = env["localedirname"]
|
||||
else:
|
||||
env["localedir"] = "$datadir/$localedirname"
|
||||
|
||||
if env["dummy_locales"]:
|
||||
installable_subs.append("locales")
|
||||
pythontools = Split("wmlscope wmllint wmlindent wesnoth_addon_manager")
|
||||
|
@ -456,6 +459,8 @@ def InstallManpages(env, component):
|
|||
|
||||
env.InstallData("datadir", "wesnoth", map(Dir, installable_subs))
|
||||
env.InstallData("docdir", "wesnoth", Dir("doc/manual"))
|
||||
if env["nls"]:
|
||||
env.InstallData("localedir", "wesnoth", Dir("translations"))
|
||||
|
||||
# The game and associated resources
|
||||
env.InstallBinary(wesnoth)
|
||||
|
|
|
@ -94,7 +94,10 @@ def InstallData(env, datadir, component, source, subdir = ""):
|
|||
else:
|
||||
dirs.append(Dir(source))
|
||||
if dirs:
|
||||
install = map(lambda x : env.InstallFiltered(os.path.join(installdir.path, x.name), x.path), dirs)
|
||||
if len(dirs) == 1:
|
||||
install = env.InstallFiltered(installdir.path, dirs[0].path)
|
||||
else:
|
||||
install = map(lambda x : env.InstallFiltered(os.path.join(installdir.path, x.name), x.path), dirs)
|
||||
AlwaysBuild(install)
|
||||
env.Alias("install-" + component, install)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue