Skip to content

Commit 79bce74

Browse files
author
Yi Fan Yu
committed
chromium: Add chrome-virtual-keyboard recipe
chrome-virtual-keyboard is an extension to chromium that has a javascript on-screen keyboard that allow users to use chromium without a physical keyboard. According to chrome webstore, there are over 700K users. limitations: * upstream hasn't maintained this extension for a long time * not all textbox will work, notably iframes leveraging the chromium flag: --extension-load="" to load a local unpacked extension. Signed-off-by: Yi Fan Yu <[email protected]>
1 parent ee752be commit 79bce74

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# class for defining extension dir for chromium
2+
CHROMIUM_EXTENSION_DIR = "${datadir}/chromium/extensions"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
SUMMARY = "Chromium Virtual Keyboard"
2+
DESCRIPTION = "Virtual Keyboard Extension for Chromium/Chrome"
3+
HOMEPAGE = "https://apps.xontab.com/VirtualKeyboard"
4+
LICENSE = "MIT"
5+
LIC_FILES_CHKSUM = "file://LICENSE;md5=a8366463bacd4f2ec5edd419e8a113ff"
6+
7+
SRC_URI = " \
8+
git://github.com/xontab/${BPN}.git \
9+
"
10+
SRCREV = "e2b9adf4885cc4ed600cd9bccb77e0df8ff549aa"
11+
S = "${WORKDIR}/git"
12+
PV = "1.11.3+git${SRCPV}"
13+
14+
inherit allarch chromium-extension-package
15+
16+
do_compile[noexec] = "1"
17+
18+
do_install() {
19+
install -d ${D}${CHROMIUM_EXTENSION_DIR}/
20+
cp -r ${S} ${D}${CHROMIUM_EXTENSION_DIR}/${BPN}
21+
22+
# remove unecessary artifacts
23+
rm -f ${D}${CHROMIUM_EXTENSION_DIR}/${BPN}/_config.yml
24+
rm -rf ${D}${CHROMIUM_EXTENSION_DIR}/${BPN}/.git/
25+
}
26+
27+
FILES_${PN} += "${CHROMIUM_EXTENSION_DIR}/${BPN}"

meta-chromium/recipes-browser/chromium/chromium-gn.inc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ require chromium.inc
22
require chromium-unbundle.inc
33
require gn-utils.inc
44

5-
inherit features_check gtk-icon-cache qemu
5+
inherit features_check gtk-icon-cache qemu chromium-extension-package
66

77
# The actual directory name in out/ is irrelevant for GN.
88
OUTPUT_DIR = "out/Release"
@@ -327,6 +327,7 @@ GN_ARGS:append:libc-musl = ' use_allocator_shim=false use_allocator="none"'
327327
CHROMIUM_EXTRA_ARGS ?= " \
328328
${@bb.utils.contains('PACKAGECONFIG', 'use-egl', '--use-gl=egl', '', d)} \
329329
${@bb.utils.contains('PACKAGECONFIG', 'kiosk-mode', '--kiosk --no-first-run --incognito', '', d)} \
330+
--load-extension=\$(find ${CHROMIUM_EXTENSION_DIR} -maxdepth 1 | sed 1d | tr '\\\\n' , ) \
330331
"
331332

332333
# V8's JIT infrastructure requires binaries such as mksnapshot and
@@ -443,7 +444,7 @@ do_install() {
443444

444445
# Add extra command line arguments to the chromium-wrapper script by
445446
# modifying the dummy "CHROME_EXTRA_ARGS" line
446-
sed -i "s/^CHROME_EXTRA_ARGS=\"\"/CHROME_EXTRA_ARGS=\"${CHROMIUM_EXTRA_ARGS}\"/" ${D}${libdir}/chromium/chromium-wrapper
447+
sed -i "s#^CHROME_EXTRA_ARGS=\"\"#CHROME_EXTRA_ARGS=\"${CHROMIUM_EXTRA_ARGS}\"#" ${D}${libdir}/chromium/chromium-wrapper
447448

448449
# This is ANGLE, not to be confused with the similarly named files under swiftshader/
449450
if [ -e libEGL.so ]; then

0 commit comments

Comments
 (0)