Only update po on Windows

This commit is contained in:
jspijker 2023-02-23 10:54:32 +01:00
parent 53eda4f1cc
commit 04f5aa04b8

View file

@ -328,17 +328,18 @@ class CuraConan(ConanFile):
entitlements_file = entitlements_file if self.settings.os == "Macos" else "None") entitlements_file = entitlements_file if self.settings.os == "Macos" else "None")
# Update the po files # Update the po files
vb = VirtualBuildEnv(self) if self.settings.os != "Windows" or self.conf.get("tools.microsoft.bash:path", check_type=str):
vb.generate() vb = VirtualBuildEnv(self)
vb.generate()
# FIXME: once m4, autoconf, automake are Conan V2 ready use self.win_bash and add gettext as base tool_requirement # FIXME: once m4, autoconf, automake are Conan V2 ready use self.win_bash and add gettext as base tool_requirement
cpp_info = self.dependencies["gettext"].cpp_info cpp_info = self.dependencies["gettext"].cpp_info
for po_file in self.source_path.joinpath("resources", "i18n").glob("**/*.po"): for po_file in self.source_path.joinpath("resources", "i18n").glob("**/*.po"):
pot_file = self.source_path.joinpath("resources", "i18n", po_file.with_suffix('.pot').name) pot_file = self.source_path.joinpath("resources", "i18n", po_file.with_suffix('.pot').name)
mkdir(self, str(unix_path(self, pot_file.parent))) mkdir(self, str(unix_path(self, pot_file.parent)))
self.run( self.run(
f"{cpp_info.bindirs[0]}/msgmerge --no-wrap --no-fuzzy-matching -width=140 -o {po_file} {po_file} {pot_file}", f"{cpp_info.bindirs[0]}/msgmerge --no-wrap --no-fuzzy-matching -width=140 -o {po_file} {po_file} {pot_file}",
env="conanbuild", ignore_errors=True) env="conanbuild", ignore_errors=True)
def build(self): def build(self):
if self.options.devtools: if self.options.devtools: