From cba77bd37286263487501ba7ed829b93b7b30e77 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 27 Sep 2023 11:09:15 +0300 Subject: [PATCH 48/48] Meson: Control ruleup build with 'tools' option See osdn #48736 Signed-off-by: Marko Lindqvist --- doc/INSTALL.meson | 3 ++- meson.build | 4 ++++ meson_options.txt | 4 ++-- platforms/macos/homebrew-appbundle.sh | 2 +- platforms/windows/installer_cross/meson-winbuild.sh | 2 +- platforms/windows/installer_msys2/Makefile.meson | 2 +- scripts/ci-build.sh | 2 +- 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/INSTALL.meson b/doc/INSTALL.meson index 00d3ad7865..88f8c7af4c 100644 --- a/doc/INSTALL.meson +++ b/doc/INSTALL.meson @@ -153,7 +153,8 @@ audio (boolean): tools (array): Extra tools to build: * ruledit : Ruleset editor - * manual: Manual generator + * manual : Manual generator + * ruleup : Ruleset upgrader Default is to build them all. nls (boolean): diff --git a/meson.build b/meson.build index a8e1306567..b64f22a097 100644 --- a/meson.build +++ b/meson.build @@ -4096,6 +4096,8 @@ tool_lib = static_library('fc_toolutil', include_directories: server_inc, ) +if get_option('tools').contains('ruleup') + executable('freeciv-ruleup', 'tools/ruleup.c', link_with: [common_lib, server_lib, tool_lib, ais], @@ -4104,6 +4106,8 @@ executable('freeciv-ruleup', install: true ) +endif + if get_option('tools').contains('ruledit') if not qt_dep.found() diff --git a/meson_options.txt b/meson_options.txt index 7c568baba6..f5bb14e456 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -52,8 +52,8 @@ option('audio', option('tools', type: 'array', - choices: ['ruledit', 'manual'], - value: ['ruledit', 'manual'], + choices: ['ruledit', 'manual', 'ruleup'], + value: ['ruledit', 'manual', 'ruleup'], description: 'Extra tools to build') option('nls', diff --git a/platforms/macos/homebrew-appbundle.sh b/platforms/macos/homebrew-appbundle.sh index 8ccc9f5eda..9a566a1599 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=manual \ + -Dtools=manual,ruleup \ -Dsyslua=true \ -Ddebug=false \ -Dclients=gtk4,qt \ diff --git a/platforms/windows/installer_cross/meson-winbuild.sh b/platforms/windows/installer_cross/meson-winbuild.sh index 3a40d7702b..75b5f12957 100755 --- a/platforms/windows/installer_cross/meson-winbuild.sh +++ b/platforms/windows/installer_cross/meson-winbuild.sh @@ -75,7 +75,7 @@ fi QTPARAMS="" -TOOLS=manual +TOOLS=manual,ruleup case "${GUI}" in gtk3.22) FCMP="gtk3" ;; gtk4) FCMP="gtk4" ;; diff --git a/platforms/windows/installer_msys2/Makefile.meson b/platforms/windows/installer_msys2/Makefile.meson index 88b1f131a2..01c49865bc 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=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); meson setup $(IMSYS2_DIR)/../../.. -Dprefix=$(IMSYS2_DIR)/$(INST_DIR)/$(WINARCH)-client-$(GUI) -Dfollowtag='windows-S3_3' -Dclients=$(CLIENT) -Dfcmp=$(FCMP) -Dtools=manual,ruleup -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 diff --git a/scripts/ci-build.sh b/scripts/ci-build.sh index 6ebe4ce4b7..d83e0531cf 100755 --- a/scripts/ci-build.sh +++ b/scripts/ci-build.sh @@ -105,7 +105,7 @@ cd build meson setup .. \ -Dqtver=qt6x \ -Ddebug=true \ - -Dtools=ruledit,manual \ + -Dtools=ruledit,manual,ruleup \ -Dsyslua=true \ -Dclients=gtk3.22,sdl2,gtk4,qt,stub,gtk4x,sdl3 \ -Dfcmp=gtk3,gtk4,qt,cli \ -- 2.40.1