Windows builds: sign DLLs in addition to EXEs

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)
This commit is contained in:
Kovid Goyal 2022-11-23 09:10:24 +05:30
parent aea3492d77
commit 168718e3e7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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)