Skip to content

Commit

Permalink
Merge branch 'master' into fix/linux/9878_fixpkgenv
Browse files Browse the repository at this point in the history
  • Loading branch information
ermshiperete committed Nov 4, 2023
2 parents 6adfa8a + 8782d32 commit 33eae05
Show file tree
Hide file tree
Showing 40 changed files with 1,072 additions and 239 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/deb-packaging.README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Debian Packaging GitHub Action

You can manually trigger a deb-packaging action on GitHub, e.g. to test changes:

- push the changes to your fork of keymanapp/keyman: git push myfork HEAD:master
- make sure you have GHA enabled in the settings of your fork and created an
access token on GitHub
- trigger a build with:

```bash
curl --write-out '\n' --request POST \
--header "Accept: application/vnd.github+json" \
--header "Authorization: token $GITHUB_TOKEN" \
--data "{ \"event_type\": \"deb-pr-packaging: master\", \
\"client_payload\": { \
\"buildSha\": \"$(git rev-parse refs/heads/master)\", \
\"headSha\": \"$(git rev-parse refs/heads/master)\", \
\"branch\": \"master\", \
\"isTestBuild\": \"true\"}" \
https://api.github.com/repos/<yourgithubname>/keyman/dispatches

```
22 changes: 14 additions & 8 deletions .github/workflows/deb-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ run-name: "Ubuntu packaging - ${{ github.event.client_payload.branch }} (branch
on:
repository_dispatch:
types: ['deb-release-packaging:*', 'deb-pr-packaging:*']

# Input:
# buildSha: The SHA of the commit to build, e.g. of the branch or
# refs/pull/1234/merge for PR
# headSha: The SHA of the branch head. Same as buildSha for regular
# builds, SHA of refs/pull/1234/head for PRs
# branch: The branch to build, for a PR in the form `PR-1234`
# isTestBuild: false for Releases, otherwise true

env:
COLOR_GREEN: "\e[32m"
GH_TOKEN: ${{ github.token }}
Expand All @@ -16,25 +25,22 @@ jobs:
runs-on: ubuntu-22.04
outputs:
VERSION: ${{ steps.version_step.outputs.VERSION }}
GIT_SHA: ${{ steps.set_status.outputs.GIT_SHA }}
PRERELEASE_TAG: ${{ steps.prerelease_tag.outputs.PRERELEASE_TAG }}
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
with:
ref: '${{ github.event.client_payload.ref }}'
ref: '${{ github.event.client_payload.buildSha }}'

- name: Set pending status on PR builds
id: set_status
if: github.event.client_payload.isTestBuild == 'true'
shell: bash
run: |
GIT_SHA="${{ github.event.client_payload.sha }}"
echo "GIT_SHA=$GIT_SHA" >> $GITHUB_OUTPUT
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/repos/$GITHUB_REPOSITORY/statuses/$GIT_SHA \
/repos/$GITHUB_REPOSITORY/statuses/${{ github.event.client_payload.headSha }} \
-f state='pending' \
-f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
-f description='Debian packaging started' \
Expand Down Expand Up @@ -86,7 +92,7 @@ jobs:
if [ "${{ github.event.client_payload.isTestBuild }}" == "true" ]; then
echo ":checkered_flag: **Test build of version ${{ steps.version_step.outputs.VERSION }} for ${{ github.event.client_payload.branch }}**" >> $GITHUB_STEP_SUMMARY
else
echo ":ship: **Release build of ${{ github.event.client_payload.branch }} branch (${{ github.event.client_payload.ref}}), version ${{ steps.version_step.outputs.VERSION }}**" >> $GITHUB_STEP_SUMMARY
echo ":ship: **Release build of ${{ github.event.client_payload.branch }} branch (${{ github.event.client_payload.branch}}), version ${{ steps.version_step.outputs.VERSION }}**" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo ":gift: Generated source package:" >> $GITHUB_STEP_SUMMARY
Expand Down Expand Up @@ -229,7 +235,7 @@ jobs:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
with:
ref: '${{ github.event.client_payload.ref }}'
ref: '${{ github.event.client_payload.buildSha }}'

- name: Download Artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
Expand Down Expand Up @@ -286,7 +292,7 @@ jobs:
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/repos/$GITHUB_REPOSITORY/statuses/${{ needs.sourcepackage.outputs.GIT_SHA }} \
/repos/$GITHUB_REPOSITORY/statuses/${{ github.event.client_payload.headSha }} \
-f state="$RESULT" \
-f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
-f description="$MSG" \
Expand Down
32 changes: 32 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Keyman Version History

## 17.0.205 alpha 2023-11-03

