From a23ba3a8bebc7795e34c126015c6a1cfecdc89eb Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Thu, 28 Sep 2023 17:00:57 +0200 Subject: [PATCH] dll --- otfmi/function_exporter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/otfmi/function_exporter.py b/otfmi/function_exporter.py index eb3dea2..6f3a654 100644 --- a/otfmi/function_exporter.py +++ b/otfmi/function_exporter.py @@ -447,6 +447,8 @@ def _build_cwrapper(self, verbose): """ cmake_args = ["cmake", "."] if sys.platform.startswith("win"): + # bits = platform.architecture()[0] + # vsplat = {"64bit": "x64", "32bit": "x86"}[bits] cmake_args.insert(1, "-DCMAKE_GENERATOR_PLATFORM=x64") subprocess.run( cmake_args, capture_output=not verbose, cwd=self.workdir, check=True @@ -651,6 +653,9 @@ def export_model(self, model_path, gui=False, verbose=False, binary=True, mode=" list_file = [className + extension] if binary: if sys.platform.startswith("win"): + if os.path.exists(os.path.join(self.workdir, "cwrapper.dll")): + list_file.append("cwrapper.dll") + # import or static lib list_file.append("cwrapper.lib") else: if os.path.exists(os.path.join(self.workdir, "libcwrapper.so")):