From f15b59b9319d4e5a43a3e3515cb0f0449c7224c7 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 19 Jan 2020 10:11:37 +0100 Subject: Add Windows driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generate C header file based on layout description and create a source bundle that must be compiled on a Windows system and then moved back to the source tree. This sucks, but cross-compiling on Linux is a pain, since Windows’ development headers assume a case-insensitive filesystem. Also I’m using MSKLC because the latest driver development kit cannot compile these drivers correctly. Dear @microsoft, please fix your shit: https://github.com/microsoft/Windows-driver-samples/issues/433 A remaining concern right now is licensing. keyboard.{c,h,def,rc} have been copied from a project generated by MSKLC and are probably non-free, although pretty much identical files like https://github.com/microsoft/Windows-driver-samples/blob/master/input/layout/kbdus/kbdus.c are covered by MS-PL. Also binds backspace key to \b and adjusts xmodmap/svg rendering accordingly. See #7. --- gen.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gen.sh') diff --git a/gen.sh b/gen.sh index 17d4214..3d83839 100755 --- a/gen.sh +++ b/gen.sh @@ -101,12 +101,21 @@ rule html rule cp command = cp \$in \$out +rule cpR + command = cp -R \$in \$out + rule gz command = gzip -c \$in > \$out rule configure-make command = cd \$in && autoreconf --install && ./configure && make +rule zipR + command = ./makezip.sh \$in \$out + +rule render-winkbd + command = lulua-render -l ar-lulua winkbd \$out + ### build targets ### build \$docdir/_build: mkdir build \$docdir/_build/fonts: mkdir @@ -124,6 +133,22 @@ build \$docdir/_build/fonts/IBMPlexArabic-Thin.woff2: cp \$fontdir/IBMPlexArabic # build osmconvert build \$osmconvert: configure-make 3rdparty/osmctools + +# windows drivers +build \$docdir/_temp/winkbd: cpR lulua/data/winkbd +build \$docdir/_temp/winkbd/customization.h: render-winkbd || \$docdir/_temp/winkbd +build \$docdir/_temp/ar-lulua-w64: mkdir +EOF + +w64zipfile="System32/kbdarlulua.dll SysWOW64/kbdarlulua.dll README.txt lulua.reg install.bat" +deps="" +for f in $w64zipfile; do + echo "build \$docdir/_temp/ar-lulua-w64/$f: cp \$docdir/_temp/winkbd/$f || \$docdir/_temp/ar-lulua-w64" + deps+=" \$docdir/_temp/ar-lulua-w64/$f" +done +cat <