From 34ee4b5ba3924c0900f40acc9db60c87f37beb8e Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Wed, 12 Feb 2020 14:32:05 +0700 Subject: [PATCH 1/8] fix(linux): Install python3-qrcode on Xenial --- linux/keyman-config/Makefile | 2 +- linux/keyman-config/debian/control | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/linux/keyman-config/Makefile b/linux/keyman-config/Makefile index 7ee8dedd78..0a91ea8f98 100644 --- a/linux/keyman-config/Makefile +++ b/linux/keyman-config/Makefile @@ -4,6 +4,7 @@ default: clean version man python3 setup.py build install: # run as sudo + pip3 install qrcode python3 setup.py install # install icons mkdir -p /usr/local/share/keyman/icons @@ -26,7 +27,6 @@ uninstall: clean # run as sudo rm -f /usr/local/bin/km-package-install rm -f /usr/local/bin/km-package-list-installed rm -f /usr/local/bin/km-package-uninstall - rm -f /usr/local/bin/qr clean: -rm -rf dist make_deb build keyman_config/version.py *.egg-info __pycache__ diff --git a/linux/keyman-config/debian/control b/linux/keyman-config/debian/control index 5d49d99979..0a2ddbfe8d 100644 --- a/linux/keyman-config/debian/control +++ b/linux/keyman-config/debian/control @@ -3,8 +3,7 @@ Maintainer: Daniel Glassey Section: python Priority: optional Build-Depends: dh-python, python3-setuptools, python3-all, debhelper (>= 9), bash-completion, - python3-magic, python3-qrcode , - python-qrcode + python3-magic, python3-qrcode Standards-Version: 4.5.0 Homepage: http://www.keyman.com/ From 5ce10affd0c90d1d0ab5b27d84d4636af21b1c81 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Wed, 12 Feb 2020 15:42:49 +0700 Subject: [PATCH 2/8] fix(linux): Use lower version of libjson-glib-dev for Xenial --- linux/ibus-keyman/debian/control | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux/ibus-keyman/debian/control b/linux/ibus-keyman/debian/control index aa15da63a4..8a9efe63ab 100644 --- a/linux/ibus-keyman/debian/control +++ b/linux/ibus-keyman/debian/control @@ -3,9 +3,9 @@ Section: utils Priority: optional Maintainer: Daniel Glassey Build-Depends: debhelper (>= 9), autotools-dev, dh-autoreconf, pkg-config, - libkmnkbp-dev (>=0.0.0~), libibus-1.0-dev (>= 1.2), libjson-glib-dev (>= 1.4.0), - libgtk-3-dev -Standards-Version: 3.9.8 + libkmnkbp-dev (>=0.0.0~), libibus-1.0-dev (>= 1.2), libjson-glib-dev (>= 1.4.0) , + libjson-glib-dev (1.1.2) , libgtk-3-dev +Standards-Version: 4.5.0 Homepage: http://www.keyman.com Package: ibus-keyman From acb8b6f3250f3703b8fc9cf89a0c719efc9729d0 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Thu, 13 Feb 2020 12:03:48 +0700 Subject: [PATCH 3/8] fix(core): Update macro for fallthrough fallthrough updated for compatibility with gcc 5.4.0 on Xenial --- common/engine/keyboardprocessor/src/utfcodec.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/engine/keyboardprocessor/src/utfcodec.hpp b/common/engine/keyboardprocessor/src/utfcodec.hpp index 3c5eb540dd..8072265dc6 100644 --- a/common/engine/keyboardprocessor/src/utfcodec.hpp +++ b/common/engine/keyboardprocessor/src/utfcodec.hpp @@ -19,7 +19,14 @@ typedef uint32_t uchar_t; +/* Intentional fallthrough */ +#if defined(__clang__) #define fallthrough [[clang::fallthrough]] +#elif defined(__GNUC__) && __GNUC___ >= 7 +#define fallthrough [[gnu::fallthrough]] +#else +#define fallthrough ((void)0) +#endif template struct _utf_codec From 764b2b172b1a3fddc4fa8505de03d68444740c49 Mon Sep 17 00:00:00 2001 From: Darcy Date: Thu, 13 Feb 2020 13:55:53 +0700 Subject: [PATCH 4/8] fix(linux): Fix macro for gcc Verified on Bionic --- common/engine/keyboardprocessor/src/utfcodec.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/engine/keyboardprocessor/src/utfcodec.hpp b/common/engine/keyboardprocessor/src/utfcodec.hpp index 8072265dc6..aba40ebc7f 100644 --- a/common/engine/keyboardprocessor/src/utfcodec.hpp +++ b/common/engine/keyboardprocessor/src/utfcodec.hpp @@ -22,7 +22,7 @@ typedef uint32_t uchar_t; /* Intentional fallthrough */ #if defined(__clang__) #define fallthrough [[clang::fallthrough]] -#elif defined(__GNUC__) && __GNUC___ >= 7 +#elif defined(__GNUC__) && __GNUC__ >= 7 #define fallthrough [[gnu::fallthrough]] #else #define fallthrough ((void)0) From 9a30d0489bd9d6495e1868b7b34bc0bd9f906478 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Thu, 13 Feb 2020 16:18:37 +0700 Subject: [PATCH 5/8] fix(linux): Change keyman-config/debian/control Per review comments * Revert python-qrcode * Add python3-pip to Build-Depends --- linux/keyman-config/debian/control | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linux/keyman-config/debian/control b/linux/keyman-config/debian/control index 0a2ddbfe8d..a90ef9d540 100644 --- a/linux/keyman-config/debian/control +++ b/linux/keyman-config/debian/control @@ -2,8 +2,9 @@ Source: keyman-config Maintainer: Daniel Glassey Section: python Priority: optional -Build-Depends: dh-python, python3-setuptools, python3-all, debhelper (>= 9), bash-completion, - python3-magic, python3-qrcode +Build-Depends: dh-python, python3-setuptools, python3-all, python3-pip, debhelper (>= 9), bash-completion, + python3-magic, python3-qrcode , + python-qrcode Standards-Version: 4.5.0 Homepage: http://www.keyman.com/ From 616fe39cfcf93b474a42180fd8c0768f8f58cb34 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Mon, 17 Feb 2020 15:48:06 +1100 Subject: [PATCH 6/8] fix(developer): crash in context help Fixes sillsdev/keyman-issues#6207. Fixes sillsdev/keyman-issues#5801. Fixes sillsdev/keyman-issues#5742. Fixes sillsdev/keyman-issues#6186. Fixes sillsdev/keyman-issues#6124. Fixes sillsdev/keyman-issues#5647. Fixes sillsdev/keyman-issues#5726. Fixes sillsdev/keyman-issues#6149. Fixes sillsdev/keyman-issues#6228. Fixes sillsdev/keyman-issues#6001. Fixes sillsdev/keyman-issues#6148. Fixes sillsdev/keyman-issues#6159. Fixes sillsdev/keyman-issues#6171. This fixes a crash when context help is unable to determine the current context. --- windows/src/developer/TIKE/main/UfrmHelp.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/src/developer/TIKE/main/UfrmHelp.pas b/windows/src/developer/TIKE/main/UfrmHelp.pas index ba47a24eeb..56168447af 100644 --- a/windows/src/developer/TIKE/main/UfrmHelp.pas +++ b/windows/src/developer/TIKE/main/UfrmHelp.pas @@ -132,7 +132,7 @@ begin FormName := (FHelpControl as TTIKEForm).HelpTopic else if FHelpControl is TCustomForm then FormName := FHelpControl.ClassName - else + else if (FHelpControl <> nil) then begin o := FHelpControl.Owner; while ((o is TframeCEFHost) or not(o is TTIKEForm)) and (o <> nil) do From 0c328a305af41b8bea784feb9116874d17a391dc Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Mon, 17 Feb 2020 17:07:34 +1100 Subject: [PATCH 7/8] fix(developer): crash importing blank OSK Fixes sillsdev/keyman-issues#6231. Fixes sillsdev/keyman-issues#6125. Fixes sillsdev/keyman-issues#5914. Fixes sillsdev/keyman-issues#5902. Relates to #2656. If you attempt to import a blank OSK into the touch layout editor, nothing happens, but behind the scenes the state was corrupted, meaning when you attempt to continue work at some point the app will crash. --- .../oskbuilder/UframeTouchLayoutBuilder.pas | 106 +++++++++--------- 1 file changed, 56 insertions(+), 50 deletions(-) diff --git a/windows/src/developer/TIKE/oskbuilder/UframeTouchLayoutBuilder.pas b/windows/src/developer/TIKE/oskbuilder/UframeTouchLayoutBuilder.pas index 9af7a7c85a..62046296a2 100644 --- a/windows/src/developer/TIKE/oskbuilder/UframeTouchLayoutBuilder.pas +++ b/windows/src/developer/TIKE/oskbuilder/UframeTouchLayoutBuilder.pas @@ -306,6 +306,7 @@ end; function TframeTouchLayoutBuilder.Load(const AFilename: string; ALoadFromTemplate, ALoadFromString: Boolean): Boolean; var + FLastFilename: string; FBaseFileName: string; FNewLayoutJS: string; FTouchLayout: TTouchLayout; @@ -319,6 +320,7 @@ var begin FLastErrorOffset := -1; FLastError := ''; + FLastFilename := FFilename; if FFilename <> '' then begin @@ -327,66 +329,70 @@ begin end; UnregisterSources; + try - if ALoadFromString then - begin - FNewLayoutJS := AFilename; - FFilename := GetNextFilename; - end - else - begin - if ALoadFromTemplate or (AFileName = '') or not FileExists(AFileName) then + if ALoadFromString then begin - FBaseFileName := FTemplateFileName; + FNewLayoutJS := AFilename; FFilename := GetNextFilename; end else begin - FBaseFileName := AFileName; - FFilename := AFileName; - end; - - with TStringList.Create do - try - LoadFromFile(FBaseFileName, TEncoding.UTF8); - FNewLayoutJS := Text; - finally - Free; - end; - end; - - FTouchLayout := TTouchLayout.Create; // I3642 - try - if not FTouchLayout.Load(FNewLayoutJS) then - begin - FLastError := FTouchLayout.LoadError; // I4083 - FLastErrorOffset := FTouchLayout.LoadErrorOffset; // I4083 - Exit(False); - end - else - begin - if (FSavedLayoutJS <> '') and ALoadFromTemplate then + if ALoadFromTemplate or (AFileName = '') or not FileExists(AFileName) then begin - FOldLayout := TTouchLayout.Create; - try - FOldLayout.Load(FSavedLayoutJS); - if FTouchLayout.Merge(FOldLayout) - then FSavedLayoutJS := FTouchLayout.Save(False) - else FSavedLayoutJS := FNewLayoutJS; - finally - FOldLayout.Free; - end; + FBaseFileName := FTemplateFileName; + FFilename := GetNextFilename; end else - FSavedLayoutJS := FNewLayoutJS; - end; - finally - FTouchLayout.Free; - end; + begin + FBaseFileName := AFileName; + FFilename := AFileName; + end; - RegisterSource; - if FState <> '' then - modWebHttpServer.AppSource.RegisterSource(FFilename + '#state', FState, True); + with TStringList.Create do + try + LoadFromFile(FBaseFileName, TEncoding.UTF8); + FNewLayoutJS := Text; + finally + Free; + end; + end; + + FTouchLayout := TTouchLayout.Create; // I3642 + try + if not FTouchLayout.Load(FNewLayoutJS) then + begin + FLastError := FTouchLayout.LoadError; // I4083 + FLastErrorOffset := FTouchLayout.LoadErrorOffset; // I4083 + FFilename := FLastFilename; + Exit(False); + end + else + begin + if (FSavedLayoutJS <> '') and ALoadFromTemplate then + begin + FOldLayout := TTouchLayout.Create; + try + FOldLayout.Load(FSavedLayoutJS); + if FTouchLayout.Merge(FOldLayout) + then FSavedLayoutJS := FTouchLayout.Save(False) + else FSavedLayoutJS := FNewLayoutJS; + finally + FOldLayout.Free; + end; + end + else + FSavedLayoutJS := FNewLayoutJS; + end; + finally + FTouchLayout.Free; + end; + + finally + RegisterSource; + if FState <> '' then + modWebHttpServer.AppSource.RegisterSource(FFilename + '#state', FState, True); + end; try DoLoad; From 4f0fd1e4425e8a79d495384f2cd51a86c5962104 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Mon, 17 Feb 2020 14:30:38 +0700 Subject: [PATCH 8/8] chore(linux): update history.md --- linux/history.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linux/history.md b/linux/history.md index 9f4cc15ccb..3f37c0ea82 100644 --- a/linux/history.md +++ b/linux/history.md @@ -1,5 +1,13 @@ # Keyman for Linux Version History +# 2020-02-17 13.0.29 beta +* Bug Fix: + * Fix keyboard processor compilation for Xenial (#2648) + +# 2020-02-11 13.0.28.beta +* Bug Fix: + * Incorporate packaging fixes from 14.0 development (#2624) + ## 2020-02-10 13.0.27 beta * Bug Fix: * Fix setting context when >= 64 characters (common #2607)