Disable GPU when running headless

On FreeBSD this prevents a failure when building with Qt 6.9

Adding the env only if `isbsd`, but this could be needed for other OSes too.
This commit is contained in:
Guido Falsi 2025-04-29 17:02:01 +02:00
parent aafa372468
commit bee292579a

View File

@ -1619,6 +1619,8 @@ def ensure_app(headless=True):
has_headless = ismacos or islinux or isbsd
if headless and has_headless:
args += ['-platformpluginpath', plugins_loc, '-platform', os.environ.get('CALIBRE_HEADLESS_PLATFORM', 'headless')]
if isbsd:
os.environ['QTWEBENGINE_CHROMIUM_FLAGS'] = '--disable-gpu'
if ismacos:
os.environ['QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM'] = '1'
if headless and iswindows: