How to link the msvcr100.dll program with the cx_freeze program

I have a Python3 console program [.py] that, when I run the [exe file after compilation], misses the msvcr100.dll error on some machines [friends or relatives, etc.], to which I need to download this dll file [google download him and copy it to the system32 .

Therefore, after googling, I found that cx_Freeze has an "include_msvcr" in build_exe that can help me solve this problem, but the documentation is not in accordance with my standard, and I could not figure out how to do it.

Here is my setup_console.py code:

 import sys from cx_Freeze import setup, Executable base=None if sys.platform=='win32': base="Win32GUI" setup( name="Rescue Unit", version="2.0", executables=[Executable("resunitv2.py",base)]) 

I tried adding the include_msvcr line after the base argument to Executable , but it gave an include_msvcr not defined error.

Btw. I use this GUI compilation code because I donโ€™t want the console window to appear while the program is running [hate] Can someone show me how to do this [with sample code possible]

[cx_Freeze version - 4.3.3, version for Python - 3.5, Windows 7 SP1 x64]

+6
source share
1 answer

Thank you all for your help, but I understood everything. The include_msvcr option should be added to the setup.py file as follows:

 import sys from cx_Freeze import setup, Executable build_exe_options = { "include_msvcr": True #skip error msvcr100.dll missing } base=None if sys.platform=='win32': base="WIN32GUI" setup( name = "AppName", version = "1.0", description = "blah blah", options = {"build_exe": build_exe_options}, executables = [Executable("appname.py", base=base)]) 
+9
source

Source: https://habr.com/ru/post/970524/


All Articles