Skip to content

Commit

Permalink
Fixed py2exe to include msvcp90.dll and friends
Browse files Browse the repository at this point in the history
  • Loading branch information
robmcmullen committed Feb 4, 2016
1 parent b8d33df commit 3afca0f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,11 @@ def run(self):
import py2exe
if is_64bit:
# Help py2exe find MSVCP90.DLL from vcredist_x64
sys.path.append("C:/Windows/winsxs/amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_08e61857a83bc251")
winsxs = "C:/Windows/winsxs/amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_08e61857a83bc251"
else:
# Help py2exe find MSVCP90.DLL from vcredist_x86
sys.path.append("C:/Windows/winsxs/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_e163563597edeada")
winsxs = "C:/Windows/winsxs/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_e163563597edeada"
sys.path.append(winsxs)

def remove_pyc(basedir):
for curdir, dirlist, filelist in os.walk(basedir):
Expand Down Expand Up @@ -281,14 +282,12 @@ def bench(self, label='fast', verbose=1, extra_argv=None):
if is_64bit:
nsis_arch = """ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64"""

# copy manifest and app config files to work around side-by-side
# errors
for f in glob.glob(r'pyinstaller/Microsoft.VC90.CRT-9.0.30729.6161/*'):
print f
shutil.copy(f, win_dist_dir)
else:
nsis_arch = ""

# copy dlls from VC redistributable package
for f in glob.glob(r'%s/*' % winsxs):
shutil.copy(f, win_dist_dir)
shutil.copy("%s/run.exe" % win_dist_dir, "%s/omnivore.exe" % win_dist_dir)
iss_filename = "%s\\omnivore.iss" % win_dist_dir
iss_file = open(iss_filename, "w")
Expand Down

0 comments on commit 3afca0f

Please sign in to comment.