* fix(developer): use KeymanWeb.Codes for 17.0+ (#9913)
* fix(developer): don't use osk-always-visible on touch devices (#9917)
* chore(linux): Improve repository_dispatch (#9865)
* chore(linux): Refactor deb-packaging.sh script (#9866)
* chore(linux): Add Core API version number (#9877)
* fix(developer): kmc code generation for context(n) in context (#9932)
* chore(developer): remove obsolete 'Allow Multiple Instances' and 'Use Legacy Compiler' options (#9934)
* chore(developer): common/include dep for kmcmplib (#9935)
* feat(common): ldml update to WIP cldr data (#9919)

## 17.0.204 alpha 2023-11-02

* fix(web): fixes doc-kbd display of default layer when it's not defined first (#9891)
* fix(developer): compiler crash when no project loaded (#9898)
* fix(developer): debug flag for compiling keyboards (#9901)
* chore(developer): verify kmp.json output from kmc-package (#9844)
* fix(developer): Project MRU now saves correctly (#9902)
* chore(common): fixup SchemaValidators error handling (#9903)
* chore(developer): change field label to 'Related Package ID' in Related Packages dialog (#9904)
* fix(developer): open editor links in new window (#9905)
* fix(developer): enable and update unit tests (#9907)
* fix(developer): layout builder - maintain presentation during undo (#9914)
* feat(developer): extract font family from .ttf in kmc-keyboard-info (#9859)
* fix(developer): raise error if virtual key in context string (#9908)
* feat(developer): Compile button in TIKE toolbar (#9910)
* chore(developer): rename messages.ts for clarity (#9920)
* fix(developer): warn if layer switch key is missing ID (#9921)
* fix(developer): restore selection in layout builder even with duplicate ids (#9922)
* fix(developer): enable line breaks in debugger (#9906)

## 17.0.203 alpha 2023-10-30

* fix(linux): Fix uninstallation of shared keyboard (#9880)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
17.0.204
17.0.206
32 changes: 1 addition & 31 deletions common/windows/delphi/general/RegistryKeys.pas
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,16 @@ interface

SRegValue_Engine_OEMProductPath = 'oem product path';

// SRegValue_UnknownLayoutID = 'unknown layout id'; // LM
SRegValue_Legacy_Default_UnknownLayoutID = '000005FE'; // I4220
SRegValue_Legacy_Default_UnknownLayoutID = '000005FE'; // I4220

SRegValue_KeymanDebug = 'debug'; // CU

SRegValue_DefaultCustomisation = 'default customisation'; // LM

SRegValue_ShowStartup = 'show startup'; // CU
SRegValue_ShowWelcome = 'show welcome'; // CU
//SRegValue_NoCheckAssociations = 'no check associations'; // CU
SRegValue_UseAdvancedInstall = 'use advanced install'; // CU

//TOUCH SRegValue_UseTouchLayout = 'use touch layout'; // CU, default false

SRegValue_AltGrCtrlAlt = 'simulate altgr'; // CU
SRegValue_KeyboardHotKeysAreToggle = 'hotkeys are toggles'; // CU
SRegValue_ReleaseShiftKeysAfterKeyPress = 'release shift keys after key press'; // CU
Expand Down Expand Up @@ -171,9 +167,6 @@ interface
SRegValue_DeadkeyConversionMode = 'deadkey conversion mode'; // CU // I4552
SRegValue_UnderlyingLayout = 'underlying layout'; // CU

// SRegKey_AppInitDLLs = 'Software\Microsoft\Windows NT\CurrentVersion\Windows'; // LM
// SRegValue_AppInitDLLs = 'AppInit_DLLs'; // LM

SRegKey_KeyboardLayoutToggle = 'keyboard layout\toggle'; // CU // I2522
SRegValue_Toggle_Hotkey = 'Hotkey';
SRegValue_Toggle_LanguageHotkey = 'Language Hotkey';
Expand Down Expand Up @@ -272,10 +265,6 @@ interface
SRegValue_CPIUP_CachedLanguageName = 'CachedLanguageName';
SRegValue_CPIUP_InputMethodOverride = 'InputMethodOverride';

{ User profile keys }

//SRegKey_NTProfileList = 'Software\Microsoft\Windows NT\CurrentVersion\ProfileList';

{ Font keys }

SRegKey_FontList_LM = 'Software\Microsoft\Windows\CurrentVersion\Fonts'; // LM
Expand Down Expand Up @@ -318,13 +307,6 @@ interface
SRegKey_IDETestFonts_CU = SRegKey_IDE_CU + '\TestFonts'; // CU
SRegKey_IDEVisualKeyboard_CU = SRegKey_IDE_CU + '\VisualKeyboard'; // CU
SRegKey_IDEToolbars_CU = SRegKey_IDE_CU + '\Toolbars'; // CU
// SRegKey_KCT = SRegKey_KeymanDeveloper_CU + '\KCT'; // LM CU
// SRegKey_KCTFiles = SRegKey_KCT_CU + '\Files'; // CU

// SRegKey_IDEOnline = SRegKey_IDE_CU + '\Online'; // CU
// SRegKey_IDE_BrandingPackTest = SRegKey_IDE_CU + '\Branding Pack\Test'; // CU // I4873

// SRegKey_CRM = SRegKey_KeymanDeveloper + '\CRM'; // CU

SRegValue_CheckForUpdates = 'check for updates'; // CU
SRegValue_LastUpdateCheckTime = 'last update check time'; // CU
Expand All @@ -335,8 +317,6 @@ interface

SRegValue_KeepInTouchShown = 'keep in touch shown'; // CU. bool // I4658

//SRegValue_OnlineUsername = 'online username';
//SRegValue_OnlinePassword = 'online password';
SRegValue_OnlineLogin = 'online login';

{ SRegKey_CRM values }
Expand All @@ -349,7 +329,6 @@ interface

{ SRegKey_KeymanDeveloper values }

//SRegValue_ShowStartup = 'show startup'; // CU -- see Keyman option of same name
SRegValue_Evaluation = 'evaluation'; // CU
SRegValue_ActiveProject = 'active project'; // CU

Expand All @@ -364,7 +343,6 @@ interface

SRegValue_IDEMRU = 'MRU'; // CU
SRegValue_CharMapSize = 'char map size'; // CU
//SRegValue_IDERegressionTestPath = 'regression test path'; // CU

{ SRegKey_IDEVisualKeyboard values }

Expand Down Expand Up @@ -393,8 +371,6 @@ interface
SRegValue_IDEOptAutoSaveBeforeCompiling = 'auto save before compiling'; // CU
SRegValue_IDEOptOSKAutoSaveBeforeImporting = 'osk auto save before importing'; // CU

SRegValue_IDEOptUseLegacyCompiler = 'use legacy compiler'; // CU

// Note: keeping 'web host port' reg value name to ensure settings maintained
// from version 14.0 and earlier of Keyman Developer. Other values are
// new with Keyman Developer 15.0
Expand All @@ -409,8 +385,6 @@ interface
SRegValue_IDEOptCharMapDisableDatabaseLookups = 'char map disable database lookups'; // CU
SRegValue_IDEOptCharMapAutoLookup = 'char map auto lookup'; // CU

SRegValue_IDEOptMultipleInstances = 'multiple instances'; // CU

SRegValue_IDEOptOpenKeyboardFilesInSourceView = 'open keyboard files in source view'; // CU // I4751

SRegValue_IDEDisplayTheme = 'display theme'; // I4796
Expand All @@ -425,10 +399,6 @@ interface

SRegValue_IDEOpt_DefaultProjectPath = 'default project path';

{ SRegKey_KCT values }

// SRegValue_KCTTemplatePath = 'template path'; // LM

{-------------------------------------------------------------------------------
- Shared keys and values -
------------------------------------------------------------------------------}
Expand Down
4 changes: 0 additions & 4 deletions common/windows/delphi/general/UserMessages.pas
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ interface
WM_USER_CheckFonts = WM_USER + 115;

const
// KeymanDeveloperUtils
WM_USER_LOADREGFILES = WM_USER+120;
//WM_USER_FORMSHOWN = WM_USER+100;

WC_COMMAND = 0;
WC_HELP = 1;
WC_OPENURL = 2;
Expand Down
1 change: 1 addition & 0 deletions core/CORE_API_VERSION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
5 changes: 3 additions & 2 deletions core/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ project('keyman_core', 'cpp', 'c',
'cpp_std=c++14',
'b_vscrt=static_from_buildtype',
'warning_level=2'],
meson_version: '>=0.53.0')
meson_version: '>=0.57.0')

# Import our standard compiler defines; this is copied from
# /resources/build/standard.meson.build by build.sh, because
# meson doesn't allow us to reference a file outside its root
subdir('resources')

lib_version = '1.0.0'
fs = import('fs')
lib_version = fs.read('CORE_API_VERSION.md').strip()

py = import('python')
python = py.find_installation()
Expand Down
4 changes: 3 additions & 1 deletion core/tests/unit/ldml/keyboards/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
tests_from_cldr = [
'ja-Latn',
'pt-t-k0-abnt2',
'fr-t-k0-azerty',
# 'fr-t-k0-optimise', (not yet)
# 'fr-t-k0-test',
'pcm',
'bn',
]

tests_without_testdata = [
Expand Down
6 changes: 5 additions & 1 deletion developer/src/kmc-kmn/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ if builder_start_action test; then
copy_deps
tsc --build test/
npm run lint
c8 --reporter=lcov --reporter=text --exclude-after-remap mocha "${builder_extra_params[@]}"
readonly C8_THRESHOLD=70
c8 --reporter=lcov --reporter=text --lines $C8_THRESHOLD --statements $C8_THRESHOLD --branches $C8_THRESHOLD --functions $C8_THRESHOLD mocha
builder_echo warning "Coverage thresholds are currently $C8_THRESHOLD%, which is lower than ideal."
builder_echo warning "Please increase threshold in build.sh as test coverage improves."

builder_finish_action success test
fi

Expand Down
1 change: 0 additions & 1 deletion developer/src/kmc-kmn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"exclude-after-remap": true,
"exclude": [
"src/import/",
"src/kmw-compiler",
"test/"
]
},
Expand Down
4 changes: 4 additions & 0 deletions developer/src/kmc-kmn/src/kmw-compiler/compiler-globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ export function IsKeyboardVersion14OrLater(): boolean {
export function IsKeyboardVersion15OrLater(): boolean {
return fk.fileVersion >= KMX.KMXFile.VERSION_150;
}

export function IsKeyboardVersion17OrLater(): boolean {
return fk.fileVersion >= KMX.KMXFile.VERSION_170;
}
4 changes: 2 additions & 2 deletions developer/src/kmc-kmn/src/kmw-compiler/javascript-strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ function JavaScript_CompositeContextValue(fk: KMX.KEYBOARD, fkp: KMX.KEY, pwsz:
Cur--; // don't increment on ifsystemstore -- correlates with AdjustIndex function // I3910
break;
case KMX.KMXFile.CODE_CONTEXTEX: // I3980
Result += `k.KCCM(${Len-Cur},${Len-rec.ContextEx.Index+1},t)`;
Result += `k.KCCM(${Len-Cur},${Len-rec.ContextEx.Index},t)`;
break;
case KMX.KMXFile.CODE_NOTANY: // I3981
CheckStoreForInvalidFunctions(fk, fkp, rec.Any.Store); // I1520
Expand Down Expand Up @@ -572,7 +572,7 @@ function JavaScript_FullContextValue(fk: KMX.KEYBOARD, fkp: KMX.KEY, pwsz: strin
FullContext += `{t:'a',a:this.s${JavaScript_Name(rec.Any.StoreIndex, rec.Any.Store.dpName)},n:1}`;
break;
case KMX.KMXFile.CODE_CONTEXTEX:
FullContext += `{t:'c',c:${rec.ContextEx.Index}}`; // I4611
FullContext += `{t:'c',c:${rec.ContextEx.Index+1}}`; // I4611
break;
case KMX.KMXFile.CODE_INDEX:
FullContext += `{t:'i',i:this.s${JavaScript_Name(rec.Index.StoreIndex, rec.Index.Store.dpName)},`+
Expand Down
11 changes: 8 additions & 3 deletions developer/src/kmc-kmn/src/kmw-compiler/kmw-compiler.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { KMX, CompilerOptions, CompilerCallbacks, KvkFileReader, VisualKeyboard, KmxFileReader, KvkFile } from "@keymanapp/common-types";
import { ExpandSentinel, incxstr, xstrlen } from "./util.js";
import { options, nl, FTabStop, setupGlobals, IsKeyboardVersion10OrLater, callbacks, FFix183_LadderLength, FCallFunctions, fk } from "./compiler-globals.js";
import { options, nl, FTabStop, setupGlobals, IsKeyboardVersion10OrLater, callbacks, FFix183_LadderLength, FCallFunctions, fk, IsKeyboardVersion17OrLater } from "./compiler-globals.js";
import { JavaScript_ContextMatch, JavaScript_KeyAsString, JavaScript_Name, JavaScript_OutputString, JavaScript_Rules, JavaScript_Shift, JavaScript_ShiftAsString, JavaScript_Store, zeroPadHex } from './javascript-strings.js';
import { KmwCompilerMessages } from "./kmw-compiler-messages.js";
import { ValidateLayoutFile } from "./validate-layout-file.js";
Expand Down Expand Up @@ -438,8 +438,13 @@ function GetKeyboardModifierBitmask(keyboard: KMX.KEYBOARD, fMnemonic: boolean):
function JavaScript_SetupDebug() {
if(IsKeyboardVersion10OrLater()) {
if(options.saveDebug) {
return 'var modCodes = keyman.osk.modifierCodes;'+nl+
FTabStop+'var keyCodes = keyman.osk.keyCodes;'+nl;
if(IsKeyboardVersion17OrLater()) {
return 'var modCodes = KeymanWeb.Codes.modifierCodes;'+nl+
FTabStop+'var keyCodes = KeymanWeb.Codes.keyCodes;'+nl;
} else {
return 'var modCodes = keyman.osk.modifierCodes;'+nl+
FTabStop+'var keyCodes = keyman.osk.keyCodes;'+nl;
}
}
}
return '';
Expand Down
Loading

0 comments on commit 33eae05

Please sign in to comment.