From 8ade629530f4c53d763280ee22159afc89681785 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 19 Dec 2021 16:44:16 +0200 Subject: [PATCH 30/30] gtk4: Build against gtk4 No longer build gtk4-client against gtk-3.9x.x development versions, but against stable gtk4. Rename variables etc accordingly. See osdn #43427 Signed-off-by: Marko Lindqvist --- Makefile.am | 2 +- client/Makefile.am | 8 +-- client/gui-gtk-4.0/Makefile.am | 2 +- client/gui-gtk-4.0/graphics.c | 2 +- client/gui-gtk-4.0/gui_main.c | 10 +-- client/gui-gtk-4.0/themes.c | 4 +- client/options.c | 78 +++++++++++----------- client/options.h | 2 +- client/tilespec.c | 2 +- common/fc_types.h | 4 +- configure.ac | 24 +++---- data/Makefile.am | 2 +- doc/BUGS | 2 +- doc/README | 2 +- doc/README.packaging | 4 +- m4/gtk3x-client.m4 | 31 --------- m4/gtk4-client.m4 | 31 +++++++++ windows/installer_cross/installer_build.sh | 6 +- windows/installer_cross/winbuild.sh | 2 +- 19 files changed, 109 insertions(+), 109 deletions(-) delete mode 100644 m4/gtk3x-client.m4 create mode 100644 m4/gtk4-client.m4 diff --git a/Makefile.am b/Makefile.am index b61441323d..c3ead9ccc1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -53,7 +53,7 @@ EXTRA_DIST = autogen.sh \ m4/gettimeofday.m4 \ m4/gtk3-client.m4 \ m4/gtk3.22-client.m4 \ - m4/gtk3x-client.m4 \ + m4/gtk4-client.m4 \ m4/host-cpu-c-abi.m4 \ m4/iconv.m4 \ m4/intlmacosx.m4 \ diff --git a/client/Makefile.am b/client/Makefile.am index 87d878929c..6dd8368cc8 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -30,7 +30,7 @@ desktopfile_DATA += \ appdatafile_DATA += \ freeciv-gtk3.22.appdata.xml endif -if CLIENT_GUI_GTK_3X +if CLIENT_GUI_GTK_4 GUI_SUBDIRS += gui-gtk-4.0 endif if CLIENT_GUI_QT @@ -216,19 +216,19 @@ freeciv_gtk3_22_LDADD = \ $(gui_gtk3_22_libs) endif -if CLIENT_GUI_GTK_3X +if CLIENT_GUI_GTK_4 bin_PROGRAMS += freeciv-gtk4 noinst_LTLIBRARIES += libfcgui-gtk4.la libfcgui_gtk4_la_SOURCES = $(freeciv_client_src) libfcgui_gtk4_la_LIBADD = gui-gtk-4.0/libgui-gtk4.la $(clientlibs) freeciv_gtk4_SOURCES = dummy.c -freeciv_gtk4_LDFLAGS = $(gui_gtk3x_ldflags) +freeciv_gtk4_LDFLAGS = $(gui_gtk4_ldflags) freeciv_gtk4_LDADD = \ libfcgui-gtk4.la $(SOUND_LIBS) gui-gtk-4.0/gui_main.lo \ $(top_builddir)/common/libfreeciv.la \ $(INTLLIBS) $(CLIENT_LIBS) $(CLIENTICON) \ $(TINYCTHR_LIBS) $(MAPIMG_WAND_LIBS) \ - $(gui_gtk3x_libs) + $(gui_gtk4_libs) endif if CLIENT_GUI_SDL2 diff --git a/client/gui-gtk-4.0/Makefile.am b/client/gui-gtk-4.0/Makefile.am index ac10082f35..c724276a2a 100644 --- a/client/gui-gtk-4.0/Makefile.am +++ b/client/gui-gtk-4.0/Makefile.am @@ -12,7 +12,7 @@ AM_CPPFLAGS = \ -I$(srcdir)/../agents \ -I$(srcdir)/../luascript \ -I$(top_srcdir)/dependencies/tinycthread \ - $(gui_gtk3x_cflags) $(SOUND_CFLAGS) + $(gui_gtk4_cflags) $(SOUND_CFLAGS) libgui_gtk4_la_SOURCES = \ action_dialog.c \ diff --git a/client/gui-gtk-4.0/graphics.c b/client/gui-gtk-4.0/graphics.c index f550cef056..8f7bc659ab 100644 --- a/client/gui-gtk-4.0/graphics.c +++ b/client/gui-gtk-4.0/graphics.c @@ -50,7 +50,7 @@ struct sprite *intro_gfx_sprite; GdkCursor *fc_cursors[CURSOR_LAST][NUM_CURSOR_FRAMES]; /***********************************************************************//** - Returns TRUE to indicate that gtk3x-client supports given view type + Returns TRUE to indicate that gtk4-client supports given view type ***************************************************************************/ bool is_view_supported(enum ts_type type) { diff --git a/client/gui-gtk-4.0/gui_main.c b/client/gui-gtk-4.0/gui_main.c index 514e21122a..4813a76834 100644 --- a/client/gui-gtk-4.0/gui_main.c +++ b/client/gui-gtk-4.0/gui_main.c @@ -100,7 +100,7 @@ #include "gui_main.h" -const char *client_string = "gui-gtk-3x"; +const char *client_string = "gui-gtk-4.0"; GtkWidget *map_canvas; /* GtkDrawingArea */ GtkWidget *map_horizontal_scrollbar; @@ -243,7 +243,7 @@ static void print_usage(void) { /* add client-specific usage information here */ fc_fprintf(stderr, - _("gtk3x-client gui-specific options are:\n")); + _("gtk4-client gui-specific options are:\n")); fc_fprintf(stderr, _("-r, --resolution WIDTHxHEIGHT\tAssume given resolution " @@ -1726,11 +1726,11 @@ static void migrate_options_from_gtk3(void) } /**********************************************************************//** - Migrate gtk3x client specific options from gtk3.22 client options. + Migrate gtk4 client specific options from gtk3.22 client options. **************************************************************************/ static void migrate_options_from_gtk3_22(void) { - log_normal(_("Migrating options from gtk3.22 to gtk3x client")); + log_normal(_("Migrating options from gtk3.22 to gtk4 client")); #define MIGRATE_OPTION(opt) GUI_GTK_OPTION(opt) = gui_options.gui_gtk3_22_##opt; #define MIGRATE_STR_OPTION(opt) \ @@ -1959,7 +1959,7 @@ void ui_exit(void) **************************************************************************/ enum gui_type get_gui_type(void) { - return GUI_GTK3x; + return GUI_GTK4; } /**********************************************************************//** diff --git a/client/gui-gtk-4.0/themes.c b/client/gui-gtk-4.0/themes.c index cbe274398f..41307e83a9 100644 --- a/client/gui-gtk-4.0/themes.c +++ b/client/gui-gtk-4.0/themes.c @@ -93,7 +93,7 @@ void gui_clear_theme(void) /*************************************************************************//** Each gui has its own themes directories. - For gtk3x these are: + For gtk4 these are: - /usr/share/themes - ~/.themes Returns an array containing these strings and sets array size in count. @@ -109,7 +109,7 @@ char **get_gui_specific_themes_directories(int *count) *count = 0; - /* Freeciv-specific GTK3x themes directories */ + /* Freeciv-specific GTK4 themes directories */ strvec_iterate(data_dirs, dir_name) { char buf[strlen(dir_name) + strlen("/themes/gtk3.22") + 1]; diff --git a/client/options.c b/client/options.c index 0c29d7e8bb..55ed4052db 100644 --- a/client/options.c +++ b/client/options.c @@ -1811,11 +1811,11 @@ static const struct copt_val_name { /* Order must match enum GUI_GTK_MSGCHAT_* */ static const struct copt_val_name names[] = { - /* TRANS: enum value for 'gui_gtk2/gtk3/gtk3x_message_chat_location' */ + /* TRANS: enum value for 'gui_gtk2/gtk3/gtk4_message_chat_location' */ { "SPLIT", N_("Split") }, - /* TRANS: enum value for 'gui_gtk2/gtk3/gtk3x_message_chat_location' */ + /* TRANS: enum value for 'gui_gtk2/gtk3/gtk4_message_chat_location' */ { "SEPARATE", N_("Separate") }, - /* TRANS: enum value for 'gui_gtk2/gtk3/gtk3x_message_chat_location' */ + /* TRANS: enum value for 'gui_gtk2/gtk3/gtk4_message_chat_location' */ { "MERGED", N_("Merged") } }; @@ -1934,7 +1934,7 @@ static struct client_option client_options[] = { GEN_STR_LIST_OPTION(gui_gtk4_default_theme_name, N_("Theme"), N_("By changing this option you change the " "active theme."), - COC_GRAPHICS, GUI_GTK3x, FC_GTK4_DEFAULT_THEME_NAME, + COC_GRAPHICS, GUI_GTK4, FC_GTK4_DEFAULT_THEME_NAME, get_themes_list, theme_reread_callback, 0), GEN_STR_LIST_OPTION(gui_sdl2_default_theme_name, N_("Theme"), N_("By changing this option you change the " @@ -2586,7 +2586,7 @@ static struct client_option client_options[] = { GEN_ENUM_OPTION(gui_gtk3_message_chat_location, N_("Messages and Chat reports location"), /* TRANS: The strings used in the UI for 'Split' etc are - * tagged 'gui_gtk2/gtk3/gtk3x_message_chat_location' */ + * tagged 'gui_gtk2/gtk3/gtk4_message_chat_location' */ N_("Controls where the Messages and Chat reports " "appear relative to the main view containing the map.\n" "'Split' allows all three to be seen simultaneously, " @@ -2807,7 +2807,7 @@ static struct client_option client_options[] = { GEN_ENUM_OPTION(gui_gtk3_22_message_chat_location, N_("Messages and Chat reports location"), /* TRANS: The strings used in the UI for 'Split' etc are - * tagged 'gui_gtk2/gtk3/gtk3x_message_chat_location' */ + * tagged 'gui_gtk2/gtk3/gtk4_message_chat_location' */ N_("Controls where the Messages and Chat reports " "appear relative to the main view containing the map.\n" "'Split' allows all three to be seen simultaneously, " @@ -2963,38 +2963,38 @@ static struct client_option client_options[] = { GEN_BOOL_OPTION(gui_gtk4_fullscreen, N_("Fullscreen"), N_("If this option is set the client will use the " "whole screen area for drawing."), - COC_INTERFACE, GUI_GTK3x, FALSE, NULL), + COC_INTERFACE, GUI_GTK4, FALSE, NULL), GEN_BOOL_OPTION(gui_gtk4_map_scrollbars, N_("Show map scrollbars"), N_("Disable this option to hide the scrollbars on the " "map view."), - COC_INTERFACE, GUI_GTK3x, FALSE, NULL), + COC_INTERFACE, GUI_GTK4, FALSE, NULL), GEN_BOOL_OPTION(gui_gtk4_dialogs_on_top, N_("Keep dialogs on top"), N_("If this option is set then dialog windows will always " "remain in front of the main Freeciv window. " "Disabling this has no effect in fullscreen mode."), - COC_INTERFACE, GUI_GTK3x, TRUE, NULL), + COC_INTERFACE, GUI_GTK4, TRUE, NULL), GEN_BOOL_OPTION(gui_gtk4_show_task_icons, N_("Show worklist task icons"), N_("Disabling this will turn off the unit and building " "icons in the worklist dialog and the production " "tab of the city dialog."), - COC_GRAPHICS, GUI_GTK3x, TRUE, NULL), + COC_GRAPHICS, GUI_GTK4, TRUE, NULL), GEN_BOOL_OPTION(gui_gtk4_enable_tabs, N_("Enable status report tabs"), N_("If this option is enabled then report dialogs will " "be shown as separate tabs rather than in popup " "dialogs."), - COC_INTERFACE, GUI_GTK3x, TRUE, NULL), + COC_INTERFACE, GUI_GTK4, TRUE, NULL), GEN_BOOL_OPTION(gui_gtk4_show_chat_message_time, N_("Show time for each chat message"), N_("If this option is enabled then all chat messages " "will be prefixed by a time string of the form " "[hour:minute:second]."), - COC_INTERFACE, GUI_GTK3x, FALSE, NULL), + COC_INTERFACE, GUI_GTK4, FALSE, NULL), GEN_BOOL_OPTION(gui_gtk4_new_messages_go_to_top, N_("New message events go to top of list"), N_("If this option is enabled, new events in the " "message window will appear at the top of the list, " "rather than being appended at the bottom."), - COC_INTERFACE, GUI_GTK3x, FALSE, NULL), + COC_INTERFACE, GUI_GTK4, FALSE, NULL), GEN_BOOL_OPTION(gui_gtk4_show_message_window_buttons, N_("Show extra message window buttons"), N_("If this option is enabled, there will be two " @@ -3005,13 +3005,13 @@ static struct client_option client_options[] = { "button or right-click on a row to inspect or goto " "respectively). This option will only take effect " "once the message window is closed and reopened."), - COC_INTERFACE, GUI_GTK3x, TRUE, NULL), + COC_INTERFACE, GUI_GTK4, TRUE, NULL), GEN_BOOL_OPTION(gui_gtk4_metaserver_tab_first, N_("Metaserver tab first in network page"), N_("If this option is enabled, the metaserver tab will " "be the first notebook tab in the network page. This " "option requires a restart in order to take effect."), - COC_NETWORK, GUI_GTK3x, FALSE, NULL), + COC_NETWORK, GUI_GTK4, FALSE, NULL), GEN_BOOL_OPTION(gui_gtk4_allied_chat_only, N_("Plain chat messages are sent to allies only"), N_("If this option is enabled, then plain messages " @@ -3024,11 +3024,11 @@ static struct client_option client_options[] = { "can also be set using a toggle button beside " "the chat entry (only visible in multiplayer " "games)."), - COC_INTERFACE, GUI_GTK3x, FALSE, NULL), + COC_INTERFACE, GUI_GTK4, FALSE, NULL), GEN_ENUM_OPTION(gui_gtk4_message_chat_location, N_("Messages and Chat reports location"), /* TRANS: The strings used in the UI for 'Split' etc are - * tagged 'gui_gtk2/gtk3/gtk3x_message_chat_location' */ + * tagged 'gui_gtk2/gtk3/gtk4_message_chat_location' */ N_("Controls where the Messages and Chat reports " "appear relative to the main view containing the map.\n" "'Split' allows all three to be seen simultaneously, " @@ -3041,7 +3041,7 @@ static struct client_option client_options[] = { "tabs alongside the map and other reports; this " "allows a larger map view on small screens.\n" "This option requires a restart in order to take " - "effect."), COC_INTERFACE, GUI_GTK3x, + "effect."), COC_INTERFACE, GUI_GTK4, GUI_GTK_MSGCHAT_SEPARATE, gui_gtk_message_chat_location_name, NULL), GEN_BOOL_OPTION(gui_gtk4_small_display_layout, @@ -3053,30 +3053,30 @@ static struct client_option client_options[] = { "status, and the unit information box will be " "extended over the entire left side of the window. " "This option requires a restart in order to take " - "effect."), COC_INTERFACE, GUI_GTK3x, FALSE, NULL), + "effect."), COC_INTERFACE, GUI_GTK4, FALSE, NULL), GEN_BOOL_OPTION(gui_gtk4_mouse_over_map_focus, N_("Mouse over the map widget selects it automatically"), N_("If this option is enabled, then the map will be " "focused when the mouse hovers over it."), - COC_INTERFACE, GUI_GTK3x, FALSE, NULL), + COC_INTERFACE, GUI_GTK4, FALSE, NULL), GEN_BOOL_OPTION(gui_gtk4_chatline_autocompletion, N_("Player or user name autocompletion"), N_("If this option is turned on, the tabulation key " "will be used in the chatline to complete the word you " "are typing with the name of a player or a user."), - COC_INTERFACE, GUI_GTK3x, TRUE, NULL), + COC_INTERFACE, GUI_GTK4, TRUE, NULL), GEN_INT_OPTION(gui_gtk4_citydlg_xsize, N_("Width of the city dialog"), N_("This value is only used if the width of the city " "dialog is saved."), - COC_INTERFACE, GUI_GTK3x, GUI_GTK4_CITYDLG_DEFAULT_XSIZE, + COC_INTERFACE, GUI_GTK4, GUI_GTK4_CITYDLG_DEFAULT_XSIZE, GUI_GTK4_CITYDLG_MIN_XSIZE, GUI_GTK4_CITYDLG_MAX_XSIZE, NULL), GEN_INT_OPTION(gui_gtk4_citydlg_ysize, N_("Height of the city dialog"), N_("This value is only used if the height of the city " "dialog is saved."), - COC_INTERFACE, GUI_GTK3x, GUI_GTK4_CITYDLG_DEFAULT_YSIZE, + COC_INTERFACE, GUI_GTK4, GUI_GTK4_CITYDLG_DEFAULT_YSIZE, GUI_GTK4_CITYDLG_MIN_YSIZE, GUI_GTK4_CITYDLG_MAX_YSIZE, NULL), GEN_ENUM_OPTION(gui_gtk4_popup_tech_help, @@ -3084,68 +3084,68 @@ static struct client_option client_options[] = { N_("Controls if tech help should be opened when " "new tech has been gained.\n" "'Ruleset' means that behavior suggested by " - "current ruleset is used."), COC_INTERFACE, GUI_GTK3x, + "current ruleset is used."), COC_INTERFACE, GUI_GTK4, GUI_POPUP_TECH_HELP_RULESET, gui_popup_tech_help_name, NULL), GEN_INT_OPTION(gui_gtk4_governor_range_min, N_("Minimum surplus for a governor"), N_("The lower limit of the range for requesting surpluses " "from the governor."), - COC_INTERFACE, GUI_GTK3x, GUI_GTK4_GOV_RANGE_MIN_DEFAULT, + COC_INTERFACE, GUI_GTK4, GUI_GTK4_GOV_RANGE_MIN_DEFAULT, GUI_GTK4_GOV_RANGE_MIN_MIN, GUI_GTK4_GOV_RANGE_MIN_MAX, NULL), GEN_INT_OPTION(gui_gtk4_governor_range_max, N_("Maximum surplus for a governor"), N_("The higher limit of the range for requesting surpluses " "from the governor."), - COC_INTERFACE, GUI_GTK3x, GUI_GTK4_GOV_RANGE_MAX_DEFAULT, + COC_INTERFACE, GUI_GTK4, GUI_GTK4_GOV_RANGE_MAX_DEFAULT, GUI_GTK4_GOV_RANGE_MAX_MIN, GUI_GTK4_GOV_RANGE_MAX_MAX, NULL), GEN_FONT_OPTION(gui_gtk4_font_city_label, "city_label", N_("City Label"), N_("This font is used to display the city labels on city " "dialogs."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Monospace 8", font_changed_callback), GEN_FONT_OPTION(gui_gtk4_font_notify_label, "notify_label", N_("Notify Label"), N_("This font is used to display server reports such " "as the demographic report or historian publications."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Monospace Bold 9", font_changed_callback), GEN_FONT_OPTION(gui_gtk4_font_spaceship_label, "spaceship_label", N_("Spaceship Label"), N_("This font is used to display the spaceship widgets."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Monospace 8", font_changed_callback), GEN_FONT_OPTION(gui_gtk4_font_help_label, "help_label", N_("Help Label"), N_("This font is used to display the help headers in the " "help window."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Sans Bold 10", font_changed_callback), GEN_FONT_OPTION(gui_gtk4_font_help_link, "help_link", N_("Help Link"), N_("This font is used to display the help links in the " "help window."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Sans 9", font_changed_callback), GEN_FONT_OPTION(gui_gtk4_font_help_text, "help_text", N_("Help Text"), N_("This font is used to display the help body text in " "the help window."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Monospace 8", font_changed_callback), GEN_FONT_OPTION(gui_gtk4_font_chatline, "chatline", N_("Chatline Area"), N_("This font is used to display the text in the " "chatline area."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Monospace 8", font_changed_callback), GEN_FONT_OPTION(gui_gtk4_font_beta_label, "beta_label", N_("Beta Label"), N_("This font is used to display the beta label."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Sans Italic 10", font_changed_callback), GEN_FONT_OPTION(gui_gtk4_font_small, "small_font", N_("Small Font"), @@ -3153,31 +3153,31 @@ static struct client_option client_options[] = { "example, it is used for display the building lists " "in the city dialog, the Economy report or the Units " "report."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Sans 9", NULL), GEN_FONT_OPTION(gui_gtk4_font_comment_label, "comment_label", N_("Comment Label"), N_("This font is used to display comment labels, such as " "in the governor page of the city dialogs."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Sans Italic 9", font_changed_callback), GEN_FONT_OPTION(gui_gtk4_font_city_names, "city_names", N_("City Names"), N_("This font is used to the display the city names " "on the map."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Sans Bold 10", NULL), GEN_FONT_OPTION(gui_gtk4_font_city_productions, "city_productions", N_("City Productions"), N_("This font is used to display the city production " "on the map."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Serif 10", NULL), GEN_FONT_OPTION(gui_gtk4_font_reqtree_text, "reqtree_text", N_("Requirement Tree"), N_("This font is used to the display the requirement tree " "in the Research report."), - COC_FONT, GUI_GTK3x, + COC_FONT, GUI_GTK4, "Serif 10", NULL), /* gui-sdl client specific options. diff --git a/client/options.h b/client/options.h index 4c71c6a0ba..d9868b1dbd 100644 --- a/client/options.h +++ b/client/options.h @@ -604,7 +604,7 @@ extern int messages_where[]; /* OR-ed MW_ values [E_COUNT] */ #define GUI_GTK3_22_GOV_RANGE_MAX_MIN 0 #define GUI_GTK3_22_GOV_RANGE_MAX_MAX 100 -/* gui-gtk3x: [xy]size of the city dialog */ +/* gui-gtk4.0: [xy]size of the city dialog */ #define GUI_GTK4_CITYDLG_DEFAULT_XSIZE 770 #define GUI_GTK4_CITYDLG_MIN_XSIZE 256 #define GUI_GTK4_CITYDLG_MAX_XSIZE 4096 diff --git a/client/tilespec.c b/client/tilespec.c index e96ad66074..c9a2ab7c54 100644 --- a/client/tilespec.c +++ b/client/tilespec.c @@ -6716,7 +6716,7 @@ void tileset_use_preferred_theme(const struct tileset *t) default_theme_name = gui_options.gui_gtk3_22_default_theme_name; default_theme_name_sz = sizeof(gui_options.gui_gtk3_22_default_theme_name); break; - case GUI_GTK3x: + case GUI_GTK4: default_theme_name = gui_options.gui_gtk4_default_theme_name; default_theme_name_sz = sizeof(gui_options.gui_gtk4_default_theme_name); break; diff --git a/common/fc_types.h b/common/fc_types.h index 2c0a4cb2dd..cb0fddebd4 100644 --- a/common/fc_types.h +++ b/common/fc_types.h @@ -783,8 +783,8 @@ BV_DEFINE(bv_startpos_nations, MAX_NUM_STARTPOS_NATIONS); #define SPECENUM_VALUE6NAME "sdl2" #define SPECENUM_VALUE7 GUI_WEB #define SPECENUM_VALUE7NAME "web" -#define SPECENUM_VALUE8 GUI_GTK3x -#define SPECENUM_VALUE8NAME "gtk3x" +#define SPECENUM_VALUE8 GUI_GTK4 +#define SPECENUM_VALUE8NAME "gtk4" #include "specenum_gen.h" /* Used in the network protocol. */ diff --git a/configure.ac b/configure.ac index bc95dec448..bf1829f6f5 100644 --- a/configure.ac +++ b/configure.ac @@ -439,7 +439,7 @@ dnl auto: Autodetect one. dnl all: Autodetect as many as possible. dnl comma-separated-list: Detect these or abort. AC_ARG_ENABLE([client], - AS_HELP_STRING([--enable-client=auto/all/gtk3/gtk3.22/sdl2/qt/stub], + AS_HELP_STRING([--enable-client=auto/all/gtk3/gtk3.22/sdl2/qt/gtk4/stub], [clients to compile [auto](list for multiple)]), [clients=${enableval}], [client=auto]) @@ -450,7 +450,7 @@ fi gui_gtk3=no gui_gtk3_22=no -gui_gtk3x=no +gui_gtk4=no gui_sdl2=no gui_qt=no gui_stub=no @@ -470,8 +470,8 @@ for gui in $(echo $clients | $SED 's/,/ /g') ; do gui_gtk3=yes elif test "x$gui" = "xgtk3.22" ; then gui_gtk3_22=yes - elif test "x$gui" = "xgtk3x" ; then - gui_gtk3x=yes + elif test "x$gui" = "xgtk4" ; then + gui_gtk4=yes elif test "x$gui" = "xgtk" ; then AC_MSG_WARN([for requested client 'gtk' enabled gtk3.22-client, that has changed since earlier versions and will change again in the future]) gui_gtk3_22=yes @@ -1057,8 +1057,8 @@ if test "x$client" != "xno"; then dnl SDL2-specific overrides FC_SDL2_CLIENT - dnl Gtk-3x-specific overrides - FC_GTK3X_CLIENT + dnl Gtk-4.0-specific overrides + FC_GTK4_CLIENT dnl Stub-specific overrides if test "x$gui_stub" = "xyes" || test "x$client" = "xall" ; then @@ -1078,7 +1078,7 @@ fi if test "x$client" = "xall" ; then if test "x$gui_gtk3" = "xyes" || test "x$gui_gtk3_22" = "xyes" || - test "x$gui_gtk3x" = "xyes" || + test "x$gui_gtk4" = "xyes" || test "x$gui_sdl2" = "xyes" || test "x$gui_qt" = "xyes" || test "x$gui_stub" = "xyes" ; then @@ -1318,9 +1318,9 @@ AC_SUBST([gui_gtk3_ldflags]) AC_SUBST([gui_gtk3_22_cflags]) AC_SUBST([gui_gtk3_22_libs]) AC_SUBST([gui_gtk3_22_ldflags]) -AC_SUBST([gui_gtk3x_cflags]) -AC_SUBST([gui_gtk3x_libs]) -AC_SUBST([gui_gtk3x_ldflags]) +AC_SUBST([gui_gtk4_cflags]) +AC_SUBST([gui_gtk4_libs]) +AC_SUBST([gui_gtk4_ldflags]) AC_SUBST([gui_sdl2_cflags]) AC_SUBST([gui_sdl2_libs]) AC_SUBST([gui_sdl2_ldflags]) @@ -1357,7 +1357,7 @@ AM_CONDITIONAL(AUDIO_SDL, test "x$SDL_mixer" != "xno") AM_CONDITIONAL(CLIENT_GUI_SDL2, test "x$gui_sdl2" = "xyes") AM_CONDITIONAL(CLIENT_GUI_GTK_3_0, test "x$gui_gtk3" = "xyes") AM_CONDITIONAL(CLIENT_GUI_GTK_3_22, test "x$gui_gtk3_22" = "xyes") -AM_CONDITIONAL(CLIENT_GUI_GTK_3X, test "x$gui_gtk3x" = "xyes") +AM_CONDITIONAL(CLIENT_GUI_GTK_4, test "x$gui_gtk4" = "xyes") AM_CONDITIONAL(CLIENT_GUI_QT, test "x$gui_qt" = "xyes") AM_CONDITIONAL(CLIENT_GUI_STUB, test "x$gui_stub" = "xyes") AM_CONDITIONAL(MINGW, test x"$MINGW" = "xyes") @@ -1896,7 +1896,7 @@ AC_MSG_NOTICE([ In-development client frontends: (these are not yet ready for general use) - Gtk-3x: $gui_gtk3x + Gtk-4.0: $gui_gtk4 Not maintained client frontends: Gtk-3.0: $gui_gtk3 diff --git a/data/Makefile.am b/data/Makefile.am index f0814e6082..d6dd0c08f5 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -22,7 +22,7 @@ if CLIENT_GUI_GTK_3_22 CLIENT_FILES += \ gtk3.22_menus.xml endif -if CLIENT_GUI_GTK_3X +if CLIENT_GUI_GTK_4 gtk4_menus.xml endif else diff --git a/doc/BUGS b/doc/BUGS index 7ed9c29a84..24acea3f35 100644 --- a/doc/BUGS +++ b/doc/BUGS @@ -40,7 +40,7 @@ Here's what to do: - Describe the problem, including any messages that were displayed. - - Indicate which client(s) you are using (gtk3, gtk3.22, gtk3x, + - Indicate which client(s) you are using (gtk3, gtk3.22, gtk4, SDL2, or Qt). - Tell us the name and version of: diff --git a/doc/README b/doc/README index 28ac9ed89b..8f300e7ba0 100644 --- a/doc/README +++ b/doc/README @@ -95,7 +95,7 @@ freeciv-qt: This uses the QT library. Development of this client has recently freeciv-sdl2: This uses Simple DirectMedia Layer libraries version 2. -freeciv-gtk4: This uses GTK+ 3.90+ libraries. This is development version of +freeciv-gtk4: This uses GTK+ 4 libraries. This is development version of a client to get turned to use gtk4 once it's released. diff --git a/doc/README.packaging b/doc/README.packaging index 9ff344464d..6c6bf1159a 100644 --- a/doc/README.packaging +++ b/doc/README.packaging @@ -23,7 +23,7 @@ Updating from 3.0 to 3.1 * Sdl1.2 Mixer support has been dropped * Libsqlite3 is now hard requirement * Sqlite3 based player authentication support is enabled by default -* Added gtk3x-client. It's a development version of future gtk4-client +* Added gtk4-client. It's still in development. * Lua version to use is 5.4 now * Experimental meson based build system has been added in parallel with the official autotools one @@ -142,7 +142,7 @@ Building multiple clients at once --------------------------------- Starting from 2.2 it has been possible to build multiple clients running 'make' just once. Just give configure option "--enable-client" comma -separated list of clients to compile, e.g. "--enable-client=gtk3,gtk3x,sdl2,qt" +separated list of clients to compile, e.g. "--enable-client=gtk3,gtk4,sdl2,qt" ---------------------------------------------------------------------- Savegame compression support diff --git a/m4/gtk3x-client.m4 b/m4/gtk3x-client.m4 deleted file mode 100644 index a91686df5e..0000000000 --- a/m4/gtk3x-client.m4 +++ /dev/null @@ -1,31 +0,0 @@ -# Try to configure the GTK-3x client (gui-gtk-4.0) - -# FC_GTK3X_CLIENT -# Test for GTK-3.99.1 libraries needed for gui-gtk-4.0 - -AC_DEFUN([FC_GTK3X_CLIENT], -[ - # Add checks "x$client" = "xauto" and "x$client" = "xall" - # when this becomes supported client - if test "x$gui_gtk3x" = "xyes" ; then - PKG_CHECK_MODULES([GTK3X], [gtk4 >= 3.99.1], - [ - GTK3X_CFLAGS="$GTK3X_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_94" - GTK3X_CFLAGS="$GTK3X_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66" - gui_gtk3x=yes - if test "x$client" = "xauto" ; then - client=yes - fi - gui_gtk3x_cflags="$GTK3X_CFLAGS" - gui_gtk3x_libs="$GTK3X_LIBS" - if test "x$MINGW" = "xyes"; then - dnl Required to compile gtk3 on Windows platform - gui_gtk3x_cflags="$gui_gtk3x_cflags -mms-bitfields" - gui_gtk3x_ldflags="$gui_gtk3x_ldflags $MWINDOWS_FLAG" - fi - ], - [ - FC_NO_CLIENT([gtk3x], [GTK-3.9x libraries not found]) - ]) - fi -]) diff --git a/m4/gtk4-client.m4 b/m4/gtk4-client.m4 new file mode 100644 index 0000000000..76cbe0bbb5 --- /dev/null +++ b/m4/gtk4-client.m4 @@ -0,0 +1,31 @@ +# Try to configure the GTK-4.0 client (gui-gtk-4.0) + +# FC_GTK4_CLIENT +# Test for GTK-4.0 libraries needed for gui-gtk-4.0 + +AC_DEFUN([FC_GTK4_CLIENT], +[ + # Add checks "x$client" = "xauto" and "x$client" = "xall" + # when this becomes supported client + if test "x$gui_gtk4" = "xyes" ; then + PKG_CHECK_MODULES([GTK4], [gtk4 >= 4.0.0], + [ + GTK4_CFLAGS="$GTK4_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_4_0" + GTK4_CFLAGS="$GTK4_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66" + gui_gtk4=yes + if test "x$client" = "xauto" ; then + client=yes + fi + gui_gtk4_cflags="$GTK4_CFLAGS" + gui_gtk4_libs="$GTK4_LIBS" + if test "x$MINGW" = "xyes"; then + dnl Required to compile gtk4 on Windows platform + gui_gtk4_cflags="$gui_gtk4_cflags -mms-bitfields" + gui_gtk4_ldflags="$gui_gtk4_ldflags $MWINDOWS_FLAG" + fi + ], + [ + FC_NO_CLIENT([gtk4], [GTK-4.0 libraries not found]) + ]) + fi +]) diff --git a/windows/installer_cross/installer_build.sh b/windows/installer_cross/installer_build.sh index 1838c0402e..9275d16925 100755 --- a/windows/installer_cross/installer_build.sh +++ b/windows/installer_cross/installer_build.sh @@ -108,8 +108,8 @@ case $GUI in sdl2) GUINAME="SDL2" FCMP="gtk3" ;; - gtk3x) - GUINAME="GTK3x" + gtk4) + GUINAME="GTK4" FCMP="gtk3" ;; ruledit) ;; *) @@ -229,7 +229,7 @@ else echo "Copying Qt environment failed!" >&2 exit 1 fi ;; - gtk3x) + gtk4) if ! add_gtk4_env $DLLSPATH $INSTDIR ; then echo "Copying gtk4 environment failed!" >&2 exit 1 diff --git a/windows/installer_cross/winbuild.sh b/windows/installer_cross/winbuild.sh index f6df1151bb..4dd81df937 100755 --- a/windows/installer_cross/winbuild.sh +++ b/windows/installer_cross/winbuild.sh @@ -80,7 +80,7 @@ elif test "x$2" != "x" ; then gtk3) FCMP="gtk3" ;; sdl2) FCMP="gtk3" ;; gtk3.22) FCMP="gtk3" ;; - gtk3x) FCMP="gtk3" ;; + gtk4) FCMP="gtk3" ;; qt) FCMP="qt" NLS="--disable-nls" ;; *) echo "Unknown gui \"$2\"!" >&2 -- 2.34.1