Move wmlxgettext to the data/tools directory so that it's automatically included in official packages

This commit is contained in:
Celtic Minstrel 2018-09-08 18:06:26 -04:00
parent cc98bcd9d0
commit 59e78e5565
14 changed files with 3 additions and 4 deletions

View file

@ -40,7 +40,6 @@ APP_DIR,APP_NAME=os.path.split(os.path.realpath(sys.argv[0]))
WESNOTH_ROOT_DIR=os.sep.join(APP_DIR.split(os.sep)[:-2]) # pop out "data" and "tools"
WESNOTH_DATA_DIR=os.path.join(WESNOTH_ROOT_DIR,"data")
WESNOTH_CORE_DIR=os.path.normpath(os.path.join(WESNOTH_DATA_DIR,"core"))
WMLXGETTEXT_DIR=os.path.normpath(os.path.join(WESNOTH_ROOT_DIR,"utils"))
def wrap_elem(line):
"""If the supplied line contains spaces, return it wrapped between double quotes"""
@ -1294,7 +1293,7 @@ wmlindent will be run on the Wesnoth core directory""")
def on_run_wmlxgettext(self):
# build the command line and add the path of the Python interpreter
wmlxgettext_command_string=[sys.executable]
wmlxgettext_command_string.append(os.path.join(WMLXGETTEXT_DIR,"wmlxgettext"))
wmlxgettext_command_string.append(os.path.join(APP_DIR,"wmlxgettext"))
textdomain=self.wmlxgettext_tab.domain_variable.get()
if textdomain:
wmlxgettext_command_string.extend(["--domain",textdomain])

View file

@ -42,7 +42,7 @@ set(DOMAINS
# If a source file has not GETTEXT_DOMAIN it belongs to this domain.
set(DEFAULT_DOMAIN wesnoth)
set(WMLXGETTEXT ${PROJECT_SOURCE_DIR}/utils/wmlxgettext)
set(WMLXGETTEXT ${PROJECT_SOURCE_DIR}/data/tools/wmlxgettext)
############ pot update. ###########

View file

@ -73,7 +73,7 @@ if "pot-update" in COMMAND_LINE_TARGETS:
wml_pot = env.Command(
join(domain, domain + ".wml.pot"),
cfgs,
"utils/wmlxgettext --directory=. --domain=%s $SOURCES -o $TARGET" % domain
"data/tools/wmlxgettext --directory=. --domain=%s $SOURCES -o $TARGET" % domain
)
new_pot = str(pot) + ".new"