From 45b09e60d8966546bf00a7da2004d583aa47bdea Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 24 Sep 2023 13:11:36 +0300 Subject: [PATCH 20/27] 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 ++-- platforms/macos/homebrew-appbundle.sh | 2 +- scripts/ci-build.sh | 2 +- windows/installer_cross/meson-winbuild.sh | 14 ++++++-------- windows/installer_msys2/Makefile.meson | 2 +- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/doc/INSTALL.meson b/doc/INSTALL.meson index 8ebdfe96f3..f0eae957a9 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 ddd2a63df3..470d034af9 100644 --- a/meson.build +++ b/meson.build @@ -4089,6 +4089,8 @@ custom_target('mi_ruledit', endif +if get_option('tools').contains('manual') + executable('freeciv-manual', 'tools/manual/fc_manual.c', 'client/helpdata.c', @@ -4099,6 +4101,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 2cb3da12c3..f2c08721ca 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/macos/homebrew-appbundle.sh b/platforms/macos/homebrew-appbundle.sh index f2ddbf2b5a..9531ddc3b3 100755 --- a/platforms/macos/homebrew-appbundle.sh +++ b/platforms/macos/homebrew-appbundle.sh @@ -102,7 +102,7 @@ fi cd build || exit 1 if ! meson setup .. \ - -Dtools=[] \ + -Dtools=manual \ -Dsyslua=true \ -Ddebug=false \ -Dclients=gtk4,qt \ diff --git a/scripts/ci-build.sh b/scripts/ci-build.sh index e7ee06798e..569f43b384 100755 --- a/scripts/ci-build.sh +++ b/scripts/ci-build.sh @@ -104,7 +104,7 @@ mkdir build cd build meson setup .. \ -Ddebug=true \ - -Dtools=ruledit \ + -Dtools=ruledit,manual \ -Dsyslua=true \ -Dclients=gtk3.22,sdl2,gtk4,qt,stub \ -Dfcmp=gtk3,gtk4,qt,cli \ diff --git a/windows/installer_cross/meson-winbuild.sh b/windows/installer_cross/meson-winbuild.sh index bd925ee298..414b225d6f 100755 --- a/windows/installer_cross/meson-winbuild.sh +++ b/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/windows/installer_msys2/Makefile.meson b/windows/installer_msys2/Makefile.meson index c11e2f012d..c965920683 100644 --- a/windows/installer_msys2/Makefile.meson +++ b/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_2' -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_2' -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