From 8bb6968ab8d7b6dfc3f2872b78b274d6418425d1 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 24 Jan 2026 07:22:57 +0500 Subject: [PATCH] scripts: waifulib: sdl2: add paths support for SDL mingw dev package --- scripts/waifulib/sdl2.py | 8 +++++++- scripts/waifulib/vgui.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/waifulib/sdl2.py b/scripts/waifulib/sdl2.py index d4c943ac..43336f01 100644 --- a/scripts/waifulib/sdl2.py +++ b/scripts/waifulib/sdl2.py @@ -63,12 +63,18 @@ def sdl2_configure_path(conf, path, libname): conf.env[LIB] = [libname] conf.end_msg('yes: {0}, {1}, {2}'.format(conf.env[LIB], conf.env[LIBPATH], conf.env[INCLUDES])) else: + if conf.env.DEST_OS == 'win32' and conf.env.COMPILER_CC != 'msvc': + if conf.env.DEST_CPU == 'x86': + triplet = 'i686-w64-mingw32' + else: + triplet = conf.env.DEST_CPU + '-w64-mingw32' + path = os.path.abspath(os.path.join(path, triplet)) conf.env[INCLUDES] = [ os.path.abspath(os.path.join(path, 'include')), os.path.abspath(os.path.join(path, 'include/%s' % libname)) ] libpath = 'lib' - if conf.env.COMPILER_CC == 'msvc': + if conf.env.DEST_OS == 'win32' and conf.env.COMPILER_CC == 'msvc': if conf.env.DEST_CPU == 'x86_64': libpath = 'lib/x64' else: diff --git a/scripts/waifulib/vgui.py b/scripts/waifulib/vgui.py index 00dc0358..5fd54191 100644 --- a/scripts/waifulib/vgui.py +++ b/scripts/waifulib/vgui.py @@ -45,7 +45,7 @@ def check_vgui(conf): else: conf.end_msg('yes') conf.start_msg('Does this toolchain able to link VGUI?') - if conf.env.DEST_OS == 'win32' and conf.env.COMPILER_CXX == 'g++': + if conf.env.DEST_OS == 'win32' and conf.env.COMPILER_CXX != 'msvc': conf.end_msg('no') # we have ABI incompatibility ONLY on MinGW Logs.warn('vgui can\'t be linked with MinGW')