From 4d41e4674732c2b36ebed4808d1a31502eff4829 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 24 Sep 2023 13:07:38 +0300 Subject: [PATCH 42/42] Meson: Make manual generator build optional Flatpak builds do not enable it. See osdn #48650 Signed-off-by: Marko Lindqvist --- doc/INSTALL.meson | 1 + meson.build | 4 ++++ meson_options.txt | 4 ++-- .../windows/installer_cross/meson-winbuild.sh | 14 ++++++-------- platforms/windows/installer_msys2/Makefile.meson | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/doc/INSTALL.meson b/doc/INSTALL.meson index 91092f7fd9..00d3ad7865 100644 --- a/doc/INSTALL.meson +++ b/doc/INSTALL.meson @@ -153,6 +153,7 @@ audio (boolean): tools (array): Extra tools to build: * ruledit : Ruleset editor + * manual: Manual generator Default is to build them all. nls (boolean): diff --git a/meson.build b/meson.build index 4bc117c207..c35dbdacda 100644 --- a/meson.build +++ b/meson.build @@ -4186,6 +4186,8 @@ custom_target('mi_ruledit', endif +if get_option('tools').contains('manual') + executable('freeciv-manual', 'tools/manual/fc_manual.c', 'client/helpdata.c', @@ -4196,6 +4198,8 @@ executable('freeciv-manual', install: true ) +endif + install_data( 'data/default/default.lua', 'data/default/nationlist.ruleset', diff --git a/meson_options.txt b/meson_options.txt index 83500a504c..7c568baba6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -52,8 +52,8 @@ option('audio', option('tools', type: 'array', - choices: ['ruledit'], - value: ['ruledit'], + choices: ['ruledit', 'manual'], + value: ['ruledit', 'manual'], description: 'Extra tools to build') option('nls', diff --git a/platforms/windows/installer_cross/meson-winbuild.sh b/platforms/windows/installer_cross/meson-winbuild.sh index 93ac407753..3a40d7702b 100755 --- a/platforms/windows/installer_cross/meson-winbuild.sh +++ b/platforms/windows/installer_cross/meson-winbuild.sh @@ -75,20 +75,18 @@ fi QTPARAMS="" +TOOLS=manual case "${GUI}" in - gtk3.22) FCMP="gtk3" - TOOLS="[]" ;; - gtk4) FCMP="gtk4" - TOOLS="[]" ;; - sdl2) FCMP="gtk4" - TOOLS="[]" ;; + gtk3.22) FCMP="gtk3" ;; + gtk4) FCMP="gtk4" ;; + sdl2) FCMP="gtk4" ;; qt5) CLIENT="qt" FCMP="qt" - TOOLS="ruledit" + TOOLS="${TOOLS},ruledit" QTPARAMS="-Dqtver=qt5" ;; qt6) CLIENT="qt" FCMP="qt" - TOOLS="ruledit" + TOOLS="${TOOLS},ruledit" MIN_WINVER=0x0A00 QTPARAMS="-Dqtver=qt6" ;; ruledit) CLIENT="[]" diff --git a/platforms/windows/installer_msys2/Makefile.meson b/platforms/windows/installer_msys2/Makefile.meson index a50b69b885..88b1f131a2 100644 --- a/platforms/windows/installer_msys2/Makefile.meson +++ b/platforms/windows/installer_msys2/Makefile.meson @@ -156,7 +156,7 @@ installer-common: install-freeciv-$(GUI) install-env-$(GUI) install-freeciv-common: clean-install-client-arch # Create build directory mkdir -p $(BUILD_DIR)/$(WINARCH)-client-$(GUI) - cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); meson setup $(IMSYS2_DIR)/../../.. -Dprefix=$(IMSYS2_DIR)/$(INST_DIR)/$(WINARCH)-client-$(GUI) -Dfollowtag='windows-S3_3' -Dclients=$(CLIENT) -Dfcmp=$(FCMP) -Dtools=[] -Dreadline=false -Dcacert-path='./ssl/certs/ca-bundle.crt' -Dmin-win-ver=$(MIN_WIN_VER) -Dsyslua=false $(EXTRA_CONFIG) + cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); meson setup $(IMSYS2_DIR)/../../.. -Dprefix=$(IMSYS2_DIR)/$(INST_DIR)/$(WINARCH)-client-$(GUI) -Dfollowtag='windows-S3_3' -Dclients=$(CLIENT) -Dfcmp=$(FCMP) -Dtools=manual -Dreadline=false -Dcacert-path='./ssl/certs/ca-bundle.crt' -Dmin-win-ver=$(MIN_WIN_VER) -Dsyslua=false $(EXTRA_CONFIG) cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); ninja cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); ninja install cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); ninja langstat_core.txt -- 2.40.1