From a5140abfb8dcf7f66bc0cbb5dc4c8a0f7bcc1548 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 8 Dec 2021 06:03:46 +0200 Subject: [PATCH 46/46] Make Qt6-mode the default See osdn #43332 Signed-off-by: Marko Lindqvist --- INSTALL | 16 ++++++++-------- configure.ac | 12 ++++++------ doc/README.packaging | 2 ++ windows/installer_cross/winbuild.sh | 2 +- windows/installer_msys2/Makefile | 8 ++++---- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/INSTALL b/INSTALL index 94b0fa7abb..93d9c4872f 100644 --- a/INSTALL +++ b/INSTALL @@ -243,8 +243,8 @@ following order: pkg-config, Glib, Atk, Pango, Gdk-Pixbuf, Gtk+. - C++ compiler. Qt-client is written in C++, so you need appropriate compiler. - Compiler needs to support c++11 standard, or, - in case of --with-qt6 build, c++17 standard + Compiler needs to support c++17 standard, or, + in case of --with-qt5 build, just c++11 standard In Freeciv development, g++ has been the primary C++ compiler. Also clang++ has been used. @@ -252,7 +252,7 @@ following order: pkg-config, Glib, Atk, Pango, Gdk-Pixbuf, Gtk+. - Qt Meta Object Compiler (moc) Qt's Meta Object Compiler is a command usually called 'moc', or - 'moc-qt5' or 'moc-qt6' depending on Qt version in some systems. + 'moc-qt6' or 'moc-qt5' depending on Qt version in some systems. You may want install 'qtchooser' to find correct moc version for you when you have multiple Qt versions installed in parallel. @@ -260,11 +260,11 @@ following order: pkg-config, Glib, Atk, Pango, Gdk-Pixbuf, Gtk+. environment variable MOCCMD, e.g., ./configure MOCCMD="/home/freeciv/local-qt/bin/moc" --enable-client=qt - - Qt5Core, Qt5Gui, and Qt5Widgets libraries and headers. - At least version 5.11 is required. - If one builds with configure option --with-qt6, - required libraries and headers are Qt6Core, Qt6Gui, and Qt6Widgets - and at least version 6.0 of Qt is required. + - Qt6Core, Qt6Gui, and Qt6Widgets libraries and headers. + At least version 6.0 is required. + If one configures with Qt5 compatibility switch --with-qt5, + required libraries and headers are Qt5Core, Qt5Gui, and Qt5Widgets + and at least version 5.11 of Qt is required. 2. Generating Makefiles diff --git a/configure.ac b/configure.ac index 203bbe628d..1a74d6f7b7 100644 --- a/configure.ac +++ b/configure.ac @@ -654,16 +654,16 @@ else CXXFLAGS="$CXXFLAGS -s USE_ICU=1" fi -dnl Should we build experimental versions of Qt programs? +dnl Should we build Qt5 versions of Qt programs? dnl This needs to be before C++ compiler check FC_WORKING_CXX, and dnl that in turn needs to be before FC_DEBUG that will depend on compiler dnl when setting compiler flags. -AC_ARG_WITH([qt6], - AS_HELP_STRING([--with-qt6], [build Qt6 versions of Qt programs]), +AC_ARG_WITH([qt5], + AS_HELP_STRING([--with-qt5], [build Qt5 versions of Qt programs]), [case "${withval}" in - yes) qt_ver="Qt6" ;; - *) qt_ver="Qt5" ;; -esac], [qt_ver="Qt5"]) + yes) qt_ver="Qt5" ;; + *) qt_ver="Qt6" ;; +esac], [qt_ver="Qt6"]) if test "x$qt_ver" = "xQt5" ; then AC_DEFINE([FC_QT5_MODE], [1], [this is Qt5 based build]) diff --git a/doc/README.packaging b/doc/README.packaging index fc233a0ec0..d979c9feca 100644 --- a/doc/README.packaging +++ b/doc/README.packaging @@ -18,6 +18,8 @@ Updating from 3.1 to 3.2 ~/.freeciv-client-rc-3.0 generated by Freeciv 3.0, or ~/.civclientrc generated by Freeciv version <= 2.1). * Gtk3-client has been dropped +* Qt6-mode is used by default. --with-qt6 configure option has been + replaced by --with-qt5 option. ---------------------------------------------------------------------- Compatibility of modified versions diff --git a/windows/installer_cross/winbuild.sh b/windows/installer_cross/winbuild.sh index f6df1151bb..889874c48f 100755 --- a/windows/installer_cross/winbuild.sh +++ b/windows/installer_cross/winbuild.sh @@ -155,7 +155,7 @@ else GITREVP="" fi -if ! ../../../configure MOCCMD=${DLLSPATH}/bin/moc FREECIV_LABEL_FORCE="-crs" CPPFLAGS="-I${DLLSPATH}/include -D_WIN32_WINNT=${MIN_WINVER}" CFLAGS="-Wno-error" PKG_CONFIG_LIBDIR="${DLLSPATH}/lib/pkgconfig" --enable-sys-tolua-cmd --with-magickwand="${DLLSPATH}/bin" --prefix="/" $GITREVP --enable-client=$CLIENTS --enable-fcmp=$FCMP --enable-debug ${NLS} --host=$TARGET --build=$(../../../bootstrap/config.guess) --with-libiconv-prefix=${DLLSPATH} --with-sqlite3-prefix=${DLLSPATH} --with-followtag="crosser" --enable-crosser ${AIS} --disable-freeciv-manual --enable-sdl-mixer=sdl2 --with-qt5-includes=${DLLSPATH}/include --with-qt5-libs=${DLLSPATH}/lib --with-tinycthread --enable-server=$SERVER --enable-ruledit=$RULEDIT $EXTRA_CONFIG +if ! ../../../configure MOCCMD=${DLLSPATH}/bin/moc FREECIV_LABEL_FORCE="-crs" CPPFLAGS="-I${DLLSPATH}/include -D_WIN32_WINNT=${MIN_WINVER}" CFLAGS="-Wno-error" PKG_CONFIG_LIBDIR="${DLLSPATH}/lib/pkgconfig" --with-qt5 --enable-sys-tolua-cmd --with-magickwand="${DLLSPATH}/bin" --prefix="/" $GITREVP --enable-client=$CLIENTS --enable-fcmp=$FCMP --enable-debug ${NLS} --host=$TARGET --build=$(../../../bootstrap/config.guess) --with-libiconv-prefix=${DLLSPATH} --with-sqlite3-prefix=${DLLSPATH} --with-followtag="crosser" --enable-crosser ${AIS} --disable-freeciv-manual --enable-sdl-mixer=sdl2 --with-qt5-includes=${DLLSPATH}/include --with-qt5-libs=${DLLSPATH}/lib --with-tinycthread --enable-server=$SERVER --enable-ruledit=$RULEDIT $EXTRA_CONFIG then echo "Configure failed" >&2 exit 1 diff --git a/windows/installer_msys2/Makefile b/windows/installer_msys2/Makefile index ff0556fbed..db320a6baa 100644 --- a/windows/installer_msys2/Makefile +++ b/windows/installer_msys2/Makefile @@ -67,10 +67,10 @@ sdl2-installer: qt-installer: qt5-installer qt5-installer: - make GUI=qt5 CLIENT=qt FCMP=qt EXTRA_CONFIG="--with-qt5-includes=/$(ARCHDIR)/include --with-qt5-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG)" wrap-qt5 + make GUI=qt5 CLIENT=qt FCMP=qt EXTRA_CONFIG="--with-qt5 --with-qt5-includes=/$(ARCHDIR)/include --with-qt5-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG)" wrap-qt5 qt6-installer: - make GUI=qt6 CLIENT=qt FCMP=qt EXTRA_CONFIG="--with-qt6 --with-qt6-includes=/$(ARCHDIR)/include/qt6 --with-qt6-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG)" MOCCMD="$(QT6_MOCCMD)" wrap-qt6 + make GUI=qt6 CLIENT=qt FCMP=qt EXTRA_CONFIG="--with-qt6-includes=/$(ARCHDIR)/include/qt6 --with-qt6-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG)" MOCCMD="$(QT6_MOCCMD)" wrap-qt6 ruledit-installer: ruledit-installer-qt5 @@ -107,13 +107,13 @@ configure-freeciv-ruledit-qt5: # create build directory mkdir -p build-$(WINARCH)-ruledit-qt5 # configure - cd build-$(WINARCH)-ruledit-qt5; ../../../configure FREECIV_LABEL_FORCE="-msys2" CPPFLAGS="-D_WIN32_WINNT=$(MIN_WIN_VER)" --disable-client --disable-server --disable-fcmp --disable-freeciv-manual --disable-sys-lua --enable-ruledit --enable-ai-static=stub --with-cacert-path="./ssl/certs/ca-bundle.crt" --with-qt5-includes=/$(ARCHDIR)/include --with-qt5-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG) + cd build-$(WINARCH)-ruledit-qt5; ../../../configure FREECIV_LABEL_FORCE="-msys2" CPPFLAGS="-D_WIN32_WINNT=$(MIN_WIN_VER)" --with-qt5 --disable-client --disable-server --disable-fcmp --disable-freeciv-manual --disable-sys-lua --enable-ruledit --enable-ai-static=stub --with-cacert-path="./ssl/certs/ca-bundle.crt" --with-qt5-includes=/$(ARCHDIR)/include --with-qt5-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG) configure-freeciv-ruledit-qt6: # create build directory mkdir -p build-$(WINARCH)-ruledit-qt6 # configure - cd build-$(WINARCH)-ruledit-qt6; ../../../configure FREECIV_LABEL_FORCE="-msys2" CPPFLAGS="-D_WIN32_WINNT=$(MIN_WIN_VER)" --with-qt6 --disable-client --disable-server --disable-fcmp --disable-freeciv-manual --disable-sys-lua --enable-ruledit --enable-ai-static=stub --with-cacert-path="./ssl/certs/ca-bundle.crt" --with-qt6-includes=/$(ARCHDIR)/include/qt6 --with-qt6-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG) + cd build-$(WINARCH)-ruledit-qt6; ../../../configure FREECIV_LABEL_FORCE="-msys2" CPPFLAGS="-D_WIN32_WINNT=$(MIN_WIN_VER)" --disable-client --disable-server --disable-fcmp --disable-freeciv-manual --disable-sys-lua --enable-ruledit --enable-ai-static=stub --with-cacert-path="./ssl/certs/ca-bundle.crt" --with-qt6-includes=/$(ARCHDIR)/include/qt6 --with-qt6-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG) # install Freeciv -- 2.33.0