[vlc-commits] [Git][videolan/npapi-vlc][master] 3 commits: fix stdole2.tld inclusion

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Oct 20 09:00:03 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC Browser Plugins


Commits:
fe037857 by Steve Lhomme at 2022-10-20T07:15:25+02:00
fix stdole2.tld inclusion

recent widl seems to use the pathes in `-L` to load .tlb files, rather than the `-I` pathes.

- - - - -
5fa33482 by Steve Lhomme at 2022-10-20T09:55:52+02:00
configure: show a message about the stdole2.tlb detection

- - - - -
4cd70f5f by Steve Lhomme at 2022-10-20T10:29:00+02:00
configure: detect if widl uses -L for TLD includes

We need to use it in some cases to include the generated stdole2.tlb.

- - - - -


2 changed files:

- activex/Makefile.am
- configure.ac


Changes:

=====================================
activex/Makefile.am
=====================================
@@ -77,7 +77,7 @@ axvlc_la_LIBADD = ../common/libvlcplugin_common.la \
 
 DATA_axvlc_rc = $(noinst_axvlc_rc_DATA)
 noinst_axvlc_rc_DATA = axvlc_rc.$(OBJEXT)
-noinst_axvlc_rcdir = 
+noinst_axvlc_rcdir =
 axvlc_rc.$(OBJEXT): axvlc_rc.rc inplace.bmp axvlc.tlb axvlc.dll.manifest
 	$(WINDRES) --include-dir $(srcdir) -i $< -o $@
 
@@ -107,8 +107,12 @@ axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl
 	$(WIDL) $(WIDLFLAGS) -I$(WINE_SDK_PATH) -I. -t -u -h -T axvlc.tlb -U axvlc_idl.c -H axvlc_idl.h $<
 else
 axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl stdole2.tlb
+if HAS_WIDL_DASH_L
+	$(WIDL) $(WIDLFLAGS) -I$(WINE_SDK_PATH) -I. -L. -t -u -h -T axvlc.tlb -U axvlc_idl.c -H axvlc_idl.h $<
+else
 	$(WIDL) $(WIDLFLAGS) -I$(WINE_SDK_PATH) -I. -t -u -h -T axvlc.tlb -U axvlc_idl.c -H axvlc_idl.h $<
 endif
+endif
 
 clean-tlb:
 	rm -f axvlc.tlb axvlc_idl.c axvlc_idl.h stdole2.tlb stdole2_idl.c stdole2_idl.h


=====================================
configure.ac
=====================================
@@ -133,6 +133,19 @@ AS_IF([test "${SYS}" = "mingw32"],[
     AC_CHECK_HEADER(ole2.h,,[AC_MSG_ERROR([required OLE header ole2.h is missing from your system])])
     AC_CHECK_HEADER(olectl.h,,[AC_MSG_ERROR([required OLE header olectl.h is missing from your system])])
     AC_CHECK_HEADERS(objsafe.h,,,[#include <ole2.h>])
+
+    HAS_WIDL_DASH_L=no
+    AS_IF([test "${WIDL}" != "no"],[
+        AC_MSG_CHECKING([widl uses -L])
+        AS_IF([$WIDL $WIDLFLAGS -L. -t /dev/null 2>/dev/null],[
+            AC_MSG_RESULT([yes])
+            HAS_WIDL_DASH_L=yes
+        ],[
+            AC_MSG_RESULT([no])
+        ])
+    ])
+
+    AC_MSG_CHECKING([for stdole2.tld presence])
     AS_IF([test "${WIDL}" != "no"],[
       ac_ext=idl
       ac_objext=tlb
@@ -147,8 +160,18 @@ library AXVLC
   importlib("stdole2.tlb");
 }
 _ACEOF
-AS_IF([ac_fn_cxx_try_compile "$LINENO"],[has_stdole2_tlb=yes],[has_stdole2_tlb=no])
-    ],[has_stdole2_tlb=no])
+        AS_IF([ac_fn_cxx_try_compile "$LINENO"],[
+            AC_MSG_RESULT([yes])
+            has_stdole2_tlb=yes
+        ],[
+            AC_MSG_RESULT([no])
+            has_stdole2_tlb=no
+        ])
+    ],[
+        AC_MSG_RESULT([no])
+        has_stdole2_tlb=no
+    ])
+
     AC_LANG_POP(C++)
 ],[
     MIDL="no"
@@ -160,6 +183,7 @@ AC_SUBST(WIDLFLAGS)
 AM_CONDITIONAL(HAS_MIDL_COMPILER, test "${MIDL}" != "no")
 AM_CONDITIONAL(HAS_WIDL_COMPILER, test "${WIDL}" != "no")
 AM_CONDITIONAL(HAS_STDOLE2_TLB, test "${has_stdole2_tlb}" = "yes")
+AM_CONDITIONAL(HAS_WIDL_DASH_L, test "${HAS_WIDL_DASH_L}" = "yes")
 
 dnl
 dnl Buggy glibc prevention. Purposedly not cached.



View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/-/compare/1df320cc1f12740ba87463231643448d359ce03a...4cd70f5f4b41b2c46add40ce04a90e75f75e2035

-- 
View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/-/compare/1df320cc1f12740ba87463231643448d359ce03a...4cd70f5f4b41b2c46add40ce04a90e75f75e2035
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list