[vlc-commits] [Git][videolan/vlc][master] 6 commits: configure: show the logs of check_qml_module.py in the logs

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Apr 17 09:01:54 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
38f562c5 by Steve Lhomme at 2024-04-17T08:32:07+00:00
configure: show the logs of check_qml_module.py in the logs

So we know what is failing.

- - - - -
e012186b by Steve Lhomme at 2024-04-17T08:32:07+00:00
configure: use a different qtconf when contribs are not found

- - - - -
dfc99826 by Steve Lhomme at 2024-04-17T08:32:07+00:00
configure: use qmake6 to check QML modules

If Qt5 and Qt6 are installed, qmake might build for Qt5.

- - - - -
f4b91ae1 by Steve Lhomme at 2024-04-17T08:32:07+00:00
configure: use bin dirs from pkgconfig on native builds, contrib native bin dirs otherwise

- - - - -
5ec613d8 by Steve Lhomme at 2024-04-17T08:32:07+00:00
build: add missing check_qml_module.py from distdir

It was missing from 177d049950e118978fa348e066eb6ad1b220935b and thus the distcheck couldn't call it.

- - - - -
30b5a2ac by Steve Lhomme at 2024-04-17T08:32:07+00:00
qt: disable qsb calls when Qt is disabled

- - - - -


4 changed files:

- Makefile.am
- buildsystem/check_qml_module.py
- configure.ac
- modules/gui/qt/Makefile.am


Changes:

=====================================
Makefile.am
=====================================
@@ -10,6 +10,7 @@ SUBDIRS = compat po share src modules lib doc bin test
 DIST_SUBDIRS = m4 $(SUBDIRS)
 
 EXTRA_DIST = \
+	buildsystem/check_qml_module.py \
 	extras/include/x86/x86inc.asm \
 	extras/include/x86/x86util.asm \
 	extras/package/macosx/package.mak \


=====================================
buildsystem/check_qml_module.py
=====================================
@@ -54,6 +54,7 @@ class QmlModuleChecker:
             )
 
         if ret.returncode != 0:
+            print(ret.stderr.strip())
             return None
 
         return json.loads(ret.stdout)
@@ -82,14 +83,22 @@ class QmlModuleChecker:
             print("qmake not found")
             return False
 
-        ret = subprocess.run(
-            [ qmake, "-qtconf", qtconf, "-query"],
-            capture_output=True,
-            encoding="utf8"
-        )
+        if qtconf:
+            ret = subprocess.run(
+                [ qmake, "-qtconf", qtconf, "-query"],
+                capture_output=True,
+                encoding="utf8"
+            )
+        else:
+            ret = subprocess.run(
+                [ qmake, "-query"],
+                capture_output=True,
+                encoding="utf8"
+            )
 
         if ret.returncode != 0:
-            return None
+            print(ret.stderr.strip())
+            return False
 
         binpath = None
         libexec = None
@@ -111,7 +120,7 @@ class QmlModuleChecker:
             self.qt5 = False
 
         if not checkQmakePath(self.qmlpath):
-            print("Qml path not found")
+            print("Qml path {} not found".format(self.qmlpath))
             return False
 
         self.qmlimportscanner = findProgram(binpath, "qmlimportscanner")
