Add mesa DLL to windows build for machines without OpenGL such as VMs

This commit is contained in:
Kovid Goyal 2019-09-04 07:46:00 +05:30
parent be471a8cbe
commit b78f584264
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 8 additions and 0 deletions

View File

@ -2,9 +2,13 @@
# git.exe must be in PATH. Must have ~100GB available disk space and 8GB RAM
# Install certifi in python 3 with:
# py.exe -m pip install certifi
# Copy opengl32sw.dll from
# https://download.qt.io/development_releases/prebuilt/llvmpipe/windows/
# to C:/mesa/32 and C:/mesa/64
vm_name 'calibre-windows-build'
root 'C:/r'
python 'py.exe'
perl 'C:/Strawberry/perl/bin/perl.exe'
ruby 'C:/Ruby26-x64/bin/ruby.exe'
mesa 'C:/mesa'

View File

@ -667,6 +667,9 @@ def copy_crt_and_d3d(env):
worker_env['WINDOWSSDKDIR'], 'Redist', 'D3D', plat)
if not os.path.exists(d3d_path):
raise SystemExit('Windows 10 D3D redistributable not found at: %r' % d3d_path)
mesa_path = os.path.join(os.environ['MESA'], ('64' if is64bit else '32'), 'opengl32sw.dll')
if not os.path.exists(mesa_path):
raise SystemExit('Mesa DLLs (opengl32sw.dll) not found at: %r' % mesa_path)
def copy_dll(dll):
shutil.copy2(dll, env.dll_dir)
@ -675,6 +678,7 @@ def copy_crt_and_d3d(env):
for dll in glob.glob(os.path.join(d3d_path, '*.dll')):
if os.path.basename(dll).lower().startswith('d3dcompiler_'):
copy_dll(dll)
copy_dll(mesa_path)
for dll in glob.glob(os.path.join(sdk_path, '*.dll')):
copy_dll(dll)
for dll in glob.glob(os.path.join(vc_path, '*.dll')):