From b47787992fa33a4dc13a53a43f7e344ae98e161d Mon Sep 17 00:00:00 2001 From: Chris Ahlstrom Date: Mon, 28 Oct 2024 10:32:19 +0000 Subject: [PATCH] Still working on MSYS2 build, conflicting Qt locations between Win Qt install and Msys2 Qt install. --- configure.ac | 16 ++++++++++------ m4/ax_have_qt.m4 | 26 ++++++++++++++------------ nsis/build_release_package.bat | 6 ++---- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index d4ab3b12..af6e3fc2 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl \file configure.ac dnl \library Seq66 dnl \author Chris Ahlstrom dnl \date 2018-11-09 -dnl \update 2024-10-26 +dnl \update 2024-10-28 dnl \version $Revision$ dnl \license $XPC_SUITE_GPL_LICENSE$ dnl @@ -507,11 +507,15 @@ if test "$ac_build_qt" != "no" ; then if test "$ac_build_windows" != "yes" ; then AM_PATH_ALSA(0.9.0) fi -if test "$ac_clang_active" = "yes" ; then - AX_HAVE_QT_CLANG -else - AX_HAVE_QT_MIN -fi + if test "$ac_build_windows" = "yes" ; then + AX_HAVE_QT + else + if test "$ac_clang_active" = "yes" ; then + AX_HAVE_QT_CLANG + else + AX_HAVE_QT_MIN + fi + fi AC_MSG_RESULT([qt user-interface build enabled]); fi diff --git a/m4/ax_have_qt.m4 b/m4/ax_have_qt.m4 index ff46129a..95d49403 100644 --- a/m4/ax_have_qt.m4 +++ b/m4/ax_have_qt.m4 @@ -25,6 +25,7 @@ # QT_LRELEASE # QT_LUPDATE # QT_DIR +# QMAKE # # which respectively contain an "-I" flag pointing to the Qt include # directory, link flags necessary to link with Qt and X, the full path to @@ -54,7 +55,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 19 +#serial 25 AU_ALIAS([BNV_HAVE_QT], [AX_HAVE_QT]) AC_DEFUN([AX_HAVE_QT], @@ -62,22 +63,23 @@ AC_DEFUN([AX_HAVE_QT], AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PATH_X]) AC_REQUIRE([AC_PATH_XTRA]) - - AC_MSG_CHECKING(for Qt) - # openSUSE leap 15.3 installs qmake-qt5, not qmake, for example. - # Store the full name (like qmake-qt5) into am_have_qt_qmexe + # Store the full name (like qmake-qt5) into QMAKE # and the specifier (like -qt5 or empty) into am_have_qt_qmexe_suff. - AC_CHECK_PROGS(am_have_qt_qmexe,qmake qmake-qt6 qmake-qt5,[]) - am_have_qt_qmexe_suff=`echo $am_have_qt_qmexe | cut -b 6-` + AC_ARG_VAR([QMAKE],"Qt make tool") + AC_CHECK_TOOLS([QMAKE],[qmake qmake-qt6 qmake-qt5],[false]) + + AC_MSG_CHECKING(for Qt) + am_have_qt_qmexe_suff=`echo $QMAKE | sed 's,^.*qmake,,'` # If we have Qt5 or later in the path, we're golden - ver=`$am_have_qt_qmexe --version | grep -o "Qt version ."` + ver=`$QMAKE --version | grep -o "Qt version ."` if test "$ver" ">" "Qt version 4"; then have_qt=yes # This pro file dumps qmake's variables, but it only works on Qt 5 or later am_have_qt_dir=`mktemp -d` am_have_qt_pro="$am_have_qt_dir/test.pro" + am_have_qt_stash="$am_have_qt_dir/.qmake.stash" am_have_qt_makefile="$am_have_qt_dir/Makefile" # http://qt-project.org/doc/qt-5/qmake-variable-reference.html#qt cat > $am_have_qt_pro << EOF @@ -114,15 +116,14 @@ qtHaveModule(webkit): QT += webkit qtHaveModule(webkitwidgets): QT += webkitwidgets qtHaveModule(xml): QT += xml qtHaveModule(xmlpatterns): QT += xmlpatterns - percent.target = % percent.commands = @echo -n "\$(\$(@))\ " QMAKE_EXTRA_TARGETS += percent EOF - $am_have_qt_qmexe $am_have_qt_pro -o $am_have_qt_makefile + $QMAKE $am_have_qt_pro -o $am_have_qt_makefile QT_CXXFLAGS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile CXXFLAGS INCPATH` QT_LIBS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile LIBS` - rm $am_have_qt_pro $am_have_qt_makefile + rm $am_have_qt_pro $am_have_qt_stash $am_have_qt_makefile rmdir $am_have_qt_dir # Look for specific tools in $PATH @@ -133,7 +134,7 @@ EOF QT_LUPDATE=`which lupdate$am_have_qt_qmexe_suff` # Get Qt version from qmake - QT_DIR=`$am_have_qt_qmexe --version | grep -o -E /.+` + QT_DIR=`$QMAKE --version | grep -o -E /.+` # All variables are defined, report the result AC_MSG_RESULT([$have_qt: @@ -166,6 +167,7 @@ EOF AC_SUBST(QT_RCC) AC_SUBST(QT_LRELEASE) AC_SUBST(QT_LUPDATE) + AC_SUBST(QMAKE) #### Being paranoid: if test x"$have_qt" = xyes; then diff --git a/nsis/build_release_package.bat b/nsis/build_release_package.bat index 569aee65..aa1f97d3 100644 --- a/nsis/build_release_package.bat +++ b/nsis/build_release_package.bat @@ -1,4 +1,4 @@ -REM REM @echo off +@echo off :: ************************************************************************** :: Seq66 Windows Build-Release Package :: -------------------------------------------------------------------------- @@ -7,7 +7,7 @@ REM REM @echo off :: \library Seq66 for Windows :: \author Chris Ahlstrom :: \date 2018-05-26 -:: \update 2024-10-25 +:: \update 2024-10-28 :: \license $XPC_SUITE_GPL_LICENSE$ :: :: This script sets up and creates a release build of Seq66 for @@ -253,8 +253,6 @@ echo %QMAKE% %QMAKEOPTS% %CONFIG_SET% %PROJECT_REL_ROOT%\%PROJECT_PRO% >> %LOG% echo %MINGMAKE% with output to make.log >> %LOG% 2>&1 %MINGMAKE% >> %LOG% 2>&1 -PAUSE - :: if %ERRORLEVEL% NEQ 0 goto builderror if ERRORLEVEL 1 goto builderror