@@ -143,7 +152,7 @@ def main():
         help="native qmake path")
 
     parser.add_argument(
-        "--qtconf", type=str, required=True,
+        "--qtconf", type=str, required=False,
         help="qmake qtconf path")
 
     parser.add_argument(


=====================================
configure.ac
=====================================
@@ -4013,7 +4013,6 @@ AS_IF([test "${enable_qt}" != "no"], [
           have_qt_wayland="yes"
       ],[:])
 
-      QT_LIBEXEC_DIRECTORY="$(eval $PKG_CONFIG --variable=libexecdir Qt6Core)"
       QT_INCLUDE_DIRECTORY="$(eval $PKG_CONFIG --variable=includedir Qt6Core)"
       QT_LIB_DIRECTORY="$(eval $PKG_CONFIG --variable=libdir Qt6Core)"
       QT_VERSION_CORE="$(eval $PKG_CONFIG --modversion Qt6Core)"
@@ -4021,75 +4020,54 @@ AS_IF([test "${enable_qt}" != "no"], [
       QT_VERSION_QML="$(eval $PKG_CONFIG --modversion Qt6Qml)"
       QT_VERSION_QUICK="$(eval $PKG_CONFIG --modversion Qt6Quick)"
 
-      QT_QML_LIBEXEC_DIRECTORY="$(eval $PKG_CONFIG --variable=libexecdir Qt6Qml)"
-      QT_SHADERTOOLS_BIN_DIRECTORY="$(eval $PKG_CONFIG --variable=bindir Qt6ShaderTools)"
-
-      dnl check native in contribs and keep the full path if found there
-      AC_MSG_CHECKING([if contribs provide qmake])
-      AS_IF([test -x "${CONTRIB_DIR}/../bin/qmake${BUILDEXEEXT}"], [
-        QMAKE="${CONTRIB_DIR}/../bin/qmake${BUILDEXEEXT}"
-        AC_MSG_RESULT([yes])
+      AS_IF([test "${host}" = "${build}"],[
+        dnl native build, we can use the exectuables of the Qt6 target
+        QT_BIN_DIRECTORY="$(eval $PKG_CONFIG --variable=bindir Qt6Core)"
+        QT_LIBEXEC_DIRECTORY="$(eval $PKG_CONFIG --variable=libexecdir Qt6Core)"
+        QT_QML_LIBEXEC_DIRECTORY="$(eval $PKG_CONFIG --variable=libexecdir Qt6Qml)"
+        QT_SHADERTOOLS_BIN_DIRECTORY="$(eval $PKG_CONFIG --variable=bindir Qt6ShaderTools)"
       ],[
-        AC_MSG_RESULT([no])
+        dnl cross compilation, use Qt6 native tools from contribs
+        AS_IF([test -n "${CONTRIB_DIR}"], [
+          QT_BIN_DIRECTORY=${CONTRIB_DIR}/../bin
+          QT_LIBEXEC_DIRECTORY=${CONTRIB_DIR}/../libexec
+          QT_QML_LIBEXEC_DIRECTORY=${QT_LIBEXEC_DIRECTORY}
+          QT_SHADERTOOLS_BIN_DIRECTORY=${QT_BIN_DIRECTORY}
+        ])
       ])
-      AC_CHECK_TOOL(QMAKE, [qmake], [false])
-      AC_MSG_CHECKING([if contribs provide moc])
-      AS_IF([test -x "${CONTRIB_DIR}/../libexec/moc${BUILDEXEEXT}"], [
-        MOC="${CONTRIB_DIR}/../libexec/moc${BUILDEXEEXT}"
+
+      AC_MSG_CHECKING([if contribs provide target_qt.conf])
+      AS_IF([test -e "${CONTRIB_DIR}/bin/target_qt.conf"], [
+        QT_CONF=${CONTRIB_DIR}/bin/target_qt.conf
         AC_MSG_RESULT([yes])
       ],[
         AC_MSG_RESULT([no])
       ])
+
+      dnl check native in contribs and keep the full path if found there
+      AC_PATH_PROGS(QMAKE6, [qmake6], qmake6, ["${QT_BIN_DIRECTORY}"])
       AC_PATH_PROGS(MOC, [moc], moc, ["${QT_LIBEXEC_DIRECTORY}"])
-      AC_MSG_CHECKING([if contribs provide rcc])
-      AS_IF([test -x "${CONTRIB_DIR}/../libexec/rcc${BUILDEXEEXT}"], [
-        RCC="${CONTRIB_DIR}/../libexec/rcc${BUILDEXEEXT}"
-        AC_MSG_RESULT([yes])
-      ],[
-        AC_MSG_RESULT([no])
-      ])
       AC_PATH_PROGS(RCC, [rcc], rcc, ["${QT_LIBEXEC_DIRECTORY}"])
-      AC_MSG_CHECKING([if contribs provide uic])
-      AS_IF([test -x "${CONTRIB_DIR}/../libexec/uic${BUILDEXEEXT}"], [
-        UIC="${CONTRIB_DIR}/../libexec/uic${BUILDEXEEXT}"
-        AC_MSG_RESULT([yes])
-      ],[
-        AC_MSG_RESULT([no])
-      ])
       AC_PATH_PROGS(UIC, [uic], uic, ["${QT_LIBEXEC_DIRECTORY}"])
-      AC_MSG_CHECKING([if contribs provide qsb])
-      AS_IF([test -x "${CONTRIB_DIR}/../bin/qsb${BUILDEXEEXT}"], [
-        QSB="${CONTRIB_DIR}/../bin/qsb${BUILDEXEEXT}"
-        AC_MSG_RESULT([yes])
-      ],[
-        AC_MSG_RESULT([no])
-      ])
       AC_PATH_PROGS(QSB, [qsb], qsb, ["${QT_SHADERTOOLS_BIN_DIRECTORY}"])
-
-      AC_MSG_CHECKING([if contribs provide qmlcachegen])
-      AS_IF([test -x "${CONTRIB_DIR}/../libexec/qmlcachegen${BUILDEXEEXT}"], [
-        QMLCACHEGEN="${CONTRIB_DIR}/../libexec/qmlcachegen${BUILDEXEEXT}"
-        AC_MSG_RESULT([yes])
-      ],[
-        AC_MSG_RESULT([no])
-      ])
-      AC_PATH_PROGS(QMLCACHEGEN, [qmlcachegen], qmlcachegen, ["${QT_QML_LIBEXEC_DIRECTORY}"])
+      AC_PATH_PROGS(QMLCACHEGEN, [qmlcachegen], no, ["${QT_QML_LIBEXEC_DIRECTORY}"])
       AS_IF([test "${QMLCACHEGEN}" = "no"], [
           AC_MSG_WARN([qmlcachegen not found])
       ])
 
       AC_CHECK_PROGS(PYTHON3, [python3], [no])
-      AC_MSG_CHECKING([if required Qt plugins are installed with ${QMAKE}])
+      AC_MSG_CHECKING([if required Qt plugins are installed with ${QMAKE6} and conf ${QT_CONF}])
       AS_IF([test "$PYTHON3" != "no" && ${PYTHON3} ${srcdir}/buildsystem/check_qml_module.py \
-            --qmake "${QMAKE}" \
-            --qtconf "${CONTRIB_DIR}/bin/target_qt.conf" \
+            --qmake "${QMAKE6}" \
+            --qtconf "${QT_CONF}" \
             --modules \
             QtQml.Models="" \
             QtQml.WorkerScript="" \
             QtQuick.Layouts="" \
             QtQuick.Window="" \
             QtQuick.Controls="" \
-            Qt5Compat.GraphicalEffects=""], [
+            Qt5Compat.GraphicalEffects="" \
+            >&AS_MESSAGE_FD ], [
         AC_MSG_RESULT([yes])
       ],[
         AC_MSG_RESULT([no])
@@ -4099,9 +4077,10 @@ AS_IF([test "${enable_qt}" != "no"], [
 
       PKG_CHECK_MODULES([QT_QUICK_TEST], [Qt6QuickTest >= ${QT_MINIMUM_VERSION}], [
           AS_IF([test "$PYTHON3" != "no" && ${PYTHON3} ${srcdir}/buildsystem/check_qml_module.py \
-            --qmake "${QMAKE}" \
-            --qtconf "${CONTRIB_DIR}/bin/target_qt.conf" \
-            --modules QtTest=""], [
+            --qmake "${QMAKE6}" \
+            --qtconf "${QT_CONF}" \
+            --modules QtTest="" \
+            >&AS_MESSAGE_FD ], [
               have_qt_quick_test="yes"
           ], [])
       ],[


=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -1121,7 +1121,6 @@ if ENABLE_QT
 BUILT_SOURCES += \
     $(libqt_plugin_la_SHADER:.frag=.frag.qsb) \
     $(libqt_plugin_la_SHADER:.vert=.vert.qsb)
-endif
 
 QSB_PARAMS = --glsl="100 es,120,150" --batchable -O
 if HAVE_WIN32
@@ -1153,6 +1152,7 @@ endif
 EXTRA_DIST += $(lib_qt_plugin_la_QRC) $(libqt_plugin_la_RES) $(libqt_plugin_la_SHADER)
 
 nodist_libqt_plugin_la_SOURCES += resources.cpp shaders/shaders.cpp
+endif
 
 if ENABLE_VLM
 nodist_libqt_plugin_la_SOURCES += dialogs/vlm/vlm.moc.cpp



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/78f68d45af0ce3ae24c60262c728eddef4f72996...30b5a2ac41c777c65d5279cbf40adc6205b72e32

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/78f68d45af0ce3ae24c60262c728eddef4f72996...30b5a2ac41c777c65d5279cbf40adc6205b72e32
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