From 5215b42fc3b80518b8efdb38ad24d19bcba599ed Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 17 Jan 2025 20:44:01 +0700 Subject: [PATCH] make manifest files optional during development, we want to be able to call 'install_exe' directly, without creating the manifest files --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 786c55e4af..b0d1c7c0e9 100755 --- a/setup.py +++ b/setup.py @@ -1852,12 +1852,17 @@ def do_add_DLLs(prefix="lib", *dll_names: str) -> None: setup_options["executables"] = executables def add_exe(script, icon, base_name, base="Console") -> None: + kwargs = {} + manifest = f"dist/{base_name}.exe.manifest" + if os.path.exists(manifest): + kwargs["manifest"] = manifest executables.append(Executable( script=script, init_script=None, # targetDir = "dist", icon=f"fs/share/xpra/icons/{icon}", target_name=f"{base_name}.exe", base=base, + **kwargs )) def add_console_exe(script, icon, base_name) -> None: