From e400f04319a48577767113932fc7bf27679533f7 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 23 Oct 2022 15:25:16 +0200 Subject: [PATCH] Only run gettext in a bash environment Once the msys2 (m4, autoconf, automake) are fixed we can use the msys2 recipe. For now people can use their own bash environment on Windows by setting the tools.microsoft.bash:path and tools.microsoft.bash:subsystem when needed. --- conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conanfile.py b/conanfile.py index 9dfe60db81..9476badca6 100644 --- a/conanfile.py +++ b/conanfile.py @@ -276,9 +276,8 @@ class CuraConan(ConanFile): self.requires(req) def build_requirements(self): - if self.settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", default=False, check_type=bool): - self.tool_requires("msys2/cci.latest") - self.tool_requires("gettext/0.21") + if self.settings_build.os != "Windows" or self.conf.get("tools.microsoft.bash:path", default=False, check_type=bool): + self.tool_requires("gettext/0.21") def layout(self): self.folders.source = "." @@ -290,7 +289,7 @@ class CuraConan(ConanFile): self.cpp.package.resdirs = ["resources", "plugins", "packaging", "pip_requirements"] # pip_requirements should be the last item in the list def build(self): - if self.settings.os == "Windows": + if self.settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", default=False, check_type=bool): return # FIXME: once m4, autoconf, automake are Conan V2 ready self.win_bash = True # We need gettext, which requires the bash environment @@ -318,6 +317,7 @@ class CuraConan(ConanFile): icon_path = "'{}'".format(Path(self.source_folder, "packaging", self._um_data()["pyinstaller"]["icon"][str(self.settings.os)])).replace("\\", "\\\\"), entitlements_file = entitlements_file if self.settings.os == "Macos" else "None") + def imports(self): self.copy("CuraEngine.exe", root_package = "curaengine", src = "@bindirs", dst = "", keep_path = False) self.copy("CuraEngine", root_package = "curaengine", src = "@bindirs", dst = "", keep_path = False)