From d3187e424ec8754329eab9eb83a4bb255a0196a2 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 24 Jan 2024 03:39:12 +0200 Subject: [PATCH 35/35] Make gtk4-client the default See osdn #47782 Signed-off-by: Marko Lindqvist --- configure.ac | 62 ++++++++++++++++++++++---------------------- doc/INSTALL.meson | 4 +-- doc/README | 30 ++++++++++----------- doc/README.packaging | 1 + meson_options.txt | 4 +-- 5 files changed, 50 insertions(+), 51 deletions(-) diff --git a/configure.ac b/configure.ac index eb3037a088..1914c80b69 100644 --- a/configure.ac +++ b/configure.ac @@ -1096,12 +1096,12 @@ if test "x$client" != "xno"; then AS_MESSAGE([checking for which clients to compile:...]) fi - dnl Gtk-3.22-specific overrides - FC_GTK3_22_CLIENT - dnl Gtk-4.0-specific overrides FC_GTK4_CLIENT + dnl Gtk-3.22-specific overrides + FC_GTK3_22_CLIENT + dnl QT-specific overrides FC_QT_CLIENT @@ -1160,34 +1160,6 @@ esac], [fcruleup=yes]) AM_CONDITIONAL([FCRULEUP], [test "x$fcruleup" != "xno"]) dnl freeciv-modpack checks -if test "x$req_fcmp_gtk3" = "xyes" || - test "x$modinst" = "xall" || test "x$modinst" = "xauto" ; then - PKG_CHECK_MODULES([GTK3MP], [gtk+-3.0 >= 3.10.0], -[ - GTK3MP_CFLAGS="$GTK3MP_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_8 -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_10" - GTK3MP_CFLAGS="$GTK3MP_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36" - PKG_CHECK_MODULES([GTHREAD_GTK3], [gthread-2.0], -[ - fcmp_gtk3=yes - fcmp_list="$fcmp_list gtk3" - mp_gtk3_cflags="$GTK3MP_CFLAGS $GTHREAD_GTK3_CFLAGS" - mp_gtk3_libs="$GTK3MP_LIBS $GTHREAD_GTK3_LIBS" - if test "x$MINGW" = "xyes"; then - dnl Required to compile gtk3 on Windows platform - mp_gtk3_cflags="$mp_gtk3_cflags -mms-bitfields" - mp_gtk3_ldflags="$mp_gtk3_ldflags $MWINDOWS_FLAG" - fi - - if test "x$modinst" = "xauto" ; then - modinst=found - fi -], [fcmp_gtk3=no])], [fcmp_gtk3=no]) -fi - -if test "x$req_fcmp_gtk3" = "xyes" && test "x$fcmp_gtk3" != "xyes" ; then - AC_MSG_ERROR([Cannot build gtk3-version of freeciv-modpack as requested]) -fi - if test "x$req_fcmp_gtk4" = "xyes" || test "x$modinst" = "xall" || test "x$modinst" = "xauto" ; then PKG_CHECK_MODULES([GTK4_MP], [gtk4 >= 4.0.0], @@ -1216,6 +1188,34 @@ if test "x$req_fcmp_gtk4" = "xyes" && test "x$fcmp_gtk4" != "xyes" ; then AC_MSG_ERROR([Cannot build gtk4-version of freeciv-modpack as requested]) fi +if test "x$req_fcmp_gtk3" = "xyes" || + test "x$modinst" = "xall" || test "x$modinst" = "xauto" ; then + PKG_CHECK_MODULES([GTK3MP], [gtk+-3.0 >= 3.10.0], +[ + GTK3MP_CFLAGS="$GTK3MP_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_8 -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_10" + GTK3MP_CFLAGS="$GTK3MP_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36" + PKG_CHECK_MODULES([GTHREAD_GTK3], [gthread-2.0], +[ + fcmp_gtk3=yes + fcmp_list="$fcmp_list gtk3" + mp_gtk3_cflags="$GTK3MP_CFLAGS $GTHREAD_GTK3_CFLAGS" + mp_gtk3_libs="$GTK3MP_LIBS $GTHREAD_GTK3_LIBS" + if test "x$MINGW" = "xyes"; then + dnl Required to compile gtk3 on Windows platform + mp_gtk3_cflags="$mp_gtk3_cflags -mms-bitfields" + mp_gtk3_ldflags="$mp_gtk3_ldflags $MWINDOWS_FLAG" + fi + + if test "x$modinst" = "xauto" ; then + modinst=found + fi +], [fcmp_gtk3=no])], [fcmp_gtk3=no]) +fi + +if test "x$req_fcmp_gtk3" = "xyes" && test "x$fcmp_gtk3" != "xyes" ; then + AC_MSG_ERROR([Cannot build gtk3-version of freeciv-modpack as requested]) +fi + if test "x$req_fcmp_qt" = "xyes" || test "x$modinst" = "xauto" || test "x$modinst" = "xall" ; then diff --git a/doc/INSTALL.meson b/doc/INSTALL.meson index d163c43ce6..43b31428e8 100644 --- a/doc/INSTALL.meson +++ b/doc/INSTALL.meson @@ -106,12 +106,12 @@ clients (array): List of clients to build. To disable client build completely, give an empty array ('-Dclients=[]'). Currently gtk3.22-, sdl2-, qt-, gtk4-, sdl3-, and stub-client builds are supported. - By default builds just gtk3.22-client. + By default builds just gtk4-client. fcmp (array): List of freeciv modpack installer UIs to build. To disable their build completely, give an empty array ('-Dfcmp=[]'). Currently gtk3, qt, gtk4, - and cli are supported. By default builds just gtk3 UI. + and cli are supported. By default builds just gtk4 UI. cacert-path (string): Custom path to CA cert bundle. If this is empty, default path will be used. diff --git a/doc/README b/doc/README index 0b3ad2f456..465d9904e4 100644 --- a/doc/README +++ b/doc/README @@ -80,33 +80,31 @@ a game is in progress, there will be one server program running, and as many client programs as there are human players. The server does not use a gui, but the clients do. The clients come in many flavors: -freeciv-gtk3.22: This uses the GTK+ 3 libraries. Version 3.22 or 3.24 - is required. To install, see section 1a of the INSTALL document. +freeciv-gtk4: This uses GTK 4 libraries. This client is better supported and more developed than the others, as such it is considered to be the default interface throughout the rest of this document. +freeciv-gtk3.22: This uses the GTK+ 3 libraries. Version 3.22 or 3.24 + is required. To install, see section 1a of the INSTALL document. + freeciv-qt: This uses the QT library, either Qt5 or Qt6. This client is considered generally usable, but it still lacks number of features gtk-clients have. freeciv-sdl2: This uses Simple DirectMedia Layer libraries version 2. -freeciv-gtk4: This uses GTK 4 libraries. This client is expected later to - replace freeciv-gtk3.22, but it's still lacking some of the functionality - of the freeciv-gtk3.22. - Starting a game: ================ NOTE: The following examples assume that Freeciv has been installed on - your system, and that the directory containing the "freeciv-gtk3.22" + your system, and that the directory containing the "freeciv-gtk4" and "freeciv-server" programs is in your PATH. If Freeciv is not installed, then you may want to use the "fcgui" and "fcser" programs, which can be found in the top Freeciv directory. They are used - in exactly the same fashion as "freeciv-gtk3.22" and "freeciv-server". + in exactly the same fashion as "freeciv-gtk4" and "freeciv-server". Running Freeciv involves starting the server, then the client(s) and AI(s), then telling the server to start the game. Here are the @@ -176,7 +174,7 @@ Client: Now all the human players should join, by running the Freeciv client: - | % freeciv-gtk3.22 + | % freeciv-gtk4 This assumes the server is running on the same machine. If not, you can either specify it on the command line with the '--server' option, @@ -185,13 +183,13 @@ Client: For example, suppose the server is running on a different machine called 'neptune'. Then players would join with a command like: - | % freeciv-gtk3.22 --server neptune + | % freeciv-gtk4 --server neptune If you're the only human player, then only one client needs to be started. In standard Unix fashion you can start the client "in the background" by appending an ampersand: - | % freeciv-gtk3.22 & + | % freeciv-gtk4 & Another option for the client you may like to try is the '--tiles' option, which can be used to select different "tilesets" (that is, @@ -215,7 +213,7 @@ Client: To try another one, for instance the trident tileset, start the client with: - | % freeciv-gtk3.22 --tiles trident + | % freeciv-gtk4 --tiles trident Other tilesets are available from https://www.freeciv.org/wiki/Tilesets @@ -293,7 +291,7 @@ Caveats: incompatible with any 2.4.x or earlier versions. 2) If the Metaserver button in the connection dialog doesn't work, - check if your ISP uses a mandatory WWW proxy and make freeciv-gtk3.22 + check if your ISP uses a mandatory WWW proxy and make freeciv-gtk4 use it through the $http_proxy environment variable. For instance, if the proxy is proxy.myisp.com port 8888, set $http_proxy to http://proxy.myisp.com:8888/ before starting the client. @@ -414,7 +412,7 @@ or, if the save-file was created by a server that compressed it: Now the players can rejoin the game: - | % freeciv-gtk3.22 -n Alexander + | % freeciv-gtk4 -n Alexander Notice how the player-name is specified with the -n option. It's vital that the player uses the same name as they had when the game was running, @@ -432,7 +430,7 @@ You may choose which local language to use by specifying a "locale". Each locale has a standard name (e.g., 'de' for German). If you have installed Freeciv, you may choose a locale by setting the environment variable LANG to that locale's standard name before running freeciv-server -and freeciv-gtk3.22. +and freeciv-gtk4. For example, assuming you wish to use the German localization, you would do: @@ -493,7 +491,7 @@ level messages. Example: - | % freeciv-gtk3.22 --debug fatal + | % freeciv-gtk4 --debug fatal This suppresses all non-fatal client log messages. diff --git a/doc/README.packaging b/doc/README.packaging index fd7382f559..e5465e48c9 100644 --- a/doc/README.packaging +++ b/doc/README.packaging @@ -17,6 +17,7 @@ Updating from 3.1 to 3.2 (e.g. ~/.freeciv/freeciv-client-rc-3.1 generated by Freeciv 3.1, ~/.freeciv-client-rc-3.0 generated by Freeciv 3.0, or ~/.civclientrc generated by Freeciv version <= 2.1). +* Gtk4-client is now the default * Gtk3-client has been dropped * Minimum SDL2 requirement for sound support is 2.0.6. * Minimum Python requirement for code generation scripts is 3.5. diff --git a/meson_options.txt b/meson_options.txt index 4b912fc602..ee08170649 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,13 +1,13 @@ option('clients', type: 'array', choices: ['gtk3.22','sdl2', 'qt', 'gtk4', 'stub', 'sdl3'], - value: ['gtk3.22'], + value: ['gtk4'], description: 'Clients to build') option('fcmp', type: 'array', choices: ['gtk3','qt','cli','gtk4'], - value: ['gtk3'], + value: ['gtk4'], description: 'Modpack installer UIs to build') option('cacert-path', -- 2.43.0