[vlc-commits] [Git][videolan/vlc][master] 3 commits: Revert "buildsystem: qt: read the qpaths as json"
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Jun 1 09:57:06 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
318f9526 by Steve Lhomme at 2024-06-01T09:43:04+00:00
Revert "buildsystem: qt: read the qpaths as json"
This reverts commit 40d21f1f0b85bf3d6b25ae93b7cb504688e4cd98.
- - - - -
08b0fffa by Steve Lhomme at 2024-06-01T09:43:04+00:00
Revert "configure: use qtpaths6 instead of qmake6"
This reverts commit 8ce83d83ae81df05ec848907380388be6ca9ac47.
- - - - -
0acc38bf by Steve Lhomme at 2024-06-01T09:43:04+00:00
buildsystem: favor QT_INSTALL_XXX to find qmlimportscanner
When providing a qtconf file, the HOST parts seems to come from hardocded values in qmake.
- - - - -
2 changed files:
- buildsystem/check_qml_module.py
- configure.ac
Changes:
=====================================
buildsystem/check_qml_module.py
=====================================
@@ -77,12 +77,12 @@ class QmlModuleChecker:
return ret
- def getInstallInfo(self, qtpaths, qtconf):
- qtpaths_cmd = [ qtpaths, "--query", "--query-format", "json" ]
+ def getInstallInfo(self, qmake, qtconf):
+ qmake_cmd = [ qmake, "-query" ]
if qtconf:
- qtpaths_cmd += [ "--qtconf", qtconf ]
+ qmake_cmd += [ "-qtconf", qtconf ]
ret = subprocess.run(
- qtpaths_cmd,
+ qmake_cmd,
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
encoding="utf8"
)
@@ -91,22 +91,26 @@ class QmlModuleChecker:
print(ret.stderr.strip())
return False
- # Qt 6.6 outputs invalid json, try to fix it
- qpaths_json = str(ret.stdout)
- if ',\n}' in qpaths_json:
- qpaths_json = qpaths_json.replace(',\n}', '\n}')
- elif ',\r\n}' in qpaths_json:
- qpaths_json = qpaths_json.replace(',\r\n}', '\r\n}')
-
- qtjson = json.loads(qpaths_json)
- binpath = qtjson["QT_HOST_BINS"]
- libexec = qtjson["QT_HOST_LIBEXECS"]
- self.qmlpath = qtjson["QT_INSTALL_QML"]
- qmlversion = qtjson["QT_VERSION"]
- if qmlversion:
- qtmajor = qmlversion.split(".")[0]
- else:
- qtmajor = ""
+ binpath_host = None
+ libexec_host = None
+ binpath_install = None
+ libexec_install = None
+ qtmajor = ""
+ for l in ret.stdout.splitlines():
+ l.strip()
+ if l.startswith("QT_HOST_BINS:"):
+ binpath_host = l.split(":", 1)[1]
+ elif l.startswith("QT_HOST_LIBEXECS:"):
+ libexec_host = l.split(":", 1)[1]
+ elif l.startswith("QT_INSTALL_BINS:"):
+ binpath_install = l.split(":", 1)[1]
+ elif l.startswith("QT_INSTALL_LIBEXECS:"):
+ libexec_install = l.split(":", 1)[1]
+ elif l.startswith("QT_INSTALL_QML:"):
+ self.qmlpath = l.split(":", 1)[1]
+ elif l.startswith("QT_VERSION:"):
+ qmlversion = l.split(":", 1)[1]
+ qtmajor = qmlversion.split(".")[0]
if qtmajor == "6":
self.qt5 = False
@@ -115,12 +119,21 @@ class QmlModuleChecker:
print("Qml path {} not found".format(self.qmlpath))
return False
- self.qmlimportscanner = findProgram(binpath, "qmlimportscanner")
+ self.qmlimportscanner = findProgram(binpath_install, "qmlimportscanner")
if self.qmlimportscanner is not None:
return True
- #Qt6 may place qmlimportscanner in libexec
- self.qmlimportscanner = findProgram(libexec, "qmlimportscanner")
+ #Qt6 may place qmlimportscanner in libexec_host
+ self.qmlimportscanner = findProgram(libexec_install, "qmlimportscanner")
+ if self.qmlimportscanner is not None:
+ return True
+
+ self.qmlimportscanner = findProgram(binpath_host, "qmlimportscanner")
+ if self.qmlimportscanner is not None:
+ return True
+
+ #Qt6 may place qmlimportscanner in libexec_host
+ self.qmlimportscanner = findProgram(libexec_host, "qmlimportscanner")
if self.qmlimportscanner is not None:
return True
@@ -140,12 +153,12 @@ class KeyValue(argparse.Action):
def main():
parser = argparse.ArgumentParser("check for qml runtime dependencies")
parser.add_argument(
- "--qtpaths", type=str, required=True,
- help="native qtpaths path")
+ "--qmake", type=str, required=True,
+ help="native qmake path")
parser.add_argument(
"--qtconf", type=str, required=False,
- help="qtpaths qtconf path")
+ help="qmake qtconf path")
parser.add_argument(
"--modules", nargs="+", action=KeyValue, required=True,
@@ -154,7 +167,7 @@ def main():
args = parser.parse_args()
moduleChecker = QmlModuleChecker()
- if not moduleChecker.getInstallInfo(args.qtpaths, args.qtconf):
+ if not moduleChecker.getInstallInfo(args.qmake, args.qtconf):
exit(-1)
with NamedTemporaryFile(mode="w+", suffix=".qml") as f:
=====================================
configure.ac
=====================================
@@ -3983,7 +3983,7 @@ have_qt_core_private="no"
have_fxc="no"
AS_IF([test "${enable_qt}" != "no"], [
have_qt="yes"
- AC_PATH_PROGS(QTPATHS6, [qtpaths6], qtpaths6, ["$PATH:${CONTRIB_DIR}/../bin"])
+ AC_PATH_PROGS(QMAKE6, [qmake6], qmake6, ["$PATH:${CONTRIB_DIR}/../bin"])
AC_ARG_WITH([qtconf],
AS_HELP_STRING([--with-qtconf=PATH], [location of Qt6 qt.conf file (auto)])
@@ -3998,14 +3998,14 @@ AS_IF([test "${enable_qt}" != "no"], [
])
])
- QT_PATHS=${QTPATHS6}
+ QT_PATHS=${QMAKE6}
AS_IF([test -n "${with_qtconf}"], [
- QT_PATHS="${QT_PATHS} --qtconf ${with_qtconf}"
+ QT_PATHS="${QMAKE6} -qtconf ${with_qtconf}"
])
QT_MINIMUM_VERSION=6.2
AC_MSG_CHECKING([Qt is at least ${QT_MINIMUM_VERSION}])
- QT_VERSION_CORE="$(${QT_PATHS} --query QT_VERSION 2>/dev/null)"
+ QT_VERSION_CORE="$(${QT_PATHS} -query QT_VERSION 2>/dev/null)"
QT_MINIMUM_MAJ=$(echo ${QT_MINIMUM_VERSION} | cut -d "." -f -1)
QT_MINIMUM_MIN=$(echo ${QT_MINIMUM_VERSION} | cut -d "." -f 2-2)
QT_VERSION_MAJ=$(echo ${QT_VERSION_CORE} | cut -d "." -f -1)
@@ -4016,11 +4016,8 @@ AS_IF([test "${enable_qt}" != "no"], [
],[
AC_MSG_RESULT([(${QT_VERSION_CORE}) yes])
- QT_BIN_DIRECTORY="$(${QT_PATHS} --query QT_HOST_BINS 2>/dev/null)"
- QMAKE="${QT_BIN_DIRECTORY}/qmake"
- AS_IF([test -n "${with_qtconf}"],[
- QMAKE="${QMAKE} -qtconf ${with_qtconf}"
- ])
+ QT_BIN_DIRECTORY="$(${QT_PATHS} -query QT_HOST_BINS 2>/dev/null)"
+ QMAKE="${QT_PATHS}"
AC_MSG_NOTICE([using ${QMAKE}])
AC_MSG_CHECKING([for Qt libraries])
@@ -4070,7 +4067,7 @@ AS_IF([test "${enable_qt}" != "no"], [
])
rm -f ${ac_pwd}/modules/gui/qt/qmake-wayland
- QT_LIBEXEC_DIRECTORY="$(${QT_PATHS} --query QT_HOST_LIBEXECS 2>/dev/null)"
+ QT_LIBEXEC_DIRECTORY="$(${QT_PATHS} -query QT_HOST_LIBEXECS 2>/dev/null)"
QT_QML_LIBEXEC_DIRECTORY=${QT_LIBEXEC_DIRECTORY}
QT_SHADERTOOLS_BIN_DIRECTORY=${QT_BIN_DIRECTORY}
@@ -4085,9 +4082,9 @@ AS_IF([test "${enable_qt}" != "no"], [
])
AC_CHECK_PROGS(PYTHON3, [python3], [no])
- AC_MSG_CHECKING([if required Qt plugins are installed with ${QTPATHS6} and conf ${with_qtconf}])
+ AC_MSG_CHECKING([if required Qt plugins are installed with ${QMAKE6} and conf ${with_qtconf}])
AS_IF([test "$PYTHON3" != "no" && ${PYTHON3} ${srcdir}/buildsystem/check_qml_module.py \
- --qtpaths "${QTPATHS6}" \
+ --qmake "${QMAKE6}" \
--qtconf "${with_qtconf}" \
--modules \
QtQml.Models="" \
@@ -4109,7 +4106,7 @@ AS_IF([test "${enable_qt}" != "no"], [
ac_status=$?
AS_IF([test $ac_status = 0 && test -f ${ac_pwd}/modules/gui/qt/qmake-quicktest],[
AS_IF([test "$PYTHON3" != "no" && ${PYTHON3} ${srcdir}/buildsystem/check_qml_module.py \
- --qtpaths "${QTPATHS6}" \
+ --qmake "${QMAKE6}" \
--qtconf "${with_qtconf}" \
--modules QtTest="" \
>&AS_MESSAGE_FD ], [
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b09808a6cff06f0c1981f264f8ef4f197a8beccc...0acc38bf27a65d1155b8611dacce700bad44f679
--
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b09808a6cff06f0c1981f264f8ef4f197a8beccc...0acc38bf27a65d1155b8611dacce700bad44f679
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