[PATCH 2/2] weston.ini.in: make config useful for installed Weston

Michael Tretter m.tretter at pengutronix.de
Wed May 23 08:34:46 UTC 2018


The weston.ini.in files refer to @abs_top_builddir@ and
@abs_top_srcdir@, assuming that the weston.ini is used on the build
system.

Moreover, the ivi-shell weston.ini uses @abs_top_srcdir@/data as path to
Weston data. However, the data is installed to westondatadir, which is
hard-coded to ${datadir}/weston without the data suffix.  Therefore, the
weston.ini.in cannot be used to generate an example weston.ini for an
installed instance of the ivi-shell.

Rename the replacement markers to @example_bindir@ and @example_datadir@
to reflect the nature of the files that are in that directory. Also
remove "data" sub-directory in the weston.ini.in and add it when
generating weston.ini. This allows to use the weston.ini.in for tests on
the build system and as example in an installed system.

Signed-off-by: Michael Tretter <m.tretter at pengutronix.de>
---
 Makefile.am             |  6 ++---
 ivi-shell/weston.ini.in | 54 ++++++++++++++++++++---------------------
 weston.ini.in           |  2 +-
 3 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 69ca6cba7..01b7d5d65 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,15 +17,15 @@ EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
 weston.ini : $(srcdir)/weston.ini.in
 	$(AM_V_GEN)$(SED) \
 		-e 's|@bindir[@]|$(bindir)|g' \
-		-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
+		-e 's|@example_bindir[@]|$(abs_top_builddir)|g' \
 		-e 's|@libexecdir[@]|$(libexecdir)|g' \
 		$< > $@
 
 ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
 	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
 		-e 's|@bindir[@]|$(bindir)|g' \
-		-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
-		-e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
+		-e 's|@example_bindir[@]|$(abs_top_builddir)|g' \
+		-e 's|@example_datadir[@]|$(abs_top_srcdir)/data|g' \
 		-e 's|@libexecdir[@]|$(libexecdir)|g' \
 		-e 's|@plugin_prefix[@]||g' \
 		$< > $@
diff --git a/ivi-shell/weston.ini.in b/ivi-shell/weston.ini.in
index 486498b4c..8e2cb9319 100644
--- a/ivi-shell/weston.ini.in
+++ b/ivi-shell/weston.ini.in
@@ -19,20 +19,20 @@ application-layer-id=4000
 
 transition-duration=300
 
-background-image=@abs_top_srcdir@/data/background.png
+background-image=@example_datadir@/background.png
 background-id=1001
-panel-image=@abs_top_srcdir@/data/panel.png
+panel-image=@example_datadir@/panel.png
 panel-id=1002
 surface-id-offset=10
-tiling-image=@abs_top_srcdir@/data/tiling.png
+tiling-image=@example_datadir@/tiling.png
 tiling-id=1003
-sidebyside-image=@abs_top_srcdir@/data/sidebyside.png
+sidebyside-image=@example_datadir@/sidebyside.png
 sidebyside-id=1004
-fullscreen-image=@abs_top_srcdir@/data/fullscreen.png
+fullscreen-image=@example_datadir@/fullscreen.png
 fullscreen-id=1005
-random-image=@abs_top_srcdir@/data/random.png
+random-image=@example_datadir@/random.png
 random-id=1006
-home-image=@abs_top_srcdir@/data/home.png
+home-image=@example_datadir@/home.png
 home-id=1007
 workspace-background-color=0x99000000
 workspace-background-id=2001
@@ -43,59 +43,59 @@ path=@libexecdir@/weston-keyboard
 [ivi-launcher]
 workspace-id=0
 icon-id=4001
-icon=@abs_top_srcdir@/data/icon_ivi_flower.png
-path=@abs_top_builddir@/weston-flower
+icon=@example_datadir@/icon_ivi_flower.png
+path=@example_bindir@/weston-flower
 
 [ivi-launcher]
 workspace-id=0
 icon-id=4002
-icon=@abs_top_srcdir@/data/icon_ivi_clickdot.png
-path=@abs_top_builddir@/weston-clickdot
+icon=@example_datadir@/icon_ivi_clickdot.png
+path=@example_bindir@/weston-clickdot
 
 [ivi-launcher]
 workspace-id=1
 icon-id=4003
-icon=@abs_top_srcdir@/data/icon_ivi_simple-egl.png
-path=@abs_top_builddir@/weston-simple-egl
+icon=@example_datadir@/icon_ivi_simple-egl.png
+path=@example_bindir@/weston-simple-egl
 
 [ivi-launcher]
 workspace-id=1
 icon-id=4004
-icon=@abs_top_srcdir@/data/icon_ivi_simple-shm.png
-path=@abs_top_builddir@/weston-simple-shm
+icon=@example_datadir@/icon_ivi_simple-shm.png
+path=@example_bindir@/weston-simple-shm
 
 [ivi-launcher]
 workspace-id=2
 icon-id=4005
-icon=@abs_top_srcdir@/data/icon_ivi_smoke.png
-path=@abs_top_builddir@/weston-smoke
+icon=@example_datadir@/icon_ivi_smoke.png
+path=@example_bindir@/weston-smoke
 
 [ivi-launcher]
 workspace-id=3
 icon-id=4006
-icon=@abs_top_srcdir@/data/icon_ivi_flower.png
-path=@abs_top_builddir@/weston-flower
+icon=@example_datadir@/icon_ivi_flower.png
+path=@example_bindir@/weston-flower
 
 [ivi-launcher]
 workspace-id=3
 icon-id=4007
-icon=@abs_top_srcdir@/data/icon_ivi_clickdot.png
-path=@abs_top_builddir@/weston-clickdot
+icon=@example_datadir@/icon_ivi_clickdot.png
+path=@example_bindir@/weston-clickdot
 
 [ivi-launcher]
 workspace-id=3
 icon-id=4008
-icon=@abs_top_srcdir@/data/icon_ivi_simple-egl.png
-path=@abs_top_builddir@/weston-simple-egl
+icon=@example_datadir@/icon_ivi_simple-egl.png
+path=@example_bindir@/weston-simple-egl
 
 [ivi-launcher]
 workspace-id=3
 icon-id=4009
-icon=@abs_top_srcdir@/data/icon_ivi_simple-shm.png
-path=@abs_top_builddir@/weston-simple-shm
+icon=@example_datadir@/icon_ivi_simple-shm.png
+path=@example_bindir@/weston-simple-shm
 
 [ivi-launcher]
 workspace-id=3
 icon-id=4010
-icon=@abs_top_srcdir@/data/icon_ivi_smoke.png
-path=@abs_top_builddir@/weston-smoke
+icon=@example_datadir@/icon_ivi_smoke.png
+path=@example_bindir@/weston-smoke
diff --git a/weston.ini.in b/weston.ini.in
index 257c4ec4c..371093c66 100644
--- a/weston.ini.in
+++ b/weston.ini.in
@@ -38,7 +38,7 @@ path=/usr/bin/google-chrome
 
 [launcher]
 icon=/usr/share/icons/gnome/24x24/apps/arts.png
-path=@abs_top_builddir@/weston-flower
+path=@example_bindir@/weston-flower
 
 [input-method]
 path=@libexecdir@/weston-keyboard
-- 
2.17.0



More information about the wayland-devel mailing list