From 6b8d267fdec056619f4a507efd5803b8c2d390c6 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Tue, 15 Sep 2026 14:57:32 +0200 Subject: [PATCH] chore(windows): remove references unused extensions .kma and .kxx Test-bot: skip --- .../Keyman.Configuration.UI.InstallFile.pas | 4 ++-- .../kmshell/install/UpgradeMnemonicLayout.pas | 15 +++++++-------- .../kmshell/main/UImportOlderKeyboardUtils.pas | 15 +++++++-------- .../src/desktop/kmshell/util/utilkmshell.pas | 7 ------- .../src/engine/kmcomapi/util/utilkeyman.pas | 15 +++++++-------- windows/src/engine/tsysinfo/sysinfo_util.pas | 18 +++++++++--------- ...Keyman.Test.Console.KeymanAPITest_BCP47.pas | 1 - 7 files changed, 32 insertions(+), 43 deletions(-) diff --git a/windows/src/desktop/kmshell/install/Keyman.Configuration.UI.InstallFile.pas b/windows/src/desktop/kmshell/install/Keyman.Configuration.UI.InstallFile.pas index 4e9b2154a5..ad12104026 100644 --- a/windows/src/desktop/kmshell/install/Keyman.Configuration.UI.InstallFile.pas +++ b/windows/src/desktop/kmshell/install/Keyman.Configuration.UI.InstallFile.pas @@ -235,8 +235,8 @@ begin dlgOpen := TOpenDialog.Create(nil); try dlgOpen.Filter := - 'Keyman files (*.kmx, *.kxx, *.kmp)|*.kmx;*.kxx;*.kmp|Keyman keyboards (*.kmx,*.kxx)' + - '|*.kmx;*.kxx|Keyman packages (*.kmp)|*.kmp|All files (*.*)|*.*'; + 'Keyman files (*.kmx, *.kmp)|*.kmx;*.kmp|Keyman keyboards (*.kmx)' + + '|*.kmx|Keyman packages (*.kmp)|*.kmp|All files (*.*)|*.*'; dlgOpen.Title := 'Install Keyman Keyboard'; if dlgOpen.Execute then diff --git a/windows/src/desktop/kmshell/install/UpgradeMnemonicLayout.pas b/windows/src/desktop/kmshell/install/UpgradeMnemonicLayout.pas index acad765590..5ff65fd8d3 100644 --- a/windows/src/desktop/kmshell/install/UpgradeMnemonicLayout.pas +++ b/windows/src/desktop/kmshell/install/UpgradeMnemonicLayout.pas @@ -1,18 +1,18 @@ (* Name: UpgradeMnemonicLayout Copyright: Copyright (C) SIL International. - Documentation: - Description: + Documentation: + Description: Create Date: 31 Dec 2014 Modified Date: 2 Jun 2015 Authors: mcdurdin - Related Files: - Dependencies: + Related Files: + Dependencies: - Bugs: - Todo: - Notes: + Bugs: + Todo: + Notes: History: 31 Dec 2014 - mcdurdin - I4553 - V9.0 - Upgrade to 476 or later requires recompile of all mnemonic layouts 06 Feb 2015 - mcdurdin - I4552 - V9.0 - Add mnemonic recompile option to ignore deadkeys 08 Apr 2015 - mcdurdin - I4651 - V9.0 - Mnemonic layout recompiler maps AltGr+VK_BKSLASH rather than VK_OEM_102 @@ -137,7 +137,6 @@ end; function GetShortKeyboardName(const FileName: string): string; begin if (LowerCase(ExtractFileExt(FileName)) = '.kmx') or - (LowerCase(ExtractFileExt(FileName)) = '.kxx') or (LowerCase(ExtractFileExt(FileName)) = '.kmp') then Result := ChangeFileExt(ExtractFileName(FileName), '') else Result := FileName; diff --git a/windows/src/desktop/kmshell/main/UImportOlderKeyboardUtils.pas b/windows/src/desktop/kmshell/main/UImportOlderKeyboardUtils.pas index af40aad036..939995f569 100644 --- a/windows/src/desktop/kmshell/main/UImportOlderKeyboardUtils.pas +++ b/windows/src/desktop/kmshell/main/UImportOlderKeyboardUtils.pas @@ -1,18 +1,18 @@ (* Name: UImportOlderKeyboardUtils Copyright: Copyright (C) SIL International. - Documentation: - Description: + Documentation: + Description: Create Date: 28 Aug 2008 Modified Date: 16 Jun 2014 Authors: mcdurdin - Related Files: - Dependencies: + Related Files: + Dependencies: - Bugs: - Todo: - Notes: + Bugs: + Todo: + Notes: History: 28 Aug 2008 - mcdurdin - I1616 - Upgrade keyboards from 6.x 01 Jun 2009 - mcdurdin - I2001 - use current user not local machine when testing root keyboard path 11 Jan 2011 - mcdurdin - I2642 - Installer uninstalls KM7 keyboards before upgrade can happen @@ -54,7 +54,6 @@ uses class function TImportOlderKeyboardUtils.GetShortKeyboardName(const FileName: string): string; begin if (LowerCase(ExtractFileExt(FileName)) = '.kmx') or - (LowerCase(ExtractFileExt(FileName)) = '.kxx') or (LowerCase(ExtractFileExt(FileName)) = '.kmp') then Result := ChangeFileExt(ExtractFileName(FileName), '') else Result := FileName; diff --git a/windows/src/desktop/kmshell/util/utilkmshell.pas b/windows/src/desktop/kmshell/util/utilkmshell.pas index 76eb4929dd..1f5db75b18 100644 --- a/windows/src/desktop/kmshell/util/utilkmshell.pas +++ b/windows/src/desktop/kmshell/util/utilkmshell.pas @@ -71,7 +71,6 @@ function IsKeyboardPackage(const FileName: string): Boolean; function IsKeyboardFile(const FileName: string): Boolean; function IsKeyboardSourceFile(const FileName: string): Boolean; function IsKeyboardPackageSourceFile(const FileName: string): Boolean; -function IsKeymanAddinFile(const FileName: string): Boolean; function IsKeymanVisualKeyboard(const FileName: string): Boolean; function MAKELCID(wLanguageID, wSortID: WORD): DWORD; @@ -139,12 +138,6 @@ begin else Result := LowerCase(Copy(FileName, Length(FileName)-3, 4)) = '.kvk'; end; -function IsKeymanAddinFile(const FileName: string): Boolean; -begin - if Length(FileName) < 5 then Result := False - else Result := LowerCase(Copy(FileName, Length(FileName)-3, 4)) = '.kma'; -end; - function IsKeyboardSourceFile(const FileName: string): Boolean; begin if Length(FileName) < 5 then Result := False diff --git a/windows/src/engine/kmcomapi/util/utilkeyman.pas b/windows/src/engine/kmcomapi/util/utilkeyman.pas index 62e87acaa6..59fcf16fdf 100644 --- a/windows/src/engine/kmcomapi/util/utilkeyman.pas +++ b/windows/src/engine/kmcomapi/util/utilkeyman.pas @@ -1,18 +1,18 @@ (* Name: utilkeyman Copyright: Copyright (C) SIL International. - Documentation: - Description: + Documentation: + Description: Create Date: 20 Jun 2006 Modified Date: 13 Mar 2015 Authors: mcdurdin - Related Files: - Dependencies: + Related Files: + Dependencies: - Bugs: - Todo: - Notes: + Bugs: + Todo: + Notes: History: 20 Jun 2006 - mcdurdin - Initial version 01 Jun 2009 - mcdurdin - I2001 - use current user not local machine when testing root keyboard path 03 May 2011 - mcdurdin - I2890 - Record diagnostic data when encountering registry errors @@ -80,7 +80,6 @@ uses function GetShortKeyboardName(const FileName: string): string; begin if (LowerCase(ExtractFileExt(FileName)) = '.kmx') or - (LowerCase(ExtractFileExt(FileName)) = '.kxx') or (LowerCase(ExtractFileExt(FileName)) = '.kmp') then Result := ChangeFileExt(ExtractFileName(FileName), '') else Result := FileName; diff --git a/windows/src/engine/tsysinfo/sysinfo_util.pas b/windows/src/engine/tsysinfo/sysinfo_util.pas index 6e012feb9f..09efa3d16b 100644 --- a/windows/src/engine/tsysinfo/sysinfo_util.pas +++ b/windows/src/engine/tsysinfo/sysinfo_util.pas @@ -7,12 +7,12 @@ Modified Date: 31 Dec 2014 Authors: mcdurdin - Related Files: - Dependencies: + Related Files: + Dependencies: - Bugs: - Todo: - Notes: + Bugs: + Todo: + Notes: History: 13 May 2005 - mcdurdin - Integrated into kmshell from tsysinfo 09 Jun 2005 - mcdurdin - Use MSXML_TLB not MSXML2_TLB 20 Jul 2008 - mcdurdin - I1523 - Report additional items in tsysinfo @@ -143,7 +143,7 @@ procedure AddRegistry(node: IXMLDOMNode; key: HKEY; path: string); Inc(buf); end; end; - + var i: Integer; str: TStringList; @@ -415,7 +415,7 @@ begin IsDir := (f.Attr and faDirectory) = faDirectory; if IsDir and ((f.Name = '.') or (f.Name = '..')) then Continue; - + if IsDir then subnode := xmlAddChild(node, 'Directory') else subnode := xmlAddChild(node, 'File'); @@ -427,9 +427,9 @@ begin begin xmlSetAttribute(subnode, 'Size', IntToStr(f.Size)); ext := ExtractFileExt(f.Name); - if SameText(ext, '.kmx') or SameText(ext, '.kxx') then + if SameText(ext, '.kmx') then AddFileKMXInfo(subnode, s+f.Name) - else if SameText(ext, '.dll') or SameText(ext, '.exe') or SameText(ext, '.kma') then + else if SameText(ext, '.dll') or SameText(ext, '.exe') then AddFilePEInfo(subnode, s+f.Name) else if SameText(ext, '.ttf') or SameText(ext, '.otf') then AddFileTTFInfo(subnode, s+f.Name); diff --git a/windows/src/test/manual-tests/integration-tests/keymanapi/Keyman.Test.Console.KeymanAPITest_BCP47.pas b/windows/src/test/manual-tests/integration-tests/keymanapi/Keyman.Test.Console.KeymanAPITest_BCP47.pas index 390445cece..ea2b55eed3 100644 --- a/windows/src/test/manual-tests/integration-tests/keymanapi/Keyman.Test.Console.KeymanAPITest_BCP47.pas +++ b/windows/src/test/manual-tests/integration-tests/keymanapi/Keyman.Test.Console.KeymanAPITest_BCP47.pas @@ -60,7 +60,6 @@ end; function GetShortKeyboardName(const FileName: string): string; begin if (LowerCase(ExtractFileExt(FileName)) = '.kmx') or - (LowerCase(ExtractFileExt(FileName)) = '.kxx') or (LowerCase(ExtractFileExt(FileName)) = '.kmp') then Result := ChangeFileExt(ExtractFileName(FileName), '') else Result := FileName;