From 168718e3e7c8675be1944b05aa5bf26d6901fb81 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 23 Nov 2022 09:10:24 +0530 Subject: [PATCH] Windows builds: sign DLLs in addition to EXEs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently Microsoft's latest pointless bit of security theatre now wants DLLs signed in addition to EXEs. Because of course, executable code can only be in DLLs and EXEs. Roll eyes. Fixes #1997486 [calibre does not start when Win 11´s smart app control is activated](https://bugs.launchpad.net/calibre/+bug/1997486) --- bypy/windows/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bypy/windows/__main__.py b/bypy/windows/__main__.py index 73e2e0fc9c..fc62b117b6 100644 --- a/bypy/windows/__main__.py +++ b/bypy/windows/__main__.py @@ -548,9 +548,9 @@ def copy_crt_and_d3d(env): def sign_executables(env): files_to_sign = [] for path in walk(env.base): - if path.lower().endswith('.exe'): + if path.lower().endswith('.exe') or path.lower().endswith('.dll'): files_to_sign.append(path) - printf('Signing {} exe files'.format(len(files_to_sign))) + printf('Signing {} exe/dll files'.format(len(files_to_sign))) sign_files(env, files_to_sign)