Some of these demo clients are useful for testing.

Add options to enable and install the demo clients.

The IVI shell example already enabled and installed some of the demo
clients. Select the required options instead of installing the demo
clients directly.

Signed-off-by: Michael Tretter <[email protected]>
---
 rules/weston.in   | 98 ++++++++++++++++++++++++++++++++++++++++++++++-
 rules/weston.make | 36 ++++++++++++-----
 2 files changed, 123 insertions(+), 11 deletions(-)

diff --git a/rules/weston.in b/rules/weston.in
index 26f6b20c0ac6..6897c6109779 100644
--- a/rules/weston.in
+++ b/rules/weston.in
@@ -31,7 +31,7 @@ menuconfig WESTON
        select SYSTEMD                  if WESTON_SYSTEMD
        select LUA                      if WESTON_SHELL_LUA
        select LUA_INSTALL_LIBLUA       if WESTON_SHELL_LUA
-       select PANGO                    if WESTON_IVISHELL_EXAMPLE
+       select PANGO                    if WESTON_DEMO_CLIENTS
        select PIPEWIRE                 if WESTON_BACKEND_PIPEWIRE
        select NEATVNC                  if WESTON_BACKEND_VNC
        select PAM                      if WESTON_BACKEND_VNC
@@ -91,6 +91,12 @@ config WESTON_IVISHELL_EXAMPLE
        bool
        depends on WESTON_IVISHELL
        select WESTON_INSTALL_CONFIG
+       select WESTON_DEMO_CLIENTS
+       select WESTON_DEMO_CLICKDOT
+       select WESTON_DEMO_FLOWER
+       select WESTON_DEMO_SMOKE
+       select WESTON_DEMO_TABLET
+       select WESTON_SIMPLE_CLIENTS
        prompt "install example IVI-Shell user interface"
        help
          Install the example hmi-controller, the IVI-Shell user interface
@@ -111,6 +117,96 @@ config WESTON_SIMPLE_CLIENTS
        help
          Install the weston-simple-* test clients.
 
+config WESTON_DEMO_CLIENTS
+       bool
+       prompt "demo clients"
+       help
+         Install the selected Weston demo clients.
+
+if WESTON_DEMO_CLIENTS
+
+config WESTON_DEMO_CLICKDOT
+       bool
+       prompt "weston-clickdot"
+
+config WESTON_DEMO_CLIPTEST
+       bool
+       prompt "weston-cliptest"
+
+config WESTON_DEMO_COLOR
+       bool
+       prompt "weston-color"
+
+config WESTON_DEMO_CONSTRAIT
+       bool
+       prompt "weston-contraint"
+
+config WESTON_DEMO_CONTENT_PROTECTION
+       bool
+       prompt "weston-content-protection"
+
+config WESTON_DEMO_DND
+       bool
+       prompt "weston-dnd"
+
+config WESTON_DEMO_EDITOR
+       bool
+       prompt "weston-editor"
+
+config WESTON_DEMO_EVENTDEMO
+       bool
+       prompt "weston-eventdemo"
+
+config WESTON_DEMO_FLOWER
+       bool
+       prompt "weston-flower"
+
+config WESTON_DEMO_FULLSCREEN
+       bool
+       prompt "weston-fullscreen"
+
+config WESTON_DEMO_IMAGE
+       bool
+       prompt "weston-image"
+
+config WESTON_DEMO_MULTI_RESOURCE
+       bool
+       prompt "weston-multi-resource"
+
+config WESTON_DEMO_PRESENTATION_SHM
+       bool
+       prompt "weston-presentation-shm"
+
+config WESTON_DEMO_RESIZOR
+       bool
+       prompt "weston-resizor"
+
+config WESTON_DEMO_SCALER
+       bool
+       prompt "weston-scaler"
+
+config WESTON_DEMO_SMOKE
+       bool
+       prompt "weston-smoke"
+
+config WESTON_DEMO_STACKING
+       bool
+       prompt "weston-stacking"
+
+config WESTON_DEMO_SUBSURFACES
+       bool
+       prompt "weston-subsurfaces"
+
+config WESTON_DEMO_TABLET
+       bool
+       prompt "weston-tablet"
+
+config WESTON_DEMO_TRANSFORMED
+       bool
+       prompt "weston-transformed"
+
+endif
+
 config WESTON_TOUCH_CALIBRATOR
        bool
        prompt "touch calibrator"
diff --git a/rules/weston.make b/rules/weston.make
index 3146b0664527..39c49f923c01 100644
--- a/rules/weston.make
+++ b/rules/weston.make
@@ -46,7 +46,7 @@ WESTON_CONF_OPT               := \
        -Dbackend-wayland=$(call ptx/truefalse,PTXCONF_WESTON_GL) \
        -Dbackend-x11=false \
        -Dcolor-management-lcms=$(call 
ptx/truefalse,PTXCONF_WESTON_COLOR_MANAGEMENT_LCMS) \
-       -Ddemo-clients=$(call ptx/truefalse,PTXCONF_WESTON_IVISHELL_EXAMPLE) \
+       -Ddemo-clients=$(call ptx/truefalse,PTXCONF_WESTON_DEMO_CLIENTS) \
        -Ddeprecated-pipewire=false \
        -Ddeprecated-remoting=false \
        -Ddeprecated-xdg-shell-v6-unstable=false \
@@ -93,6 +93,27 @@ endif
 # Target-Install
 # ----------------------------------------------------------------------------
 
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_CLICKDOT)    += clickdot
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_CLIPTEST)    += cliptest
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_COLOR)       += color
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_CONSTRAIT)   += constraints
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_CONTENT_PROTECTION)  += 
content_protection
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_DND)         += dnd
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_EDITOR)      += editor
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_EVENTDEMO)   += eventdemo
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_FLOWER)      += flower
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_FULLSCREEN)  += fullscreen
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_IMAGE)       += image
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_MULTI_RESOURCE)      += 
multi-resource
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_PRESENTATION_SHM)    += 
presentation-shm
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_RESIZOR)     += resizor
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_SCALER)      += scaler
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_SMOKE)       += smoke
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_STACKING)    += stacking
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_SUBSURFACES) += subsurfaces
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_TABLET)      += tablet
+WESTON_DEMO_CLIENTS-$(PTXCONF_WESTON_DEMO_TRANSFORMED) += transformed
+
 $(STATEDIR)/weston.targetinstall:
        @$(call targetinfo)
 
@@ -208,16 +229,11 @@ ifdef PTXCONF_WESTON_IVISHELL_EXAMPLE
                sidebyside.png \
                tiling.png, \
                $(call install_copy, weston, 0, 0, 0644, -, 
/usr/share/weston/$(image))$(ptx/nl))
+endif
 
-       @$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-clickdot)
-       @$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-flower)
-ifdef PTXCONF_WESTON_GL
-       @$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-simple-egl)
-endif
-       @$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-simple-shm)
-       @$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-smoke)
-       @$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-tablet)
-endif
+       @$(foreach bin, $(WESTON_DEMO_CLIENTS-y), \
+               $(call install_copy, weston, 0, 0, 0755, -, \
+                       /usr/bin/weston-$(bin))$(ptx/nl))
 
        @$(call install_finish, weston)
 
-- 
2.47.3


Reply via email to