Skip to content

Commit

Permalink
Only add missing DLLs if they don't already exist
Browse files Browse the repository at this point in the history
  • Loading branch information
mherrmann committed Jan 3, 2018
1 parent ceb2571 commit 30d284c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fbs/freeze/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from fbs.freeze import run_pyinstaller
from fbs.resources import generate_resources
from os import remove
from os.path import join, dirname
from os.path import join, dirname, exists
from shutil import copy

import sys
Expand Down Expand Up @@ -30,9 +30,11 @@ def freeze_windows(extra_pyinstaller_args=None):
_add_missing_dlls()

def _add_missing_dlls():
for dll in (
freeze_dir = path('${freeze_dir}')
for dll_name in (
'msvcr100.dll', 'msvcr110.dll', 'msvcp110.dll', 'vcruntime140.dll',
'msvcp140.dll', 'concrt140.dll', 'vccorlib140.dll',
'api-ms-win-crt-multibyte-l1-1-0.dll'
):
copy(join(r'c:\Windows\System32', dll), path('${freeze_dir}'))
if not exists(join(freeze_dir, dll_name)):
copy(join(r'c:\Windows\System32', dll_name), freeze_dir)

0 comments on commit 30d284c

Please sign in to comment.