From 87687d3443fd6895cdd71d4e3f31e3aedad51f27 Mon Sep 17 00:00:00 2001 From: "EberhardSchweizer07@gmail.com" Date: Mon, 24 Mar 2025 16:47:38 +0100 Subject: [PATCH 001/343] Language selector sorted according to language names instead of language ids --- ...an.Setup.System.SetupUILanguageManager.pas | 52 +++++++++++++++++++ windows/src/desktop/setup/UfrmRunDesktop.pas | 10 ++-- 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/windows/src/desktop/setup/Keyman.Setup.System.SetupUILanguageManager.pas b/windows/src/desktop/setup/Keyman.Setup.System.SetupUILanguageManager.pas index 0eca0b41ce..d4a0470d40 100644 --- a/windows/src/desktop/setup/Keyman.Setup.System.SetupUILanguageManager.pas +++ b/windows/src/desktop/setup/Keyman.Setup.System.SetupUILanguageManager.pas @@ -5,6 +5,7 @@ interface uses System.Classes, System.Generics.Collections, + System.Generics.Defaults, Keyman.System.UILanguageManager, SetupStrings; @@ -18,6 +19,8 @@ type FStrings: TDictionary; FActiveLocale: string; FLocales: TSetupLocales; + FIndexMapping: TDictionary; + FSortedValues: TList< TPair>; private class procedure CreateStatic; class procedure DestroyStatic; @@ -27,8 +30,11 @@ type class function Get(id: TInstallInfoText): string; class function Locales: TSetupLocales; static; + class function IndexMapping: TDictionary; static; + class function SortedValues: TList< TPair>; static; class property ActiveLocale: string read FActiveLocale write FActiveLocale; class procedure RegisterSetupStrings(const tag: string; const locale: TLocaleArray); + class procedure Reorder; end; implementation @@ -43,6 +49,7 @@ begin begin FStrings := TDictionary.Create; FLocales := TSetupLocales.Create; + FIndexMapping := TDictionary.Create; end; end; @@ -51,6 +58,16 @@ begin Result := FLocales; end; +class function TSetupUILanguageManager.IndexMapping: TDictionary; +begin + Result := FIndexMapping; +end; + +class function TSetupUILanguageManager.SortedValues: TList< TPair>; +begin + Result := FSortedValues; +end; + class procedure TSetupUILanguageManager.DestroyStatic; begin FreeAndNil(FStrings); @@ -103,6 +120,41 @@ begin FLocales.Add(tag, locale[ssLanguageName]); end; +class procedure TSetupUILanguageManager.Reorder; +var + item: TPair; + i: integer; + j: integer; + sortedKeys: TArray; + sortedPairA: TList< TPair>; +begin + sortedPairA := TList< TPair>.Create(); + i := 0; + for item in TSetupUILanguageManager.Locales do + begin + sortedPairA.Add(item); + end; + sortedPairA.Sort( + TComparer>.Construct( + function(const Left, Right: TPair): Integer + begin + // Sort by the Key value + Result := CompareText(Left.Value, Right.Value); + end + ) + ); + FSortedValues := sortedPairA; + sortedKeys := FLocales.Values.ToArray; + TArray.Sort(sortedKeys); + i := 0; + for item in TSetupUILanguageManager.Locales do + begin + j := sortedPairA.IndexOf(item) ; + FIndexMapping.Add(j,i); + i := i+1; + end; +end; + initialization finalization TSetupUILanguageManager.DestroyStatic; diff --git a/windows/src/desktop/setup/UfrmRunDesktop.pas b/windows/src/desktop/setup/UfrmRunDesktop.pas index 170d142a28..79df354422 100644 --- a/windows/src/desktop/setup/UfrmRunDesktop.pas +++ b/windows/src/desktop/setup/UfrmRunDesktop.pas @@ -587,7 +587,8 @@ var item: TPair; n: Integer; begin - for item in TSetupUILanguageManager.Locales do + TSetupUILanguageManager.Reorder; + for item in TSetupUILanguageManager.SortedValues do begin n := cbLanguage.Items.Add(item.Value); if TSetupUILanguageManager.ActiveLocale = item.Key then @@ -957,8 +958,12 @@ begin end; procedure TfrmRunDesktop.cbLanguageClick(Sender: TObject); +var + n : Integer; begin - TSetupUILanguageManager.ActiveLocale := TSetupUILanguageManager.Locales.Keys.ToArray[cbLanguage.ItemIndex]; + n := cbLanguage.ItemIndex; + n := TSetupUILanguageManager.IndexMapping[n]; + TSetupUILanguageManager.ActiveLocale := TSetupUILanguageManager.Locales.Keys.ToArray[n]; FillStrings; end; @@ -1042,7 +1047,6 @@ begin FCheckForUpdates := ValueExists(SRegValue_CheckForUpdates) and ReadBool(SRegValue_CheckForUpdates); FStartWithWindows := ValueExists(SRegValue_UpgradeRunKeyman) or (OpenKeyReadOnly('\' + SRegKey_WindowsRun_CU) and ValueExists(SRegValue_WindowsRun_Keyman)); - end else if FCanUpgrade10 and OpenKeyReadOnly(SRegKey_KeymanEngine100_ProductOptions_Desktop_CU) then // I4293 begin From 06f1489dd86aa522da5976d2880949e0791c0c73 Mon Sep 17 00:00:00 2001 From: Meng-Heng Date: Fri, 20 Jun 2025 16:18:30 +0700 Subject: [PATCH 002/343] chore: include more valid bcp 47 tags and add markdown alerts into docs --- developer/docs/help/reference/bcp-47.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/developer/docs/help/reference/bcp-47.md b/developer/docs/help/reference/bcp-47.md index f5c8a49539..671c9e52a9 100644 --- a/developer/docs/help/reference/bcp-47.md +++ b/developer/docs/help/reference/bcp-47.md @@ -30,13 +30,21 @@ The following are all examples of valid BCP 47 tags: * `en-US`: English, in United States * `km-Khmr-KH`: Khmer, written in the Khmer script, in Cambodia * `km-fonipa`: Khmer, transcribed in IPA +* `und-cpmn`: Undetermined (Cypro-Minoan) +* `tok-Zzzz-AA`: Toki Pona (Unknown Script) + +> [!NOTE] +> `Zzzz` is an uncoded script of IOS 15924 and one of the Special codes of the Script subtag. +> `AA` is a Private Use Code. ### The language subtag The only required option is the Language subtag, which is an [ISO 639-1][2] or [ISO 639-3][3] code. -ISO 639-1 tags are a two-letter code. ISO 639-3 tags are a three-letter code. +- ISO 639-1 tags are a two-letter code. +- ISO 639-3 tags are a three-letter code. + First, try to find your language on the list of two-letter ISO 639-1 codes. [This Wikipedia page][4] lists all of the two-letter codes. @@ -46,10 +54,11 @@ it will give you an appropriate code. In this example, I searched Glottolog for “[Saanich][6]” (name of the First Nations that speak SENĆOŦEN) and found `str` as the code for all Straits Salish languages. -The Language subtag is conventionally written in lower case. +> [!IMPORTANT] +> The Language subtag is conventionally written in lower case. -The next two subtags are **optional**, however, they allow you to be more -specific about your language. +> [!NOTE] +> The next two subtags are **optional**, however, they allow you to be more specific about your language. ### The script subtag @@ -67,8 +76,8 @@ of the **Canadian Aboriginal syllabics** family of writing systems. If I wrote a keyboard or lexical model that produced syllabics, I would choose `Cans`, as that is the **ISO 15924** tag for Canadian Aboriginal syllabics. -The Script subtag is conventionally written in title case - first letter -capitalized. +> [!IMPORTANT] +> The Script subtag is conventionally written in title case - first letter capitalized. ### The region subtag @@ -100,7 +109,8 @@ and Mexico. Another common UN M49 region code is `001` for the whole world. -Alphabetic region subtags are conventionally written in upper case. +> [!IMPORTANT] +> Alphabetic region subtags are conventionally written in upper case. [1]: https://en.wikipedia.org/wiki/IETF_language_tag [2]: https://en.wikipedia.org/wiki/ISO_639-1 From 2acfa5493a3075974ab024bad8c276dce437cb40 Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Thu, 3 Jul 2025 17:35:33 +1000 Subject: [PATCH 003/343] fix(windows): check if autmatic updates off before prompt Before prompting check if automatic updates has been turned off in the time sitting in waiting for restart. Also check it as we transition to waiting for restart in case it was turned off while downloading. Fixes:#14262 --- .../main/Keyman.System.UpdateStateMachine.pas | 24 +++++++++++++++---- windows/src/desktop/kmshell/main/initprog.pas | 19 +++++++++++---- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas b/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas index 5c89e795d7..c683eb1b0f 100644 --- a/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas +++ b/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas @@ -69,7 +69,6 @@ type procedure RemoveCachedFiles; function SetRegistryState(Update: TUpdateState): Boolean; - function GetAutomaticUpdates: Boolean; function SetApplyNow(Value: Boolean): Boolean; function GetApplyNow: Boolean; @@ -99,6 +98,7 @@ type function ReadyToInstall: Boolean; function IsInstallingState: Boolean; + function GetAutomaticUpdates: Boolean; function CheckRegistryState: TUpdateState; end; @@ -731,6 +731,7 @@ end; function UpdateAvailableState.HandleKmShell; begin + if bucStateContext.FAutomaticUpdate then begin // we will use a new kmshell process to enable @@ -747,7 +748,8 @@ end; procedure UpdateAvailableState.HandleAbort; begin - + bucStateContext.RemoveCachedFiles; + ChangeState(IdleState); end; procedure UpdateAvailableState.HandleInstallNow; @@ -872,7 +874,7 @@ end; procedure DownloadingState.HandleAbort; begin - // To abort during the downloading + // don't abort during the downloading which is executing in a separate process end; procedure DownloadingState.HandleInstallNow; @@ -899,6 +901,16 @@ end; procedure WaitingRestartState.EnterState; begin + // Entering this state means that it was not an 'apply now' update + // It should be then a automatic update. However, the automatic update + // may have been set to disable after the idle state. Is so abort + if not bucStateContext.FAutomaticUpdate then + begin + bucStateContext.RemoveCachedFiles; + ChangeState(IdleState); + Exit; + end; + // Enter WaitingRestartState bucStateContext.SetRegistryState(usWaitingRestart); end; @@ -938,7 +950,8 @@ begin end else begin - if not (TUpdateCheckStorage.CheckMetaDataForUpdate) then + if not (TUpdateCheckStorage.CheckMetaDataForUpdate) or + not bucStateContext.FAutomaticUpdate then // set by user after idle state begin // Return to Idle state and check for Updates state ChangeState(IdleState); @@ -960,7 +973,8 @@ end; procedure WaitingRestartState.HandleAbort; begin - ChangeState(UpdateAvailableState); + bucStateContext.RemoveCachedFiles; + ChangeState(IdleState); end; procedure WaitingRestartState.HandleInstallNow; diff --git a/windows/src/desktop/kmshell/main/initprog.pas b/windows/src/desktop/kmshell/main/initprog.pas index 5c12ef1bed..8905aa1338 100644 --- a/windows/src/desktop/kmshell/main/initprog.pas +++ b/windows/src/desktop/kmshell/main/initprog.pas @@ -668,8 +668,19 @@ function ShouldSendToBUpdateSM(FSilent: Boolean; BUpdateSM: TUpdateStateMachine; // UI elements from the state machine we have bring some of logic here. var frmStartInstall: TfrmStartInstall; + ReadyToInstall: Boolean; begin - if not FSilent and BUpdateSM.ReadyToInstall and + ReadyToInstall := BUpdateSM.ReadyToInstall; + // The setting for automatic updates may have been set to disable + // after updates where checked and downloaded. The user should + // not be prompted for an update in this case and the update should + // abort. + if BUpdateSM.GetAutomaticUpdates and ReadyToInstall then + begin + BUpdateSM.HandleAbort; + end; + + if not FSilent and ReadyToInstall and (FMode in [fmStart, fmSplash, fmMain, fmAbout, fmHelp, fmShowHelp, fmSettings, fmBoot]) then begin @@ -680,7 +691,7 @@ begin frmStartInstall.Free; end; end - else if FSilent and BUpdateSM.ReadyToInstall then + else if FSilent and ReadyToInstall then Result := False else Result := True; @@ -722,10 +733,10 @@ begin else begin // Since Package upgrade and Keyman upgrade share the installing state - // the presence of the following package related switches means we + // the presence of the following package related switches means we // should skip running the update state machine HandleKmShell event SkipBUpdate := (FMode in [ - fmInstallTip, fmInstallTipsForPackages, + fmInstallTip, fmInstallTipsForPackages, fmRegisterTip, fmUpgradeKeyboards, fmUpgradeMnemonicLayout ]); From 2668dfc76df94acdebd89045d12872ddd31d49ce Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 4 Jul 2025 13:01:22 +1000 Subject: [PATCH 004/343] docs(resources): clarify Build-bot usage Fixes: #14266 --- docs/build-bot.md | 99 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 93 insertions(+), 6 deletions(-) diff --git a/docs/build-bot.md b/docs/build-bot.md index e879154a96..ea4f28c2fa 100644 --- a/docs/build-bot.md +++ b/docs/build-bot.md @@ -29,6 +29,39 @@ Or you may want to ensure that an artifact is built for Windows: Build-bot: release windows ``` +## The Build-bot command + +The build bot is controlled through the `Build-bot` command, which can be put +into commit trailers or the PR body (not PR comments). The format of the command +is: + +``` +Build-bot: [Platforms] +``` + +* `BuildLevel` can be `skip`, `build`, or `release`. See [Build Level] for more + details. +* `Platforms` can be omitted, in which case the command applies to all platforms + (equivalent to specifying `all`). If specified, it must be a comma-separated + list, with or without spaces, of one or more of the following platform + identifiers: + + * `all`: apply to all platforms listed below + * `android` + * `developer` + * `ios` + * `linux` + * `mac` + * `web` + * `windows` + * `common`: build common components, on all three build platforms (note: + `release` is equivalent to `build` buildLevel for `common`) + * `core`: build Keyman Core, on all three build platforms, and also WASM + (note: `release` is equivalent to `build` buildLevel for `core`) + +The list of platforms can be found in the `available_platforms` variable in +trigger-definitions.inc.sh. + ## Build Level The build level specifies what we want to be run for a test build on a PR. @@ -42,8 +75,8 @@ other release distribution endpoints. The build level is controlled by the Build-bot commit trailer and PR body Build-bot/Test-bot trailers. The default build level will be 'build'. -For target branch builds, the build level will always be 'build', and Build-bot: -commit trailers are ignored. +For target branch (master, beta, stable-x.y) builds, the build level will always +be 'build', and Build-bot: commit trailers are ignored. ### 'skip' build level @@ -82,7 +115,8 @@ For a 'release' build level: * we won't upload artifacts to any release endpoint such as Debian, packages.sil.org, etc, or to the release areas for Play Store or App Store -(uploading to *.keyman.com and to release endpoints happens in the release TC build config/GHA) +(uploading to *.keyman.com and to release endpoints happens in the release TC +build config/GHA) ## Controlling the build bot with trailers @@ -113,10 +147,11 @@ The Build-bot has limited interactions with the Keyman test bot (aka keymanapp-test-bot): if a 'User Testing' section is found in the PR body, the default build level will be upgraded from 'build' to 'release'. -Build bot trailers found in the commits or in the PR body are applied after the -test bot command. +Build bot trailers found in either the commits or in the PR body are applied +after the test bot command. -WARNING: The build bot does not check PR comments for Test-bot commands. +WARNING: The build bot does not check PR comments for Test-bot commands or a +'User Testing' section. ## Example Build-bot interactions @@ -136,6 +171,58 @@ Note that other platforms are still 'skip' but not included in the build set. Finally, the PR author pushes another commit, with `Build-bot: release windows`. The build set is now: `(android:skip ios:skip windows:release)`. +# FAQ +* How do I specify commands for multiple platforms, e.g. building on Windows and Linux? + +``` +Build-bot: build windows,linux +``` + +* If I modify a file that would cause a build on all platforms, does `Build-bot: + build android` then cause a build only on Android and skip all others? Or is + it only additive? + +The commands are additive. To skip all others, you would do: + +``` +Build-bot: skip +Build-bot: build android +``` + +* What happens in the following scenario: I have a PR that I only want to build + on Android and I add `Build-bot: build android`. Later on I merge in the + changes from `master` and add another commit. If I still only want to build on + Android, do I have to add `Build-bot: build android` on my new commit again? + Or what happens with merges that touch other files which would cause builds + for other platforms? + +First, you would need to specify `skip` for all other platforms in order to only +build on Android: + +``` +Build-bot: skip +Build-bot: build android +``` + +Then, the build bot scans all the commits in the PR, and additively builds the +final build set from the `Build-bot` commands from all the commits (up to 2000 +in one PR). Thus, earlier bot commands commits will continue to be honoured. +This makes it easier to apply merge commits, for example, or small fixups, +without needing to think about what needs to be built again. + +* How can I re-trigger builds after changing my build bot commands? + +In [TeamCity - Trigger Test Builds](https://build.palaso.org/buildConfiguration/Keyman_Test), +select a custom Run (small button attached to right of Run button), and in the +"Changes" tab, "Build branch" field, enter the PR number to re-run the builds. +Any test builds currently running against that PR will be cancelled and +restarted. + +Note: if you reduce the build set (with `skip`), and re-run builds in this way +without pushing a new commit, you will end up with stale status checks on the +latest commit in your PR for the builds that are now skipped on the new run, so +in this scenario it is safest to push a new commit with the updated build bot +commands. [Build Level]: #Build_Level \ No newline at end of file From 314c606aece55cbd1bbf9519622e5680dfce19bd Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Tue, 15 Jul 2025 16:27:14 +1000 Subject: [PATCH 005/343] fix(windows): add check a fix for registry datatypes Fixes: #14342 The Windows system level keyboard hotkeys controlled in registry have sometimes been incorrectly written as a DWORD datatype. There 106 events in sentry for just July. When opening the Windows setting dialog and the registry has DWORDS it will show unassinged in the dialog if apply is pressed it will convert the keys to REG_SZ. This fix follows a similar pattern it will check the data type of the registry key if it is DWORD it will remove it and add a new key of the same name as REG_SZ and set it to the unassigned value. Fixes: KEYMAN-WINDOWS-4NK --- .../keyman/langswitch/LangSwitchManager.pas | 93 ++++++++++++++----- 1 file changed, 70 insertions(+), 23 deletions(-) diff --git a/windows/src/engine/keyman/langswitch/LangSwitchManager.pas b/windows/src/engine/keyman/langswitch/LangSwitchManager.pas index 80da078728..0a375695e0 100644 --- a/windows/src/engine/keyman/langswitch/LangSwitchManager.pas +++ b/windows/src/engine/keyman/langswitch/LangSwitchManager.pas @@ -1,4 +1,4 @@ -(* +(* Name: LangSwitchManager Copyright: Copyright (C) SIL International. Documentation: @@ -47,6 +47,7 @@ unit LangSwitchManager; interface uses + ErrorControlledRegistry, System.Classes, System.Contnrs, System.SysUtils, @@ -230,6 +231,7 @@ type FLanguageToggle: string; FLayoutToggle: string; procedure LoadCurrentHotkey; + function FixRegistryDataType(RegistryKey: TRegistryErrorControlled; const ValueName: string): Boolean; procedure DisableWindowsHotkey; procedure RestoreWindowsHotkey; public @@ -251,7 +253,6 @@ uses InterfaceHotkeys, kmint, LoadIndirectStringUnit, - ErrorControlledRegistry, Registry, RegistryKeys, UfrmKeyman7Main, @@ -981,38 +982,73 @@ begin FCurrentHotkey := FindHotkey(kmcom.Hotkeys); end; +function TLangSwitchConfiguration.FixRegistryDataType( + RegistryKey: TRegistryErrorControlled; + const ValueName: string +): Boolean; +var + RegType: TRegDataType; + const CHotkeyNotAssigned = '3'; +begin + Result := False; + + if RegistryKey.ValueExists(ValueName) then + begin + RegType := RegistryKey.GetDataType(ValueName); + if not ((RegType = rdString) or (RegType = rdExpandString)) then + begin + RegistryKey.DeleteValue(ValueName); + RegistryKey.WriteString(ValueName, CHotkeyNotAssigned); + Result := True; + end; + end; + +end; + procedure TLangSwitchConfiguration.DisableWindowsHotkey; var MatchValue: string; - FReset: Boolean; + KeyboardToggleReg: TRegistryErrorControlled; + FReset, FFixed: Boolean; + const CHotkeyNotAssigned = '3'; begin if FCurrentHotkey = (HK_ALT or HK_SHIFT) then MatchValue := '1' else if FCurrentHotkey = (HK_CTRL or HK_SHIFT) then MatchValue := '2' else Exit; - FLanguageToggle := '3'; - FLayoutToggle := '3'; + FLanguageToggle := CHotkeyNotAssigned; + FLayoutToggle := CHotkeyNotAssigned; + //FFixed := False; FReset := False; - with TRegistryErrorControlled.Create do // I2890 + KeyboardToggleReg := TRegistryErrorControlled.Create; // I2890 try - if not OpenKey(SRegKey_KeyboardLayoutToggle, True) then // I2890 - RaiseLastRegistryError; + if not KeyboardToggleReg.OpenKey(SRegKey_KeyboardLayoutToggle, True) then // I2890 + KeyboardToggleReg.RaiseLastRegistryError; + // Fix potential corrupted registry keys + if FixRegistryDataType(KeyboardToggleReg, SRegValue_Toggle_Hotkey) then + FReset := True; + if FixRegistryDataType(KeyboardToggleReg, SRegValue_Toggle_LanguageHotkey) then + FReset := True; + if FixRegistryDataType(KeyboardToggleReg, SRegValue_Toggle_LayoutHotkey) then + FReset := True; - if ValueExists(SRegValue_Toggle_Hotkey) then FLanguageToggle := ReadString(SRegValue_Toggle_Hotkey); + if KeyboardToggleReg.ValueExists(SRegValue_Toggle_Hotkey) then + FLanguageToggle := KeyboardToggleReg.ReadString(SRegValue_Toggle_Hotkey); if FLanguageToggle = MatchValue then begin - WriteString(SRegValue_Toggle_Hotkey, '3'); - WriteString(SRegValue_Toggle_LanguageHotkey, '3'); + KeyboardToggleReg.WriteString(SRegValue_Toggle_Hotkey, CHotkeyNotAssigned); + KeyboardToggleReg.WriteString(SRegValue_Toggle_LanguageHotkey, CHotkeyNotAssigned); FReset := True; end; - if ValueExists(SRegValue_Toggle_LayoutHotkey) then FLayoutToggle := ReadString(SRegValue_Toggle_LayoutHotkey); + if KeyboardToggleReg.ValueExists(SRegValue_Toggle_LayoutHotkey) then + FLayoutToggle := KeyboardToggleReg.ReadString(SRegValue_Toggle_LayoutHotkey); if FLayoutToggle = MatchValue then begin - WriteString(SRegValue_Toggle_LayoutHotkey, '3'); + KeyboardToggleReg.WriteString(SRegValue_Toggle_LayoutHotkey, CHotkeyNotAssigned); FReset := True; end; finally @@ -1024,31 +1060,42 @@ end; procedure TLangSwitchConfiguration.RestoreWindowsHotkey; var - FReset: Boolean; + FReset, Changed: Boolean; + KeyboardToggleReg: TRegistryErrorControlled; begin FReset := False; if FLanguageToggle = '' then Exit; - with TRegistryErrorControlled.Create do // I2890 + KeyboardToggleReg := TRegistryErrorControlled.Create; // I2890 try - if not OpenKey(SRegKey_KeyboardLayoutToggle, True) then // I2890 - RaiseLastRegistryError; + if not KeyboardToggleReg.OpenKey(SRegKey_KeyboardLayoutToggle, True) then // I2890 + KeyboardToggleReg.RaiseLastRegistryError; - if not ValueExists(SRegValue_Toggle_Hotkey) or (ReadString(SRegValue_Toggle_Hotkey) <> FLanguageToggle) then + // Fix potential corrupted registry keys + if FixRegistryDataType(KeyboardToggleReg, SRegValue_Toggle_Hotkey) then + FReset := True; + if FixRegistryDataType(KeyboardToggleReg, SRegValue_Toggle_LanguageHotkey) then + FReset := True; + if FixRegistryDataType(KeyboardToggleReg, SRegValue_Toggle_LayoutHotkey) then + FReset := True; + + if not KeyboardToggleReg.ValueExists(SRegValue_Toggle_Hotkey) or + (KeyboardToggleReg.ReadString(SRegValue_Toggle_Hotkey) <> FLanguageToggle) then begin - WriteString(SRegValue_Toggle_Hotkey, FLanguageToggle); - WriteString(SRegValue_Toggle_LanguageHotkey, FLanguageToggle); + KeyboardToggleReg.WriteString(SRegValue_Toggle_Hotkey, FLanguageToggle); + KeyboardToggleReg.WriteString(SRegValue_Toggle_LanguageHotkey, FLanguageToggle); FReset := True; end; - if not ValueExists(SRegValue_Toggle_LayoutHotkey) or (ReadString(SRegValue_Toggle_LayoutHotkey) <> FLayoutToggle) then + if not KeyboardToggleReg.ValueExists(SRegValue_Toggle_LayoutHotkey) or + (KeyboardToggleReg.ReadString(SRegValue_Toggle_LayoutHotkey) <> FLayoutToggle) then begin - WriteString(SRegValue_Toggle_LayoutHotkey, FLayoutToggle); + KeyboardToggleReg.WriteString(SRegValue_Toggle_LayoutHotkey, FLayoutToggle); FReset := True; end; finally - Free; + KeyboardToggleReg.Free; end; if FReset then From 3ec1338b36469e3cd4f3aff50b02be6a17d1de05 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Mon, 21 Jul 2025 17:20:52 +0200 Subject: [PATCH 006/343] test(developer): add unit tests for `isValidUtf8` Follow-up-of: #14369 Test-bot: skip --- developer/src/kmcmplib/src/Compiler.cpp | 2 +- .../kmcmplib/tests/gtest-compiler.tests.cpp | 98 ++++++++++++++++++- 2 files changed, 98 insertions(+), 2 deletions(-) diff --git a/developer/src/kmcmplib/src/Compiler.cpp b/developer/src/kmcmplib/src/Compiler.cpp index b09e9e704d..ab6296609b 100644 --- a/developer/src/kmcmplib/src/Compiler.cpp +++ b/developer/src/kmcmplib/src/Compiler.cpp @@ -3874,7 +3874,7 @@ bool isValidUtf8(KMX_BYTE* str, int sz) { // 2-byte sequence if (remaining < 2 || (str[i + 1] & 0xC0) != 0x80 || - str[i] == 0xC0 || + str[i] == 0xC0 || // C0 and C1 are illegal values str[i] == 0xC1) { return false; } diff --git a/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp b/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp index 5589056d7e..0f0f726337 100644 --- a/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp +++ b/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp @@ -24,7 +24,8 @@ KMX_DWORD GetRHS(PFILE_KEYBOARD fk, PKMX_WCHAR p, PKMX_WCHAR buf, int bufsize, i bool isIntegerWstring(PKMX_WCHAR p); bool hasPreamble(std::u16string result); KMX_DWORD ProcessKeyLineImpl(PFILE_KEYBOARD fk, PKMX_WCHAR str, KMX_BOOL IsUnicode, PKMX_WCHAR pklIn, PKMX_WCHAR pklKey, PKMX_WCHAR pklOut); -bool UTF16TempFromUTF8(KMX_BYTE* infile, int sz, KMX_BYTE** tempfile, int* sz16); +extern bool UTF16TempFromUTF8(KMX_BYTE* infile, int sz, KMX_BYTE** tempfile, int* sz16); +extern bool isValidUtf8(KMX_BYTE* str, int sz); namespace kmcmp { extern int nErrors; @@ -2160,3 +2161,98 @@ TEST(UTF16TempFromUTF8, HandlesEmptyInput) { EXPECT_EQ(tempfile, nullptr); EXPECT_EQ(sz16, 0); } + +TEST(IsValidUtf8Test, ValidAscii) { + std::vector v = {'h', 'e', 'l', 'l', 'o'}; + EXPECT_TRUE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Valid2Byte) { + std::vector v = {0xC2, 0xA2}; // U+00A2: ¢ + EXPECT_TRUE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Valid3Byte) { + std::vector v = {0xE2, 0x82, 0xAC}; // U+20AC: € + EXPECT_TRUE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Valid4Byte) { + std::vector v = {0xF0, 0x9F, 0x98, 0x80}; // U+1F600: 😀 + EXPECT_TRUE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, InvalidOverlongEncoding) { + std::vector v = {0xC1, 0x81}; // Overlong encoding for ASCII + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, InvalidMissingContinuation) { + std::vector v = {0xE2, 0x82}; // Missing one continuation byte + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, InvalidLoneContinuation) { + std::vector v = {0x80}; // Continuation byte without starter + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid4ByteOutOfRange) { + std::vector v = {0xF4, 0x90, 0x80, 0x80}; // > U+10FFFF + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, ValidMixedAsciiAndMultiByte) { + std::vector v = {'A', 0xC2, 0xA2, 0xE2, 0x82, 0xAC, 0xF0, 0x9F, 0x98, 0x80}; + EXPECT_TRUE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid2ByteBadSecondByte) { + std::vector v = {0xD2, 0x28}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid2ByteBadSecondByteToHigh) { + std::vector v = {0xD2, 0xC8}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid3ByteBadSecondByte) { + std::vector v = {0xE2, 0x28, 0xA1}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid3ByteBadThirdByte) { + std::vector v = {0xE2, 0xA8, 0xD1}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid4ByteBadSecondByte) { + std::vector v = {0xF2, 0xC8, 0xB2, 0x88}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid4ByteBadThirdByte) { + std::vector v = {0xF2, 0xB8, 0x02, 0x88}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid4ByteBadFourthByte) { + std::vector v = {0xF2, 0xB8, 0xA2, 0xD8}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, InvalidByteC0) { + std::vector v = {0xC1}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, InvalidByteF5) { + std::vector v = {0xF5}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, ValidEmptyInput) { + std::vector v = {}; + EXPECT_TRUE(isValidUtf8(v.data(), v.size())); +} From ed7c0caf9dcb2580d0a5ceee6adcac58cc9c9b8f Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Thu, 24 Jul 2025 08:04:50 +0700 Subject: [PATCH 007/343] maint(android): Update Android Target API to 35 --- android/KMAPro/kMAPro/build.gradle | 2 +- android/KMEA/app/build.gradle | 2 +- android/Samples/KMSample1/app/build.gradle | 2 +- android/Samples/KMSample2/app/build.gradle | 2 +- android/Tests/KeyboardHarness/app/build.gradle | 2 +- oem/firstvoices/android/app/build.gradle | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/KMAPro/kMAPro/build.gradle b/android/KMAPro/kMAPro/build.gradle index 864fb36ee9..558c25e9bf 100644 --- a/android/KMAPro/kMAPro/build.gradle +++ b/android/KMAPro/kMAPro/build.gradle @@ -12,7 +12,7 @@ apply from: "$rootPath/version.gradle" String tier = new File('../../TIER.md').getText('UTF-8').trim(); android { - compileSdk 34 + compileSdk 35 namespace="com.tavultesoft.kmapro" // Don't compress kmp files so they can be copied via AssetManager diff --git a/android/KMEA/app/build.gradle b/android/KMEA/app/build.gradle index dd4251025b..760dd5f244 100644 --- a/android/KMEA/app/build.gradle +++ b/android/KMEA/app/build.gradle @@ -28,7 +28,7 @@ android { defaultConfig { minSdkVersion 21 - targetSdkVersion 34 + targetSdkVersion 35 // KEYMAN_VERSION_CODE and KEYMAN_VERSION_NAME from version.gradle but Gradle removes them for libraries buildConfigField "String", "KEYMAN_ENGINE_VERSION_NAME", "\""+KEYMAN_VERSION_NAME+"\"" diff --git a/android/Samples/KMSample1/app/build.gradle b/android/Samples/KMSample1/app/build.gradle index cc92dee298..c8ae0f6380 100644 --- a/android/Samples/KMSample1/app/build.gradle +++ b/android/Samples/KMSample1/app/build.gradle @@ -14,7 +14,7 @@ android { defaultConfig { applicationId "com.keyman.kmsample1" minSdkVersion 21 - targetSdkVersion 34 + targetSdkVersion 35 versionCode 1 versionName "1.0" } diff --git a/android/Samples/KMSample2/app/build.gradle b/android/Samples/KMSample2/app/build.gradle index cd2f4d6225..f194cf9156 100644 --- a/android/Samples/KMSample2/app/build.gradle +++ b/android/Samples/KMSample2/app/build.gradle @@ -14,7 +14,7 @@ android { defaultConfig { applicationId "com.keyman.kmsample2" minSdkVersion 21 - targetSdkVersion 34 + targetSdkVersion 35 versionCode 1 versionName "1.0" } diff --git a/android/Tests/KeyboardHarness/app/build.gradle b/android/Tests/KeyboardHarness/app/build.gradle index ab8066393b..43c928da61 100644 --- a/android/Tests/KeyboardHarness/app/build.gradle +++ b/android/Tests/KeyboardHarness/app/build.gradle @@ -21,7 +21,7 @@ android { defaultConfig { applicationId "com.keyman.android.tests.keyboardHarness" minSdkVersion 21 - targetSdkVersion 34 + targetSdkVersion 35 // KEYMAN_VERSION_CODE and KEYMAN_VERSION_NAME from version.gradle versionCode KEYMAN_VERSION_CODE as Integer diff --git a/oem/firstvoices/android/app/build.gradle b/oem/firstvoices/android/app/build.gradle index 8a6558aa3d..27aec25499 100644 --- a/oem/firstvoices/android/app/build.gradle +++ b/oem/firstvoices/android/app/build.gradle @@ -18,7 +18,7 @@ android { defaultConfig { applicationId "com.firstvoices.keyboards" minSdkVersion 21 - targetSdkVersion 34 + targetSdkVersion 35 // KEYMAN_VERSION_CODE and KEYMAN_VERSION_NAME from version.gradle versionCode KEYMAN_VERSION_CODE as Integer From 9807d5e137c1e44b136219b80f8f987d01567949 Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Thu, 24 Jul 2025 16:19:23 +1000 Subject: [PATCH 008/343] fix(windows): add early return if SM abort is called If it has been determined the user turned off automatic updates in the function ShouldSendToBUpdateSM then it shall return early. --- windows/src/desktop/kmshell/main/initprog.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/windows/src/desktop/kmshell/main/initprog.pas b/windows/src/desktop/kmshell/main/initprog.pas index 8905aa1338..528e944b2b 100644 --- a/windows/src/desktop/kmshell/main/initprog.pas +++ b/windows/src/desktop/kmshell/main/initprog.pas @@ -675,9 +675,10 @@ begin // after updates where checked and downloaded. The user should // not be prompted for an update in this case and the update should // abort. - if BUpdateSM.GetAutomaticUpdates and ReadyToInstall then + if not BUpdateSM.GetAutomaticUpdates and ReadyToInstall then begin BUpdateSM.HandleAbort; + Exit(False); end; if not FSilent and ReadyToInstall and From 3c311a5aaae030af88d0a3e23f4b40944a6170da Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Thu, 24 Jul 2025 16:59:41 +1000 Subject: [PATCH 009/343] fix(windows): free the correct object KeyboardToggleReg --- .../engine/keyman/langswitch/LangSwitchManager.pas | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/windows/src/engine/keyman/langswitch/LangSwitchManager.pas b/windows/src/engine/keyman/langswitch/LangSwitchManager.pas index 0a375695e0..04a8b91392 100644 --- a/windows/src/engine/keyman/langswitch/LangSwitchManager.pas +++ b/windows/src/engine/keyman/langswitch/LangSwitchManager.pas @@ -231,6 +231,18 @@ type FLanguageToggle: string; FLayoutToggle: string; procedure LoadCurrentHotkey; + (** + * Ensures that the specified registry value has a valid string data type. + * If the registry value exists but is not of type `rdString` or `rdExpandString`, + * the function deletes the existing value and writes a default string value + * of `'3'`. + * + * @param RegistryKey The registry key object wrapper used to access the registry. + * @param ValueName The name of the registry value to check and correct. + * + * @returns True if the data type was incorrect and the value was reset; + * False if the value did not exist or was already a valid string type. + *) function FixRegistryDataType(RegistryKey: TRegistryErrorControlled; const ValueName: string): Boolean; procedure DisableWindowsHotkey; procedure RestoreWindowsHotkey; @@ -1052,7 +1064,7 @@ begin FReset := True; end; finally - Free; + KeyboardToggleReg.Free; end; if FReset then SystemParametersInfo(SPI_SETLANGTOGGLE, 0, nil, 0); From 02fc68790b1e24926bd55568d6824d74b65fae81 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Thu, 24 Jul 2025 14:39:12 +0700 Subject: [PATCH 010/343] fix(android): Fix targetSdkVersion for the app --- android/KMAPro/kMAPro/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/KMAPro/kMAPro/build.gradle b/android/KMAPro/kMAPro/build.gradle index 558c25e9bf..0d56daf63f 100644 --- a/android/KMAPro/kMAPro/build.gradle +++ b/android/KMAPro/kMAPro/build.gradle @@ -32,7 +32,7 @@ android { defaultConfig { applicationId "com.tavultesoft.kmapro" minSdkVersion 21 - targetSdkVersion 34 + targetSdkVersion 35 //println "===DUMPING PROPERTIES===" //dumpProperties(project) // Use this to dump all external properties for debugging TeamCity integration From 183a8455b0fda96dd298f2944d528b9cfeb3a58d Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 24 Jul 2025 19:16:18 +0200 Subject: [PATCH 011/343] maint(linux): fix stopping of test server --- .../tests/dbus-test-server/KmDbusTestServer.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/linux/ibus-keyman/tests/dbus-test-server/KmDbusTestServer.cpp b/linux/ibus-keyman/tests/dbus-test-server/KmDbusTestServer.cpp index 80ae444185..50007e2b9e 100644 --- a/linux/ibus-keyman/tests/dbus-test-server/KmDbusTestServer.cpp +++ b/linux/ibus-keyman/tests/dbus-test-server/KmDbusTestServer.cpp @@ -98,11 +98,9 @@ void KmDbusTestServer::Loop() return; } - guint exitFlag = FALSE; - // Install the object ret = sd_bus_add_object_vtable(bus, NULL, KEYMAN_TESTSVC_OBJECT_PATH, - KEYMAN_TESTSVC_INTERFACE_NAME, test_service_vtable, &exitFlag); + KEYMAN_TESTSVC_INTERFACE_NAME, test_service_vtable, this); if (ret < 0) { g_error("Failed to issue method call: %s", strerror(-ret)); return; @@ -118,12 +116,12 @@ void KmDbusTestServer::Loop() for (;;) { // Process requests ret = sd_bus_process(bus, NULL); - g_debug("sd_bus_process returned %d, exitFlag=%d", ret, exitFlag); + g_debug("sd_bus_process returned %d, exitFlag=%d", ret, this->exitFlag); if (ret < 0) { g_error("Failed to process bus: %s", strerror(-ret)); return; } - if (exitFlag) { + if (this->exitFlag) { // `exitFlag` can be modified by the callback function // `on_exit_method` which can be called by `sd_bus_process` g_debug("Exiting loop"); From bfc3aa345610c97f67152f720cc86efaefdca892 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Fri, 25 Jul 2025 19:37:30 +0200 Subject: [PATCH 012/343] refactor(linux): move dbus defines to common include This got missed in #14372. Fixes: #13281 Follow-up-of: #14372 Test-bot: skip --- linux/ibus-keyman/src/KeymanSystemServiceClient.cpp | 4 +--- linux/include/km_linux_common.h | 4 ++++ linux/keyman-system-service/src/KeymanSystemService.cpp | 4 +--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/linux/ibus-keyman/src/KeymanSystemServiceClient.cpp b/linux/ibus-keyman/src/KeymanSystemServiceClient.cpp index 1c2867778e..ca3f077afc 100644 --- a/linux/ibus-keyman/src/KeymanSystemServiceClient.cpp +++ b/linux/ibus-keyman/src/KeymanSystemServiceClient.cpp @@ -5,11 +5,9 @@ #else #include #endif +#include #include "KeymanSystemServiceClient.h" -#define KEYMAN_BUS_NAME "com.keyman.SystemService1" -#define KEYMAN_INTERFACE_NAME "com.keyman.SystemService1.System" -#define KEYMAN_OBJECT_PATH "/com/keyman/SystemService1/System" extern gboolean testing; diff --git a/linux/include/km_linux_common.h b/linux/include/km_linux_common.h index 374ae01251..65204d9ccf 100644 --- a/linux/include/km_linux_common.h +++ b/linux/include/km_linux_common.h @@ -4,4 +4,8 @@ #define KEYMAN_F24_KEYCODE_OUTPUT_SENTINEL 194 // 0xC2 +#define KEYMAN_BUS_NAME "com.keyman.SystemService1" +#define KEYMAN_INTERFACE_NAME "com.keyman.SystemService1.System" +#define KEYMAN_OBJECT_PATH "/com/keyman/SystemService1/System" + #endif // __KM_LINUX_COMMON_H__ diff --git a/linux/keyman-system-service/src/KeymanSystemService.cpp b/linux/keyman-system-service/src/KeymanSystemService.cpp index f226ff2b2f..88cfa09ffa 100644 --- a/linux/keyman-system-service/src/KeymanSystemService.cpp +++ b/linux/keyman-system-service/src/KeymanSystemService.cpp @@ -17,12 +17,10 @@ #else #include #endif +#include #include "KeymanSystemService.h" #include "KeyboardDevice.h" -#define KEYMAN_BUS_NAME "com.keyman.SystemService1" -#define KEYMAN_INTERFACE_NAME "com.keyman.SystemService1.System" -#define KEYMAN_OBJECT_PATH "/com/keyman/SystemService1/System" using namespace std; From c08ac71b304e2eece356a6067ee5dcd65b226b8b Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Fri, 25 Jul 2025 19:42:33 +0200 Subject: [PATCH 013/343] docs(linux): update readme for test service Build-bot: skip Test-bot: skip --- linux/keyman-system-service/tests/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linux/keyman-system-service/tests/README.md b/linux/keyman-system-service/tests/README.md index af77363b65..477a776c63 100644 --- a/linux/keyman-system-service/tests/README.md +++ b/linux/keyman-system-service/tests/README.md @@ -9,3 +9,11 @@ keyman-system-service. The differences are: The keyman-test-service gets called/used by the ibus-keyman integration tests. + +This test service goes hand in hand with `linux/ibus-keyman/tests/dbus-test-server`: +during test setup the dbus-test-server gets started (and registers its +class), but also adds our `services` subdir (`linux/keyman-system-service/tests/services`) +to the list of directories to be searched for services. + +When during the test `ibus-engine-keyman` calls a method on +`keyman-test-service` it will be started by dbus. From 08746e24a2ad0f65f5f708a26376009847136292 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Fri, 25 Jul 2025 19:51:09 +0200 Subject: [PATCH 014/343] refactor(linux): remove shellcheck warnings Test-bot: skip --- linux/ibus-keyman/tests/scripts/run-tests.sh | 45 ++--- .../tests/scripts/test-helper.inc.sh | 154 +++++++++--------- 2 files changed, 103 insertions(+), 96 deletions(-) diff --git a/linux/ibus-keyman/tests/scripts/run-tests.sh b/linux/ibus-keyman/tests/scripts/run-tests.sh index 1f26b39a41..c2b9d796df 100755 --- a/linux/ibus-keyman/tests/scripts/run-tests.sh +++ b/linux/ibus-keyman/tests/scripts/run-tests.sh @@ -1,20 +1,24 @@ #!/usr/bin/env bash +# shellcheck disable=SC2312 + set -eu +# shellcheck disable=SC2034 TOP_SRCDIR=${top_srcdir:-$(realpath "$(dirname "$0")/../..")} -TESTBASEDIR=${XDG_DATA_HOME:-$HOME/.local/share}/keyman +TESTBASEDIR=${XDG_DATA_HOME:-${HOME}/.local/share}/keyman TESTDIR=${TESTBASEDIR}/test_kmx CLEANUP_FILE=/tmp/ibus-keyman-test-cleanup PID_FILE=/tmp/ibus-keyman-test.pids ENV_FILE=/tmp/keyman-env.txt +# shellcheck disable=SC1091 . "$(dirname "$0")"/test-helper.inc.sh local_cleanup() { - cleanup "$CLEANUP_FILE" + cleanup "${CLEANUP_FILE}" } -if [ -v KEYMAN_PKG_BUILD ]; then +if [[ -v KEYMAN_PKG_BUILD ]]; then # During package builds we skip these tests that require to start ibus because # ibus requires to find /var/lib/dbus/machine-id or /etc/machine-id, otherwise it fails with: # "Bail out! IBUS-FATAL-WARNING: Unable to load /var/lib/dbus/machine-id: Failed to open file @@ -23,7 +27,7 @@ if [ -v KEYMAN_PKG_BUILD ]; then exit 0 fi -if ! which Xvfb > /dev/null || ! which Xephyr > /dev/null || ! which metacity > /dev/null || ! which mutter > /dev/null; then +if ! command -v Xvfb > /dev/null || ! command -v Xephyr > /dev/null || ! command -v metacity > /dev/null || ! command -v mutter > /dev/null; then echo "Please install Xvfb, Xephyr, metacity and mutter before running these tests!" echo "sudo apt install xvfb xserver-xephyr metacity mutter" exit 1 @@ -54,9 +58,9 @@ function run_tests() { DISPLAY_SERVER=$1 shift - if [ -d "$(dirname "$0")/../../../build/$(arch)/debug" ]; then + if [[ -d "$(dirname "$0")/../../../build/$(arch)/debug" ]]; then CONFIG=debug - elif [ -d "$(dirname "$0")/../../../build/$(arch)/release" ]; then + elif [[ -d "$(dirname "$0")/../../../build/$(arch)/release" ]]; then CONFIG=release else echo "Cannot find ../../../build/$(arch)/debug or ../../../build/$(arch)/release" @@ -74,19 +78,20 @@ function run_tests() { fi echo "" - if [ $# -gt 0 ]; then + if [[ $# -gt 0 ]]; then #shellcheck disable=SC2206 TESTFILES=($@) else - pushd "$TESTDIR" > /dev/null || exit + pushd "${TESTDIR}" > /dev/null || exit TESTFILES=(*.kmx) popd > /dev/null || exit fi echo "# Starting tests..." # shellcheck disable=SC1090 - source "$ENV_FILE" - echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" + source "${ENV_FILE}" + # shellcheck disable=SC2154 + echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" if [[ -n ${REMOTE_DEBUG:-} ]]; then echo "===> Now attach debugger to ${REMOTE_HOST}" @@ -97,10 +102,10 @@ function run_tests() { #shellcheck disable=SC2086 ${REMOTE_DEBUG:-} "${G_TEST_BUILDDIR:-../../build/$(arch)/${CONFIG}/tests}/ibus-keyman-tests" ${ARG_K-} ${ARG_TAP-} \ ${ARG_VERBOSE-} ${ARG_DEBUG-} ${ARG_SURROUNDING_TEXT-} ${ARG_NO_SURROUNDING_TEXT-} \ - --directory "$TESTDIR" "${DISPLAY_SERVER}" ${TESTFILES[@]} + --directory "${TESTDIR}" "${DISPLAY_SERVER}" ${TESTFILES[@]} echo "# Finished tests." - cleanup "$CLEANUP_FILE" + cleanup "${CLEANUP_FILE}" } USE_WAYLAND=1 @@ -124,34 +129,34 @@ while (( $# )); do shift || (echo "Error: The last argument is missing a value. Exiting."; false) || exit 5 done -if ! can_run_wayland && [ "$USE_WAYLAND" == "0" ]; then +if ! can_run_wayland && [[ "${USE_WAYLAND}" == "0" ]]; then # support for --headless got added in mutter 40.x echo "# WARNING: mutter doesn't support running headless. Skipping Wayland tests." USE_WAYLAND=0 - if [ "$USE_X11" == "0" ]; then + if [[ "${USE_X11}" == "0" ]]; then echo "ERROR: no tests to run. Can't run Wayland tests, and --no-x11 is specified." exit 8 fi fi -if [ "$USE_WAYLAND" == "0" ] && [ "$USE_X11" == "0" ]; then +if [[ "${USE_WAYLAND}" == "0" ]] && [[ "${USE_X11}" == "0" ]]; then echo "ERROR: I'll have to run somewhere. Specifying both --no-wayland and --no-x11 is not allowed." exit 6 fi G_TEST_BUILDDIR="${G_TEST_BUILDDIR:-../../build/$(arch)/debug/tests}" -if [ ! -f "${G_TEST_BUILDDIR}/ibus-keyman-tests" ]; then +if [[ ! -f "${G_TEST_BUILDDIR}/ibus-keyman-tests" ]]; then G_TEST_BUILDDIR="${G_TEST_BUILDDIR:-../../build/$(arch)/release/tests}" fi -echo > "$CLEANUP_FILE" -echo > "$PID_FILE" +echo > "${CLEANUP_FILE}" +echo > "${PID_FILE}" trap local_cleanup EXIT SIGINT -if [ "$USE_WAYLAND" == "1" ]; then +if [[ "${USE_WAYLAND}" == "1" ]]; then run_tests --wayland "$@" fi -if [ "$USE_X11" == "1" ]; then +if [[ "${USE_X11}" == "1" ]]; then run_tests --x11 "$@" fi diff --git a/linux/ibus-keyman/tests/scripts/test-helper.inc.sh b/linux/ibus-keyman/tests/scripts/test-helper.inc.sh index e9732cc478..2a6b38be3d 100755 --- a/linux/ibus-keyman/tests/scripts/test-helper.inc.sh +++ b/linux/ibus-keyman/tests/scripts/test-helper.inc.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +# shellcheck shell=bash function can_run_wayland() { local MUTTER_VERSION @@ -13,9 +13,9 @@ function can_run_wayland() { function _generate_kmpjson() { local TESTDIR TESTDIR="$1" - pushd "$TESTDIR" > /dev/null || exit + pushd "${TESTDIR}" > /dev/null || exit KMPFILE="${TESTDIR}/kmp.json" - cat <<-EOF > "$KMPFILE" + cat <<-EOF > "${KMPFILE}" { "system": { "keymanDeveloperVersion": "10.0.1099.0", @@ -36,33 +36,33 @@ function _generate_kmpjson() { } EOF for f in k_*.kmx; do - keyboard=$(basename "$f") + keyboard=$(basename "${f}") keyboard="${keyboard%.*}" - echo " ," >> "$KMPFILE" - cat <<-EOF >> "$KMPFILE" + echo " ," >> "${KMPFILE}" + cat <<-EOF >> "${KMPFILE}" { - "name": "$keyboard", - "description": "$keyboard" + "name": "${keyboard}", + "description": "${keyboard}" } EOF done - cat <<-EOF >> "$KMPFILE" + cat <<-EOF >> "${KMPFILE}" ], "keyboards": [ EOF FIRST=true for f in k_*.kmx; do - keyboard=$(basename "$f") + keyboard=$(basename "${f}") keyboard="${keyboard%.*}" - if $FIRST; then + if ${FIRST}; then FIRST=false else - echo " ," >> "$KMPFILE" + echo " ," >> "${KMPFILE}" fi - cat <<-EOF >> "$KMPFILE" + cat <<-EOF >> "${KMPFILE}" { - "name": "$keyboard", - "id": "$keyboard", + "name": "${keyboard}", + "id": "${keyboard}", "version": "0.0", "languages": [ { @@ -73,8 +73,8 @@ EOF } EOF done - echo " ]" >> "$KMPFILE" - echo "}" >> "$KMPFILE" + echo " ]" >> "${KMPFILE}" + echo "}" >> "${KMPFILE}" popd > /dev/null || exit } @@ -84,9 +84,9 @@ function _link_test_keyboards() { TESTBASEDIR=$3 if [[ $(find "${KMX_TEST_DIR}/" -name k_\*.kmx 2>/dev/null | wc -l) -gt 0 ]]; then - mkdir -p "$(realpath --canonicalize-missing "$TESTBASEDIR")" - rm -f "$TESTDIR" - ln -sf "$(realpath "${KMX_TEST_DIR}")" "$TESTDIR" + mkdir -p "$(realpath --canonicalize-missing "${TESTBASEDIR}")" + rm -f "${TESTDIR}" + ln -sf "$(realpath "${KMX_TEST_DIR}")" "${TESTDIR}" else echo "Can't find test kmx files in ${KMX_TEST_DIR}" exit 3 @@ -99,31 +99,31 @@ function _setup_init() { CLEANUP_FILE=$2 PID_FILE=$3 - if [ -z "${TOP_SRCDIR:-}" ]; then + if [[ -z "${TOP_SRCDIR:-}" ]]; then TOP_SRCDIR=${G_TEST_SRCDIR:-$(realpath "$(dirname "$0")/..")}/.. fi - if [ -z "${TOP_BINDIR:-}" ]; then + if [[ -z "${TOP_BINDIR:-}" ]]; then TOP_BINDIR=${G_TEST_BUILDDIR:-$(realpath "$(dirname "$0/..")")}/.. fi - echo > "$ENV_FILE" + echo > "${ENV_FILE}" - if [ -f "$CLEANUP_FILE" ]; then + if [[ -f "${CLEANUP_FILE}" ]]; then # kill previous instances - "$(dirname "$0")"/teardown-tests.sh "$CLEANUP_FILE" || true + "$(dirname "$0")"/teardown-tests.sh "${CLEANUP_FILE}" || true fi - echo > "$CLEANUP_FILE" - echo > "$PID_FILE" + echo > "${CLEANUP_FILE}" + echo > "${PID_FILE}" TEMP_DATA_DIR=$(mktemp --directory) echo "rm -rf \"${TEMP_DATA_DIR}\" || true # TEMP_DATA_DIR" >> "${CLEANUP_FILE}" COMMON_ARCH_DIR= - [ -d "${TOP_SRCDIR}"/../../core/build/arch ] && COMMON_ARCH_DIR=${TOP_SRCDIR}/../../core/build/arch + [[ -d "${TOP_SRCDIR}"/../../core/build/arch ]] && COMMON_ARCH_DIR=${TOP_SRCDIR}/../../core/build/arch - if [ -d "${COMMON_ARCH_DIR}"/release ]; then + if [[ -d "${COMMON_ARCH_DIR}"/release ]]; then COMMON_ARCH_DIR=${COMMON_ARCH_DIR}/release - elif [ -d "${COMMON_ARCH_DIR}"/debug ]; then + elif [[ -d "${COMMON_ARCH_DIR}"/debug ]]; then COMMON_ARCH_DIR=${COMMON_ARCH_DIR}/debug else echo "Can't find neither ${COMMON_ARCH_DIR}/release nor ${COMMON_ARCH_DIR}/debug" @@ -131,7 +131,7 @@ function _setup_init() { fi export LD_LIBRARY_PATH=${COMMON_ARCH_DIR}/src:${LD_LIBRARY_PATH-} - echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> "$ENV_FILE" + echo "export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> "${ENV_FILE}" } function _setup_test_dbus_server() { @@ -143,12 +143,14 @@ function _setup_test_dbus_server() { "${TOP_BINDIR}/tests/dbus-test-server/km-dbus-test-server" &> /tmp/km-test-server.log & sleep 1 - cat /tmp/km-test-server.env >> "$ENV_FILE" - cat /tmp/km-test-server.env >> "$CLEANUP_FILE" - echo "${TOP_BINDIR}/tests/dbus-test-server/stop-test-server" >> "$CLEANUP_FILE" + cat /tmp/km-test-server.env >> "${ENV_FILE}" + cat /tmp/km-test-server.env >> "${CLEANUP_FILE}" + echo "${TOP_BINDIR}/tests/dbus-test-server/stop-test-server" >> "${CLEANUP_FILE}" + # shellcheck disable=SC1091 source /tmp/km-test-server.env - echo "# DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" + # shellcheck disable=SC2154 + echo "# DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" } function _setup_display_server() { @@ -158,7 +160,7 @@ function _setup_display_server() { PID_FILE=$3 DISPLAY_SERVER=$4 - if [ "$DISPLAY_SERVER" == "--wayland" ]; then + if [[ "${DISPLAY_SERVER}" == "--wayland" ]]; then if ! can_run_wayland; then # support for --headless got added in mutter 40.x echo "ERROR: mutter doesn't support running headless. Can't run Wayland tests." @@ -168,49 +170,49 @@ function _setup_display_server() { echo "Starting mutter..." TMPFILE=$(mktemp) # mutter-Message: 18:56:15.422: Using Wayland display name 'wayland-1' - mutter --wayland --headless --no-x11 --virtual-monitor 1024x768 &> "$TMPFILE" & + mutter --wayland --headless --no-x11 --virtual-monitor 1024x768 &> "${TMPFILE}" & PID=$! - echo "kill -9 ${PID} || true # mutter" >> "$CLEANUP_FILE" + echo "kill -9 ${PID} || true # mutter" >> "${CLEANUP_FILE}" echo "${PID} mutter" >> "${PID_FILE}" sleep 1s export WAYLAND_DISPLAY - WAYLAND_DISPLAY=$(grep "Using Wayland display" "$TMPFILE" | cut -d"'" -f2) - rm "$TMPFILE" - echo "export WAYLAND_DISPLAY=\"$WAYLAND_DISPLAY\"" >> "$ENV_FILE" + WAYLAND_DISPLAY=$(grep "Using Wayland display" "${TMPFILE}" | cut -d"'" -f2) + rm "${TMPFILE}" + echo "export WAYLAND_DISPLAY=\"${WAYLAND_DISPLAY}\"" >> "${ENV_FILE}" else echo "Running on X11:" while true; do echo "Starting Xvfb..." - DISP_XVFB=$RANDOM - Xvfb -screen 0 1024x768x24 :${DISP_XVFB} &> /dev/null & + DISP_XVFB=${RANDOM} + Xvfb -screen 0 1024x768x24 ":${DISP_XVFB}" &> /dev/null & PID=$! sleep 1 - if ps --no-headers --pid="$PID" > /dev/null; then + if ps --no-headers --pid="${PID}" > /dev/null; then break fi done - echo "kill -9 ${PID} || true # Xvfb" >> "$CLEANUP_FILE" + echo "kill -9 ${PID} || true # Xvfb" >> "${CLEANUP_FILE}" echo "${PID} Xvfb" >> "${PID_FILE}" while true; do echo "Starting Xephyr..." - DISP_XEPHYR=$RANDOM - DISPLAY=:${DISP_XVFB} Xephyr :${DISP_XEPHYR} -screen 1024x768 &> /dev/null & + DISP_XEPHYR=${RANDOM} + DISPLAY=:${DISP_XVFB} Xephyr ":${DISP_XEPHYR}" -screen 1024x768 &> /dev/null & PID=$! sleep 1 - if ps --no-headers --pid="$PID" > /dev/null; then + if ps --no-headers --pid="${PID}" > /dev/null; then break fi done - echo "kill -9 ${PID} || true # Xephyr" >> "$CLEANUP_FILE" + echo "kill -9 ${PID} || true # Xephyr" >> "${CLEANUP_FILE}" echo "${PID} Xephyr" >> "${PID_FILE}" echo "Starting metacity" - metacity --display=:${DISP_XEPHYR} &> /dev/null & + metacity --display=":${DISP_XEPHYR}" &> /dev/null & PID=$! - echo "kill -9 ${PID} || true # metacity" >> "$CLEANUP_FILE" + echo "kill -9 ${PID} || true # metacity" >> "${CLEANUP_FILE}" echo "${PID} metacity" >> "${PID_FILE}" export DISPLAY=:${DISP_XEPHYR} - echo "export DISPLAY=\"$DISPLAY\"" >> "$ENV_FILE" + echo "export DISPLAY=\"${DISPLAY}\"" >> "${ENV_FILE}" fi } @@ -219,23 +221,23 @@ function _setup_schema_and_gsettings() { ENV_FILE=$1 # Install schema to temporary directory. This removes the build dependency on the keyman package. - SCHEMA_DIR=$TEMP_DATA_DIR/glib-2.0/schemas - export XDG_DATA_DIRS=$TEMP_DATA_DIR:${XDG_DATA_DIRS-} - echo "export XDG_DATA_DIRS=$XDG_DATA_DIRS" >> "$ENV_FILE" + SCHEMA_DIR=${TEMP_DATA_DIR}/glib-2.0/schemas + export XDG_DATA_DIRS=${TEMP_DATA_DIR}:${XDG_DATA_DIRS-} + echo "export XDG_DATA_DIRS=${XDG_DATA_DIRS}" >> "${ENV_FILE}" export GSETTINGS_SCHEMA_DIR=${SCHEMA_DIR} - echo "export GSETTINGS_SCHEMA_DIR=\"$SCHEMA_DIR\"" >> "$ENV_FILE" + echo "export GSETTINGS_SCHEMA_DIR=\"${SCHEMA_DIR}\"" >> "${ENV_FILE}" - mkdir -p "$SCHEMA_DIR" - cp "${TOP_SRCDIR}"/../keyman-config/resources/com.keyman.gschema.xml "$SCHEMA_DIR"/ - glib-compile-schemas "$SCHEMA_DIR" + mkdir -p "${SCHEMA_DIR}" + cp "${TOP_SRCDIR}"/../keyman-config/resources/com.keyman.gschema.xml "${SCHEMA_DIR}"/ + glib-compile-schemas "${SCHEMA_DIR}" # Ubuntu 18.04 Bionic doesn't have ibus-memconf, and glib is not compiled with the keyfile # backend enabled, so we just use the default backend. Otherwise we use the keyfile # store which interferes less when running on a dev machine. - if [ -f /usr/libexec/ibus-memconf ]; then + if [[ -f /usr/libexec/ibus-memconf ]]; then export GSETTINGS_BACKEND=keyfile - echo "export GSETTINGS_BACKEND=\"$GSETTINGS_BACKEND\"" >> "$ENV_FILE" + echo "export GSETTINGS_BACKEND=\"${GSETTINGS_BACKEND}\"" >> "${ENV_FILE}" IBUS_CONFIG=--config=/usr/libexec/ibus-memconf fi } @@ -264,7 +266,7 @@ function _setup_ibus() { IBUS_ADDRESS=$(ibus address) export IBUS_ADDRESS - echo "export IBUS_ADDRESS=\"$IBUS_ADDRESS\"" >> "$ENV_FILE" + echo "export IBUS_ADDRESS=\"${IBUS_ADDRESS}\"" >> "${ENV_FILE}" echo "Starting ibus-engine-keyman..." #shellcheck disable=SC2086 @@ -285,12 +287,12 @@ function setup() { _setup_init "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" - TESTBASEDIR=${XDG_DATA_HOME:-$HOME/.local/share}/keyman + TESTBASEDIR=${XDG_DATA_HOME:-${HOME}/.local/share}/keyman TESTDIR=${TESTBASEDIR}/test_kmx - _link_test_keyboards "${TOP_SRCDIR}/../../common/test/keyboards/baseline" "$TESTDIR" "$TESTBASEDIR" + _link_test_keyboards "${TOP_SRCDIR}/../../common/test/keyboards/baseline" "${TESTDIR}" "${TESTBASEDIR}" - _generate_kmpjson "$TESTDIR" + _generate_kmpjson "${TESTDIR}" _setup_test_dbus_server "${ENV_FILE}" "${CLEANUP_FILE}" _setup_display_server "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" "${DISPLAY_SERVER}" @@ -314,10 +316,10 @@ function cleanup() { local CLEANUP_FILE CLEANUP_FILE=$1 - if [ -f "$CLEANUP_FILE" ]; then + if [[ -f "${CLEANUP_FILE}" ]]; then echo echo "# Shutting down processes..." - bash "$CLEANUP_FILE" # > /dev/null 2>&1 + bash "${CLEANUP_FILE}" # > /dev/null 2>&1 rm "$CLEANUP_FILE" echo "# Finished shutdown of processes." fi @@ -333,7 +335,7 @@ function cleanup() { } function exit_on_package_build() { - if [ -v KEYMAN_PKG_BUILD ]; then + if [[ -v KEYMAN_PKG_BUILD ]]; then # Skip setup during package builds - can't run headless and we won't # run the other tests anyway exit 0 @@ -346,12 +348,12 @@ function _get_missing_processes() { MISSING_PROCS="" while read -r LINE; do - if [ -z "$LINE" ]; then + if [[ -z "${LINE}" ]]; then continue fi - PID=$(echo "$LINE" | cut -d' ' -f1) - if ! ps --no-headers --pid="$PID" > /dev/null; then - MISSING_PROCS="${MISSING_PROCS} $(echo "$LINE" | cut -d' ' -f2)" + PID=$(echo "${LINE}" | cut -d' ' -f1) + if ! ps --no-headers --pid="${PID}" > /dev/null; then + MISSING_PROCS="${MISSING_PROCS} $(echo "${LINE}" | cut -d' ' -f2)" break fi done < "${PID_FILE}" @@ -364,19 +366,19 @@ function check_processes_running() { CLEANUP_FILE=$3 PID_FILE=$4 TEST_NAME=$5 - MISSING_PROCS=$(_get_missing_processes "$PID_FILE") + MISSING_PROCS=$(_get_missing_processes "${PID_FILE}") - if [ "$MISSING_PROCS" != "" ]; then + if [[ "${MISSING_PROCS}" != "" ]]; then echo "# Some background processes no longer running. Restarting..." { echo "Some background processes no longer running (running ${TEST_NAME}):" ; \ - echo "$MISSING_PROCS" ; \ + echo "${MISSING_PROCS}" ; \ echo "Restarting..." ; } >> /tmp/debug.output mv /tmp/ibus-engine-keyman.log{,"-${TEST_NAME}-$(date -Iseconds)"} cleanup "${CLEANUP_FILE}" > /dev/null 2>&1 setup "${DISPLAY_SERVER}" "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" > /dev/null 2>&1 fi - if [ "$(_get_missing_processes "$PID_FILE")" != "" ]; then + if [[ "$(_get_missing_processes "$PID_FILE")" != "" ]]; then echo "# WARNING: Expected background processes are still missing after restart: ${MISSING_PROCS}" echo "# Maybe an old process is still running?" fi From ad962172e9a94f5d9e9fddcb29f56dff58abe5cb Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Mon, 28 Jul 2025 16:54:37 +1000 Subject: [PATCH 015/343] fix(windows): remove dead code --- windows/src/engine/keyman/langswitch/LangSwitchManager.pas | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/windows/src/engine/keyman/langswitch/LangSwitchManager.pas b/windows/src/engine/keyman/langswitch/LangSwitchManager.pas index 04a8b91392..31481be316 100644 --- a/windows/src/engine/keyman/langswitch/LangSwitchManager.pas +++ b/windows/src/engine/keyman/langswitch/LangSwitchManager.pas @@ -1021,7 +1021,7 @@ procedure TLangSwitchConfiguration.DisableWindowsHotkey; var MatchValue: string; KeyboardToggleReg: TRegistryErrorControlled; - FReset, FFixed: Boolean; + FReset: Boolean; const CHotkeyNotAssigned = '3'; begin if FCurrentHotkey = (HK_ALT or HK_SHIFT) then MatchValue := '1' @@ -1031,7 +1031,6 @@ begin FLanguageToggle := CHotkeyNotAssigned; FLayoutToggle := CHotkeyNotAssigned; - //FFixed := False; FReset := False; KeyboardToggleReg := TRegistryErrorControlled.Create; // I2890 From 73605727a0f372e1ee527759a49c5119e071f5b9 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Mon, 28 Jul 2025 15:01:13 +0200 Subject: [PATCH 016/343] Update developer/src/kmcmplib/tests/gtest-compiler.tests.cpp Co-authored-by: Marc Durdin --- developer/src/kmcmplib/tests/gtest-compiler.tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp b/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp index 0f0f726337..757767762f 100644 --- a/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp +++ b/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp @@ -2212,7 +2212,7 @@ TEST(IsValidUtf8Test, Invalid2ByteBadSecondByte) { EXPECT_FALSE(isValidUtf8(v.data(), v.size())); } -TEST(IsValidUtf8Test, Invalid2ByteBadSecondByteToHigh) { +TEST(IsValidUtf8Test, Invalid2ByteBadSecondByteTooHigh) { std::vector v = {0xD2, 0xC8}; EXPECT_FALSE(isValidUtf8(v.data(), v.size())); } From 3bd6ee18a0d66a6c4f1c281d4ad57864963aead7 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Mon, 28 Jul 2025 14:02:03 -0400 Subject: [PATCH 017/343] auto: increment master version to 19.0.93 --- HISTORY.md | 8 ++++++++ VERSION.md | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index ea259c5a99..50b8063143 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,13 @@ # Keyman Version History +## 19.0.92 alpha 2025-07-28 + +* build(deps): bump multer from 2.0.1 to 2.0.2 (#14373) +* refactor(linux): remove shellcheck warnings (#14409) +* refactor(linux): move dbus defines to common include (#14407) +* docs(linux): update readme for test service (#14408) +* fix(windows): add check a fix for registry datatypes (#14358) + ## 19.0.91 alpha 2025-07-26 * maint(windows): fix calls of renamed functions (#14413) diff --git a/VERSION.md b/VERSION.md index 145ea8990d..66287cb816 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -19.0.92 \ No newline at end of file +19.0.93 \ No newline at end of file From d694ab088998c3b46e2ee978c04c2185177362ae Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Tue, 29 Jul 2025 10:07:18 +0700 Subject: [PATCH 018/343] fix(android): Update compileSdk to 35 --- android/KMEA/app/build.gradle | 2 +- android/Samples/KMSample1/app/build.gradle | 2 +- android/Samples/KMSample2/app/build.gradle | 2 +- android/Tests/KeyboardHarness/app/build.gradle | 2 +- android/Tests/keycode/app/build.gradle | 4 ++-- oem/firstvoices/android/app/build.gradle | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/KMEA/app/build.gradle b/android/KMEA/app/build.gradle index 760dd5f244..e8e803017c 100644 --- a/android/KMEA/app/build.gradle +++ b/android/KMEA/app/build.gradle @@ -13,7 +13,7 @@ base { } android { - compileSdk 34 + compileSdk 35 namespace "com.keyman.engine" buildFeatures { diff --git a/android/Samples/KMSample1/app/build.gradle b/android/Samples/KMSample1/app/build.gradle index c8ae0f6380..53a4a560f2 100644 --- a/android/Samples/KMSample1/app/build.gradle +++ b/android/Samples/KMSample1/app/build.gradle @@ -3,7 +3,7 @@ plugins { } android { - compileSdk 34 + compileSdk 35 namespace="com.keyman.kmsample1" // Don't compress kmp files so they can be copied via AssetManager diff --git a/android/Samples/KMSample2/app/build.gradle b/android/Samples/KMSample2/app/build.gradle index f194cf9156..5bafdc295a 100644 --- a/android/Samples/KMSample2/app/build.gradle +++ b/android/Samples/KMSample2/app/build.gradle @@ -3,7 +3,7 @@ plugins { } android { - compileSdk 34 + compileSdk 35 namespace="com.keyman.kmsample2" // Don't compress kmp files so they can be copied via AssetManager diff --git a/android/Tests/KeyboardHarness/app/build.gradle b/android/Tests/KeyboardHarness/app/build.gradle index 43c928da61..3eb7f27d28 100644 --- a/android/Tests/KeyboardHarness/app/build.gradle +++ b/android/Tests/KeyboardHarness/app/build.gradle @@ -6,7 +6,7 @@ ext.rootPath = '../../../' apply from: "$rootPath/version.gradle" android { - compileSdk 34 + compileSdk 35 namespace="com.keyman.android.tests.keyboardHarness" // Don't compress kmp files so they can be copied via AssetManager diff --git a/android/Tests/keycode/app/build.gradle b/android/Tests/keycode/app/build.gradle index a0b24abb44..975d8054ae 100644 --- a/android/Tests/keycode/app/build.gradle +++ b/android/Tests/keycode/app/build.gradle @@ -4,13 +4,13 @@ ext.rootPath = '../../../' apply from: "$rootPath/version.gradle" android { - compileSdk 34 + compileSdk 35 namespace="com.keyman.android.tests.keycode" defaultConfig { applicationId "com.keyman.android.tests.keycode" minSdkVersion 21 - targetSdkVersion 34 + targetSdkVersion 35 // KEYMAN_VERSION_CODE and KEYMAN_VERSION_NAME from version.gradle versionCode KEYMAN_VERSION_CODE as Integer diff --git a/oem/firstvoices/android/app/build.gradle b/oem/firstvoices/android/app/build.gradle index 27aec25499..c384a70b32 100644 --- a/oem/firstvoices/android/app/build.gradle +++ b/oem/firstvoices/android/app/build.gradle @@ -8,7 +8,7 @@ ext.rootPath = '../../../../android' apply from: "$rootPath/version.gradle" android { - compileSdk 34 + compileSdk 35 namespace="com.firstvoices.keyboards" buildFeatures { From 052c8b611b48cc948fb08d50252ac8031275132c Mon Sep 17 00:00:00 2001 From: Meng-Heng Date: Tue, 29 Jul 2025 15:25:22 +0700 Subject: [PATCH 019/343] docs: apply @srl296 suggestions --- developer/docs/help/reference/bcp-47.md | 33 +++++++++++-------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/developer/docs/help/reference/bcp-47.md b/developer/docs/help/reference/bcp-47.md index 671c9e52a9..edd467b657 100644 --- a/developer/docs/help/reference/bcp-47.md +++ b/developer/docs/help/reference/bcp-47.md @@ -31,27 +31,23 @@ The following are all examples of valid BCP 47 tags: * `km-Khmr-KH`: Khmer, written in the Khmer script, in Cambodia * `km-fonipa`: Khmer, transcribed in IPA * `und-cpmn`: Undetermined (Cypro-Minoan) -* `tok-Zzzz-AA`: Toki Pona (Unknown Script) +* `tok-Zzzz`: Toki Pona (Unknown Script) > [!NOTE] > `Zzzz` is an uncoded script of IOS 15924 and one of the Special codes of the Script subtag. -> `AA` is a Private Use Code. ### The language subtag The only required option is the Language subtag, which is an [ISO 639-1][2] or -[ISO 639-3][3] code. - -- ISO 639-1 tags are a two-letter code. -- ISO 639-3 tags are a three-letter code. +[ISO 639-3][3] code. Essentially, it is an [ISO-639][4] that uses two-letter and three-letter codes. First, try to find your language on the list of two-letter ISO 639-1 codes. -[This Wikipedia page][4] lists all of the two-letter codes. +[This Wikipedia page][5] lists all of the two-letter codes. If the two-letter code is available, it is used instead of the three-letter code. If you can't find a two-letter code, you'll need to find the closest -three-letter code. You can use [Glottolog][5] to search for your language, and +three-letter code. You can use [Glottolog][6] to search for your language, and it will give you an appropriate code. In this example, I searched Glottolog for -“[Saanich][6]” (name of the First Nations that speak SENĆOŦEN) and found `str` +“[Saanich][7]” (name of the First Nations that speak SENĆOŦEN) and found `str` as the code for all Straits Salish languages. > [!IMPORTANT] @@ -67,7 +63,7 @@ model or keyboard. If your language only uses one writing system, omit the Script subtag. Otherwise, in cases where a language can be written in many different writing -systems, you can choose the four letter [ISO 15924][7] script tag that your +systems, you can choose the four letter [ISO 15924][8] script tag that your keyboard or lexical model produces. For example, Plains Cree can either be written in _standard Roman orthography_, @@ -97,11 +93,11 @@ Latin America. Additionally, regions may have vocabulary that doesn't exist in the other regions where the language is spoken. If I were working with a language specific to one country, I would use the [ISO -3166-1 alpha-2][8] country code for the region subtag. For example, `ES` for +3166-1 alpha-2][9] country code for the region subtag. For example, `ES` for Spain or `MX` for Mexico. However, if I were working with Latin American Spanish (a group of countries), I -would need to specify Latin America's [UN M49][9] region code. For Latin +would need to specify Latin America's [UN M49][10] region code. For Latin America, its code is `419`. My lexical model would not suggest words that are common in Spain, but vulgar in Latin America, however it would predict words like "pupupsas" and "chuchitos", which are words that are uncommon in both Spain @@ -115,9 +111,10 @@ Another common UN M49 region code is `001` for the whole world. [1]: https://en.wikipedia.org/wiki/IETF_language_tag [2]: https://en.wikipedia.org/wiki/ISO_639-1 [3]: https://en.wikipedia.org/wiki/ISO_639-3 -[4]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes -[5]: https://glottolog.org/glottolog/language -[6]: https://glottolog.org/resource/languoid/id/saan1246 -[7]: https://en.wikipedia.org/wiki/ISO_15924 -[8]: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 -[9]: https://en.wikipedia.org/wiki/UN_M49 +[4]: https://en.wikipedia.org/wiki/ISO_639 +[5]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes +[6]: https://glottolog.org/glottolog/language +[7]: https://glottolog.org/resource/languoid/id/saan1246 +[8]: https://en.wikipedia.org/wiki/ISO_15924 +[9]: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 +[10]: https://en.wikipedia.org/wiki/UN_M49 From dee4c154c604f9a94b334c8e48f676ddadf808a4 Mon Sep 17 00:00:00 2001 From: Meng-Heng Date: Tue, 29 Jul 2025 15:27:52 +0700 Subject: [PATCH 020/343] docs: change valid bcp47 tag --- developer/docs/help/reference/bcp-47.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer/docs/help/reference/bcp-47.md b/developer/docs/help/reference/bcp-47.md index edd467b657..0f8e90f911 100644 --- a/developer/docs/help/reference/bcp-47.md +++ b/developer/docs/help/reference/bcp-47.md @@ -31,7 +31,7 @@ The following are all examples of valid BCP 47 tags: * `km-Khmr-KH`: Khmer, written in the Khmer script, in Cambodia * `km-fonipa`: Khmer, transcribed in IPA * `und-cpmn`: Undetermined (Cypro-Minoan) -* `tok-Zzzz`: Toki Pona (Unknown Script) +* `tok-Zzzz`: Toki Pona (Code for uncoded script) > [!NOTE] > `Zzzz` is an uncoded script of IOS 15924 and one of the Special codes of the Script subtag. From 480c98ab32e6c0c1522d857f7d685fb107f82f59 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Tue, 29 Jul 2025 14:01:37 -0400 Subject: [PATCH 021/343] auto: increment master version to 19.0.94 --- HISTORY.md | 5 +++++ VERSION.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 50b8063143..46cf4737ec 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # Keyman Version History +## 19.0.93 alpha 2025-07-29 + +* test(developer): add unit tests for `isValidUtf8` (#14381) +* maint(linux): fix stopping of test server (#14403) + ## 19.0.92 alpha 2025-07-28 * build(deps): bump multer from 2.0.1 to 2.0.2 (#14373) diff --git a/VERSION.md b/VERSION.md index 66287cb816..533bdf0adf 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -19.0.93 \ No newline at end of file +19.0.94 \ No newline at end of file From 85986dd6d84fd5a1ea83e90e8723d79edc81c7df Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Wed, 30 Jul 2025 13:04:45 +0700 Subject: [PATCH 022/343] fix(android): Convert to ConstraintLayout and apply insets Using Android Studio's tool to convert the top level RelativeLayout to ConstraintLayout. This way, the edge-to-edge doesn't cover up the top and bottom portions of the app. Also apply insets so app and keyboard fit in usable areas. --- android/KMAPro/kMAPro/build.gradle | 3 + .../com/tavultesoft/kmapro/MainActivity.java | 19 +++++-- .../src/main/res/layout/activity_main.xml | 31 +++++++---- android/KMEA/app/build.gradle | 1 + .../java/com/keyman/engine/BaseActivity.java | 55 ++++++++++++++++++- .../java/com/keyman/engine/KMManager.java | 35 ++++++++++++ 6 files changed, 127 insertions(+), 17 deletions(-) diff --git a/android/KMAPro/kMAPro/build.gradle b/android/KMAPro/kMAPro/build.gradle index 0d56daf63f..3c6efc4cd9 100644 --- a/android/KMAPro/kMAPro/build.gradle +++ b/android/KMAPro/kMAPro/build.gradle @@ -166,6 +166,9 @@ repositories { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' + // To use constraintlayout in compose + implementation 'androidx.constraintlayout:constraintlayout-compose:1.1.1' implementation 'com.google.android.material:material:1.12.0' implementation 'com.stepstone.stepper:material-stepper:4.3.1' api(name: 'keyman-engine', ext: 'aar') diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java index 3eec444fbd..1515a82076 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java @@ -67,6 +67,7 @@ import androidx.activity.result.ActivityResultLauncher; import androidx.activity.result.contract.ActivityResultContracts; import androidx.appcompat.widget.Toolbar; import androidx.appcompat.app.AlertDialog; +import androidx.constraintlayout.widget.ConstraintLayout; import android.content.ClipData; import android.content.Context; import android.content.DialogInterface; @@ -85,7 +86,6 @@ import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import androidx.annotation.NonNull; import androidx.core.app.ActivityCompat; -import androidx.core.content.ContextCompat; import android.provider.Settings; import android.text.Html; @@ -98,8 +98,6 @@ import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; -import android.view.WindowManager; -import android.webkit.WebView; import android.widget.Button; import android.widget.LinearLayout; import android.widget.SeekBar; @@ -118,6 +116,7 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene private static final String TAG = "MainActivity"; + private ConstraintLayout constraintLayout; private KMTextView textView; private final int minTextSize = 16; private final int maxTextSize = 72; @@ -170,6 +169,10 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene setContentView(R.layout.activity_main); + constraintLayout = (ConstraintLayout)findViewById(R.id.constraintLayout); + setupEdgeToEdge(R.id.constraintLayout); + setupStatusBarColors(android.R.color.white, R.color.neutral_2); + toolbar = (Toolbar) findViewById(R.id.titlebar); setSupportActionBar(toolbar); getSupportActionBar().setTitle(null); @@ -622,10 +625,18 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene if (resourceId > 0) statusBarHeight = getResources().getDimensionPixelSize(resourceId); + // Navigation bar height + int navigationBarHeight = 0; + resourceId = getResources().getIdentifier("navigation_bar_height", "dimen", "android"); + if (resourceId > 0) { + navigationBarHeight = getResources().getDimensionPixelSize(resourceId); + } + Point size = KMManager.getWindowSize(context); int screenHeight = size.y; Log.d(TAG, "Main resizeTextView bannerHeight: " + bannerHeight); - textView.setHeight(screenHeight - statusBarHeight - actionBarHeight - bannerHeight - keyboardHeight); + textView.setHeight( + screenHeight - statusBarHeight - actionBarHeight - bannerHeight - keyboardHeight - navigationBarHeight); } private void showInfo() { diff --git a/android/KMAPro/kMAPro/src/main/res/layout/activity_main.xml b/android/KMAPro/kMAPro/src/main/res/layout/activity_main.xml index c2911272d1..5a468df05e 100644 --- a/android/KMAPro/kMAPro/src/main/res/layout/activity_main.xml +++ b/android/KMAPro/kMAPro/src/main/res/layout/activity_main.xml @@ -1,6 +1,8 @@ - - + - + + android:hint="@string/textview_hint" + android:inputType="textMultiLine|textNoSuggestions" + android:scrollbars="vertical" + app:layout_constraintTop_toBottomOf="@id/checkWebViewChromeLayout"> - + diff --git a/android/KMEA/app/build.gradle b/android/KMEA/app/build.gradle index e8e803017c..3b68839d43 100644 --- a/android/KMEA/app/build.gradle +++ b/android/KMEA/app/build.gradle @@ -65,6 +65,7 @@ android { dependencies { // 1.6.0-rc01 needed to resolve https://issuetracker.google.com/issues/238425626 implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' // material:1.7.0 will need Gradle plugin 7.1.0+ implementation 'com.google.android.material:material:1.12.0' implementation 'commons-io:commons-io:2.16.1' diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java b/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java index 261cd950b8..5e885c2d48 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java @@ -9,10 +9,18 @@ import android.content.ContextWrapper; import android.content.SharedPreferences; import android.os.Build; import android.os.LocaleList; +import android.view.ViewGroup; +import android.view.Window; +import android.view.WindowManager; import android.widget.Toast; - +import androidx.activity.EdgeToEdge; import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; +import androidx.core.view.WindowCompat; +import androidx.core.view.WindowInsetsControllerCompat; import androidx.preference.PreferenceManager; import com.keyman.engine.util.ContextUtils; @@ -68,6 +76,51 @@ public class BaseActivity extends AppCompatActivity { return ""; } + /** + * Setup the activity for edge-to-edge + * https://developer.android.com/develop/ui/views/layout/edge-to-edge-manually + * https://stackoverflow.com/questions/57293449/go-edge-to-edge-on-android-correctly-with-windowinsets + * @param layoutID - Top level ID of the view + */ + public void setupEdgeToEdge(int layoutID) { + EdgeToEdge.enable(this); + + ViewCompat.setOnApplyWindowInsetsListener(findViewById(layoutID), + (view, windowInsets) -> { + // Allocate insets for system bars and display cutout (notch) + Insets insets = windowInsets.getInsets( + WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout()); + ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams)view.getLayoutParams(); + mlp.topMargin = insets.top; + mlp.bottomMargin = insets.left; + mlp.leftMargin = insets.left; + mlp.rightMargin = insets.right; + view.setLayoutParams(mlp); + return windowInsets; + }); + } + + /** + * Apply colors to the status bar (If Android API < 35) and navigation bar + * @param statusBarcolor - int value of the color to use on the status bar. + * @param navigationBarColor - int value of the color to use on the navigation bar. + */ + public void setupStatusBarColors(int statusBarColor, int navigationBarColor) { + // Set status bar colors + // https://stackoverflow.com/a/79706054 + Window window = getWindow(); + window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); + window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); + + WindowInsetsControllerCompat windowInsetsController = + WindowCompat.getInsetsController(window, window.getDecorView()); + windowInsetsController.setAppearanceLightStatusBars(true); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM) { + window.setStatusBarColor(getColor(statusBarColor)); + } + window.setNavigationBarColor(getColor(navigationBarColor)); + } + @Override protected void attachBaseContext(Context newBase) { // Override the app locale using the BCP 47 tag from shared preferences diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java index 75b0443537..a4bf032ee3 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java @@ -692,14 +692,34 @@ public final class KMManager { /** * Adjust the keyboard dimensions. If the suggestion banner is active, use the * combined banner height and keyboard height + * + * Android API 35+ enforces edge-to-edge so we need to determine the navigation bar height (if visible) + * so the keyboard isn't covered up by the navigation bar. + * In portrait orientation, this affects the keyboard bottom margin. + * On phones in landscape orientation, this affects the left/right side of the keyboard * @return RelativeLayout.LayoutParams */ public static RelativeLayout.LayoutParams getKeyboardLayoutParams() { int bannerHeight = getBannerHeight(appContext); int kbHeight = getKeyboardHeight(appContext); + int navigationHeight = getNavigationBarHeight(appContext); + int orientation = getOrientation(appContext); + FormFactor formFactor = getFormFactor(); + RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.MATCH_PARENT, bannerHeight + kbHeight); params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE); + + // Add margins to account for edge-to-edge where system bars cover up the keyboard + if (orientation == Configuration.ORIENTATION_PORTRAIT || + formFactor == FormFactor.TABLET) { + params.bottomMargin = navigationHeight; + } else if (orientation == Configuration.ORIENTATION_LANDSCAPE && formFactor == FormFactor.PHONE) { + // Apply to left and right to handle navigation bar + // Keeps the keyboard symmetrical and also accounts for notch if visible + params.leftMargin = navigationHeight; + params.rightMargin = navigationHeight; + } return params; } @@ -2421,6 +2441,21 @@ public final class KMManager { KeyboardHeight_Context_Landscape_Default = (int) newResources.getDimension(R.dimen.keyboard_height); } + // Get the navigation bar height (if visible) in pixels + private static int getNavigationBarHeight(Context context) { + // Determine if navigation bar is visible + int resourceId = context.getResources().getIdentifier( + "config_showNavigationBar", "bool", "android"); + if (resourceId <= 0) { + return 0; + } + + // Navigation bar visible so get the height + resourceId = context.getResources().getIdentifier( + "navigation_bar_height", "dimen", "android"); + return (resourceId > 0) ? context.getResources().getDimensionPixelSize(resourceId) : 0; + } + /** * Get the size of the area the window would occupy. * API 30+ From 3b91f09074dbadbb9cd9e7545e717cded8258e93 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Wed, 30 Jul 2025 14:32:40 +0700 Subject: [PATCH 023/343] fix(android): Add API check for changing colors --- .../app/src/main/java/com/keyman/engine/BaseActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java b/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java index 5e885c2d48..7369d257e5 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java @@ -115,10 +115,11 @@ public class BaseActivity extends AppCompatActivity { WindowInsetsControllerCompat windowInsetsController = WindowCompat.getInsetsController(window, window.getDecorView()); windowInsetsController.setAppearanceLightStatusBars(true); - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM && + Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { window.setStatusBarColor(getColor(statusBarColor)); + window.setNavigationBarColor(getColor(navigationBarColor)); } - window.setNavigationBarColor(getColor(navigationBarColor)); } @Override From 0d20e49567caf641d0790b12c38015025a300dfb Mon Sep 17 00:00:00 2001 From: MengHeng <90595388+Meng-Heng@users.noreply.github.com> Date: Wed, 30 Jul 2025 14:53:06 +0700 Subject: [PATCH 024/343] Apply suggestions from code review Co-authored-by: Darcy Wong --- developer/docs/help/reference/bcp-47.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer/docs/help/reference/bcp-47.md b/developer/docs/help/reference/bcp-47.md index 0f8e90f911..0d09f4dfdc 100644 --- a/developer/docs/help/reference/bcp-47.md +++ b/developer/docs/help/reference/bcp-47.md @@ -34,7 +34,7 @@ The following are all examples of valid BCP 47 tags: * `tok-Zzzz`: Toki Pona (Code for uncoded script) > [!NOTE] -> `Zzzz` is an uncoded script of IOS 15924 and one of the Special codes of the Script subtag. +> `Zzzz` is an uncoded script of ISO 15924 and one of the Special codes of the Script subtag. ### The language subtag From f6120747ad74fef66c93c73a72404eb4b88d895e Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Thu, 31 Jul 2025 07:09:35 +0700 Subject: [PATCH 025/343] chore(android): Remove unused constraintlayout-compose dependency --- android/KMAPro/kMAPro/build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/android/KMAPro/kMAPro/build.gradle b/android/KMAPro/kMAPro/build.gradle index 3c6efc4cd9..19dba38af3 100644 --- a/android/KMAPro/kMAPro/build.gradle +++ b/android/KMAPro/kMAPro/build.gradle @@ -167,8 +167,6 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.2.1' - // To use constraintlayout in compose - implementation 'androidx.constraintlayout:constraintlayout-compose:1.1.1' implementation 'com.google.android.material:material:1.12.0' implementation 'com.stepstone.stepper:material-stepper:4.3.1' api(name: 'keyman-engine', ext: 'aar') From b7eb61815cf6513933f67e9495670076175f9643 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Thu, 31 Jul 2025 09:55:38 +0700 Subject: [PATCH 026/343] fix(android): Fix insets --- .../app/src/main/java/com/keyman/engine/BaseActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java b/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java index 7369d257e5..e09ae6c4a7 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java @@ -92,7 +92,7 @@ public class BaseActivity extends AppCompatActivity { WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout()); ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams)view.getLayoutParams(); mlp.topMargin = insets.top; - mlp.bottomMargin = insets.left; + mlp.bottomMargin = insets.bottom; mlp.leftMargin = insets.left; mlp.rightMargin = insets.right; view.setLayoutParams(mlp); @@ -101,7 +101,7 @@ public class BaseActivity extends AppCompatActivity { } /** - * Apply colors to the status bar (If Android API < 35) and navigation bar + * If Android API < 35, apply colors to the status bar and navigation bar * @param statusBarcolor - int value of the color to use on the status bar. * @param navigationBarColor - int value of the color to use on the navigation bar. */ From 16c9bfc90d6bafa698884e88c0b0211be005e4ae Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Thu, 31 Jul 2025 10:39:15 +0700 Subject: [PATCH 027/343] fix(android): Handle when navigation bar is left/right of screen --- .../java/com/keyman/engine/BaseActivity.java | 27 +++++++++++++++++++ .../java/com/keyman/engine/KMManager.java | 25 ++++++++++++++--- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java b/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java index e09ae6c4a7..1bbf1ae8d6 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/BaseActivity.java @@ -29,7 +29,16 @@ import com.keyman.engine.util.KMLog; import java.util.Locale; public class BaseActivity extends AppCompatActivity { + public enum NavigationBarLocationType { + // Default navigation bar location + NAVIGATION_BAR_BOTTOM, + NAVIGATION_BAR_LEFT, // Landscape orientation + NAVIGATION_BAR_RIGHT, // Landscape orientation + } + private static final String TAG = "BaseActivity"; + private static NavigationBarLocationType navigationBarLocation = NavigationBarLocationType.NAVIGATION_BAR_BOTTOM; + static ContextWrapper localeUpdatedContext; /** @@ -76,6 +85,14 @@ public class BaseActivity extends AppCompatActivity { return ""; } + /** + * Return the navigation bar location + * @return NavigationBarLocationType + */ + public static NavigationBarLocationType getNavigationBarLocation() { + return navigationBarLocation; + } + /** * Setup the activity for edge-to-edge * https://developer.android.com/develop/ui/views/layout/edge-to-edge-manually @@ -96,6 +113,16 @@ public class BaseActivity extends AppCompatActivity { mlp.leftMargin = insets.left; mlp.rightMargin = insets.right; view.setLayoutParams(mlp); + + // Update Navigation Bar location + if (insets.left > 0) { + navigationBarLocation = NavigationBarLocationType.NAVIGATION_BAR_LEFT; + } else if (insets.right > 0) { + navigationBarLocation = NavigationBarLocationType.NAVIGATION_BAR_RIGHT; + } else { + navigationBarLocation = NavigationBarLocationType.NAVIGATION_BAR_BOTTOM; + } + return windowInsets; }); } diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java index a4bf032ee3..8484613a09 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java @@ -57,6 +57,7 @@ import io.sentry.Breadcrumb; import io.sentry.Sentry; import io.sentry.SentryLevel; +import com.keyman.engine.BaseActivity.NavigationBarLocationType; import com.keyman.engine.KeyboardEventHandler.OnKeyboardDownloadEventListener; import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener; import com.keyman.engine.cloud.CloudDownloadMgr; @@ -716,9 +717,12 @@ public final class KMManager { params.bottomMargin = navigationHeight; } else if (orientation == Configuration.ORIENTATION_LANDSCAPE && formFactor == FormFactor.PHONE) { // Apply to left and right to handle navigation bar - // Keeps the keyboard symmetrical and also accounts for notch if visible - params.leftMargin = navigationHeight; - params.rightMargin = navigationHeight; + NavigationBarLocationType navigationBarLocation = BaseActivity.getNavigationBarLocation(); + if (navigationBarLocation == NavigationBarLocationType.NAVIGATION_BAR_LEFT) { + params.leftMargin = navigationHeight; + } else if (navigationBarLocation == NavigationBarLocationType.NAVIGATION_BAR_RIGHT) { + params.rightMargin = navigationHeight; + } } return params; } @@ -2456,6 +2460,21 @@ public final class KMManager { return (resourceId > 0) ? context.getResources().getDimensionPixelSize(resourceId) : 0; } + /** + * If device is landscape orientation, return if navigation bar is on left (1) or right (2). Otherwise 0 + * @param Context - context + * @return int + */ + private static int getNavigationBarLocation(Context context) { + int orientation = getOrientation(context); + if (orientation != Configuration.ORIENTATION_LANDSCAPE) { + return 0; + } + + return 1; + //View rootView = context.getApplicationContext().getWindow().getDecorView(); + } + /** * Get the size of the area the window would occupy. * API 30+ From 53f9ede409368134518ae45bdca14069a8a4f51d Mon Sep 17 00:00:00 2001 From: MengHeng <90595388+Meng-Heng@users.noreply.github.com> Date: Thu, 31 Jul 2025 15:23:13 +0700 Subject: [PATCH 028/343] Apply suggestions from code review Co-authored-by: rc-swag <58423624+rc-swag@users.noreply.github.com> --- developer/docs/help/reference/bcp-47.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/developer/docs/help/reference/bcp-47.md b/developer/docs/help/reference/bcp-47.md index 0d09f4dfdc..84acce1b19 100644 --- a/developer/docs/help/reference/bcp-47.md +++ b/developer/docs/help/reference/bcp-47.md @@ -38,8 +38,7 @@ The following are all examples of valid BCP 47 tags: ### The language subtag -The only required option is the Language subtag, which is an [ISO 639-1][2] or -[ISO 639-3][3] code. Essentially, it is an [ISO-639][4] that uses two-letter and three-letter codes. +The only required option is the Language subtag, which is an [ISO 639][4] code. If a two-letter code[ISO 639-1][2] is available, it is used instead of the three-letter code [ISO 639-3][3]. First, try to find your language on the list of two-letter ISO 639-1 codes. [This Wikipedia page][5] lists all of the two-letter codes. If the two-letter code is available, it is used instead of the three-letter code. From 6bed9162b1694243d19e1af1b55f58bf64a211e5 Mon Sep 17 00:00:00 2001 From: MengHeng <90595388+Meng-Heng@users.noreply.github.com> Date: Thu, 31 Jul 2025 15:34:27 +0700 Subject: [PATCH 029/343] Apply suggestions from code review --- developer/docs/help/reference/bcp-47.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer/docs/help/reference/bcp-47.md b/developer/docs/help/reference/bcp-47.md index 84acce1b19..0d087911e2 100644 --- a/developer/docs/help/reference/bcp-47.md +++ b/developer/docs/help/reference/bcp-47.md @@ -41,7 +41,7 @@ The following are all examples of valid BCP 47 tags: The only required option is the Language subtag, which is an [ISO 639][4] code. If a two-letter code[ISO 639-1][2] is available, it is used instead of the three-letter code [ISO 639-3][3]. First, try to find your language on the list of two-letter ISO 639-1 codes. -[This Wikipedia page][5] lists all of the two-letter codes. If the two-letter code is available, it is used instead of the three-letter code. +[This Wikipedia page][5] lists all of the two-letter codes. If you can't find a two-letter code, you'll need to find the closest three-letter code. You can use [Glottolog][6] to search for your language, and From 808b6557d656f0b1efe1f59c423f03303eafc7f2 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 1 Aug 2025 10:20:39 +1000 Subject: [PATCH 030/343] maint(common): use `cpp_std=c++17` in meson project default_options We attempted to set the C++ version in standard.meson.build, but this does not work well as the option name varies by platform, and it also triggers a warning in meson. This fix moves the setting into each meson.build project() default_options. As there are only a handful of these, the maintenance burden is not high. Fixes: #14432 Relates-to: #14355 Build-bot: build Test-bot: skip --- core/meson.build | 1 + developer/src/kmcmplib/meson.build | 2 +- linux/ibus-keyman/meson.build | 1 + linux/keyman-system-service/meson.build | 1 + linux/mcompile/keymap/meson.build | 1 + mac/mcompile/meson.build | 1 + resources/build/meson/standard.meson.build | 6 ------ 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/core/meson.build b/core/meson.build index a5dffb5ede..01e016ad27 100644 --- a/core/meson.build +++ b/core/meson.build @@ -9,6 +9,7 @@ project('keyman_core', 'cpp', 'c', version: files('../VERSION.md'), license: 'MIT', default_options : ['buildtype=release', + 'cpp_std=c++17', 'b_vscrt=static_from_buildtype', 'warning_level=2', 'debug=true'], diff --git a/developer/src/kmcmplib/meson.build b/developer/src/kmcmplib/meson.build index 0493c504f4..935f8496f1 100644 --- a/developer/src/kmcmplib/meson.build +++ b/developer/src/kmcmplib/meson.build @@ -8,7 +8,7 @@ project('kmcmplib', 'cpp', 'c', version: files('../../../VERSION.md'), license: 'MIT', default_options : ['buildtype=release', - 'cpp_std=c++14', + 'cpp_std=c++17', 'b_vscrt=static_from_buildtype', 'default_library=static', 'debug=true']) diff --git a/linux/ibus-keyman/meson.build b/linux/ibus-keyman/meson.build index 3d0bbf0fce..f7a0eb7c7f 100644 --- a/linux/ibus-keyman/meson.build +++ b/linux/ibus-keyman/meson.build @@ -1,5 +1,6 @@ project('ibus-keyman', 'c', 'cpp', version: files('../../VERSION.md'), + default_options: ['cpp_std=c++17'], license: 'GPL-2+', meson_version: '>=1.0') diff --git a/linux/keyman-system-service/meson.build b/linux/keyman-system-service/meson.build index b6f16e82f8..6f950ba59f 100644 --- a/linux/keyman-system-service/meson.build +++ b/linux/keyman-system-service/meson.build @@ -1,5 +1,6 @@ project('keyman-system-service', 'c', 'cpp', version: files('../../VERSION.md'), + default_options: ['cpp_std=c++17'], license: 'MIT', meson_version: '>=1.0') diff --git a/linux/mcompile/keymap/meson.build b/linux/mcompile/keymap/meson.build index b6d489902c..af9c84017e 100644 --- a/linux/mcompile/keymap/meson.build +++ b/linux/mcompile/keymap/meson.build @@ -1,6 +1,7 @@ project( 'mcompile', 'c', 'cpp', version: files('../../../VERSION.md'), + default_options: ['cpp_std=c++17'], license: 'MIT', meson_version: '>=1.0', ) diff --git a/mac/mcompile/meson.build b/mac/mcompile/meson.build index 2429799442..6a156752ab 100644 --- a/mac/mcompile/meson.build +++ b/mac/mcompile/meson.build @@ -1,5 +1,6 @@ project('mcompile', 'c', 'cpp', version: files('../../VERSION.md'), + default_options: ['cpp_std=c++17'], license: 'MIT', meson_version: '>=1.0') diff --git a/resources/build/meson/standard.meson.build b/resources/build/meson/standard.meson.build index 300a00d8e9..6345e67fb2 100644 --- a/resources/build/meson/standard.meson.build +++ b/resources/build/meson/standard.meson.build @@ -16,12 +16,6 @@ cpp_compiler = meson.get_compiler('cpp') c_compiler = meson.get_compiler('c') -# Unfortunately this outputs a warning: 'Consider using the built-in option -# for language standard version instead of using "-std=c++17".' -# But that is not possible to do after creating the project... -# See also https://github.com/mesonbuild/meson/issues/10685 -add_project_arguments('-std=c++17', language: 'cpp') - # # Standard informational messages for our builds # From f2d60427205d3342f5048c09ad9c38887c144660 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Fri, 1 Aug 2025 14:37:21 -0400 Subject: [PATCH 031/343] auto: increment master version to 19.0.95 --- HISTORY.md | 4 ++++ VERSION.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 46cf4737ec..d774cd3454 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,9 @@ # Keyman Version History +## 19.0.94 alpha 2025-08-01 + +* maint(common): use `cpp_std=c++17` in meson project default_options (#14433) + ## 19.0.93 alpha 2025-07-29 * test(developer): add unit tests for `isValidUtf8` (#14381) diff --git a/VERSION.md b/VERSION.md index 533bdf0adf..d0f6206d48 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -19.0.94 \ No newline at end of file +19.0.95 \ No newline at end of file From 65158a0526c2f98e2572fbb6572a4104f6fd34f4 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Sat, 2 Aug 2025 06:58:40 +1000 Subject: [PATCH 032/343] maint(common): rename shellHelperFunctions.sh to utils.inc.sh Adds documentation for various functions, removes unused functions (a couple of simple, very lightly used functions were unDRYed; these could go back the other way across all shell scripts if necessary). TODO items noted for follow-up refactoring. Fixes: #14275 Relates-to: #14269 Build-bot: build all Test-bot: skip --- android/KMAPro/build.sh | 2 +- android/KMEA/build.sh | 2 +- android/Samples/KMSample1/build.sh | 4 +- android/Samples/KMSample2/build.sh | 4 +- android/Tests/KeyboardHarness/build.sh | 4 +- android/build.sh | 2 +- .../issue/6254-invalid-version-99/build.sh | 2 +- common/tools/hextobin/build.sh | 2 +- common/tools/sourcemap-path-remapper/build.sh | 2 +- common/web/keyman-version/build.sh | 2 +- common/web/langtags/build.sh | 2 +- common/web/types/build.sh | 2 +- common/windows/cef-checkout.sh | 2 +- core/build.sh | 2 +- core/include/ldml/build.sh | 2 +- core/tools/ldml-const-builder/build.sh | 2 +- developer/src/build.sh | 2 +- .../src/common/web/test-helpers/build.sh | 2 +- developer/src/common/web/utils/build.sh | 2 +- developer/src/inst/build.sh | 2 +- developer/src/kmc-analyze/build.sh | 2 +- developer/src/kmc-copy/build.sh | 2 +- developer/src/kmc-generate/build.sh | 2 +- developer/src/kmc-keyboard-info/build.sh | 2 +- developer/src/kmc-kmn/build.sh | 2 +- developer/src/kmc-ldml/build.sh | 2 +- developer/src/kmc-model-info/build.sh | 2 +- developer/src/kmc-model/build.sh | 2 +- developer/src/kmc-package/build.sh | 2 +- developer/src/kmc/build.sh | 2 +- developer/src/kmc/test/command-line-tests.sh | 2 +- developer/src/kmcmplib/build.sh | 2 +- developer/src/server/build.sh | 2 +- ios/build.sh | 2 +- ios/ci.sh | 2 +- ios/engine/build.sh | 6 +- ios/i18n-export.sh | 2 +- ios/keyman/build.sh | 6 +- ios/samples/KMSample1/build.sh | 2 +- ios/samples/KMSample2/build.sh | 2 +- ios/tools/prepRelease.sh | 4 +- linux/build.sh | 2 +- linux/mcompile/keymap/build.sh | 2 +- linux/scripts/upload-to-debian.sh | 2 +- mac/Keyman4MacIM/make-km-dmg.sh | 16 +-- mac/build.sh | 6 +- mac/setup/build.sh | 2 +- oem/firstvoices/android/build.sh | 2 +- oem/firstvoices/ios/build.sh | 7 +- oem/firstvoices/windows/src/inst/build.sh | 2 +- resources/build/build-utils-ci.test.sh | 2 +- resources/build/builder.inc.sh | 2 +- resources/build/history/history-utils.sh | 2 +- resources/build/report-history.sh | 2 +- .../build/test/build-utils-traps.test.sh | 2 +- resources/build/test/builder-deps.test.sh | 2 +- resources/build/test/test.sh | 2 +- .../utils.inc.sh} | 115 ++++-------------- resources/build/version/build.sh | 2 +- resources/docker-images/build.sh | 2 +- resources/docker-images/docker-build.inc.sh | 2 +- resources/docker-images/run.sh | 2 +- resources/stats/stats.sh | 2 +- .../android/keyman-android-release.sh | 2 +- .../android/keyman-android-test-samples.sh | 2 +- .../teamcity/android/keyman-android-test.sh | 2 +- .../developer/keyman-developer-release.sh | 2 +- resources/teamcity/ios/keyman-ios-release.sh | 2 +- resources/teamcity/ios/keyman-ios-test.sh | 2 +- .../teamcity/linux/keyman-linux-release.sh | 2 +- .../linux/keyman-linux-test-integration.sh | 2 +- resources/teamcity/linux/keyman-linux-test.sh | 2 +- .../teamcity/macos/keyman-macos-release.sh | 2 +- resources/teamcity/macos/keyman-macos-test.sh | 2 +- resources/teamcity/web/keyman-web-release.sh | 2 +- resources/teamcity/web/keyman-web-test.sh | 2 +- .../windows/keyman-windows-release.sh | 2 +- .../teamcity/windows/keyman-windows-test.sh | 2 +- resources/tools/check-markdown/build.sh | 2 +- web/build.sh | 2 +- web/ci.sh | 2 +- web/src/app/browser/build.sh | 2 +- web/src/app/ui/build.sh | 2 +- web/src/app/webview/build.sh | 2 +- web/src/engine/attachment/build.sh | 2 +- web/src/engine/common/web-utils/build.sh | 2 +- web/src/engine/dom-utils/build.sh | 2 +- web/src/engine/element-wrappers/build.sh | 2 +- web/src/engine/events/build.sh | 2 +- web/src/engine/interfaces/build.sh | 2 +- web/src/engine/js-processor/build.sh | 2 +- web/src/engine/keyboard-storage/build.sh | 2 +- web/src/engine/keyboard/build.sh | 2 +- web/src/engine/main/build.sh | 2 +- web/src/engine/osk/build.sh | 2 +- web/src/engine/osk/gesture-processor/build.sh | 2 +- .../osk/gesture-processor/src/tools/build.sh | 2 +- web/src/engine/predictive-text/build.sh | 2 +- .../engine/predictive-text/templates/build.sh | 2 +- .../predictive-text/wordbreakers/build.sh | 2 +- .../predictive-text/worker-main/build.sh | 2 +- .../worker-main/unit_tests/test.sh | 2 +- .../predictive-text/worker-thread/build.sh | 2 +- web/src/engine/sentry-manager/build.sh | 2 +- web/src/samples/build.sh | 2 +- web/src/test/manual/build.sh | 2 +- web/src/tools/build.sh | 2 +- .../tools/building/sourcemap-root/build.sh | 2 +- web/src/tools/es-bundling/build.sh | 2 +- web/src/tools/testing/bulk_rendering/build.sh | 2 +- web/src/tools/testing/recorder-core/build.sh | 2 +- web/src/tools/testing/recorder/build.sh | 2 +- web/test.sh | 2 +- windows/src/build.sh | 2 +- windows/src/desktop/build.sh | 2 +- windows/src/desktop/help/build.sh | 2 +- windows/src/desktop/inst/build.sh | 2 +- windows/src/engine/inst/build.sh | 2 +- 118 files changed, 159 insertions(+), 229 deletions(-) rename resources/{shellHelperFunctions.sh => build/utils.inc.sh} (73%) mode change 100755 => 100644 diff --git a/android/KMAPro/build.sh b/android/KMAPro/build.sh index fd54215d1c..66ce1d09c3 100755 --- a/android/KMAPro/build.sh +++ b/android/KMAPro/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" . "$KEYMAN_ROOT/resources/build/build-help.inc.sh" . "$KEYMAN_ROOT/resources/build/build-download-resources.sh" diff --git a/android/KMEA/build.sh b/android/KMEA/build.sh index 4d4ea7f8e3..45a770308f 100755 --- a/android/KMEA/build.sh +++ b/android/KMEA/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" # ################################ Main script ################################ diff --git a/android/Samples/KMSample1/build.sh b/android/Samples/KMSample1/build.sh index 172ef6c5e7..752e72b91e 100755 --- a/android/Samples/KMSample1/build.sh +++ b/android/Samples/KMSample1/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" ################################ Main script ################################ @@ -23,7 +23,7 @@ builder_describe "Build KMSample1 app for Android." \ "configure" \ "build" \ "test" \ - ":app KMSample1" + ":app KMSample1" # parse before describe_outputs to check debug flags builder_parse "$@" diff --git a/android/Samples/KMSample2/build.sh b/android/Samples/KMSample2/build.sh index 2f7a99c764..5538d5dee6 100755 --- a/android/Samples/KMSample2/build.sh +++ b/android/Samples/KMSample2/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" ################################ Main script ################################ @@ -23,7 +23,7 @@ builder_describe "Build KMSample2 app for Android." \ "configure" \ "build" \ "test" \ - ":app KMSample2" + ":app KMSample2" # parse before describe_outputs to check debug flags builder_parse "$@" diff --git a/android/Tests/KeyboardHarness/build.sh b/android/Tests/KeyboardHarness/build.sh index c23f8ca0f5..af85c7c55a 100755 --- a/android/Tests/KeyboardHarness/build.sh +++ b/android/Tests/KeyboardHarness/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" ################################ Main script ################################ @@ -23,7 +23,7 @@ builder_describe "Build KeyboardHarness test app for Android." \ "configure" \ "build" \ "test" \ - ":app KeyboardHarness" + ":app KeyboardHarness" # parse before describe outputs to check debug flags builder_parse "$@" diff --git a/android/build.sh b/android/build.sh index eeaa3f6e9a..ebf30aeb43 100755 --- a/android/build.sh +++ b/android/build.sh @@ -14,7 +14,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/build/build-utils-ci.inc.sh" . "${KEYMAN_ROOT}/resources/build/zip.inc.sh" diff --git a/common/test/keyboards/issue/6254-invalid-version-99/build.sh b/common/test/keyboards/issue/6254-invalid-version-99/build.sh index 7bf37f54e4..462908042c 100755 --- a/common/test/keyboards/issue/6254-invalid-version-99/build.sh +++ b/common/test/keyboards/issue/6254-invalid-version-99/build.sh @@ -4,7 +4,7 @@ # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/build-utils.sh" -# . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +# . "$KEYMAN_ROOT/resources/build/utils.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE THIS_DIR="$(dirname "$THIS_SCRIPT")" diff --git a/common/tools/hextobin/build.sh b/common/tools/hextobin/build.sh index 073b008bf2..0d8075b83b 100755 --- a/common/tools/hextobin/build.sh +++ b/common/tools/hextobin/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/common/tools/sourcemap-path-remapper/build.sh b/common/tools/sourcemap-path-remapper/build.sh index 3d50eccf83..c3b7e24536 100755 --- a/common/tools/sourcemap-path-remapper/build.sh +++ b/common/tools/sourcemap-path-remapper/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/common/web/keyman-version/build.sh b/common/web/keyman-version/build.sh index 9de3da3f8f..aa9287ea6c 100755 --- a/common/web/keyman-version/build.sh +++ b/common/web/keyman-version/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" ################################ Main script ################################ diff --git a/common/web/langtags/build.sh b/common/web/langtags/build.sh index f125448d4a..58fc6d10cf 100755 --- a/common/web/langtags/build.sh +++ b/common/web/langtags/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Build Keyman langtags.js common module" \ diff --git a/common/web/types/build.sh b/common/web/types/build.sh index 5a9243e6cd..679fcfc018 100755 --- a/common/web/types/build.sh +++ b/common/web/types/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Build Keyman common file types module" \ diff --git a/common/windows/cef-checkout.sh b/common/windows/cef-checkout.sh index b8326561b8..184769a198 100755 --- a/common/windows/cef-checkout.sh +++ b/common/windows/cef-checkout.sh @@ -14,7 +14,7 @@ set -u # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" -# . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +# . "$KEYMAN_ROOT/resources/build/utils.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE pushd $KEYMAN_CEF4DELPHI_ROOT > /dev/null diff --git a/core/build.sh b/core/build.sh index 94e8ae4e38..6bdb52d936 100755 --- a/core/build.sh +++ b/core/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$THIS_SCRIPT_PATH/commands.inc.sh" ################################ Main script ################################ diff --git a/core/include/ldml/build.sh b/core/include/ldml/build.sh index 17902411d3..4188b758f5 100755 --- a/core/include/ldml/build.sh +++ b/core/include/ldml/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Keyman ldml-keyboard-constants package" \ diff --git a/core/tools/ldml-const-builder/build.sh b/core/tools/ldml-const-builder/build.sh index 26c7c0a60e..01082bca0a 100755 --- a/core/tools/ldml-const-builder/build.sh +++ b/core/tools/ldml-const-builder/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" CORE_LDML_H_FILE="../../include/ldml/keyman_core_ldml.h" diff --git a/developer/src/build.sh b/developer/src/build.sh index d81762aa2c..b774b6c943 100755 --- a/developer/src/build.sh +++ b/developer/src/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" . "$KEYMAN_ROOT/developer/src/packages.inc.sh" diff --git a/developer/src/common/web/test-helpers/build.sh b/developer/src/common/web/test-helpers/build.sh index c1664cfddd..f7b9bb49b0 100755 --- a/developer/src/common/web/test-helpers/build.sh +++ b/developer/src/common/web/test-helpers/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Keyman Developer unit test helpers" \ "@/developer/src/common/web/utils" \ diff --git a/developer/src/common/web/utils/build.sh b/developer/src/common/web/utils/build.sh index 251588e2f6..4bd0885dcf 100755 --- a/developer/src/common/web/utils/build.sh +++ b/developer/src/common/web/utils/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Build Keyman Developer web utility module" \ diff --git a/developer/src/inst/build.sh b/developer/src/inst/build.sh index 504811eb4b..be26678e5c 100755 --- a/developer/src/inst/build.sh +++ b/developer/src/inst/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -source "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +source "$KEYMAN_ROOT/resources/build/utils.inc.sh" source "$KEYMAN_ROOT/resources/build/jq.inc.sh" builder_describe "Installation files for Keyman Developer" \ diff --git a/developer/src/kmc-analyze/build.sh b/developer/src/kmc-analyze/build.sh index ace83ffbbe..1d069b3b81 100755 --- a/developer/src/kmc-analyze/build.sh +++ b/developer/src/kmc-analyze/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Keyman Developer Compiler Analysis Tools" \ diff --git a/developer/src/kmc-copy/build.sh b/developer/src/kmc-copy/build.sh index b681757be2..a5f8febdc1 100755 --- a/developer/src/kmc-copy/build.sh +++ b/developer/src/kmc-copy/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Build Keyman kmc-copy module" \ diff --git a/developer/src/kmc-generate/build.sh b/developer/src/kmc-generate/build.sh index 7db46acd56..6b790ad3ff 100755 --- a/developer/src/kmc-generate/build.sh +++ b/developer/src/kmc-generate/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Build Keyman kmc-generate module" \ diff --git a/developer/src/kmc-keyboard-info/build.sh b/developer/src/kmc-keyboard-info/build.sh index 87902b6876..5d41665e5f 100755 --- a/developer/src/kmc-keyboard-info/build.sh +++ b/developer/src/kmc-keyboard-info/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Build Keyman kmc keyboard-info Compiler module" \ "@/common/web/langtags" \ diff --git a/developer/src/kmc-kmn/build.sh b/developer/src/kmc-kmn/build.sh index c6ed29b6f9..7ff15520b5 100755 --- a/developer/src/kmc-kmn/build.sh +++ b/developer/src/kmc-kmn/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Keyman Developer Compiler Module for .kmn to .kmx" \ diff --git a/developer/src/kmc-ldml/build.sh b/developer/src/kmc-ldml/build.sh index 689291b247..e1b879f438 100755 --- a/developer/src/kmc-ldml/build.sh +++ b/developer/src/kmc-ldml/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Keyman kmc Keyboard Compiler module" \ "@/common/web/keyman-version" \ diff --git a/developer/src/kmc-model-info/build.sh b/developer/src/kmc-model-info/build.sh index 766c9be413..21cd3e52f5 100755 --- a/developer/src/kmc-model-info/build.sh +++ b/developer/src/kmc-model-info/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Build Keyman kmc Lexical Model model-info Compiler module" \ "@/common/web/types" \ diff --git a/developer/src/kmc-model/build.sh b/developer/src/kmc-model/build.sh index 9e7166f8b7..53f7b44b12 100755 --- a/developer/src/kmc-model/build.sh +++ b/developer/src/kmc-model/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Keyman kmc Lexical Model Compiler module" \ diff --git a/developer/src/kmc-package/build.sh b/developer/src/kmc-package/build.sh index 81f8b928c7..93ba6c4ade 100755 --- a/developer/src/kmc-package/build.sh +++ b/developer/src/kmc-package/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Build Keyman kmc Package Compiler module" \ diff --git a/developer/src/kmc/build.sh b/developer/src/kmc/build.sh index b7f06852c4..1fc897949a 100755 --- a/developer/src/kmc/build.sh +++ b/developer/src/kmc/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/developer/src/packages.inc.sh" builder_describe "Build Keyman Keyboard Compiler kmc" \ diff --git a/developer/src/kmc/test/command-line-tests.sh b/developer/src/kmc/test/command-line-tests.sh index 74447afd41..c76a641376 100755 --- a/developer/src/kmc/test/command-line-tests.sh +++ b/developer/src/kmc/test/command-line-tests.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" -# . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +# . "$KEYMAN_ROOT/resources/build/utils.inc.sh" # . "$KEYMAN_ROOT/developer/src/packages.inc.sh" builder_describe "Test Keyman Keyboard Compiler kmc command line e2e" \ diff --git a/developer/src/kmcmplib/build.sh b/developer/src/kmcmplib/build.sh index 77036cc990..457f597f4c 100755 --- a/developer/src/kmcmplib/build.sh +++ b/developer/src/kmcmplib/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" . "$THIS_SCRIPT_PATH/checkout-keyboards.inc.sh" . "$THIS_SCRIPT_PATH/commands.inc.sh" diff --git a/developer/src/server/build.sh b/developer/src/server/build.sh index 6741bb68de..d2bd8575dd 100755 --- a/developer/src/server/build.sh +++ b/developer/src/server/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/jq.inc.sh" builder_describe "Build Keyman Developer Server" \ diff --git a/ios/build.sh b/ios/build.sh index f260b07f8b..c1fd7efa32 100755 --- a/ios/build.sh +++ b/ios/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Builds Keyman Engine and the Keyman app for use on iOS devices - iPhone and iPad." \ "@/resources/tools/check-markdown test:help" \ diff --git a/ios/ci.sh b/ios/ci.sh index fbcb46409f..547170a42f 100755 --- a/ios/ci.sh +++ b/ios/ci.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" cd "$THIS_SCRIPT_PATH" # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # Please note that this build script (understandably) assumes that it is running on Mac OS X. verify_on_mac diff --git a/ios/engine/build.sh b/ios/engine/build.sh index fd473a2cdf..d9ac60f69d 100755 --- a/ios/engine/build.sh +++ b/ios/engine/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-download-resources.sh" # Please note that this build script (understandably) assumes that it is running on Mac OS X. @@ -133,7 +133,9 @@ function build_engine() { KEYMAN_VERSION_ENVIRONMENT=$KEYMAN_VERSION_ENVIRONMENT \ UPLOAD_SENTRY=$UPLOAD_SENTRY - assertDirExists "$KEYMAN_XCFRAMEWORK" + if ! [[ -d "${KEYMAN_XCFRAMEWORK}" ]]; then + builder_die "Build failed: directory '${KEYMAN_XCFRAMEWORK}' missing" + fi } builder_run_action clean do_clean diff --git a/ios/i18n-export.sh b/ios/i18n-export.sh index 5ae87a6f97..18f6b83d7c 100755 --- a/ios/i18n-export.sh +++ b/ios/i18n-export.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # This script runs from its own folder cd "$(dirname "$THIS_SCRIPT")" diff --git a/ios/keyman/build.sh b/ios/keyman/build.sh index cc43d42e60..bb9379fdba 100755 --- a/ios/keyman/build.sh +++ b/ios/keyman/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-help.inc.sh" # Please note that this build script (understandably) assumes that it is running on Mac OS X. @@ -92,7 +92,9 @@ function build_app() { KEYMAN_VERSION_ENVIRONMENT=$KEYMAN_VERSION_ENVIRONMENT \ UPLOAD_SENTRY=$UPLOAD_SENTRY - assertDirExists "$ARCHIVE_PATH" + if ! [[ -d "${ARCHIVE_PATH}" ]]; then + builder_die "Build failed: directory '${ARCHIVE_PATH}' missing" + fi if ! builder_is_debug_build; then echo "Preparing .ipa file for deployment to real devices" diff --git a/ios/samples/KMSample1/build.sh b/ios/samples/KMSample1/build.sh index f7bb8798c7..e2302474ba 100755 --- a/ios/samples/KMSample1/build.sh +++ b/ios/samples/KMSample1/build.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" cd "$THIS_SCRIPT_PATH" # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # Please note that this build script (understandably) assumes that it is running on Mac OS X. verify_on_mac diff --git a/ios/samples/KMSample2/build.sh b/ios/samples/KMSample2/build.sh index 0b0fdc542d..6e88e39704 100755 --- a/ios/samples/KMSample2/build.sh +++ b/ios/samples/KMSample2/build.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" cd "$THIS_SCRIPT_PATH" # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # Please note that this build script (understandably) assumes that it is running on Mac OS X. verify_on_mac diff --git a/ios/tools/prepRelease.sh b/ios/tools/prepRelease.sh index c9e47edd20..2c4027b0ee 100755 --- a/ios/tools/prepRelease.sh +++ b/ios/tools/prepRelease.sh @@ -27,7 +27,7 @@ fi #Include script dependency . $KEYMAN_ROOT/resources/build/history/history-utils.sh #includes the following -#. ../resources/shellHelperFunctions.sh +#. ../resources/build/utils.inc.sh BUILD_NUMBER=`cat ../VERSION.md` KEYMAN_TIER=`cat ../TIER.md` @@ -50,12 +50,10 @@ mkdir -p "${UPLOAD_DIR}" echo "Writing changelog to $CHANGELOG_PATH" get_version_notes "ios" "${BUILD_NUMBER}" "$KEYMAN_TIER" > $CHANGELOG_PATH echo "* Minor fixes and performance improvements" >> $CHANGELOG_PATH -assertFileExists "${CHANGELOG_PATH}" # Strip emoji as App Store does not allow emoji in changelogs node "$KEYMAN_ROOT/resources/tools/strip-emoji" < "$CHANGELOG_PATH" > "$CHANGELOG_PATH.1" mv -f "$CHANGELOG_PATH.1" "$CHANGELOG_PATH" -assertFileExists "${CHANGELOG_PATH}" # # Keyman Engine diff --git a/linux/build.sh b/linux/build.sh index ae5e5d3bd4..d4cfcef976 100755 --- a/linux/build.sh +++ b/linux/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/linux/mcompile/keymap/build.sh b/linux/mcompile/keymap/build.sh index d7c6aac34f..96b958f4eb 100755 --- a/linux/mcompile/keymap/build.sh +++ b/linux/mcompile/keymap/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/meson-utils.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -#. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +#. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/linux/scripts/upload-to-debian.sh b/linux/scripts/upload-to-debian.sh index 3b2c5ba1dd..eb6c7aff26 100755 --- a/linux/scripts/upload-to-debian.sh +++ b/linux/scripts/upload-to-debian.sh @@ -36,7 +36,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" NOOP= PUSH= diff --git a/mac/Keyman4MacIM/make-km-dmg.sh b/mac/Keyman4MacIM/make-km-dmg.sh index 21559b59ff..63384408c3 100755 --- a/mac/Keyman4MacIM/make-km-dmg.sh +++ b/mac/Keyman4MacIM/make-km-dmg.sh @@ -46,7 +46,7 @@ cd `dirname ${KEYMAN_MACIM_BASE_PATH}` > /dev/null KEYMAN_MACIM_BASE_PATH=`pwd`; popd > /dev/null -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" KM_APP_NAME="Install Keyman.app" OUTPUT_DIR="$KEYMAN_MACIM_BASE_PATH/output" @@ -141,14 +141,14 @@ fi # Step 1 - Copy template to working copy to prevent unintended changes WORKING_COPY_OF_IMAGE="$OUTPUT_DIR/Keyman-temp-$KEYMAN_VERSION.dmg" -displayInfo "Copying \"$TEMPLATE_IMAGE\" to \"$WORKING_COPY_OF_IMAGE\"..." +builder_echo info "Copying \"$TEMPLATE_IMAGE\" to \"$WORKING_COPY_OF_IMAGE\"..." if [[ -e "$WORKING_COPY_OF_IMAGE" && "$VERBOSITY" != "-quiet" ]] ; then builder_warn "Overwriting: $WORKING_COPY_OF_IMAGE" fi cp -f "$TEMPLATE_IMAGE" "$WORKING_COPY_OF_IMAGE" # Step 2 - Mount (copy of) template image - writeable -displayInfo "Attaching \"$WORKING_COPY_OF_IMAGE\"" "Mounting as \"$STAGING_DIR\"..." +builder_echo info "Attaching \"$WORKING_COPY_OF_IMAGE\"" "Mounting as \"$STAGING_DIR\"..." if [[ -e "$STAGING_DIR" ]]; then builder_die "Mount folder $STAGING_DIR is already present. Unmount it first." fi @@ -170,7 +170,7 @@ ls -la "$STAGING_DIR/background" echo "---- End Listing ----" # Step 3 - Replace existing application files with new version -displayInfo "Copying files from \"$SOURCE_KM_APP\"..." +builder_echo info "Copying files from \"$SOURCE_KM_APP\"..." find "$DEST_KM_APP" -mindepth 1 -maxdepth 1 echo "---------" find "$DEST_KM_APP" -mindepth 1 -maxdepth 1 -print0 | xargs -0 rm -rf @@ -184,7 +184,7 @@ ls -la "$STAGING_DIR/background" echo "---- End Listing ----" # Step 4 - Detach/unmount the temporary image/staging area -displayInfo "Detaching \"$WORKING_COPY_OF_IMAGE\"" +builder_echo info "Detaching \"$WORKING_COPY_OF_IMAGE\"" # Attempt to detach 10 times, waiting 5 seconds each time # because macOS may still be working in the folder in the @@ -213,7 +213,7 @@ fi # Step 5 - Convert image to a compressed readonly DMG image DMG_FILE_PATH="$DEST_DIR/keyman-$KEYMAN_VERSION.dmg" -displayInfo "Converting/compressing image to create \"$DMG_FILE_PATH\"" +builder_echo info "Converting/compressing image to create \"$DMG_FILE_PATH\"" if [[ -e "$DMG_FILE_PATH" ]] ; then if [[ "$VERBOSITY" != "-quiet" ]] ; then builder_warn "Overwriting: $DMG_FILE_PATH" @@ -226,8 +226,8 @@ if ! [[ $? == 0 && -f "$DMG_FILE_PATH" ]]; then fi # Step 6 - Clean up -displayInfo "Cleaning up..." +builder_echo info "Cleaning up..." rm "$WORKING_COPY_OF_IMAGE" -displayInfo "Make DMG completed successfully." +builder_echo info "Make DMG completed successfully." exit 0 diff --git a/mac/build.sh b/mac/build.sh index 6bd91d73a5..302edce27b 100755 --- a/mac/build.sh +++ b/mac/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-help.inc.sh" . "$KEYMAN_ROOT/mac/mac-utils.inc.sh" @@ -102,7 +102,7 @@ execBuildCommand() { shift declare -r cmnd="$*" - displayInfo "Building $component:" "$cmnd" + builder_echo heading "Building $component:" "$cmnd" set +e local ret_code=0 eval "$cmnd" || ret_code=$? @@ -276,7 +276,7 @@ do_install() { builder_heading "Attempting local deployment with command:" KM4MIM_APP_BASE_PATH="$KM4MIM_BASE_PATH/build/$CONFIG" - displayInfo "$KM4MIM_BASE_PATH/localdeploy.sh \"$KM4MIM_APP_BASE_PATH\"" + builder_echo info "$KM4MIM_BASE_PATH/localdeploy.sh \"$KM4MIM_APP_BASE_PATH\"" "$KM4MIM_BASE_PATH/localdeploy.sh" "$KM4MIM_APP_BASE_PATH" } diff --git a/mac/setup/build.sh b/mac/setup/build.sh index af39660b6a..d31292bd23 100755 --- a/mac/setup/build.sh +++ b/mac/setup/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/mac/mac-utils.inc.sh" # Please note that this build script (understandably) assumes that it is running on Mac OS X. diff --git a/oem/firstvoices/android/build.sh b/oem/firstvoices/android/build.sh index 2e10dd5b83..7270ba0a9b 100755 --- a/oem/firstvoices/android/build.sh +++ b/oem/firstvoices/android/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" . "$KEYMAN_ROOT/resources/build/build-download-resources.sh" diff --git a/oem/firstvoices/ios/build.sh b/oem/firstvoices/ios/build.sh index 1b13248f98..04cd385f1f 100755 --- a/oem/firstvoices/ios/build.sh +++ b/oem/firstvoices/ios/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-download-resources.sh" # ################################ Main script ################################ @@ -109,8 +109,9 @@ function do_build() { KEYMAN_VERSION=$KEYMAN_VERSION \ KEYMAN_VERSION_WITH_TAG=$KEYMAN_VERSION_WITH_TAG - assertDirExists "$ARCHIVE_PATH" - + if ! [[ -d "${ARCHIVE_PATH}" ]]; then + builder_die "Build failed: directory '${ARCHIVE_PATH}' missing" + fi # Do NOT use the _EXT variant here; there's no scheme to ref, which will lead # Xcode to generate a build error. diff --git a/oem/firstvoices/windows/src/inst/build.sh b/oem/firstvoices/windows/src/inst/build.sh index 0d0767ae66..16cd7a5b69 100755 --- a/oem/firstvoices/windows/src/inst/build.sh +++ b/oem/firstvoices/windows/src/inst/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -source "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +source "$KEYMAN_ROOT/resources/build/utils.inc.sh" source "$KEYMAN_ROOT/resources/build/build-download-resources.sh" builder_describe "Installation files for FirstVoices Keyboards" \ diff --git a/resources/build/build-utils-ci.test.sh b/resources/build/build-utils-ci.test.sh index 8251156d27..c2b63baf53 100755 --- a/resources/build/build-utils-ci.test.sh +++ b/resources/build/build-utils-ci.test.sh @@ -12,7 +12,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" # END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # Tests diff --git a/resources/build/builder.inc.sh b/resources/build/builder.inc.sh index 70d7d07c16..9e137cea8b 100644 --- a/resources/build/builder.inc.sh +++ b/resources/build/builder.inc.sh @@ -44,7 +44,7 @@ __builder_find_keyman_root trap __builder_not_a_builder_script exit # This will also import /resources/builder.inc.sh -# TODO: rename build-utils.sh to utils.sh +# TODO: merge build-utils.sh with utils.inc.sh . "$KEYMAN_ROOT/resources/build/build-utils.sh" # All builder scripts start in their own folder diff --git a/resources/build/history/history-utils.sh b/resources/build/history/history-utils.sh index a7a8b3e837..9a1f8f6b5e 100755 --- a/resources/build/history/history-utils.sh +++ b/resources/build/history/history-utils.sh @@ -5,7 +5,7 @@ _hu_base_dir=$(dirname "$BASH_SOURCE")/../../.. -. $_hu_base_dir/resources/shellHelperFunctions.sh +. $_hu_base_dir/resources/build/utils.inc.sh _hu_debug() { if [[ ! -z ${DEBUG+x} ]] && [[ $DEBUG == 1 ]]; then echo "$1"; fi diff --git a/resources/build/report-history.sh b/resources/build/report-history.sh index 44eaa5843c..c753beff6b 100755 --- a/resources/build/report-history.sh +++ b/resources/build/report-history.sh @@ -12,7 +12,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" BUILD=false BASE=`git branch --show-current` diff --git a/resources/build/test/build-utils-traps.test.sh b/resources/build/test/build-utils-traps.test.sh index 3ed6d89a37..2265227ec6 100755 --- a/resources/build/test/build-utils-traps.test.sh +++ b/resources/build/test/build-utils-traps.test.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/build-utils.sh" # END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ############## diff --git a/resources/build/test/builder-deps.test.sh b/resources/build/test/builder-deps.test.sh index 7be2d6a37c..d2199c19fd 100755 --- a/resources/build/test/builder-deps.test.sh +++ b/resources/build/test/builder-deps.test.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/build-utils.sh" # END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe \ "Tests dependency builds" \ diff --git a/resources/build/test/test.sh b/resources/build/test/test.sh index 788af8c338..86ad94ee32 100755 --- a/resources/build/test/test.sh +++ b/resources/build/test/test.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/build-utils.sh" # END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" cd "$THIS_SCRIPT_PATH" diff --git a/resources/shellHelperFunctions.sh b/resources/build/utils.inc.sh old mode 100755 new mode 100644 similarity index 73% rename from resources/shellHelperFunctions.sh rename to resources/build/utils.inc.sh index 4e22f2ee55..bf60019dcd --- a/resources/shellHelperFunctions.sh +++ b/resources/build/utils.inc.sh @@ -12,62 +12,6 @@ verify_on_mac() { fi } -# The list of valid platforms that our build scripts ought expect. -platforms=("android" "ios" "linux" "lmlayer" "mac" "web" "win") - -# Used to validate a specified 'platform' parameter. -_verify_platform() { - match=false - for proj in "${platforms[@]}" - do - if [[ "${proj}" = "$1" ]]; then - match=true - fi - done - - if [[ ${match} = false ]]; then - builder_die "Invalid project specified!" - fi -} - -displayInfo() { - # TODO: can we replace this function with builder_debug? - if [[ "${QUIET}" != true ]]; then - while [[ $# -gt 0 ]] ; do - echo "$1" - shift # past argument - done - fi -} - -assertFileExists() { - if ! [[ -f $1 ]]; then - builder_die "Build failed: missing $1" - fi -} - -assertDirExists() { - if ! [[ -d $1 ]]; then - builder_die "Build failed: missing $1" - fi -} - -assertValidVersionNbr() -{ - # REVIEW: this function doesn't seem to be used anywhere in the codebase. - if [[ "$1" == "" || ! "$1" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - builder_die "Specified version not valid: '$1'. Version should be in the form Major.Minor.BuildCounter" - fi -} - -assertValidPRVersionNbr() -{ - # REVIEW: this function doesn't seem to be used anywhere in the codebase. - if [[ "$1" == "" || ! "$1" =~ ^[0-9]+\.[0-9]+\.pull\.[0-9]+$ ]]; then - builder_die "Specified version not valid: '$1'. Version should be in the form Major.Minor.pull.BuildCounter" - fi -} - # # Write ${UPLOAD_DIR}/${ARTIFACT_FILENAME}.download_info file for the target # artifact @@ -88,7 +32,9 @@ write_download_info() { local DATE HASH SIZE DOWNLOAD_INFO STAT_FLAGS - _verify_platform "${PLATFORM}" + if [[ ! "${PLATFORM}" =~ ^(android|ios|linux|mac|web|win)$ ]]; then + builder_die "Invalid project ${PLATFORM}" + fi # shellcheck disable=SC2312 if builder_is_macos && [[ $(command -v stat) == /usr/bin/stat ]]; then @@ -128,40 +74,6 @@ write_download_info() { echo "${DOWNLOAD_INFO}" | "${JQ}" . >> "${UPLOAD_DIR}/${ARTIFACT_FILENAME}.download_info" } -# set_version sets the file version on mac/ios projects -set_version ( ) { - # REVIEW: this function doesn't seem to be used anywhere in the codebase. - PRODUCT_PATH=$1 - - if [ $KEYMAN_VERSION ]; then - if [ $2 ]; then # $2 = product name. - echo "Setting version numbers in $2 to $KEYMAN_VERSION." - fi - /usr/libexec/Plistbuddy -c "Set CFBundleVersion $KEYMAN_VERSION" "$PRODUCT_PATH/Info.plist" - /usr/libexec/Plistbuddy -c "Set CFBundleShortVersionString $KEYMAN_VERSION" "$PRODUCT_PATH/Info.plist" - fi -} - - -# Uses npm to set the current package version (package.json). -# -# This sets the version according to the current KEYMAN_VERSION_WITH_TAG. -# -# Usage: -# -# set_npm_version -# -set_npm_version () { - # REVIEW: this function doesn't seem to be used anywhere in the codebase. - - # We use --no-git-tag-version because our CI system controls version numbering and - # already tags releases. We also want to have the version of this match the - # release of Keyman Developer -- these two versions should be in sync. Because this - # is a large repo with multiple projects and build systems, it's better for us that - # individual build systems don't take too much ownership of git tagging. :) - npm version --allow-same-version --no-git-tag-version --no-commit-hooks "$KEYMAN_VERSION_WITH_TAG" -} - # # Re-runs the specified command-line instruction up to 5 times should it fail, waiting a # random delay between each attempt. No re-runs are attempted after successful commands. @@ -214,6 +126,7 @@ _try_multiple_times ( ) { # Verifies that node is installed, and installs npm packages, but only once per # build invocation # +# TODO: rename to builder_node_select_version_and_npm_ci, move to builder.node.inc.sh verify_npm_setup() { # We'll piggy-back on the builder module dependency build state to determine # if npm ci has been called in the current script invocation. Adding the @@ -250,16 +163,22 @@ verify_npm_setup() { popd > /dev/null } +# TODO: rename to _node_print_expected_version, move to builder.node.inc.sh _print_expected_node_version() { "$JQ" -r '.engines.node' "$KEYMAN_ROOT/package.json" } # Use nvm to select a node version according to package.json # see /docs/build/node.md +# +# TODO: rename to _node_select_version_with_nvm, move to builder.node.inc.sh _select_node_version_with_nvm() { local REQUIRED_NODE_VERSION CURRENT_NODE_VERSION REQUIRED_NODE_VERSION="$(_print_expected_node_version)" + if [[ -z "$REQUIRED_NODE_VERSION" ]]; then + builder_die "Could not find expected Node.js version in $KEYMAN_ROOT/package.json" + fi if builder_is_windows; then CURRENT_NODE_VERSION="$(node --version)" @@ -284,6 +203,15 @@ _select_node_version_with_nvm() { fi } +# +# Wrapper for check-markdown tool to verify links within and validity of all .md +# files in a folder and its sub-folders +# +# Usage: +# check-markdown path_root +# Parameters: +# 1: path_root path to base folder containing .md files to be checked +# check-markdown() { node "$KEYMAN_ROOT/resources/tools/check-markdown" --root "$1" } @@ -297,9 +225,8 @@ check-markdown() { # 1: coverage_threshold optional, minimum coverage for c8 to pass tests, # defaults to 90 (percent) # -# Todo: -# Move to builder.typescript.inc.sh when this is established -# +# TODO: move to builder.typescript.inc.sh when this is established, rename to +# builder_typescript_do_tests builder_do_typescript_tests() { local MOCHA_FLAGS= diff --git a/resources/build/version/build.sh b/resources/build/version/build.sh index f6e01bcec3..076867db39 100755 --- a/resources/build/version/build.sh +++ b/resources/build/version/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/resources/docker-images/build.sh b/resources/docker-images/build.sh index b650b9ce55..1d77d56a54 100755 --- a/resources/docker-images/build.sh +++ b/resources/docker-images/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ################################ Main script ################################ . "${KEYMAN_ROOT}/resources/build/minimum-versions.inc.sh" -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/docker-images/docker-build.inc.sh" builder_describe \ diff --git a/resources/docker-images/docker-build.inc.sh b/resources/docker-images/docker-build.inc.sh index 9685116955..44c129ac20 100644 --- a/resources/docker-images/docker-build.inc.sh +++ b/resources/docker-images/docker-build.inc.sh @@ -1,7 +1,7 @@ # shellcheck shell=bash # no hashbang for .inc.sh -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" _add_build_args() { local var=$1 diff --git a/resources/docker-images/run.sh b/resources/docker-images/run.sh index 2c8cd3e51d..88db4d436f 100755 --- a/resources/docker-images/run.sh +++ b/resources/docker-images/run.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${KEYMAN_ROOT}/resources/build/minimum-versions.inc.sh" . "${KEYMAN_ROOT}/resources/docker-images/docker-build.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/resources/stats/stats.sh b/resources/stats/stats.sh index 949d137e4b..cc175460b5 100755 --- a/resources/stats/stats.sh +++ b/resources/stats/stats.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" cd "$THIS_SCRIPT_PATH" diff --git a/resources/teamcity/android/keyman-android-release.sh b/resources/teamcity/android/keyman-android-release.sh index 1485f038f7..b19491f565 100755 --- a/resources/teamcity/android/keyman-android-release.sh +++ b/resources/teamcity/android/keyman-android-release.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/build/zip.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/android/android-actions.inc.sh" diff --git a/resources/teamcity/android/keyman-android-test-samples.sh b/resources/teamcity/android/keyman-android-test-samples.sh index 1faa1b6c66..cfb644bea0 100755 --- a/resources/teamcity/android/keyman-android-test-samples.sh +++ b/resources/teamcity/android/keyman-android-test-samples.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/android/android-actions.inc.sh" ################################ Main script ################################ diff --git a/resources/teamcity/android/keyman-android-test.sh b/resources/teamcity/android/keyman-android-test.sh index ca856e1ff4..39035341a9 100755 --- a/resources/teamcity/android/keyman-android-test.sh +++ b/resources/teamcity/android/keyman-android-test.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/android/android-actions.inc.sh" ################################ Main script ################################ diff --git a/resources/teamcity/developer/keyman-developer-release.sh b/resources/teamcity/developer/keyman-developer-release.sh index 1b0b2a5e72..1a63e8acbc 100755 --- a/resources/teamcity/developer/keyman-developer-release.sh +++ b/resources/teamcity/developer/keyman-developer-release.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-windows.inc.sh" diff --git a/resources/teamcity/ios/keyman-ios-release.sh b/resources/teamcity/ios/keyman-ios-release.sh index b9386a3ed3..b00e62bf52 100755 --- a/resources/teamcity/ios/keyman-ios-release.sh +++ b/resources/teamcity/ios/keyman-ios-release.sh @@ -15,7 +15,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-mac.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/ios/ios-actions.inc.sh" diff --git a/resources/teamcity/ios/keyman-ios-test.sh b/resources/teamcity/ios/keyman-ios-test.sh index 9f918b8d8f..633aa2e0a2 100755 --- a/resources/teamcity/ios/keyman-ios-test.sh +++ b/resources/teamcity/ios/keyman-ios-test.sh @@ -15,7 +15,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-mac.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/ios/ios-actions.inc.sh" diff --git a/resources/teamcity/linux/keyman-linux-release.sh b/resources/teamcity/linux/keyman-linux-release.sh index 0f2265ffeb..146b1ff30f 100755 --- a/resources/teamcity/linux/keyman-linux-release.sh +++ b/resources/teamcity/linux/keyman-linux-release.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/linux/linux-actions.inc.sh" diff --git a/resources/teamcity/linux/keyman-linux-test-integration.sh b/resources/teamcity/linux/keyman-linux-test-integration.sh index b68ade47be..6be6689bb9 100755 --- a/resources/teamcity/linux/keyman-linux-test-integration.sh +++ b/resources/teamcity/linux/keyman-linux-test-integration.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/linux/linux-actions.inc.sh" diff --git a/resources/teamcity/linux/keyman-linux-test.sh b/resources/teamcity/linux/keyman-linux-test.sh index 98298253f8..ecdaf68e15 100755 --- a/resources/teamcity/linux/keyman-linux-test.sh +++ b/resources/teamcity/linux/keyman-linux-test.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/linux/linux-actions.inc.sh" diff --git a/resources/teamcity/macos/keyman-macos-release.sh b/resources/teamcity/macos/keyman-macos-release.sh index 0f19668583..2fc8037cfa 100755 --- a/resources/teamcity/macos/keyman-macos-release.sh +++ b/resources/teamcity/macos/keyman-macos-release.sh @@ -15,7 +15,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-mac.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/macos/macos-actions.inc.sh" diff --git a/resources/teamcity/macos/keyman-macos-test.sh b/resources/teamcity/macos/keyman-macos-test.sh index cea4e8ab86..5e9593122d 100755 --- a/resources/teamcity/macos/keyman-macos-test.sh +++ b/resources/teamcity/macos/keyman-macos-test.sh @@ -15,7 +15,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-mac.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/macos/macos-actions.inc.sh" diff --git a/resources/teamcity/web/keyman-web-release.sh b/resources/teamcity/web/keyman-web-release.sh index ce1058d246..5adc918947 100755 --- a/resources/teamcity/web/keyman-web-release.sh +++ b/resources/teamcity/web/keyman-web-release.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/web/web-actions.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" diff --git a/resources/teamcity/web/keyman-web-test.sh b/resources/teamcity/web/keyman-web-test.sh index 33fbe707d7..ec6d56c3a2 100755 --- a/resources/teamcity/web/keyman-web-test.sh +++ b/resources/teamcity/web/keyman-web-test.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/web/web-actions.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" diff --git a/resources/teamcity/windows/keyman-windows-release.sh b/resources/teamcity/windows/keyman-windows-release.sh index 10bf60cbb6..679a709bbc 100755 --- a/resources/teamcity/windows/keyman-windows-release.sh +++ b/resources/teamcity/windows/keyman-windows-release.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-windows.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/windows/windows-actions.inc.sh" diff --git a/resources/teamcity/windows/keyman-windows-test.sh b/resources/teamcity/windows/keyman-windows-test.sh index 8685fff4e3..690ae38957 100755 --- a/resources/teamcity/windows/keyman-windows-test.sh +++ b/resources/teamcity/windows/keyman-windows-test.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/windows/windows-actions.inc.sh" diff --git a/resources/tools/check-markdown/build.sh b/resources/tools/check-markdown/build.sh index c288b9a6be..d211bef171 100755 --- a/resources/tools/check-markdown/build.sh +++ b/resources/tools/check-markdown/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/build.sh b/web/build.sh index 51301682ca..b38d965a1b 100755 --- a/web/build.sh +++ b/web/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" # ################################ Main script ################################ diff --git a/web/ci.sh b/web/ci.sh index 77210ae224..2a35a6373e 100755 --- a/web/ci.sh +++ b/web/ci.sh @@ -12,7 +12,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../resources/build/build-utils.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/build/zip.inc.sh" . "${KEYMAN_ROOT}/resources/build/ci/pull-requests.inc.sh" diff --git a/web/src/app/browser/build.sh b/web/src/app/browser/build.sh index 85c696ba4a..a34f3db826 100755 --- a/web/src/app/browser/build.sh +++ b/web/src/app/browser/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=app/browser . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/app/ui/build.sh b/web/src/app/ui/build.sh index 3a431f9a0a..c308c37ff5 100755 --- a/web/src/app/ui/build.sh +++ b/web/src/app/ui/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=app/ui . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/app/webview/build.sh b/web/src/app/webview/build.sh index 1c2b2fe7dd..4a0da825d2 100755 --- a/web/src/app/webview/build.sh +++ b/web/src/app/webview/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=app/webview . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/attachment/build.sh b/web/src/engine/attachment/build.sh index 497e65e9a1..7364193b90 100755 --- a/web/src/engine/attachment/build.sh +++ b/web/src/engine/attachment/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" # Imports common Web build-script definitions & functions SUBPROJECT_NAME=engine/attachment -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/web/common.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/common/web-utils/build.sh b/web/src/engine/common/web-utils/build.sh index c487e22c91..92bc30d0e4 100755 --- a/web/src/engine/common/web-utils/build.sh +++ b/web/src/engine/common/web-utils/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "${KEYMAN_ROOT}/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" SUBPROJECT_NAME=engine/common/web-utils BUILD_DIR="/web/src/engine/common/web-utils/build" diff --git a/web/src/engine/dom-utils/build.sh b/web/src/engine/dom-utils/build.sh index 10cf2b660c..bc27e2ea39 100755 --- a/web/src/engine/dom-utils/build.sh +++ b/web/src/engine/dom-utils/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # Imports common Web build-script definitions & functions SUBPROJECT_NAME=engine/dom-utils diff --git a/web/src/engine/element-wrappers/build.sh b/web/src/engine/element-wrappers/build.sh index aeee72241a..60038184f8 100755 --- a/web/src/engine/element-wrappers/build.sh +++ b/web/src/engine/element-wrappers/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/element-wrappers . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/events/build.sh b/web/src/engine/events/build.sh index e1f804908f..f5934e5dc2 100755 --- a/web/src/engine/events/build.sh +++ b/web/src/engine/events/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/events . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/interfaces/build.sh b/web/src/engine/interfaces/build.sh index 502e1f7172..5c1953541d 100755 --- a/web/src/engine/interfaces/build.sh +++ b/web/src/engine/interfaces/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/interfaces . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/js-processor/build.sh b/web/src/engine/js-processor/build.sh index 620670276b..05e6a2e57e 100755 --- a/web/src/engine/js-processor/build.sh +++ b/web/src/engine/js-processor/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/js-processor . "${KEYMAN_ROOT}/web/common.inc.sh" -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/keyboard-storage/build.sh b/web/src/engine/keyboard-storage/build.sh index 86755c613a..5067983644 100755 --- a/web/src/engine/keyboard-storage/build.sh +++ b/web/src/engine/keyboard-storage/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/keyboard-storage . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/keyboard/build.sh b/web/src/engine/keyboard/build.sh index dc1283a7f2..fbc42d6c5d 100755 --- a/web/src/engine/keyboard/build.sh +++ b/web/src/engine/keyboard/build.sh @@ -11,7 +11,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/keyboard . "${KEYMAN_ROOT}/web/common.inc.sh" -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/src/engine/main/build.sh b/web/src/engine/main/build.sh index a90e9f7660..b67762c73a 100755 --- a/web/src/engine/main/build.sh +++ b/web/src/engine/main/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/main . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/osk/build.sh b/web/src/engine/osk/build.sh index 307d5b7a08..cfb64e6edd 100755 --- a/web/src/engine/osk/build.sh +++ b/web/src/engine/osk/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/osk . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/osk/gesture-processor/build.sh b/web/src/engine/osk/gesture-processor/build.sh index 5bee378fca..6c2c355e7d 100755 --- a/web/src/engine/osk/gesture-processor/build.sh +++ b/web/src/engine/osk/gesture-processor/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/osk/gesture-processor . "${KEYMAN_ROOT}/web/common.inc.sh" -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" BUNDLE_CMD="node $KEYMAN_ROOT/web/src/tools/es-bundling/build/common-bundle.mjs" diff --git a/web/src/engine/osk/gesture-processor/src/tools/build.sh b/web/src/engine/osk/gesture-processor/src/tools/build.sh index 343d90a117..ef4d9830fb 100755 --- a/web/src/engine/osk/gesture-processor/src/tools/build.sh +++ b/web/src/engine/osk/gesture-processor/src/tools/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" BUNDLE_CMD="node $KEYMAN_ROOT/web/src/tools/es-bundling/build/common-bundle.mjs" diff --git a/web/src/engine/predictive-text/build.sh b/web/src/engine/predictive-text/build.sh index ff0029ec40..c558243628 100755 --- a/web/src/engine/predictive-text/build.sh +++ b/web/src/engine/predictive-text/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/predictive-text/templates/build.sh b/web/src/engine/predictive-text/templates/build.sh index 2dda929d27..4434f8d222 100755 --- a/web/src/engine/predictive-text/templates/build.sh +++ b/web/src/engine/predictive-text/templates/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "$(dirname "$THIS_SCRIPT")/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" ################################ Main script ################################ diff --git a/web/src/engine/predictive-text/wordbreakers/build.sh b/web/src/engine/predictive-text/wordbreakers/build.sh index 9e449030d8..7a4224205d 100755 --- a/web/src/engine/predictive-text/wordbreakers/build.sh +++ b/web/src/engine/predictive-text/wordbreakers/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "$(dirname "$THIS_SCRIPT")/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" ################################ Main script ################################ diff --git a/web/src/engine/predictive-text/worker-main/build.sh b/web/src/engine/predictive-text/worker-main/build.sh index 6642e18b86..b25a0c687e 100755 --- a/web/src/engine/predictive-text/worker-main/build.sh +++ b/web/src/engine/predictive-text/worker-main/build.sh @@ -11,7 +11,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" BUNDLE_CMD="node $KEYMAN_ROOT/web/src/tools/es-bundling/build/common-bundle.mjs" diff --git a/web/src/engine/predictive-text/worker-main/unit_tests/test.sh b/web/src/engine/predictive-text/worker-main/unit_tests/test.sh index 4732ac6167..6f905534bb 100755 --- a/web/src/engine/predictive-text/worker-main/unit_tests/test.sh +++ b/web/src/engine/predictive-text/worker-main/unit_tests/test.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # This script runs from its own folder cd "$THIS_SCRIPT_PATH" diff --git a/web/src/engine/predictive-text/worker-thread/build.sh b/web/src/engine/predictive-text/worker-thread/build.sh index d72d5f2d22..3817048dac 100755 --- a/web/src/engine/predictive-text/worker-thread/build.sh +++ b/web/src/engine/predictive-text/worker-thread/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" WORKER_OUTPUT=build/obj diff --git a/web/src/engine/sentry-manager/build.sh b/web/src/engine/sentry-manager/build.sh index e91b78ce7e..1fac3dfc57 100755 --- a/web/src/engine/sentry-manager/build.sh +++ b/web/src/engine/sentry-manager/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "${KEYMAN_ROOT}/web/common.inc.sh" -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" builder_describe "Builds the Sentry-reporting module used with Keyman Engine for Web" \ "@/common/web/keyman-version" \ diff --git a/web/src/samples/build.sh b/web/src/samples/build.sh index fe5817e6e5..710f1cb489 100755 --- a/web/src/samples/build.sh +++ b/web/src/samples/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # Imports common Web build-script definitions & functions . "$KEYMAN_ROOT/web/common.inc.sh" diff --git a/web/src/test/manual/build.sh b/web/src/test/manual/build.sh index 8b564480b8..22ea7bff84 100755 --- a/web/src/test/manual/build.sh +++ b/web/src/test/manual/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/tools/build.sh b/web/src/tools/build.sh index b9d1e27bda..5b3a2baed3 100755 --- a/web/src/tools/build.sh +++ b/web/src/tools/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/src/tools/building/sourcemap-root/build.sh b/web/src/tools/building/sourcemap-root/build.sh index 3e9a9759f1..f64ba7f094 100755 --- a/web/src/tools/building/sourcemap-root/build.sh +++ b/web/src/tools/building/sourcemap-root/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/src/tools/es-bundling/build.sh b/web/src/tools/es-bundling/build.sh index ec2deee862..348fd5a970 100755 --- a/web/src/tools/es-bundling/build.sh +++ b/web/src/tools/es-bundling/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/src/tools/testing/bulk_rendering/build.sh b/web/src/tools/testing/bulk_rendering/build.sh index 53ad43da17..eb5f6169e6 100755 --- a/web/src/tools/testing/bulk_rendering/build.sh +++ b/web/src/tools/testing/bulk_rendering/build.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=tools/testing/bulk_rendering . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/src/tools/testing/recorder-core/build.sh b/web/src/tools/testing/recorder-core/build.sh index 0b89ce7701..e601bc0133 100755 --- a/web/src/tools/testing/recorder-core/build.sh +++ b/web/src/tools/testing/recorder-core/build.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/src/tools/testing/recorder/build.sh b/web/src/tools/testing/recorder/build.sh index 91f27d09e5..93fe071bc2 100755 --- a/web/src/tools/testing/recorder/build.sh +++ b/web/src/tools/testing/recorder/build.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=tools/testing/recorder . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/test.sh b/web/test.sh index ea4f9e0abc..5cb8dd257d 100755 --- a/web/test.sh +++ b/web/test.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # This script runs from its own folder cd "$THIS_SCRIPT_PATH" diff --git a/windows/src/build.sh b/windows/src/build.sh index c6cbbaa82b..9ed2a09466 100755 --- a/windows/src/build.sh +++ b/windows/src/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe \ "Keyman for Windows" \ diff --git a/windows/src/desktop/build.sh b/windows/src/desktop/build.sh index 96d0324cfd..e933165ff3 100755 --- a/windows/src/desktop/build.sh +++ b/windows/src/desktop/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" . "$KEYMAN_ROOT/developer/src/packages.inc.sh" diff --git a/windows/src/desktop/help/build.sh b/windows/src/desktop/help/build.sh index 807f7047ab..e5e74be2f9 100755 --- a/windows/src/desktop/help/build.sh +++ b/windows/src/desktop/help/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Help documentation for Keyman for Windows" \ clean configure build test install \ diff --git a/windows/src/desktop/inst/build.sh b/windows/src/desktop/inst/build.sh index d0678fb3d0..e541e79b46 100755 --- a/windows/src/desktop/inst/build.sh +++ b/windows/src/desktop/inst/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -source "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +source "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Installation files for Keyman for Windows" \ @/common/windows/data \ diff --git a/windows/src/engine/inst/build.sh b/windows/src/engine/inst/build.sh index 42374c140e..e0e9d65fa7 100755 --- a/windows/src/engine/inst/build.sh +++ b/windows/src/engine/inst/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -source "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +source "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Installation files for Keyman Engine for Windows" \ clean configure build test publish From f394245636d4238f15cff570eacdae4ece71a423 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Sat, 2 Aug 2025 07:53:42 +1000 Subject: [PATCH 033/343] maint(common): consolidate builder scripts Clarifies the confusing builder.inc.sh / build-utils.sh distinction by giving the scripts more appropriate names. Most build scripts should use builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh. Documented in resources/build/README.md. Renames: * resources/build/builder.inc.sh to resources/build/builder-full.inc.sh * resources/build/build-utils.sh to resources/build/builder-basic.inc.sh Other changes: * Moves Android-specific functions out of builder-basic.inc.sh and into android/build.sh. * Renames functions in builder-basic.inc.sh More functions may be moved from builder-basic.inc.sh into utils.inc.sh or other scripts in the future. Fixes: #14065 Build-bot: build all Test-bot: skip --- .github/workflows/deb-packaging.yml | 2 +- .gitignore | 2 +- android/KMAPro/build.sh | 2 +- android/KMEA/build.sh | 2 +- android/Samples/KMSample1/build.sh | 2 +- android/Samples/KMSample2/build.sh | 2 +- android/Tests/KeyboardHarness/build.sh | 2 +- android/build.sh | 16 +++- android/utility/i18n-check-unused-strings.sh | 2 +- build.sh | 2 +- common/build.sh | 2 +- common/include/build.sh | 2 +- common/linux/build.sh | 2 +- common/mac/build.sh | 2 +- common/test/keyboards/baseline/build.sh | 2 +- common/test/keyboards/build.sh | 2 +- .../issue/6254-invalid-version-99/build.sh | 2 +- .../test/resources/test_kill_browserstack.sh | 2 +- common/tools/hextobin/build.sh | 2 +- common/tools/sourcemap-path-remapper/build.sh | 2 +- common/web/build.sh | 2 +- common/web/keyman-version/build.sh | 2 +- common/web/langtags/build.sh | 2 +- common/web/types/build.sh | 2 +- common/windows/build.sh | 2 +- common/windows/cef-checkout.sh | 2 +- common/windows/data/build.sh | 2 +- common/windows/delphi/build.sh | 2 +- common/windows/delphi/components/build.sh | 2 +- .../delphi/general/KeymanVersionInfo.inc | 2 +- .../delphi/general/keymanversion_build.in | 2 +- common/windows/delphi/tools/build.sh | 2 +- .../tools/build_standards_data/build.sh | 2 +- .../delphi/tools/buildunidata/build.sh | 2 +- .../delphi/tools/certificates/build.sh | 2 +- common/windows/delphi/tools/devtools/build.sh | 2 +- .../windows/delphi/tools/sentrytool/build.sh | 2 +- .../windows/delphi/tools/test-klog/build.sh | 2 +- .../delphi/tools/verify_signatures/build.sh | 2 +- common/windows/mkver.sh | 2 +- core/build.sh | 2 +- core/include/ldml/build.sh | 2 +- core/tools/api-header-extractor/build.sh | 2 +- core/tools/ldml-const-builder/build.sh | 2 +- developer/build.sh | 2 +- developer/src/build.sh | 2 +- developer/src/common/build.sh | 2 +- developer/src/common/delphi/build.sh | 2 +- developer/src/common/web/build.sh | 2 +- .../src/common/web/test-helpers/build.sh | 2 +- developer/src/common/web/utils/build.sh | 2 +- developer/src/inst/build.sh | 2 +- developer/src/kmanalyze/build.sh | 2 +- developer/src/kmc-analyze/build.sh | 2 +- developer/src/kmc-copy/build.sh | 2 +- developer/src/kmc-generate/build.sh | 2 +- developer/src/kmc-keyboard-info/build.sh | 2 +- developer/src/kmc-kmn/build.sh | 2 +- developer/src/kmc-ldml/build.sh | 2 +- developer/src/kmc-model-info/build.sh | 2 +- developer/src/kmc-model/build.sh | 2 +- developer/src/kmc-package/build.sh | 2 +- developer/src/kmc/build.sh | 2 +- developer/src/kmc/test/command-line-tests.sh | 2 +- developer/src/kmcmplib/build.sh | 2 +- .../src/kmcmplib/tests/get-test-source.sh | 2 +- developer/src/kmcmplib/tests/prep.sh | 2 +- developer/src/kmconvert/build.sh | 2 +- developer/src/kmdbrowserhost/build.sh | 2 +- developer/src/kmdecomp/build.sh | 2 +- developer/src/samples/build.sh | 2 +- developer/src/samples/imsample/build.sh | 2 +- developer/src/server/build.sh | 2 +- developer/src/server/src/version-data.ts | 2 +- developer/src/setup/build.sh | 2 +- developer/src/test/auto/build.sh | 2 +- .../compile-supplementary-support/build.sh | 2 +- .../src/test/auto/keyboard-js-info/build.sh | 2 +- developer/src/test/auto/kmcomp/build.sh | 2 +- .../src/test/auto/kmx-file-languages/build.sh | 2 +- .../src/test/auto/model-ts-parser/build.sh | 2 +- developer/src/test/auto/package-info/build.sh | 2 +- developer/src/test/build.sh | 2 +- developer/src/tike/build.sh | 2 +- developer/src/tools/sentry-upload-difs.sh | 2 +- docs/builder.md | 12 +-- ios/build.sh | 2 +- ios/ci.sh | 2 +- ios/engine/build.sh | 2 +- ios/i18n-export.sh | 2 +- ios/keyman/build.sh | 2 +- ios/samples/KMSample1/build.sh | 2 +- ios/samples/KMSample2/build.sh | 2 +- ios/samples/common.inc.sh | 2 +- ios/scripts/kme-universal.sh | 2 +- ios/tools/prepRelease.sh | 2 +- linux/build.sh | 2 +- linux/ibus-keyman/build.sh | 2 +- linux/keyman-config/build.sh | 2 +- linux/keyman-system-service/build.sh | 2 +- linux/mcompile/keymap/build.sh | 2 +- linux/scripts/deb-packaging.sh | 4 +- linux/scripts/debian.sh | 2 +- linux/scripts/dist.sh | 2 +- linux/scripts/launchpad.sh | 4 +- linux/scripts/reconf.sh | 2 +- linux/scripts/test/deb-packaging.tests.sh | 2 +- linux/scripts/test/verify_api.tests.sh | 2 +- linux/scripts/upload-to-debian.sh | 2 +- linux/scripts/verify_api.inc.sh | 2 +- mac/Keyman4MacIM/make-km-dmg.sh | 2 +- mac/build.sh | 2 +- mac/is_same_version.sh | 2 +- mac/mcompile/build.sh | 2 +- mac/setup/build.sh | 2 +- oem/firstvoices/android/build.sh | 2 +- oem/firstvoices/common/build_csv_languages.sh | 2 +- oem/firstvoices/ios/build.sh | 2 +- oem/firstvoices/windows/src/inst/build.sh | 2 +- resources/build.sh | 2 +- resources/build/README.md | 17 +++- resources/build/build-utils-ci.test.sh | 2 +- .../{build-utils.sh => builder-basic.inc.sh} | 88 +++++++------------ .../{builder.inc.sh => builder-full.inc.sh} | 28 ++---- resources/build/builder-report.sh | 2 +- resources/build/ci/test/test-pull-requests.sh | 2 +- resources/build/help-keyman-com.sh | 2 +- resources/build/increment-version.sh | 2 +- resources/build/jq.inc.sh | 2 +- resources/build/pr-build-status/build.sh | 2 +- resources/build/publish-minimum-versions.sh | 2 +- resources/build/report-history.sh | 2 +- resources/build/run-required-test-builds.sh | 2 +- .../test/build-bot/trigger-build-bot.test.sh | 2 +- .../build/test/build-utils-traps.test.sh | 4 +- resources/build/test/build.sh | 2 +- resources/build/test/builder-deps.test.sh | 2 +- .../test/builder-invalid-script-1.test.sh | 2 +- .../test/builder-invalid-script-2.test.sh | 2 +- .../test/builder-invalid-script-3.test.sh | 2 +- .../build/test/debug-deps/child/build.sh | 2 +- .../build/test/debug-deps/child/dep/build.sh | 2 +- resources/build/test/debug-deps/dep/build.sh | 2 +- .../build/test/debug-deps/dep/child/build.sh | 2 +- resources/build/test/debug-deps/test.sh | 2 +- .../test/dependencies/basic/app/build.sh | 2 +- .../test/dependencies/basic/library/build.sh | 2 +- .../test/dependencies/error/app/build.sh | 2 +- .../test/dependencies/error/error/build.sh | 2 +- .../test/dependencies/targets/app/build.sh | 2 +- .../dependencies/targets/library/build.sh | 2 +- resources/build/test/dependencies/test.sh | 2 +- resources/build/test/ignored-flags/build.sh | 2 +- .../build/test/ignored-flags/child/build.sh | 2 +- resources/build/test/ignored-flags/test.sh | 2 +- .../build/test/locate_emscripten.tests.sh | 2 +- resources/build/test/test.sh | 4 +- .../build/test/testing-framework.tests.sh | 2 +- resources/build/test/trap-test-builds.test.sh | 2 +- resources/build/test/trees/build.sh | 2 +- resources/build/test/trees/child1/build.sh | 2 +- resources/build/test/trees/child2/build.sh | 2 +- .../test/trees/child3_renamed/src/build.sh | 2 +- resources/build/test/trees/dep/build.sh | 2 +- resources/build/test/trees/test.sh | 2 +- resources/build/test/verify-colors.test.sh | 2 +- resources/build/test/zip.inc.tests.sh | 2 +- resources/build/version/build.sh | 2 +- resources/build/xcode-utils.sh | 14 +-- resources/builder.inc.sh | 2 +- resources/docker-images/build.sh | 2 +- resources/docker-images/run.sh | 2 +- .../ldml-keyboards/fetch-latest-cldr.sh | 2 +- .../unicode-character-database/download.sh | 2 +- resources/stats/stats.sh | 2 +- .../android/keyman-android-release.sh | 2 +- .../android/keyman-android-test-samples.sh | 2 +- .../teamcity/android/keyman-android-test.sh | 2 +- .../teamcity/common/common-test-common-web.sh | 2 +- .../teamcity/common/common-test-common.sh | 2 +- .../teamcity/common/common-test-core-wasm.sh | 2 +- resources/teamcity/common/common-test-core.sh | 2 +- .../developer/keyman-developer-release.sh | 2 +- .../keyman-developer-test-linux-macos.sh | 2 +- .../keyman-developer-test-windows.sh | 2 +- resources/teamcity/ios/keyman-ios-release.sh | 2 +- .../teamcity/ios/keyman-ios-test-samples.sh | 2 +- resources/teamcity/ios/keyman-ios-test.sh | 2 +- .../teamcity/linux/keyman-linux-release.sh | 2 +- .../linux/keyman-linux-test-integration.sh | 2 +- resources/teamcity/linux/keyman-linux-test.sh | 2 +- .../teamcity/macos/keyman-macos-release.sh | 2 +- resources/teamcity/macos/keyman-macos-test.sh | 2 +- resources/teamcity/web/keyman-web-release.sh | 2 +- resources/teamcity/web/keyman-web-test.sh | 2 +- .../windows/keyman-windows-release.sh | 2 +- .../teamcity/windows/keyman-windows-test.sh | 2 +- resources/tools/check-markdown/build.sh | 2 +- web/build.sh | 2 +- web/ci.sh | 2 +- web/src/app/browser/build.sh | 2 +- web/src/app/ui/build.sh | 2 +- web/src/app/webview/build.sh | 2 +- web/src/engine/attachment/build.sh | 2 +- web/src/engine/common/web-utils/build.sh | 2 +- web/src/engine/dom-utils/build.sh | 2 +- web/src/engine/element-wrappers/build.sh | 2 +- web/src/engine/events/build.sh | 2 +- web/src/engine/interfaces/build.sh | 2 +- web/src/engine/js-processor/build.sh | 2 +- web/src/engine/keyboard-storage/build.sh | 2 +- web/src/engine/keyboard/build.sh | 2 +- web/src/engine/main/build.sh | 2 +- web/src/engine/osk/build.sh | 2 +- web/src/engine/osk/gesture-processor/build.sh | 2 +- .../osk/gesture-processor/src/tools/build.sh | 2 +- web/src/engine/predictive-text/build.sh | 2 +- .../engine/predictive-text/templates/build.sh | 2 +- .../predictive-text/wordbreakers/build.sh | 2 +- .../predictive-text/worker-main/build.sh | 2 +- .../worker-main/unit_tests/test.sh | 2 +- .../predictive-text/worker-thread/build.sh | 2 +- web/src/engine/sentry-manager/build.sh | 2 +- web/src/samples/build.sh | 2 +- web/src/test/manual/build.sh | 2 +- .../manual/embed/android-harness/build.sh | 2 +- web/src/tools/build.sh | 2 +- web/src/tools/building/check-build-size.sh | 2 +- .../tools/building/sourcemap-root/build.sh | 2 +- web/src/tools/es-bundling/build.sh | 2 +- web/src/tools/testing/bulk_rendering/build.sh | 2 +- web/src/tools/testing/recorder-core/build.sh | 2 +- web/src/tools/testing/recorder/build.sh | 2 +- web/test.sh | 2 +- windows/build.sh | 2 +- windows/src/build.sh | 2 +- windows/src/buildtools/sentry-upload-difs.sh | 2 +- windows/src/desktop/build.sh | 2 +- windows/src/desktop/help/build.sh | 2 +- windows/src/desktop/inst/build.sh | 2 +- windows/src/desktop/insthelp/build.sh | 2 +- windows/src/desktop/kmbrowserhost/build.sh | 2 +- windows/src/desktop/kmconfig/build.sh | 2 +- windows/src/desktop/kmshell/build.sh | 2 +- windows/src/desktop/locale/crowdin-control.sh | 2 +- windows/src/desktop/setup/build.sh | 2 +- windows/src/engine/build.sh | 2 +- windows/src/engine/inst/build.sh | 2 +- windows/src/engine/insthelper/build.sh | 2 +- windows/src/engine/keyman/build.sh | 2 +- windows/src/engine/keyman32/build.sh | 2 +- windows/src/engine/keymanmc/build.sh | 2 +- windows/src/engine/keymanx64/build.sh | 2 +- windows/src/engine/kmcomapi/build.sh | 2 +- windows/src/engine/kmrefresh/build.sh | 2 +- windows/src/engine/kmtip/build.sh | 2 +- windows/src/engine/mcompile/build.sh | 2 +- windows/src/engine/testhost/build.sh | 2 +- windows/src/engine/tsysinfo/build.sh | 2 +- windows/src/engine/tsysinfox64/build.sh | 2 +- windows/src/global/delphi/build.sh | 2 +- windows/src/support/build.sh | 2 +- windows/src/support/etl2log/build.sh | 2 +- windows/src/support/oskbulkrenderer/build.sh | 2 +- windows/src/support/texteditor/build.sh | 2 +- .../i18n-check-unused-strings.sh | 2 +- .../build.sh | 2 +- windows/src/test/unit-tests/build.sh | 2 +- .../unit-tests/group-helper-rsp19902/build.sh | 2 +- windows/src/test/unit-tests/jsonutil/build.sh | 2 +- .../src/test/unit-tests/shared-data/build.sh | 2 +- .../test/unit-tests/shared-data/cpp/build.sh | 2 +- .../unit-tests/shared-data/delphi/build.sh | 2 +- .../test/unit-tests/standards-data/build.sh | 2 +- .../unit-tests/ui-language-manager/build.sh | 2 +- .../test/unit-tests/windows-setup/build.sh | 2 +- 276 files changed, 354 insertions(+), 369 deletions(-) rename resources/build/{build-utils.sh => builder-basic.inc.sh} (89%) mode change 100755 => 100644 rename resources/build/{builder.inc.sh => builder-full.inc.sh} (52%) diff --git a/.github/workflows/deb-packaging.yml b/.github/workflows/deb-packaging.yml index a06d7ed3cd..674b90e9c4 100644 --- a/.github/workflows/deb-packaging.yml +++ b/.github/workflows/deb-packaging.yml @@ -86,7 +86,7 @@ jobs: shell: bash run: | THIS_SCRIPT="$GITHUB_WORKSPACE/.github/workflows/deb-packaging.yml" - . "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" + . "${THIS_SCRIPT%/*}/../../resources/build/builder-basic.inc.sh" echo "KEYMAN_VERSION=${KEYMAN_VERSION:-${VERSION}}" >> $GITHUB_OUTPUT - name: Set prerelease tag as output parameter diff --git a/.gitignore b/.gitignore index 6c8fbfbec8..6316adb5d2 100644 --- a/.gitignore +++ b/.gitignore @@ -164,7 +164,7 @@ tsconfig.tsbuildinfo # Windows system files Thumbs.db -# Temporary file for logging scripts in xcode runs, see build-utils.sh for +# Temporary file for logging scripts in xcode runs, see builder-basic.inc.sh for # details /xcodebuild-scripts.log diff --git a/android/KMAPro/build.sh b/android/KMAPro/build.sh index 66ce1d09c3..525b951138 100755 --- a/android/KMAPro/build.sh +++ b/android/KMAPro/build.sh @@ -3,7 +3,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/android/KMEA/build.sh b/android/KMEA/build.sh index 45a770308f..9b6d0d4892 100755 --- a/android/KMEA/build.sh +++ b/android/KMEA/build.sh @@ -4,7 +4,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/android/Samples/KMSample1/build.sh b/android/Samples/KMSample1/build.sh index 752e72b91e..65e5619815 100755 --- a/android/Samples/KMSample1/build.sh +++ b/android/Samples/KMSample1/build.sh @@ -4,7 +4,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/android/Samples/KMSample2/build.sh b/android/Samples/KMSample2/build.sh index 5538d5dee6..08c5261778 100755 --- a/android/Samples/KMSample2/build.sh +++ b/android/Samples/KMSample2/build.sh @@ -4,7 +4,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/android/Tests/KeyboardHarness/build.sh b/android/Tests/KeyboardHarness/build.sh index af85c7c55a..66f2b0496e 100755 --- a/android/Tests/KeyboardHarness/build.sh +++ b/android/Tests/KeyboardHarness/build.sh @@ -4,7 +4,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/android/build.sh b/android/build.sh index ebf30aeb43..e00c99e634 100755 --- a/android/build.sh +++ b/android/build.sh @@ -10,7 +10,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 @@ -108,8 +108,18 @@ function archive_artifacts() { fi } -# Override JAVA_HOME to OpenJDK 11 -set_java_home + +# For CI compatibility of building Keyman for Android 18.0 with OpenJDK 11, +# this overrides JAVA_HOME for the builder script to use OpenJDK 21. +android_set_java_home() { + if [[ ! -z ${JAVA_HOME_21+x} ]]; then + builder_echo "Setting JAVA_HOME to JAVA_HOME_21 (${JAVA_HOME_21})" + export JAVA_HOME="${JAVA_HOME_21}" + fi +} + +# Override JAVA_HOME +android_set_java_home # This script also responsible for cleaning up /android/upload builder_run_child_actions clean diff --git a/android/utility/i18n-check-unused-strings.sh b/android/utility/i18n-check-unused-strings.sh index 062ff8cff4..9e3a0a21c3 100755 --- a/android/utility/i18n-check-unused-strings.sh +++ b/android/utility/i18n-check-unused-strings.sh @@ -25,7 +25,7 @@ set -u # die on undefined variables ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # Preparation diff --git a/build.sh b/build.sh index a455d3307f..2589a162b1 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Keyman -- all projects" \ diff --git a/common/build.sh b/common/build.sh index 5119bca8ac..a066cf15d3 100755 --- a/common/build.sh +++ b/common/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Keyman common and resources modules" \ diff --git a/common/include/build.sh b/common/include/build.sh index 9115bd661a..962d13d5c7 100755 --- a/common/include/build.sh +++ b/common/include/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Build keymanversion_build.h" configure build clean diff --git a/common/linux/build.sh b/common/linux/build.sh index b52102313e..2df05e03ba 100755 --- a/common/linux/build.sh +++ b/common/linux/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # diff --git a/common/mac/build.sh b/common/mac/build.sh index 44a7064c83..1acf2f3ccd 100755 --- a/common/mac/build.sh +++ b/common/mac/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # diff --git a/common/test/keyboards/baseline/build.sh b/common/test/keyboards/baseline/build.sh index 065e2593c5..1428b5e0c4 100755 --- a/common/test/keyboards/baseline/build.sh +++ b/common/test/keyboards/baseline/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Baseline keyboards tests -- built with 16.0 compiler" \ diff --git a/common/test/keyboards/build.sh b/common/test/keyboards/build.sh index 2d6a986b87..489bf17543 100755 --- a/common/test/keyboards/build.sh +++ b/common/test/keyboards/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/zip.inc.sh" diff --git a/common/test/keyboards/issue/6254-invalid-version-99/build.sh b/common/test/keyboards/issue/6254-invalid-version-99/build.sh index 462908042c..80c5e575e6 100755 --- a/common/test/keyboards/issue/6254-invalid-version-99/build.sh +++ b/common/test/keyboards/issue/6254-invalid-version-99/build.sh @@ -3,7 +3,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-basic.inc.sh" # . "$KEYMAN_ROOT/resources/build/utils.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE THIS_DIR="$(dirname "$THIS_SCRIPT")" diff --git a/common/test/resources/test_kill_browserstack.sh b/common/test/resources/test_kill_browserstack.sh index f6ea16a36b..cbca52da45 100755 --- a/common/test/resources/test_kill_browserstack.sh +++ b/common/test/resources/test_kill_browserstack.sh @@ -8,7 +8,7 @@ set -eu ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE diff --git a/common/tools/hextobin/build.sh b/common/tools/hextobin/build.sh index 0d8075b83b..28eaa853d5 100755 --- a/common/tools/hextobin/build.sh +++ b/common/tools/hextobin/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/common/tools/sourcemap-path-remapper/build.sh b/common/tools/sourcemap-path-remapper/build.sh index c3b7e24536..44c3692dae 100755 --- a/common/tools/sourcemap-path-remapper/build.sh +++ b/common/tools/sourcemap-path-remapper/build.sh @@ -6,7 +6,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/common/web/build.sh b/common/web/build.sh index 2370e3ecf4..182de85d62 100755 --- a/common/web/build.sh +++ b/common/web/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Keyman common web modules" \ diff --git a/common/web/keyman-version/build.sh b/common/web/keyman-version/build.sh index aa9287ea6c..95730b2793 100755 --- a/common/web/keyman-version/build.sh +++ b/common/web/keyman-version/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/common/web/langtags/build.sh b/common/web/langtags/build.sh index 58fc6d10cf..d04319fc77 100755 --- a/common/web/langtags/build.sh +++ b/common/web/langtags/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/common/web/types/build.sh b/common/web/types/build.sh index 679fcfc018..b1eaa8b3ff 100755 --- a/common/web/types/build.sh +++ b/common/web/types/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/common/windows/build.sh b/common/windows/build.sh index 663a7f41c7..45941b668d 100755 --- a/common/windows/build.sh +++ b/common/windows/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # diff --git a/common/windows/cef-checkout.sh b/common/windows/cef-checkout.sh index 184769a198..c669961328 100755 --- a/common/windows/cef-checkout.sh +++ b/common/windows/cef-checkout.sh @@ -13,7 +13,7 @@ set -u ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-basic.inc.sh" # . "$KEYMAN_ROOT/resources/build/utils.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE diff --git a/common/windows/data/build.sh b/common/windows/data/build.sh index ac559612bb..2b70c426ed 100755 --- a/common/windows/data/build.sh +++ b/common/windows/data/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/common/windows/delphi/build.sh b/common/windows/delphi/build.sh index b3e0ddfc1f..81042422fd 100755 --- a/common/windows/delphi/build.sh +++ b/common/windows/delphi/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/common/windows/delphi/components/build.sh b/common/windows/delphi/components/build.sh index 86bad135e0..6fe3dfa9ec 100755 --- a/common/windows/delphi/components/build.sh +++ b/common/windows/delphi/components/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Common Delphi components" clean configure build test edit diff --git a/common/windows/delphi/general/KeymanVersionInfo.inc b/common/windows/delphi/general/KeymanVersionInfo.inc index 4991b42385..41e316e051 100644 --- a/common/windows/delphi/general/KeymanVersionInfo.inc +++ b/common/windows/delphi/general/KeymanVersionInfo.inc @@ -1,6 +1,6 @@ type TKeymanVersionInfo = record - // These fields match fields in /resources/build/build-utils.sh + // These fields match fields in /resources/build/builder-basic.inc.sh Version: string; // 14.0.2 VersionWin: string; // 14.0.2.0 VersionRelease: string; // 14.0 diff --git a/common/windows/delphi/general/keymanversion_build.in b/common/windows/delphi/general/keymanversion_build.in index edd55572a6..a5ada65e15 100644 --- a/common/windows/delphi/general/keymanversion_build.in +++ b/common/windows/delphi/general/keymanversion_build.in @@ -6,7 +6,7 @@ // Keyman Version Information CKeymanVersionInfo: TKeymanVersionInfo = ( - // These fields match fields in /resources/build/build-utils.sh + // These fields match fields in /resources/build/builder-basic.inc.sh Version: '$Version'; VersionWin: '$VersionWin'; VersionRelease: '$VersionRelease'; diff --git a/common/windows/delphi/tools/build.sh b/common/windows/delphi/tools/build.sh index 6fad40a4d6..220463620b 100755 --- a/common/windows/delphi/tools/build.sh +++ b/common/windows/delphi/tools/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/common/windows/delphi/tools/build_standards_data/build.sh b/common/windows/delphi/tools/build_standards_data/build.sh index 3d39aefe9d..239bde79f0 100755 --- a/common/windows/delphi/tools/build_standards_data/build.sh +++ b/common/windows/delphi/tools/build_standards_data/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Build build_standards_data tool" clean configure build test edit diff --git a/common/windows/delphi/tools/buildunidata/build.sh b/common/windows/delphi/tools/buildunidata/build.sh index b4e13c264d..36b069351b 100755 --- a/common/windows/delphi/tools/buildunidata/build.sh +++ b/common/windows/delphi/tools/buildunidata/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Unicode character database build tool" \ diff --git a/common/windows/delphi/tools/certificates/build.sh b/common/windows/delphi/tools/certificates/build.sh index 10ab4c75ce..dfe4911f18 100755 --- a/common/windows/delphi/tools/certificates/build.sh +++ b/common/windows/delphi/tools/certificates/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Build and install test certificates" clean configure build test \ diff --git a/common/windows/delphi/tools/devtools/build.sh b/common/windows/delphi/tools/devtools/build.sh index f514ea7578..f7b9dd52d4 100755 --- a/common/windows/delphi/tools/devtools/build.sh +++ b/common/windows/delphi/tools/devtools/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/common/windows/delphi/tools/sentrytool/build.sh b/common/windows/delphi/tools/sentrytool/build.sh index ca4e427c39..c1672b0aeb 100755 --- a/common/windows/delphi/tools/sentrytool/build.sh +++ b/common/windows/delphi/tools/sentrytool/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Sentrytool for converting Delphi symbols into sentry-readable format" \ diff --git a/common/windows/delphi/tools/test-klog/build.sh b/common/windows/delphi/tools/test-klog/build.sh index b271565cae..acdd90cd53 100755 --- a/common/windows/delphi/tools/test-klog/build.sh +++ b/common/windows/delphi/tools/test-klog/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Tool for validating klog is disabled for release builds" \ diff --git a/common/windows/delphi/tools/verify_signatures/build.sh b/common/windows/delphi/tools/verify_signatures/build.sh index f53883c70e..d1b29e89cb 100755 --- a/common/windows/delphi/tools/verify_signatures/build.sh +++ b/common/windows/delphi/tools/verify_signatures/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Tool to verify all Windows executable signatures and manifests" \ diff --git a/common/windows/mkver.sh b/common/windows/mkver.sh index 8ddb9e34ed..84886666bd 100755 --- a/common/windows/mkver.sh +++ b/common/windows/mkver.sh @@ -9,7 +9,7 @@ set -u ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE display_usage() { diff --git a/core/build.sh b/core/build.sh index 6bdb52d936..1c1d337b1c 100755 --- a/core/build.sh +++ b/core/build.sh @@ -3,7 +3,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE diff --git a/core/include/ldml/build.sh b/core/include/ldml/build.sh index 4188b758f5..650bd7adf7 100755 --- a/core/include/ldml/build.sh +++ b/core/include/ldml/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/core/tools/api-header-extractor/build.sh b/core/tools/api-header-extractor/build.sh index fe048ce48b..bf26598ce2 100755 --- a/core/tools/api-header-extractor/build.sh +++ b/core/tools/api-header-extractor/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE CORE_ROOT="$KEYMAN_ROOT/core" diff --git a/core/tools/ldml-const-builder/build.sh b/core/tools/ldml-const-builder/build.sh index 01082bca0a..8c8bc364b5 100755 --- a/core/tools/ldml-const-builder/build.sh +++ b/core/tools/ldml-const-builder/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/build.sh b/developer/build.sh index b75967a4ce..74269abcc3 100755 --- a/developer/build.sh +++ b/developer/build.sh @@ -2,7 +2,7 @@ ## START STANDARD UTILITY SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../resources/build/builder-basic.inc.sh" ## END STANDARD UTILITY SCRIPT INCLUDE # This is not a builder script but calls a builder script diff --git a/developer/src/build.sh b/developer/src/build.sh index b774b6c943..6e23dc8c0a 100755 --- a/developer/src/build.sh +++ b/developer/src/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/common/build.sh b/developer/src/common/build.sh index b37c2bc948..8ef5a4a1f2 100755 --- a/developer/src/common/build.sh +++ b/developer/src/common/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/common/delphi/build.sh b/developer/src/common/delphi/build.sh index 63680a5624..907621194f 100755 --- a/developer/src/common/delphi/build.sh +++ b/developer/src/common/delphi/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/common/web/build.sh b/developer/src/common/web/build.sh index 7ca90bd986..9be3a521fa 100755 --- a/developer/src/common/web/build.sh +++ b/developer/src/common/web/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/common/web/test-helpers/build.sh b/developer/src/common/web/test-helpers/build.sh index f7b9bb49b0..81042fff19 100755 --- a/developer/src/common/web/test-helpers/build.sh +++ b/developer/src/common/web/test-helpers/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/common/web/utils/build.sh b/developer/src/common/web/utils/build.sh index 4bd0885dcf..a8f6a1585f 100755 --- a/developer/src/common/web/utils/build.sh +++ b/developer/src/common/web/utils/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/inst/build.sh b/developer/src/inst/build.sh index be26678e5c..8b37048e1e 100755 --- a/developer/src/inst/build.sh +++ b/developer/src/inst/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE source "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmanalyze/build.sh b/developer/src/kmanalyze/build.sh index ecd9fd263f..a72381557f 100755 --- a/developer/src/kmanalyze/build.sh +++ b/developer/src/kmanalyze/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Legacy keyboard source analysis tool" \ diff --git a/developer/src/kmc-analyze/build.sh b/developer/src/kmc-analyze/build.sh index 1d069b3b81..4c09fabb43 100755 --- a/developer/src/kmc-analyze/build.sh +++ b/developer/src/kmc-analyze/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-copy/build.sh b/developer/src/kmc-copy/build.sh index a5f8febdc1..9dd7d3d2e2 100755 --- a/developer/src/kmc-copy/build.sh +++ b/developer/src/kmc-copy/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-generate/build.sh b/developer/src/kmc-generate/build.sh index 6b790ad3ff..ca8b9615f4 100755 --- a/developer/src/kmc-generate/build.sh +++ b/developer/src/kmc-generate/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-keyboard-info/build.sh b/developer/src/kmc-keyboard-info/build.sh index 5d41665e5f..7eaac99c02 100755 --- a/developer/src/kmc-keyboard-info/build.sh +++ b/developer/src/kmc-keyboard-info/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-kmn/build.sh b/developer/src/kmc-kmn/build.sh index 7ff15520b5..dc33cfd9c1 100755 --- a/developer/src/kmc-kmn/build.sh +++ b/developer/src/kmc-kmn/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-ldml/build.sh b/developer/src/kmc-ldml/build.sh index e1b879f438..7f9ff0ad15 100755 --- a/developer/src/kmc-ldml/build.sh +++ b/developer/src/kmc-ldml/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-model-info/build.sh b/developer/src/kmc-model-info/build.sh index 21cd3e52f5..60c1d23b0b 100755 --- a/developer/src/kmc-model-info/build.sh +++ b/developer/src/kmc-model-info/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-model/build.sh b/developer/src/kmc-model/build.sh index 53f7b44b12..550bb8a302 100755 --- a/developer/src/kmc-model/build.sh +++ b/developer/src/kmc-model/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-package/build.sh b/developer/src/kmc-package/build.sh index 93ba6c4ade..1e260c7b3e 100755 --- a/developer/src/kmc-package/build.sh +++ b/developer/src/kmc-package/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc/build.sh b/developer/src/kmc/build.sh index 1fc897949a..0654bfd247 100755 --- a/developer/src/kmc/build.sh +++ b/developer/src/kmc/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" diff --git a/developer/src/kmc/test/command-line-tests.sh b/developer/src/kmc/test/command-line-tests.sh index c76a641376..41652bcdfd 100755 --- a/developer/src/kmc/test/command-line-tests.sh +++ b/developer/src/kmc/test/command-line-tests.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" diff --git a/developer/src/kmcmplib/build.sh b/developer/src/kmcmplib/build.sh index 457f597f4c..952c0732b8 100755 --- a/developer/src/kmcmplib/build.sh +++ b/developer/src/kmcmplib/build.sh @@ -3,7 +3,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmcmplib/tests/get-test-source.sh b/developer/src/kmcmplib/tests/get-test-source.sh index fe6cded2f1..af647ee311 100755 --- a/developer/src/kmcmplib/tests/get-test-source.sh +++ b/developer/src/kmcmplib/tests/get-test-source.sh @@ -3,7 +3,7 @@ # Finds all keyboards in the keyboards repo (passed in $1) that are valid source # keyboards (i.e. ///source/.kmn) # -# Called from meson.build, so this script does not use build-utils.sh. Do not run this +# Called from meson.build, so this script does not use builder-basic.inc.sh. Do not run this # script directly. # set -eu diff --git a/developer/src/kmcmplib/tests/prep.sh b/developer/src/kmcmplib/tests/prep.sh index 8ad9b81171..e00f2fc1fd 100755 --- a/developer/src/kmcmplib/tests/prep.sh +++ b/developer/src/kmcmplib/tests/prep.sh @@ -11,7 +11,7 @@ set -eu ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE cd "$THIS_SCRIPT_PATH" diff --git a/developer/src/kmconvert/build.sh b/developer/src/kmconvert/build.sh index 3ba94c21dc..e18977f05b 100755 --- a/developer/src/kmconvert/build.sh +++ b/developer/src/kmconvert/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Keyboard project generation and conversion tool" \ diff --git a/developer/src/kmdbrowserhost/build.sh b/developer/src/kmdbrowserhost/build.sh index 55e7ae8d14..8996b17bc4 100755 --- a/developer/src/kmdbrowserhost/build.sh +++ b/developer/src/kmdbrowserhost/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Chromium browser host process for Keyman Developer" \ diff --git a/developer/src/kmdecomp/build.sh b/developer/src/kmdecomp/build.sh index 494b8afde5..069e3e836a 100755 --- a/developer/src/kmdecomp/build.sh +++ b/developer/src/kmdecomp/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/samples/build.sh b/developer/src/samples/build.sh index 703a2691a8..c60602bf85 100755 --- a/developer/src/samples/build.sh +++ b/developer/src/samples/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/samples/imsample/build.sh b/developer/src/samples/imsample/build.sh index 2cdd11ac70..50447040ac 100755 --- a/developer/src/samples/imsample/build.sh +++ b/developer/src/samples/imsample/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/server/build.sh b/developer/src/server/build.sh index d2bd8575dd..bd19066948 100755 --- a/developer/src/server/build.sh +++ b/developer/src/server/build.sh @@ -3,7 +3,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/server/src/version-data.ts b/developer/src/server/src/version-data.ts index 05f266c5c6..a082a65170 100644 --- a/developer/src/server/src/version-data.ts +++ b/developer/src/server/src/version-data.ts @@ -1,5 +1,5 @@ /* - Version information from build-utils.sh: + Version information from builder-basic.inc.sh: # KEYMAN_VERSION: Full current build version, e.g. "14.0.1" # [KEYMAN_VERSION_WIN: Full current build version for Windows, e.g. "14.0.1.0"] diff --git a/developer/src/setup/build.sh b/developer/src/setup/build.sh index ef84122fdb..1e4ab94a68 100755 --- a/developer/src/setup/build.sh +++ b/developer/src/setup/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/test/auto/build.sh b/developer/src/test/auto/build.sh index 043711e752..a2bca0e0dd 100755 --- a/developer/src/test/auto/build.sh +++ b/developer/src/test/auto/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/test/auto/compile-supplementary-support/build.sh b/developer/src/test/auto/compile-supplementary-support/build.sh index b004605b1d..4f8acf40a9 100755 --- a/developer/src/test/auto/compile-supplementary-support/build.sh +++ b/developer/src/test/auto/compile-supplementary-support/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "test if KS=1 is in the right files, both in debug and non-debug versions" clean configure build test diff --git a/developer/src/test/auto/keyboard-js-info/build.sh b/developer/src/test/auto/keyboard-js-info/build.sh index 0a19929f4b..7bbf417681 100755 --- a/developer/src/test/auto/keyboard-js-info/build.sh +++ b/developer/src/test/auto/keyboard-js-info/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Test the read of basic keyboard info info from js files" clean configure build test diff --git a/developer/src/test/auto/kmcomp/build.sh b/developer/src/test/auto/kmcomp/build.sh index 7239010b06..8bfcd69149 100755 --- a/developer/src/test/auto/kmcomp/build.sh +++ b/developer/src/test/auto/kmcomp/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Test that kmc passes various compile tests" clean configure build test diff --git a/developer/src/test/auto/kmx-file-languages/build.sh b/developer/src/test/auto/kmx-file-languages/build.sh index 58ae1492ef..9bf1821450 100755 --- a/developer/src/test/auto/kmx-file-languages/build.sh +++ b/developer/src/test/auto/kmx-file-languages/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Test the read of language info from kmx files and translation from legacy ids to BCP47" clean configure build test diff --git a/developer/src/test/auto/model-ts-parser/build.sh b/developer/src/test/auto/model-ts-parser/build.sh index eaf5bb4819..e4e2208e56 100755 --- a/developer/src/test/auto/model-ts-parser/build.sh +++ b/developer/src/test/auto/model-ts-parser/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Test lexical model parser" clean configure build test diff --git a/developer/src/test/auto/package-info/build.sh b/developer/src/test/auto/package-info/build.sh index e67366b26e..32f9fbbbc4 100755 --- a/developer/src/test/auto/package-info/build.sh +++ b/developer/src/test/auto/package-info/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Test lexical model parser" clean configure build test diff --git a/developer/src/test/build.sh b/developer/src/test/build.sh index 48f3e69ac5..6546dbf752 100755 --- a/developer/src/test/build.sh +++ b/developer/src/test/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/tike/build.sh b/developer/src/tike/build.sh index b06fd1f847..0ba6c98642 100755 --- a/developer/src/tike/build.sh +++ b/developer/src/tike/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Build Keyman Developer IDE" \ diff --git a/developer/src/tools/sentry-upload-difs.sh b/developer/src/tools/sentry-upload-difs.sh index 34ab4c60b0..b45387ec3e 100755 --- a/developer/src/tools/sentry-upload-difs.sh +++ b/developer/src/tools/sentry-upload-difs.sh @@ -14,7 +14,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE cd "$KEYMAN_ROOT/developer" diff --git a/docs/builder.md b/docs/builder.md index 18272accd0..66815c6325 100644 --- a/docs/builder.md +++ b/docs/builder.md @@ -1,4 +1,4 @@ -# Using the build-utils.sh builder functions +# Using the builder-basic.inc.sh builder functions The Keyman repository is standardising on bash scripts for builds. These may call project-specific builders, such as `tsc` for Typescript projects, `meson` @@ -43,7 +43,7 @@ set -eu ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "$(dirname "$THIS_SCRIPT")//resources/build/build-utils.sh" +. "$(dirname "$THIS_SCRIPT")//resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # . "$KEYMAN_ROOT/.../foo.inc.sh" # any other includes, such as jq.inc.sh @@ -78,7 +78,7 @@ Builder scripts will inherit `set -eu` from builder.inc.sh: ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "$(dirname "$THIS_SCRIPT")//resources/build/build-utils.sh" +. "$(dirname "$THIS_SCRIPT")//resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE ``` @@ -100,7 +100,7 @@ search-and-replace) this section in the future as required. ## Any other includes -Once `build-utils.sh` has been included, the variable `$KEYMAN_ROOT` will be +Once `builder-basic.inc.sh` has been included, the variable `$KEYMAN_ROOT` will be available, so other include scripts should be sourced accordingly, for example: ```bash @@ -114,7 +114,7 @@ to `cd` at the start of your script. ## Standard environment -`build-utils.sh` will prepend `$KEYMAN_ROOT/node_modules/.bin` to the `PATH` +`builder-basic.inc.sh` will prepend `$KEYMAN_ROOT/node_modules/.bin` to the `PATH` variable to ensure that we run the correct versions of npm package commands, so there is no need to hard-code path references or add script wrappers to package.json (`npm run