Skip to content

Commit

Permalink
Windows app: don't need to include msvcp140.dll any more
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanDunfield committed Jan 14, 2025
1 parent d3757cb commit aee02f8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
14 changes: 0 additions & 14 deletions windows_exe/SnapPy_dbg.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@ datafiles += collect_data_files('spherogram')
datafiles += collect_data_files('tkinter_gl')


# SnapPyHP.pyd and twister_core.pyd are compiled with the MS Visual
# C++ compiler from Visual Studio 2015, which dynamically links them
# against the C++ runtime library msvcp140.dll. As of PyInstaller
# 3.3, vcruntime140.dll (and msvcp100.dll) are listed in
# PyInstaller.depends.dylib._includes but msvcp140.dll is not. To
# work around this we add msvcp140.dll as a binary, specifying
# that it should be at the top level of the bundle, adjacent to the
# two .pyd files which depend on it.

if cpu_width == '32bit':
binaries = [('C:\\Windows\\SysWOW64\\msvcp140.dll', '.')]
else:
binaries = [('C:\\Windows\\System32\\msvcp140.dll', '.')]

a = Analysis(['SnapPy.py'],
binaries=binaries,
hiddenimports=imports + ['linecache', 'pkg_resources.py2_warn'],
Expand Down
14 changes: 0 additions & 14 deletions windows_exe/SnapPy_py3.spec
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@ datafiles += collect_data_files('spherogram')
datafiles += collect_data_files('tkinter_gl')


# SnapPyHP.pyd and twister_core.pyd are compiled with the MS Visual
# C++ compiler from Visual Studio 2015, which dynamically links them
# against the C++ runtime library msvcp140.dll. As of PyInstaller
# 3.3, vcruntime140.dll (and msvcp100.dll) are listed in
# PyInstaller.depends.dylib._includes but msvcp140.dll is not. To
# work around this we add msvcp140.dll as a binary, specifying
# that it should be at the top level of the bundle, adjacent to the
# two .pyd files which depend on it.

if cpu_width == '32bit':
binaries = [('C:\\Windows\\SysWOW64\\msvcp140.dll', '.')]
else:
binaries = [('C:\\Windows\\System32\\msvcp140.dll', '.')]

a = Analysis(['SnapPy.py'],
binaries=binaries,
hiddenimports=imports + ['linecache', 'pkg_resources.py2_warn'],
Expand Down

0 comments on commit aee02f8

Please sign in to comment.