HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}"
HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'true', 'false', d)}"
+# To customize weston.ini, start by setting the desired assignment in weston.ini,
+# commented out. Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS.
+INI_UNCOMMENT_ASSIGNMENTS = ""
+INI_UNCOMMENT_ASSIGNMENTS_append_mx7ulp = " \
+ use-g2d=1 \
+"
+INI_UNCOMMENT_ASSIGNMENTS_append_mx8mm = " \
+ use-g2d=1 \
+"
+INI_UNCOMMENT_ASSIGNMENTS_append_mx8mq = " \
+ gbm-format=argb8888 \
+ \\[shell\\] \
+ size=1920x1080 \
+"
+
+uncomment() {
+ if ! (grep "^#$1" $2); then
+ bbfatal "Commented setting '#$1' not found in file $2"
+ fi
+ sed -i -e 's,^#'"$1"','"$1"',g' $2
+}
+
do_install_append() {
if ${HAS_SYSTEMD}; then
if ${HAS_XWAYLAND}; then
install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston
fi
fi
+ for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do
+ uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini
+ done
}
+++ /dev/null
-[core]
-#gbm-format=argb8888
-idle-time=0
-use-g2d=1
-#xwayland=true
-
-#[shell]
-#size=1920x1080
-
-#[output]
-#name=HDMI-A-1
-#mode=1920x1080@60
-#transform=90
-
-#[output]
-#name=HDMI-A-2
-#mode=off
-# WIDTHxHEIGHT Resolution size width and height in pixels
-# off Disables the output
-# preferred Uses the preferred mode
-# current Uses the current crt controller mode
-#transform=90
-
-[screen-share]
-command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
+++ /dev/null
-[core]
-#gbm-format=argb8888
-idle-time=0
-use-g2d=1
-#xwayland=true
-
-#[shell]
-#size=1920x1080
-
-#[output]
-#name=HDMI-A-1
-#mode=1920x1080@60
-#transform=90
-
-#[output]
-#name=HDMI-A-2
-#mode=off
-# WIDTHxHEIGHT Resolution size width and height in pixels
-# off Disables the output
-# preferred Uses the preferred mode
-# current Uses the current crt controller mode
-#transform=90
-
-[screen-share]
-command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
+++ /dev/null
-[core]
-gbm-format=argb8888
-idle-time=0
-#use-g2d=1
-#xwayland=true
-
-[shell]
-size=1920x1080
-
-#[output]
-#name=HDMI-A-1
-#mode=1920x1080@60
-#transform=90
-
-#[output]
-#name=HDMI-A-2
-#mode=off
-# WIDTHxHEIGHT Resolution size width and height in pixels
-# off Disables the output
-# preferred Uses the preferred mode
-# current Uses the current crt controller mode
-#transform=90
-
-[screen-share]
-command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize