Martin Storsjö : widl: Fix including tlb files in mingw-w64-tools configuration.

Alexandre Julliard julliard at winehq.org
Wed Dec 29 16:04:18 CST 2021


Module: wine
Branch: master
Commit: 7f95c692998daa83cbeffcbe261ebbff80af54a8
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7f95c692998daa83cbeffcbe261ebbff80af54a8

Author: Martin Storsjö <martin at martin.st>
Date:   Wed Dec 29 00:05:07 2021 +0200

widl: Fix including tlb files in mingw-w64-tools configuration.

Prior to c94f44f9b4559351c0ca86d344fe37aabc15200c (widl: Search for
imported typelibs in the library search path.), widl looked for
tlb files in the path specified by BIN_TO_INCLUDEDIR. After that
commit, widl looks for tlb files in a subdirectory (get_pe_dir)
of BIN_TO_DLLDIR (which mingw-w64 sets to the same as
BIN_TO_INCLUDEDIR).

For compatibility with the mingw-w64 usecase, check for tlb files
in the directory specified by BIN_TO_DLLDIR without a separate
subdirectory suffix too.

Signed-off-by: Martin Storsjö <martin at martin.st>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/widl/widl.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/widl/widl.c b/tools/widl/widl.c
index 0b5f07236f0..f696a73bd2f 100644
--- a/tools/widl/widl.c
+++ b/tools/widl/widl.c
@@ -698,7 +698,11 @@ int open_typelib( const char *name )
 
     if (stdinc)
     {
-        if (dlldir) TRYOPEN( strmake( "%s%s/%s", dlldir, pe_dir, name ));
+        if (dlldir)
+        {
+            TRYOPEN( strmake( "%s%s/%s", dlldir, pe_dir, name ));
+            TRYOPEN( strmake( "%s/%s", dlldir, name ));
+        }
         for (i = 0; i < ARRAY_SIZE(default_dirs); i++)
         {
             if (i && !strcmp( default_dirs[i], default_dirs[0] )) continue;




More information about the wine-cvs mailing list