visual studio redistributable
See original GitHub issueCurrently, the windows version of glfw needs to have the VC redistributable installed or else it fails with an error when you attempt to use it. Would you be willing to redistribute the DLL inside the windows wheel?
For the x64 version this looks like copying msvcr110.dll
from c:\windows\system32
to the package directory, then modifying this code: https://github.com/FlorianRhiem/pyGLFW/blob/master/glfw/library.py#L161 to look something like this:
elif sys.platform == 'win32':
# try glfw3.dll using windows search paths
try:
glfw = ctypes.CDLL('glfw3.dll')
except OSError:
# try glfw3.dll in package directory
try:
glfw = ctypes.CDLL(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'glfw3.dll'))
except OSError:
# try glfw3.dll with included VC redistributable
os.environ["PATH"] = os.environ["PATH"] + ";" + os.path.abspath(os.path.dirname(__file__))
try:
glfw = ctypes.CDLL('glfw3.dll')
except OSError:
glfw = None
It looks like you are explicitly allowed to redistribute the redistributable DLLs: https://docs.microsoft.com/en-us/cpp/windows/determining-which-dlls-to-redistribute?view=vs-2019
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Latest supported Visual C++ Redistributable downloads
Microsoft Visual C++ Redistributable latest supported downloads · Visual Studio 2015, 2017, 2019, and 2022 · Visual Studio 2013 (VC++ 12.0).
Read more >Download Visual C++ Redistributable for Visual Studio ...
The Visual C++ Redistributable Packages install run-time components that are ...
Read more >Visual C++ Redistributable for Visual Studio 2015
The Visual C++ Redistributable Packages install run-time components that are required to run C++ applications built using Visual Studio 2015.
Read more >Redistributing Visual C++ Files
The easiest way to locate the redistributable files is by using ...
Read more >Visual Studio 2019 Redistribution
Find the Distributable Code for Microsoft Visual Studio ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for your help! I’ve just uploaded v1.9.0 with wheels for linux, windows and macOS.
I tested this on a headless server and it seemed to work fine. I don’t have a desktop linux machine currently.
Thanks for doing this! Being able to depend on glfw without adding per-platform install instructions is great.