Skip to content

Commit

Permalink
building: ensure that onefile builds on Windows have manifest embedded
Browse files Browse the repository at this point in the history
The onefile builds on Windows may not have manifest embedded if
icon was explicitly disabled via `--icon NONE`. This in turn causes
subtle issues, such as #5624.
  • Loading branch information
rokm committed Mar 11, 2021
1 parent b9e70f3 commit dad3a21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PyInstaller/building/api.py
Expand Up @@ -532,7 +532,8 @@ def assemble(self):
raise SystemExit(_MISSING_BOOTLOADER_ERRORMSG)

if is_win and (self.icon != "NONE" or self.versrsrc or self.resources
or self.uac_admin or self.uac_uiaccess or not is_64bits):
or self.uac_admin or self.uac_uiaccess or not is_64bits
or (self.manifest and not self.exclude_binaries)):
fd, tmpnm = tempfile.mkstemp(prefix=os.path.basename(exe) + ".",
dir=CONF['workpath'])
# need to close the file, otherwise copying resources will fail
Expand Down
2 changes: 2 additions & 0 deletions news/5625.bugfix.rst
@@ -0,0 +1,2 @@
(Windows) Fix ``onefile`` builds not having manifest embedded when icon is
disabled via ``--icon NONE``.

0 comments on commit dad3a21

Please sign in to comment.