mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-07 22:47:29 +00:00
chore(windows): Merge branch 'master' into fix/windows/14261/splash-screen-unresponsive
This commit is contained in:
commit
aa3e6567f7
283 changed files with 17160 additions and 6410 deletions
123
.github/workflows/README.md
vendored
Normal file
123
.github/workflows/README.md
vendored
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
# api-verification.yml
|
||||
TODO
|
||||
|
||||
# auto-merge-keyman-server-pr.yml
|
||||
TODO
|
||||
|
||||
# build-test-publish-docker.yml
|
||||
TODO
|
||||
|
||||
# cleanup-ghcr.yml
|
||||
TODO
|
||||
|
||||
# close-linked-issues-for-merged-prs.yml
|
||||
TODO
|
||||
|
||||
# core-arm64-windows-test.yml: Test Keyman Core on Windows/ARM64
|
||||
|
||||
This action allows us to test Keyman Core for Windows on ARM64 architecture with
|
||||
a GitHub agent, as we do not have any TeamCity Windows build agents with ARM64
|
||||
arch.
|
||||
|
||||
It will normally be triggered as part of a test build from the
|
||||
resources/teamcity/triggers/trigger-test-builds.sh script.
|
||||
|
||||
You can manually trigger a core-arm64-windows-test action on GitHub on your fork
|
||||
of keymanapp/keyman. This is normally only needed to test changes to the action
|
||||
itself:
|
||||
|
||||
- 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
|
||||
- seet `GITHUB_TOKEN=<your_gh_token>`
|
||||
- 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\": \"core-arm64-windows-test: master\", \
|
||||
\"client_payload\": { \
|
||||
\"buildSha\": \"$(git rev-parse refs/heads/master)\", \
|
||||
\"branch\": \"master\", \
|
||||
\"user\": \"${USER}\", \
|
||||
\"isTestBuild\": \"true\", \
|
||||
\"force\": \"true\"}" \
|
||||
https://api.github.com/repos/<yourgithubname>/keyman/dispatches
|
||||
```
|
||||
|
||||
To trigger a build for PR #1234 in a branch `my-pr-branch` this would look similar
|
||||
to this:
|
||||
|
||||
```bash
|
||||
curl --write-out '\n' --request POST \
|
||||
--header "Accept: application/vnd.github+json" \
|
||||
--header "Authorization: token $GITHUB_TOKEN" \
|
||||
--data "{ \"event_type\": \"core-arm64-windows-test: PR #1234\", \
|
||||
\"client_payload\": { \
|
||||
\"buildSha\": \"$(git rev-parse refs/heads/my-pr-branch)\", \
|
||||
\"branch\": \"my-pr-branch\", \
|
||||
\"user\": \"${USER}\", \
|
||||
\"isTestBuild\": \"true\", \
|
||||
\"force\": \"true\"}" \
|
||||
https://api.github.com/repos/<yourgithubname>/keyman/dispatches
|
||||
```
|
||||
|
||||
....
|
||||
|
||||
# crowdin.yml
|
||||
TODO
|
||||
|
||||
# deb-packaging.yml: Ubuntu Packaging GitHub Action
|
||||
|
||||
You can manually trigger a deb-packaging action on GitHub on your fork
|
||||
of keymanapp/keyman. This is normally only needed to test changes to the action
|
||||
itself:
|
||||
|
||||
- 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
|
||||
- seet `GITHUB_TOKEN=<your_gh_token>`
|
||||
- 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)\", \
|
||||
\"branch\": \"master\", \
|
||||
\"baseBranch\": \"master\", \
|
||||
\"baseRef\": \"$(git rev-parse refs/heads/master^)\", \
|
||||
\"user\": \"${USER}\", \
|
||||
\"isTestBuild\": \"true\", \
|
||||
\"force\": \"true\"}" \
|
||||
https://api.github.com/repos/<yourgithubname>/keyman/dispatches
|
||||
```
|
||||
|
||||
To trigger a build for PR #1234 in a branch `pr-1234` this would look similar
|
||||
to this:
|
||||
|
||||
```bash
|
||||
curl --write-out '\n' --request POST \
|
||||
--header "Accept: application/vnd.github+json" \
|
||||
--header "Authorization: token $GITHUB_TOKEN" \
|
||||
--data "{ \"event_type\": \"deb-pr-packaging: PR #1234\", \
|
||||
\"client_payload\": { \
|
||||
\"buildSha\": \"$(git rev-parse refs/heads/pr-1234)\", \
|
||||
\"branch\": \"pr-1234\", \
|
||||
\"baseBranch\": \"master\", \
|
||||
\"baseRef\": \"$(git rev-parse refs/heads/master)\", \
|
||||
\"user\": \"${USER}\", \
|
||||
\"isTestBuild\": \"true\", \
|
||||
\"force\": \"true\"}" \
|
||||
https://api.github.com/repos/<yourgithubname>/keyman/dispatches
|
||||
```
|
||||
|
||||
# labeler.yml
|
||||
TODO
|
||||
|
||||
# npm-publish.yml
|
||||
TODO
|
||||
|
||||
# pr-build-status.yml
|
||||
TODO
|
||||
167
.github/workflows/core-arm64-windows-test.yml
vendored
Normal file
167
.github/workflows/core-arm64-windows-test.yml
vendored
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
#
|
||||
# This workflow tests Keyman Core on ARM64/Windows; we cannot use our TeamCity
|
||||
# agents because we have no ARM64 Windows agents.
|
||||
#
|
||||
# It is triggered by a repository_dispatch event with the type
|
||||
# `core-arm64-windows-test:*`.
|
||||
#
|
||||
|
||||
name: "Keyman Core - ARM64/Windows test"
|
||||
run-name: "Keyman Core - ARM64/Windows test - ${{ github.event.client_payload.branch }} by @${{ github.event.client_payload.user }}"
|
||||
on:
|
||||
repository_dispatch:
|
||||
types: ['core-arm64-windows-test:*']
|
||||
|
||||
# Inputs:
|
||||
#
|
||||
# buildSha: The SHA of the commit to build, e.g. of the branch or
|
||||
# refs/pull/1234/head for PR
|
||||
# isTestBuild: true for PR and test builds, false for release builds
|
||||
# force: true to run this action on a fork of keymanapp/keyman
|
||||
#
|
||||
# Descriptive inputs:
|
||||
#
|
||||
# branch: Name of the branch to build, generally, `master`, `beta`,
|
||||
# `stable-x.y`, or for a PR `#1234`. Used only in the action
|
||||
# title
|
||||
# user: The user that triggered the build or created the PR. Used
|
||||
# only in the action title
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
STATUS_CONTEXT: 'Keyman Core - ARM64 test'
|
||||
_builder_timings: false
|
||||
|
||||
jobs:
|
||||
core-arm64-windows-test:
|
||||
name: Keyman Core ARM64/Windows test
|
||||
if: github.repository == 'keymanapp/keyman' || github.event.client_payload.force
|
||||
runs-on: windows-11-arm
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
|
||||
with:
|
||||
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: |
|
||||
gh api \
|
||||
--method POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
repos/$GITHUB_REPOSITORY/statuses/${{ github.event.client_payload.buildSha }} \
|
||||
-f state='pending' \
|
||||
-f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
|
||||
-f description='Keyman Core - ARM64 test started' \
|
||||
-f context="$STATUS_CONTEXT"
|
||||
|
||||
- name: Report initial npm/node versions
|
||||
run: |
|
||||
echo "Initial npm/node versions"
|
||||
npm -v
|
||||
node -v
|
||||
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.13'
|
||||
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
# This needs to be kept in sync with minimum-versions.sh
|
||||
node-version: '20.19'
|
||||
# As of Dec 2025, ngrok not yet supported on ARM Windows,
|
||||
# google-closure-compiler (and others?) does not support arm64 yet, so
|
||||
# use the x64 version of node. This is needed to avoid `npm ci` failure,
|
||||
# even though we don't use ngrok directly; google-closure-compiler is
|
||||
# used by emscripten
|
||||
architecture: x64
|
||||
|
||||
- name: Report on current environment
|
||||
shell: bash
|
||||
run: |
|
||||
echo "-- Environment --"
|
||||
echo "pythonLocation=$pythonLocation"
|
||||
echo "-- Current npm/node versions --"
|
||||
npm -v
|
||||
node -v
|
||||
|
||||
- name: Setup environment
|
||||
shell: bash
|
||||
run: |
|
||||
# As of Dec 2025, Emscripten does not support Win11 ARM natively
|
||||
echo "EMSDK_ARCH=x86_64" >> $GITHUB_ENV
|
||||
echo "EMSDK_KEEP_DOWNLOADS=1" >> $GITHUB_ENV
|
||||
echo "KEYMAN_USE_EMSDK=1" >> $GITHUB_ENV
|
||||
|
||||
echo "PATH=$PATH:$pythonLocation/Scripts" >> $GITHUB_ENV
|
||||
|
||||
echo "KEYMAN_CI_SKIP_NVM=1" >> $GITHUB_ENV
|
||||
|
||||
|
||||
- name: Install emscripten
|
||||
shell: bash
|
||||
run: |
|
||||
source resources/build/minimum-versions.inc.sh
|
||||
mkdir ../emsdk
|
||||
pushd ../emsdk
|
||||
git clone https://github.com/emscripten-core/emsdk.git
|
||||
cd emsdk
|
||||
./emsdk install "${KEYMAN_MIN_VERSION_EMSCRIPTEN}"
|
||||
./emsdk activate "${KEYMAN_MIN_VERSION_EMSCRIPTEN}"
|
||||
cd upstream/emscripten
|
||||
npm install
|
||||
echo "EMSCRIPTEN_BASE=$(pwd)" >> $GITHUB_ENV
|
||||
popd
|
||||
|
||||
- name: Install meson
|
||||
shell: bash
|
||||
run: |
|
||||
pip3 install --user meson
|
||||
|
||||
- name: Run test
|
||||
shell: bash
|
||||
run: |
|
||||
# Run the test
|
||||
./core/build.sh configure,build,test:arm64
|
||||
|
||||
set_status:
|
||||
name: Set result status on PR builds
|
||||
needs: [core-arm64-windows-test]
|
||||
runs-on: windows-11-arm
|
||||
if: ${{ always() && github.event.client_payload.isTestBuild == 'true' }}
|
||||
steps:
|
||||
- name: Set success
|
||||
if: needs.core-arm64-windows-test.result == 'success'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "RESULT=success" >> $GITHUB_ENV
|
||||
echo "MSG=Keyman Core ARM64 test succeeded" >> $GITHUB_ENV
|
||||
|
||||
- name: Set cancelled
|
||||
if: needs.core-arm64-windows-test.result == 'cancelled'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "RESULT=error" >> $GITHUB_ENV
|
||||
echo "MSG=Keyman Core ARM64 test cancelled" >> $GITHUB_ENV
|
||||
|
||||
- name: Set failure
|
||||
if: needs.core-arm64-windows-test.result == 'failure'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "RESULT=failure" >> $GITHUB_ENV
|
||||
echo "MSG=Keyman Core ARM64 test failed" >> $GITHUB_ENV
|
||||
|
||||
- name: Set final status
|
||||
shell: bash
|
||||
run: |
|
||||
gh api \
|
||||
--method POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
repos/$GITHUB_REPOSITORY/statuses/${{ github.event.client_payload.buildSha }} \
|
||||
-f state="$RESULT" \
|
||||
-f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
|
||||
-f description="$MSG" \
|
||||
-f context="$STATUS_CONTEXT"
|
||||
2
.github/workflows/crowdin.yml
vendored
2
.github/workflows/crowdin.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
|
||||
- name: crowdin action
|
||||
uses: crowdin/github-action@2.7.0
|
||||
uses: crowdin/github-action@v2.7.0
|
||||
with:
|
||||
upload_sources: true
|
||||
|
||||
|
|
|
|||
43
.github/workflows/deb-packaging.README.md
vendored
43
.github/workflows/deb-packaging.README.md
vendored
|
|
@ -1,43 +0,0 @@
|
|||
# Ubuntu 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)\", \
|
||||
\"branch\": \"master\", \
|
||||
\"baseBranch\": \"master\",
|
||||
\"baseRef\": \"$(git rev-parse refs/heads/master^)\",
|
||||
\"user\": \"${USER}\",
|
||||
\"isTestBuild\": \"true\",
|
||||
\"force\": \"true\"}" \
|
||||
https://api.github.com/repos/<yourgithubname>/keyman/dispatches
|
||||
```
|
||||
|
||||
To trigger a build for PR #1234 in a branch `pr-1234` this would look similar
|
||||
to this:
|
||||
|
||||
```bash
|
||||
curl --write-out '\n' --request POST \
|
||||
--header "Accept: application/vnd.github+json" \
|
||||
--header "Authorization: token $GITHUB_TOKEN" \
|
||||
--data "{ \"event_type\": \"deb-pr-packaging: PR #1234\", \
|
||||
\"client_payload\": { \
|
||||
\"buildSha\": \"$(git rev-parse refs/heads/pr-1234)\", \
|
||||
\"branch\": \"pr-1234\", \
|
||||
\"baseBranch\": \"master\",
|
||||
\"baseRef\": \"$(git rev-parse refs/heads/master)\",
|
||||
\"user\": \"${USER}\",
|
||||
\"isTestBuild\": \"true\",
|
||||
\"force\": \"true\"}" \
|
||||
https://api.github.com/repos/<yourgithubname>/keyman/dispatches
|
||||
```
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -103,8 +103,8 @@
|
|||
/windows/src/engine/keyman32/*.cod
|
||||
/windows/src/engine/keyman32/*.pdb
|
||||
|
||||
# /engine/keymanx64/
|
||||
/windows/src/engine/keymanx64/x64
|
||||
# /engine/keymanhp/
|
||||
/windows/src/engine/keymanhp/x64
|
||||
|
||||
# /engine/kmcomapi/
|
||||
/windows/src/engine/kmcomapi/kmcomapi.tlb
|
||||
|
|
|
|||
106
HISTORY.md
106
HISTORY.md
|
|
@ -1,5 +1,101 @@
|
|||
# Keyman Version History
|
||||
|
||||
## 19.0.183 alpha 2025-12-22
|
||||
|
||||
* maint(core): remove leading slash on gh api call parameter (#15381)
|
||||
* maint(core): fix test runner runs-on (#15382)
|
||||
|
||||
## 19.0.182 alpha 2025-12-22
|
||||
|
||||
* maint(common): Fix crowdin sync version to v2.7.0 (#15373)
|
||||
* chore(linux): Update keyman-config.pot strings (#15366)
|
||||
* chore(windows): show architecture in support texteditor (#15378)
|
||||
|
||||
## 19.0.181 alpha 2025-12-20
|
||||
|
||||
* fix(developer): clear message when selecting custom layer name in touch layout editor (#15371)
|
||||
* fix(developer): prevent duplicate layer name in Layer Properties dialog (#15372)
|
||||
|
||||
## 19.0.180 alpha 2025-12-19
|
||||
|
||||
* fix(mac): ensure retry for mac disk detach actually repeats (#15330)
|
||||
* fix(developer): handle Enter key in dialogs in Touch Layout Editor (#15338)
|
||||
* chore(windows): fix typo in error message (#15362)
|
||||
* chore(common): Update crowdin strings for PT (#15368)
|
||||
|
||||
## 19.0.179 alpha 2025-12-18
|
||||
|
||||
* fix(linux): fix persisting options (#15364)
|
||||
|
||||
## 19.0.178 alpha 2025-12-17
|
||||
|
||||
* chore(windows): correct kbda1 to kbdth0 in comment in unit test (#15351)
|
||||
|
||||
## 19.0.177 alpha 2025-12-16
|
||||
|
||||
* feat(windows): report a sentry event when low level hook is reinstalled (#15335)
|
||||
* chore(linux): add manual test for localization (#15356)
|
||||
* feat(developer): show keyboard version in web debugger (#15339)
|
||||
|
||||
## 19.0.176 alpha 2025-12-13
|
||||
|
||||
* chore(windows): remove unused variable (#15334)
|
||||
|
||||
## 19.0.175 alpha 2025-12-12
|
||||
|
||||
* fix(windows): use Thai Kedmanee instead of Arabic 101 in RightAltEmulationCheck.tests.cpp (#15346)
|
||||
|
||||
## 19.0.174 alpha 2025-12-10
|
||||
|
||||
* chore(windows): simple bisect utility for checking setup-redist.exe file size (#15322)
|
||||
|
||||
## 19.0.173 alpha 2025-12-09
|
||||
|
||||
* docs(developer): Clarify keystrokes in Step-1 of tutorial (#15326)
|
||||
* feat(android): Add Grabbable Bar and settings status for keyboard resizing (#15267)
|
||||
* chore(linux): Update debian changelog (#15282)
|
||||
* docs(web): fix typo in osk documentation (#15313)
|
||||
|
||||
## 19.0.172 alpha 2025-12-08
|
||||
|
||||
* docs(web): add links to next/previous page to web guide (#15311)
|
||||
* fix(developer): verify project file loaded successfully in analyze (#15318)
|
||||
|
||||
## 19.0.171 alpha 2025-12-08
|
||||
|
||||
* maint(resources): verify order of builder_describe_internal_dependency (#15257)
|
||||
* maint(common): use `builder_launch` for child builds (#15258)
|
||||
* change(windows): Revert "change(windows): include map2pdb generation for relevant Delphi projects" (#15276)
|
||||
* change(windows): add shortcuts to 'Update Available' dialog (#15280)
|
||||
* maint(resources): roll back builder_launch for trigger-release-builds.sh (#15316)
|
||||
|
||||
## 19.0.170 alpha 2025-12-03
|
||||
|
||||
* chore(deps-dev): bump js-yaml from 4.1.0 to 4.1.1 in /resources/build/pr-build-status (#15173)
|
||||
* chore(deps-dev): bump glob from 10.4.5 to 10.5.0 in /resources/build/pr-build-status (#15184)
|
||||
* chore(deps): bump js-yaml and @microsoft/api-documenter (#15185)
|
||||
* chore(deps): bump glob from 10.4.5 to 10.5.0 in /developer/src/server/src/win32/trayicon/addon-src (#15186)
|
||||
* docs(developer): add/update API docs (#15275)
|
||||
|
||||
## 19.0.169 alpha 2025-12-02
|
||||
|
||||
* maint(core): verify that keyman_core_ldml.h is in sync (#15256)
|
||||
* chore(common): Update FirstVoices keyboard versions in keyboards.csv (#15261)
|
||||
|
||||
## 19.0.168 alpha 2025-12-01
|
||||
|
||||
* chore(android): add intent to broadcast font name (#15193)
|
||||
* docs(android): Document Keyman API for keyboard font change (#15247)
|
||||
* docs(ios): Use /cdn/dev assets for Engine guides (#15253)
|
||||
* fix(developer): handle errors in .keyman-touch-layout file when loading (#15243)
|
||||
* fix(android): address keyboard height vs touch height race after keyboard height preference change (also min max heights + docs) (#13663)
|
||||
|
||||
## 19.0.167 alpha 2025-11-28
|
||||
|
||||
* change(windows): add unit testing to keyman32 build (#15244)
|
||||
* refactor(windows): merge syskbdnt.cpp and syskbdnt64.cpp into RightAltEmulationCheck.cpp (#15245)
|
||||
* chore(windows): add wow64kbd support app for researching WOW64 reqs (#15246)
|
||||
|
||||
## 19.0.166 alpha 2025-11-26
|
||||
|
||||
* chore(android): Clarify PR title for #15136 (#15224)
|
||||
|
|
@ -1012,6 +1108,16 @@
|
|||
* refactor(windows): rename `TKeymanMutex.MutexOwned` to `TakeOwnership` and add `ReleaseOwnership` (#13168)
|
||||
* chore: increment to alpha 19.0 (#13187)
|
||||
|
||||
## 18.0.245 stable 2025-12-03
|
||||
|
||||
* chore(windows): VS2022 patch for stable-18.0 (#15081)
|
||||
* maint(resources): use VERSION_ENVIRONMENT var for v18 (#15068)
|
||||
* chore(linux): Update debian changelog (#14964)
|
||||
* fix(windows): add check a fix for registry datatypes (#15175)
|
||||
* chore(linux): Update debian changelog (#15132)
|
||||
* feat(windows): update wix to 3.14.1 (#15195)
|
||||
* fix(windows): reinstall low level keyboard hook if it gets removed (#15219)
|
||||
|
||||
## 18.0.244 stable 2025-10-31
|
||||
|
||||
* fix(linux): use `ibus` command to restart ibus (#14975)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
19.0.167
|
||||
19.0.184
|
||||
|
|
@ -35,6 +35,7 @@ import android.view.inputmethod.ExtractedText;
|
|||
import android.view.inputmethod.ExtractedTextRequest;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
import android.widget.FrameLayout;
|
||||
import android.content.Intent;
|
||||
|
||||
import io.sentry.android.core.SentryAndroid;
|
||||
import io.sentry.Sentry;
|
||||
|
|
@ -140,6 +141,22 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven
|
|||
KMManager.updateSelectionRange(KMManager.KeyboardType.KEYBOARD_TYPE_SYSTEM);
|
||||
}
|
||||
|
||||
private void sendCurrentFontName() {
|
||||
Keyboard keyboardInfo = KMManager.getCurrentKeyboardInfo(this);
|
||||
if (keyboardInfo != null) {
|
||||
String fontName = keyboardInfo.getFont();
|
||||
|
||||
Intent intent;
|
||||
if (BuildConfig.DEBUG) {
|
||||
intent = new Intent("com.tavultesoft.kmapro.debug.keyboard_changed");
|
||||
} else {
|
||||
intent = new Intent("com.tavultesoft.kmapro.keyboard_changed");
|
||||
}
|
||||
intent.putExtra("fontName", fontName);
|
||||
sendBroadcast(intent);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the main point where we do our initialization of the input method
|
||||
* to begin operating on an application. At this point we have been
|
||||
|
|
@ -198,6 +215,10 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven
|
|||
if (KMManager.isNumericField(inputType)) {
|
||||
KMManager.setNumericLayer(KeyboardType.KEYBOARD_TYPE_SYSTEM);
|
||||
}
|
||||
|
||||
if (KMManager.isKeyboardLoaded(KeyboardType.KEYBOARD_TYPE_SYSTEM)) {
|
||||
sendCurrentFontName();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -268,6 +289,7 @@ public class SystemKeyboard extends InputMethodService implements OnKeyboardEven
|
|||
// Refresh banner theme
|
||||
BannerController.setHTMLBanner(this, KeyboardType.KEYBOARD_TYPE_SYSTEM);
|
||||
KMManager.showSystemKeyboard();
|
||||
sendCurrentFontName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -22,32 +22,28 @@ import com.keyman.engine.BaseActivity;
|
|||
import com.keyman.engine.KMManager;
|
||||
|
||||
/**
|
||||
* Settings menu for adjusting the keyboard height. The value for the current device orientation
|
||||
* is saved in shared preferences.
|
||||
* Settings menu for adjusting the keyboard height.
|
||||
* The value for the current device orientation is saved via KMManager.
|
||||
*/
|
||||
public class AdjustKeyboardHeightActivity extends BaseActivity {
|
||||
private static final String TAG = "AdjustKbdHeight";
|
||||
public static final String adjustKeyboardHeightKey = "AdjustKeyboardHeight";
|
||||
|
||||
private static Button resetButton = null;
|
||||
private static ImageView sampleKeyboard = null;
|
||||
|
||||
// Keeps track of the adjusted keyboard height for saving
|
||||
private static int currentHeight = 0;
|
||||
private static ViewGroup.LayoutParams layoutParams;
|
||||
private Button resetButton;
|
||||
private ImageView sampleKeyboard;
|
||||
private TextView percentageDisplay;
|
||||
private int currentHeight;
|
||||
private ViewGroup.LayoutParams layoutParams;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
final Context context = this;
|
||||
|
||||
setContentView(R.layout.activity_adjust_keyboard_height);
|
||||
|
||||
setupEdgeToEdge(R.id.adjust_keyboard_layout);
|
||||
setupStatusBarColors(R.color.keyman_blue, android.R.color.white);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.titlebar);
|
||||
Toolbar toolbar = findViewById(R.id.titlebar);
|
||||
setSupportActionBar(toolbar);
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
|
|
@ -60,75 +56,162 @@ public class AdjustKeyboardHeightActivity extends BaseActivity {
|
|||
actionBar.setBackgroundDrawable(new ColorDrawable(ContextCompat.getColor(this, R.color.keyman_blue)));
|
||||
}
|
||||
|
||||
TextView adjustKeyboardHeightActivityTitle = (TextView) findViewById(R.id.bar_title);
|
||||
|
||||
String titleStr = getString(R.string.adjust_keyboard_height);
|
||||
TextView adjustKeyboardHeightActivityTitle = findViewById(R.id.bar_title);
|
||||
adjustKeyboardHeightActivityTitle.setTextColor(ContextCompat.getColor(this, R.color.ms_white));
|
||||
adjustKeyboardHeightActivityTitle.setText(titleStr);
|
||||
adjustKeyboardHeightActivityTitle.setText(getString(R.string.adjust_keyboard_height));
|
||||
|
||||
sampleKeyboard = findViewById(R.id.sample_keyboard);
|
||||
percentageDisplay = findViewById(R.id.keyboard_height_percentage);
|
||||
View resizeHandle = findViewById(R.id.resize_handle);
|
||||
|
||||
sampleKeyboard = (ImageView) findViewById(R.id.sample_keyboard);
|
||||
layoutParams = sampleKeyboard.getLayoutParams();
|
||||
currentHeight = KMManager.getKeyboardHeight(context);
|
||||
refreshSampleKeyboard(context);
|
||||
currentHeight = KMManager.getKeyboardHeight(this);
|
||||
refreshSampleKeyboard();
|
||||
|
||||
resetButton = (Button) findViewById(R.id.reset_to_defaults);
|
||||
resetButton.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
// Clear the keyboard height preferences to reset
|
||||
KMManager.applyKeyboardHeight(context, KMManager.KeyboardHeight_Reset);
|
||||
|
||||
// Restore default height
|
||||
currentHeight = KMManager.getKeyboardHeight(context);
|
||||
refreshSampleKeyboard(context);
|
||||
}
|
||||
resetButton = findViewById(R.id.reset_to_defaults);
|
||||
resetButton.setOnClickListener(v -> {
|
||||
KMManager.applyKeyboardHeight(this, KMManager.KeyboardHeight_Reset);
|
||||
currentHeight = KMManager.getKeyboardHeight(this);
|
||||
refreshSampleKeyboard();
|
||||
});
|
||||
|
||||
sampleKeyboard.setOnTouchListener(new View.OnTouchListener() {
|
||||
@Override
|
||||
public boolean onTouch(View view, MotionEvent event) {
|
||||
int y = (int)event.getY();
|
||||
|
||||
switch(event.getAction()) {
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
// Update currentHeight as the user drags (moves)
|
||||
// Increasing the keyboard height is a negative y
|
||||
currentHeight -= y;
|
||||
|
||||
// Apply lower and upper bounds on currentHeight
|
||||
int defaultHeight = (int) context.getResources().getDimension(R.dimen.keyboard_height);
|
||||
currentHeight = Math.max(defaultHeight/2, currentHeight);
|
||||
currentHeight = Math.min(defaultHeight*2, currentHeight);
|
||||
|
||||
refreshSampleKeyboard(context);
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
// Save the currentHeight when the user releases
|
||||
KMManager.applyKeyboardHeight(context, currentHeight);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
View.OnTouchListener touchListener = (view, event) -> {
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
view.setPressed(true);
|
||||
break;
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
int[] location = new int[2];
|
||||
sampleKeyboard.getLocationOnScreen(location);
|
||||
int viewBottom = location[1] + sampleKeyboard.getHeight();
|
||||
int touchY = (int) event.getRawY();
|
||||
currentHeight = calculateKeyboardHeightFromTouch(touchY, viewBottom);
|
||||
refreshSampleKeyboard();
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
view.setPressed(false);
|
||||
KMManager.applyKeyboardHeight(this, currentHeight);
|
||||
break;
|
||||
}
|
||||
});
|
||||
return true;
|
||||
};
|
||||
|
||||
resizeHandle.setOnTouchListener(touchListener);
|
||||
sampleKeyboard.setOnTouchListener(touchListener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh the layout for the sample keyboard
|
||||
* @param context
|
||||
* Refresh the layout for the sample keyboard and update percentage display.
|
||||
*/
|
||||
private void refreshSampleKeyboard(Context context) {
|
||||
layoutParams.height = currentHeight;
|
||||
sampleKeyboard.setLayoutParams(layoutParams);
|
||||
private void refreshSampleKeyboard() {
|
||||
if (layoutParams != null && sampleKeyboard != null) {
|
||||
layoutParams.height = currentHeight;
|
||||
sampleKeyboard.requestLayout();
|
||||
|
||||
if (percentageDisplay != null) {
|
||||
percentageDisplay.setText(createLiveKeyboardHeightString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate percentage from height and default height.
|
||||
* @param height Current height
|
||||
* @param defaultHeight Default height
|
||||
* @return Percentage rounded to nearest integer
|
||||
*/
|
||||
private static int calculatePercentage(int height, int defaultHeight) {
|
||||
if (defaultHeight == 0 || height == 0) {
|
||||
return 100;
|
||||
}
|
||||
return (int) Math.round((double) height / defaultHeight * 100);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a string showing the keyboard height as percentages for both orientations.
|
||||
* @param context Context
|
||||
* @return String in format "100% Portrait | 100% Landscape"
|
||||
*/
|
||||
public static String createKeyboardHeightString(Context context) {
|
||||
int portraitHeight = KMManager.getKeyboardHeight(context, Configuration.ORIENTATION_PORTRAIT);
|
||||
int landscapeHeight = KMManager.getKeyboardHeight(context, Configuration.ORIENTATION_LANDSCAPE);
|
||||
|
||||
int portraitDefault = KMManager.getDefaultKeyboardHeight(Configuration.ORIENTATION_PORTRAIT);
|
||||
int landscapeDefault = KMManager.getDefaultKeyboardHeight(Configuration.ORIENTATION_LANDSCAPE);
|
||||
|
||||
int portraitPercent = calculatePercentage(portraitHeight, portraitDefault);
|
||||
int landscapePercent = calculatePercentage(landscapeHeight, landscapeDefault);
|
||||
|
||||
return context.getString(R.string.keyboard_height_format, portraitPercent, landscapePercent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate keyboard height from touch Y coordinate and clamp
|
||||
* within min-max bounds.
|
||||
* @param touchY Touch Y coordinate in screen coordinates
|
||||
* @param viewBottom Bottom Y coordinate of keyboard view
|
||||
* @return Keyboard height in pixels, clamped to min/max bounds
|
||||
*/
|
||||
private int calculateKeyboardHeightFromTouch(int touchY, int viewBottom) {
|
||||
int height = viewBottom - touchY;
|
||||
int minKeyboardHeight = KMManager.getKeyboardHeightMin(this);
|
||||
int maxKeyboardHeight = KMManager.getKeyboardHeightMax(this);
|
||||
return Math.max(minKeyboardHeight, Math.min(maxKeyboardHeight, height));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a string showing keyboard height percentages for both orientations,
|
||||
* using the current (unsaved) height for the active orientation.
|
||||
* @return String in format "100% Portrait | 100% Landscape"
|
||||
*/
|
||||
private String createLiveKeyboardHeightString() {
|
||||
int currentOrientation = KMManager.getOrientation(this);
|
||||
|
||||
int portraitDefault = KMManager.getDefaultKeyboardHeight(Configuration.ORIENTATION_PORTRAIT);
|
||||
int landscapeDefault = KMManager.getDefaultKeyboardHeight(Configuration.ORIENTATION_LANDSCAPE);
|
||||
|
||||
int portraitHeight;
|
||||
int landscapeHeight;
|
||||
if (currentOrientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
portraitHeight = currentHeight;
|
||||
landscapeHeight = KMManager.getKeyboardHeight(this, Configuration.ORIENTATION_LANDSCAPE);
|
||||
} else {
|
||||
landscapeHeight = currentHeight;
|
||||
portraitHeight = KMManager.getKeyboardHeight(this, Configuration.ORIENTATION_PORTRAIT);
|
||||
}
|
||||
|
||||
int portraitPercent = calculatePercentage(portraitHeight, portraitDefault);
|
||||
int landscapePercent = calculatePercentage(landscapeHeight, landscapeDefault);
|
||||
|
||||
return getString(R.string.keyboard_height_format, portraitPercent, landscapePercent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
// Ensure height is saved even if user switches tasks or navigates away abnormally
|
||||
// This prevents the touch zone from being out of sync with the keyboard visual
|
||||
if (currentHeight > 0) {
|
||||
KMManager.applyKeyboardHeight(this, currentHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
|
||||
// IMPORTANT: Apply current height BEFORE switching orientations
|
||||
// This ensures the old orientation's height is saved before loading the new one
|
||||
if (currentHeight > 0) {
|
||||
KMManager.applyKeyboardHeight(this, currentHeight);
|
||||
}
|
||||
|
||||
layoutParams = sampleKeyboard.getLayoutParams();
|
||||
|
||||
// When the user rotates the device, restore currentHeight
|
||||
// When the user rotates the device, restore currentHeight for the new orientation
|
||||
currentHeight = KMManager.getKeyboardHeight(this);
|
||||
refreshSampleKeyboard(this);
|
||||
refreshSampleKeyboard();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ public class KeymanSettingsFragment extends PreferenceFragmentCompat {
|
|||
adjustKeyboardHeight.setKey(AdjustKeyboardHeightActivity.adjustKeyboardHeightKey);
|
||||
adjustKeyboardHeight.setTitle(getString(R.string.adjust_keyboard_height));
|
||||
adjustKeyboardHeight.setWidgetLayoutResource(R.layout.preference_height_icon_layout);
|
||||
adjustKeyboardHeight.setSummary(AdjustKeyboardHeightActivity.createKeyboardHeightString(context));
|
||||
Intent adjustKeyboardHeightIntent = new Intent(context, AdjustKeyboardHeightActivity.class);
|
||||
adjustKeyboardHeight.setIntent(adjustKeyboardHeightIntent);
|
||||
|
||||
|
|
@ -268,5 +269,7 @@ public class KeymanSettingsFragment extends PreferenceFragmentCompat {
|
|||
|
||||
// Update the language / keyboard count when we return to this menu from deeper levels.
|
||||
languagesPreference.setTitle(getInstalledLanguagesText());
|
||||
|
||||
adjustKeyboardHeight.setSummary(AdjustKeyboardHeightActivity.createKeyboardHeightString(context));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="16dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/ms_white"
|
||||
android:pathData="M12,20 L4,8 L20,8 Z" />
|
||||
</vector>
|
||||
10
android/KMAPro/kMAPro/src/main/res/drawable/ic_arrow_up.xml
Normal file
10
android/KMAPro/kMAPro/src/main/res/drawable/ic_arrow_up.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="16dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/ms_white"
|
||||
android:pathData="M12,4 L4,16 L20,16 Z" />
|
||||
</vector>
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Resize handle bar background with grip lines -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Base background with Keyman blue -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/keyman_blue" />
|
||||
<corners
|
||||
android:topLeftRadius="8dp"
|
||||
android:topRightRadius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- Grip indicator - three horizontal lines -->
|
||||
<item
|
||||
android:gravity="center"
|
||||
android:top="12dp"
|
||||
android:bottom="12dp">
|
||||
<layer-list>
|
||||
<item android:top="0dp" android:bottom="10dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/ms_white" />
|
||||
<corners android:radius="1dp" />
|
||||
<size android:width="40dp" android:height="3dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:top="6dp" android:bottom="6dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/ms_white" />
|
||||
<corners android:radius="1dp" />
|
||||
<size android:width="40dp" android:height="3dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:top="10dp" android:bottom="0dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/ms_white" />
|
||||
<corners android:radius="1dp" />
|
||||
<size android:width="40dp" android:height="3dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Resize handle bar with grip lines and touch feedback -->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Pressed state - solid darker background -->
|
||||
<item android:state_pressed="true">
|
||||
<layer-list>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#0E5196" />
|
||||
<corners
|
||||
android:topLeftRadius="8dp"
|
||||
android:topRightRadius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:width="40dp"
|
||||
android:height="4dp"
|
||||
android:gravity="center">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/ms_white" />
|
||||
<corners android:radius="2dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
</item>
|
||||
|
||||
<!-- Default state - gradient background with grip lines -->
|
||||
<item android:drawable="@drawable/resize_handle_background" />
|
||||
</selector>
|
||||
|
|
@ -10,32 +10,22 @@
|
|||
<include layout="@layout/titlebar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/drag_the_keyboard"
|
||||
android:id="@+id/adjust_instructions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/titlebar"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||
android:text="@string/drag_the_keyboard"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/adjust_keyboard_instructions"
|
||||
android:textSize="@dimen/adjust_keyboard_height_label_textsize"
|
||||
app:layout_constraintTop_toBottomOf="@id/titlebar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rotate_the_device"
|
||||
android:layout_below="@id/drag_the_keyboard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||
android:text="@string/rotate_the_device"
|
||||
android:textSize="@dimen/adjust_keyboard_height_label_textsize"
|
||||
app:layout_constraintTop_toBottomOf="@id/drag_the_keyboard" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/button_layout"
|
||||
android:orientation="horizontal"
|
||||
android:layout_below="@id/rotate_the_device"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/rotate_the_device">
|
||||
app:layout_constraintTop_toBottomOf="@id/adjust_instructions">
|
||||
|
||||
<Button
|
||||
android:id="@+id/reset_to_defaults"
|
||||
|
|
@ -57,6 +47,70 @@
|
|||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- Percentage Display -->
|
||||
<TextView
|
||||
android:id="@+id/keyboard_height_percentage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="100% Portrait | 100% Landscape"
|
||||
app:layout_constraintTop_toBottomOf="@id/button_layout"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Grabbable Resize Handle Bar -->
|
||||
<LinearLayout
|
||||
android:id="@+id/resize_handle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/resize_handle_bar"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:contentDescription="@string/adjust_keyboard_instructions"
|
||||
app:layout_constraintBottom_toTopOf="@id/sample_keyboard"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<!-- Up arrow on left -->
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:src="@drawable/ic_arrow_up"
|
||||
android:contentDescription="Resize up" />
|
||||
|
||||
<!-- Spacer to center -->
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- Center grip lines (visual from background drawable) -->
|
||||
<View
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- Spacer to right -->
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- Down arrow on right -->
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_arrow_down"
|
||||
android:contentDescription="Resize down" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Resizable keyboard "image -->
|
||||
<ImageView
|
||||
android:id="@+id/sample_keyboard"
|
||||
|
|
@ -65,15 +119,7 @@
|
|||
android:contentDescription="@string/adjust_keyboard_height"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/blank_osk"
|
||||
android:background="@drawable/dash_border"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:paddingStart="@dimen/blank_osk_padding"
|
||||
android:paddingEnd="@dimen/blank_osk_padding"
|
||||
android:paddingTop="@dimen/blank_osk_padding"
|
||||
android:paddingBottom="@dimen/blank_osk_padding"
|
||||
app:layout_constraintTop_toBottomOf="@id/button_layout"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintVertical_bias="1.0" />
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -116,9 +116,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">ሁሉም ቋንቋዎች ቀደም ሲል ተጭኗል</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">የፊደል ገበታ ሰሌዳውን በመጎተት ቁመቱን አስተካክል</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">ዲቫይሱን በማሽከርከር ፖርትሬቱንና ላንድስኬፑን አስተካክል</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">የፊደል ገበታ ሰሌዳውን በመጎተት ቁመቱን አስተካክል ዲቫይሱን በማሽከርከር ፖርትሬቱንና ላንድስኬፑን አስተካክል</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">ወደ ቀደመው ሴቲንግ መልስ</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -122,9 +122,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">كل اللغات مثبتة مسبقا</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">اسحب لوحة المفاتيح لتغيير مدى ارتفاعها</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">دور الجهاز لضبط الوضع العمودي والوضع الأفقي</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">اسحب لوحة المفاتيح لتغيير مدى ارتفاعها. دور الجهاز لضبط الوضع العمودي والوضع الأفقي.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">إعادة ضبط الافتراضيات</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -114,9 +114,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Bütün dillər artıq quraşdırılıb</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Hündürlüyünün ölcüsü tənzimləmək üçün klaviaturanı dartın</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Portret və landşaft tənzimləmək üçün cihazı çevirin</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Hündürlüyünün ölcüsü tənzimləmək üçün klaviaturanı dartın. Portret və landşaft tənzimləmək üçün cihazı çevirin.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">İlkin vəziyyətinə qaytar</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -120,9 +120,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Ὅλες οἱ γλῶσσες ἔχουν ἤδη ἐγκατασταθεῖ</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Σύρετε τὸ πληκτρολόγιο γιὰ νὰ ἀλλάξετε τὸ ὕψος του</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Περιστρέψτε τὴν συσκευὴ γιὰ προσαρμογὴ τοῦ ὕψους σὲ λειτουργία πορτραίτου καὶ τοπίου</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Σύρετε τὸ πληκτρολόγιο γιὰ νὰ ἀλλάξετε τὸ ὕψος του. Περιστρέψτε τὴν συσκευὴ γιὰ προσαρμογὴ τοῦ ὕψους σὲ λειτουργία πορτραίτου καὶ τοπίου.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Ἐπαναφέρετε τὶς προεπιλεγμένες ρυθμίσεις</string>
|
||||
<!-- Context: Adjust Longpress Delay Time menu -->
|
||||
|
|
|
|||
|
|
@ -120,9 +120,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Ya están instalados todos los idiomas</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Arrastra el teclado para ajustar la altura</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Rota el dispositivo para ajustar el modo vertical y horizontal</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Arrastra el teclado para ajustar la altura. Rota el dispositivo para ajustar el modo vertical y horizontal.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Restaurar valores predeterminados</string>
|
||||
<!-- Context: Adjust Longpress Delay Time menu -->
|
||||
|
|
|
|||
|
|
@ -117,9 +117,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Luggat chatta dakhalo</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Ajubdal keyboard ley badalan tula</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Barrumal shu\'ul ley badalan shaba binshaf</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Ajubdal keyboard ley badalan tula. Barrumal shu\'ul ley badalan shaba binshaf.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Eingalab ley shaba gabul</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -114,9 +114,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Hulfur mnyayeri natǝ mdǝku kurtǝ ka hara instal ɗa</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Ndǝkǝr keyboard kamnyar jaktǝ wala kǝmta saɓǝlkur ni</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Shinar waya wala hansetu ni kamnyar katsa nzi thlat-thlata wala peri-periari</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Ndǝkǝr keyboard kamnyar jaktǝ wala kǝmta saɓǝlkur ni. Shinar waya wala hansetu ni kamnyar katsa nzi thlat-thlata wala peri-periari.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Kalaktǝni katsa ni tsu apa tǝ mdǝ nam ni</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -117,9 +117,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Shanga nyayere ndǝ kurtǝ vu tǝdar</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Ndǝrti kibod akuya ka gǝ kǝnta dzugamkurir ko saɓǝlkur su</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Mwari aka sǝr ʻya su akuyaka gǝ dzuguti njaiyir lanskep</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Ndǝrti kibod akuya ka gǝ kǝnta dzugamkurir ko saɓǝlkur su. Mwari aka sǝr ʻya su akuyaka gǝ dzuguti njaiyir lanskep.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Ɓǝla ʻyati tǝni apa Waci</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -122,9 +122,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Všechny jazyky jsou již nainstalovány</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Přetažením klávesnice změníte výšku</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Otočit zařízení pro nastavení na výšku a na šířku</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Přetažením klávesnice změníte výšku. Otočit zařízení pro nastavení na výšku a na šířku.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Obnovit výchozí nastavení</string>
|
||||
<!-- Context: Adjust Longpress Delay Time menu -->
|
||||
|
|
|
|||
|
|
@ -118,9 +118,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Alle Sprachen bereits installiert</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Ziehen Sie die Tastatur, um die Höhe zu ändern</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Drehen Sie das Gerät um Hoch- und Querformat anzupassen</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Ziehen Sie die Tastatur, um die Höhe zu ändern. Drehen Sie das Gerät um Hoch- und Querformat anzupassen.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Einstellungen auf Standard zurücksetzen</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -120,9 +120,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Todos los idiomas ya están instalados</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Mueve el teclado para reajustar la altura</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Rotar el dispositivo para ajustar a modo vertical u horizontal</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Mueve el teclado para reajustar la altura. Rotar el dispositivo para ajustar a modo vertical u horizontal.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Restablecer valores predeterminados</string>
|
||||
<!-- Context: Adjust Longpress Delay Time menu -->
|
||||
|
|
|
|||
|
|
@ -114,9 +114,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Ɗemngal man fuu arti wa`inni</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Dasa kibod man ngam de`itina juutugo</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Waylutu na`ura man ngam a` de`itina dow bee les</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Dasa kibod man ngam de`itina juutugo. Waylutu na`ura man ngam a` de`itina dow bee les.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Lornu ɗum ko naftirta tum</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -115,9 +115,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Ɗemɗe fof aafaama kisa</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Daas tappirde ndee ngam waylude tooweendi</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Yiiltu kaɓirgol ngol ngam fotndude naddaro e leddaro</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Daas tappirde ndee ngam waylude tooweendi. Yiiltu kaɓirgol ngol ngam fotndude naddaro e leddaro.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Artir e Goowaaɗe</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -118,9 +118,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Toutes les langues de cet ensemble sont déjà installées</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Faites glisser le clavier pour redimensionner la hauteur</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Faire pivoter l\'appareil pour ajuster le portrait et le paysage</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Faites glisser le clavier pour redimensionner la hauteur. Faire pivoter l\'appareil pour ajuster le portrait et le paysage.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Réinitialiser aux valeurs par défaut</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -114,9 +114,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">An riga da an shigar da dukkanin yarukan</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Danne madanni domin sake girman</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Juya na\'urar domin daidaita hoto da gyara shi</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Danne madanni domin sake girman. Juya na\'urar domin daidaita hoto da gyara shi.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Gyara saiti zuwa yadda ya dace</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -115,9 +115,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Sma gwaɗaha luwunda falo</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">An tiɗat keyboard ka virata mbakat fiwuku</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Awava tina ngana ka gulat foto nda plavant bugo</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">An tiɗat keyboard ka virata mbakat fiwuku. Awava tina ngana ka gulat foto nda plavant bugo.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Virata magat ina kol ɗughwana</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -113,9 +113,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Semua bahasa telah terpasang</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Drag the keyboard to resize the height</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Rotate the device to adjust portrait and landscape</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Drag the keyboard to resize the height. Rotate the device to adjust portrait and landscape.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Reset to Defaults</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -120,9 +120,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Tutte le lingue già installate</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Trascina la tastiera per ridimensionare l\'altezza</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Ruota il dispositivo per regolare verticale e orizzontale</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Trascina la tastiera per ridimensionare l\'altezza. Ruota il dispositivo per regolare verticale e orizzontale.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Ripristina impostazioni predefinite</string>
|
||||
<!-- Context: Adjust Longpress Delay Time menu -->
|
||||
|
|
|
|||
|
|
@ -119,9 +119,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">ភាសាទាំងអស់ដែលបានដំឡើងហើយ</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">ទាញក្ដារចុចដើម្បីកែកម្ពស់</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">បង្វិលឧបករណ៍ដើម្បីកែបញ្ឈ និងផ្ដេក</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">ទាញក្ដារចុចដើម្បីកែកម្ពស់ បង្វិលឧបករណ៍ដើម្បីកែបញ្ឈ និងផ្ដេក</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">ប្ដូរកំណត់ទៅលំនាំដើម</string>
|
||||
<!-- Context: Adjust Longpress Delay Time menu -->
|
||||
|
|
|
|||
|
|
@ -118,9 +118,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">ಎಲ್ಲಾ ಭಾಷೆಗಳನ್ನು ಈಗಾಗಲೇ ಸ್ಥಾಪಿಸಲಾಗಿದೆ</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">ಎತ್ತರವನ್ನು ಬದಲಾಯಿಸಲು ಕೀಲಿಮಣೆಯನ್ನು ಎಳೆಯಿರಿ</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">ಪೋರ್ಟ್ರೇಟ್ ಮತ್ತು ಲ್ಯಾಂಡ್ಸ್ಕೇಪ್ ಹೊಂದಿಸಲು ಸಾಧನವನ್ನು ತಿರುಗಿಸಿ</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">ಎತ್ತರವನ್ನು ಬದಲಾಯಿಸಲು ಕೀಲಿಮಣೆಯನ್ನು ಎಳೆಯಿರಿ. ಪೋರ್ಟ್ರೇಟ್ ಮತ್ತು ಲ್ಯಾಂಡ್ಸ್ಕೇಪ್ ಹೊಂದಿಸಲು ಸಾಧನವನ್ನು ತಿರುಗಿಸಿ.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">ಡೀಫಾಲ್ಟ್ ಮರುಹೊಂದಿಸಿ</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -114,9 +114,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Tǝlam samma ikke</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Keyboard dǝ girne datǝnzǝ dǝ fulutǝ ro</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Device dǝ suwarne daatanzǝ daata dǝa kuru baatanzǝ dǝa</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Keyboard dǝ girne datǝnzǝ dǝ fulutǝ ro. Device dǝ suwarne daatanzǝ daata dǝa kuru baatanzǝ dǝa.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Bǝlin sarro waltǝne setinne</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -114,9 +114,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Baɗumma naraha na an fa amikwa ŋanna</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Piya keyboard gé fare tsa ne adaliya</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Mbeɗanahe nja nawura ŋanna gé portrait antara landscape</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Piya keyboard gé fare tsa ne adaliya. Mbeɗanahe nja nawura ŋanna gé portrait antara landscape.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Reset to Defaults</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -120,9 +120,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">စုတ်ဘာသာသီုဖအိုတ်တုဲ</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">သ္ဂောံချိၚ်သမၠုၚ် ကဳဗုဒ်ဂှ် ဂြဲညိ</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">ဂွံချိၚ် လံက်သတိက် လံက်ဇမၠိၚ်ဂှ် ဗဂေတ်ကဵုစက်ပိုဲညိ။</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">သ္ဂောံချိၚ်သမၠုၚ် ကဳဗုဒ်ဂှ် ဂြဲညိ ဂွံချိၚ် လံက်သတိက် လံက်ဇမၠိၚ်ဂှ် ဗဂေတ်ကဵုစက်ပိုဲညိ။</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">ကလေၚ်သ္ပနူပကတိ</string>
|
||||
<!-- Context: Adjust Longpress Delay Time menu -->
|
||||
|
|
|
|||
|
|
@ -114,9 +114,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Ca ŋya yer kuku du mji akuya installed</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Cina keyboard gadibar ngilaba dzigamkur ari</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Shina su ari ga ngilaba dzigamkur baɗa ŋga ari</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Cina keyboard gadibar ngilaba dzigamkur ari. Shina su ari ga ngilaba dzigamkur baɗa ŋga ari.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Iri ga munagu alu lagu ginda nur dang</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -114,9 +114,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Alle talen zijn al geïnstalleerd</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Sleep het toetsenbord om de hoogte aan te passen</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Draai het apparaat om portret en liggend aan te passen</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Sleep het toetsenbord om de hoogte aan te passen. Draai het apparaat om portret en liggend aan te passen.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Standaardinstellingen herstellen</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -116,9 +116,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Wszystkie języki są już zainstalowane</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Przeciągnij klawiaturę, aby zmienić wysokość</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Obróć urządzenie, aby dostosować pionowo i poziomo</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Przeciągnij klawiaturę, aby zmienić wysokość. Obróć urządzenie, aby dostosować pionowo i poziomo.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Przywróć domyślne</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@
|
|||
<string name="action_install_updates" comment="Menu notification that keyboard or dictionary updates available">Instalar Atualizações</string>
|
||||
<!-- Context: Title -->
|
||||
<string name="title_version" comment="Title of Keyman for Android version">Versão: %1$s</string>
|
||||
<!-- Context: Text label when old Chrome version installed -->
|
||||
<!-- Context: Text label when old Chrome version installed. Label replaced in Keyman 19.0 -->
|
||||
<string name="text_require_chrome_57" comment="Banner text when old version of Chrome is installed"> O Keyman requer a versão 57 ou mais recente.</string>
|
||||
<string name="text_require_chrome_version" comment="Banner text when old version of Chrome is installed"> Keyman requires Chrome version %1$s or newer.</string>
|
||||
<!-- Context: Button label -->
|
||||
<string name="button_update_chrome" comment="Prompt to upgrade Chrome in the Play Store">Atualizar Chrome</string>
|
||||
<!-- Context: Textfield prompt (… is the ellipsis character "...") -->
|
||||
|
|
@ -87,6 +88,10 @@
|
|||
<string name="spacebar_caption_hint_language_keyboard" comment="Spacebar caption hint - language + keyboard">Idioma e teclado na barra de espaço</string>
|
||||
<!-- Context: Keyman Settings menu / Spacebar caption hint -->
|
||||
<string name="spacebar_caption_hint_blank" comment="Spacebar caption hint - blank">Não mostrar legenda na barra de espaço</string>
|
||||
<!-- Context: Keyman Settings menu / Show OSK with Physical Keyboard -->
|
||||
<string name="show_osk" comment="show OSK when physical keyboard is connected">Show On-Screen Keyboard</string>
|
||||
<!-- Context: Keyman Settings menu / Show OSK with Physical Keyboard hint -->
|
||||
<string name="show_osk_hint" comment="When physical keyboard is connected">When physical keyboard is connected</string>
|
||||
<!-- Context: Keyman Settings menu / Haptic feedback -->
|
||||
<string name="haptic_feedback" comment="haptic feedback on key press">Vibrar ao tocar</string>
|
||||
<!-- Context: Keyman Settings menu. Removed in Keyman 18 -->
|
||||
|
|
@ -120,11 +125,11 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Todos os idiomas já instalados</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Arraste o teclado para redimensionar a altura</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Gire o dispositivo para ajustar o retrato e a paisagem</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Drag the keyboard to resize the height. Rotate the device to adjust portrait and landscape.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Restaurar padrões</string>
|
||||
<!-- Context: Keyboard height display format. %1$d = portrait percentage, %2$d = landscape percentage -->
|
||||
<string name="keyboard_height_format" comment="Format for displaying keyboard height percentages">%1$d%% Portrait | %2$d%% Landscape</string>
|
||||
<!-- Context: Adjust Longpress Delay Time menu -->
|
||||
<string name="longpress_delay_time" comment="Current longpress delay time (seconds)">Tempo de atraso: %1$.1f segundos</string>
|
||||
<!-- Context: Adjust Longpress Delay Time menu -->
|
||||
|
|
|
|||
|
|
@ -117,9 +117,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Все языки уже установлены</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Перетащите клавиатуру для изменения высоты</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Повернуть устройство для настройки портрета и ландшафта</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Перетащите клавиатуру для изменения высоты. Повернуть устройство для настройки портрета и ландшафта.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Сброс по умолчанию</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -115,9 +115,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Alla språk är redan installerade</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Dra tangentbordet för att ändra storlek på höjden</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Rotera enheten för att justera stående och liggande</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Dra tangentbordet för att ändra storlek på höjden. Rotera enheten för att justera stående och liggande.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Återställ till standard</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -117,9 +117,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Всі мови вже встановлені</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Перетягніть клавіатуру, щоб змінити розмір висоти</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Поверніть пристрій, щоб змінити портретну та альбомну орієнтацію</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Перетягніть клавіатуру, щоб змінити розмір висоти. Поверніть пристрій, щоб змінити портретну та альбомну орієнтацію.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Відновити параметри за замовчуванням</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -119,9 +119,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">Tất cả ngôn ngữ đã được cài đặt rồi</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Kéo bàn phím để điều chỉnh độ cao</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Xoay thiết bị để điều chỉnh độ ngang độ dọc</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Kéo bàn phím để điều chỉnh độ cao. Xoay thiết bị để điều chỉnh độ ngang độ dọc.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Khôi phục mặc định</string>
|
||||
<!-- Context: Adjust Longpress Delay Time menu -->
|
||||
|
|
|
|||
|
|
@ -115,9 +115,7 @@
|
|||
<!-- Context: Select Package and Select Languages menu -->
|
||||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">所有语言已被安装</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">拖动键盘以调整高度</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">旋转设备以调整横竖屏模式</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">拖动键盘以调整高度. 旋转设备以调整横竖屏模式.</string>
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">重置为默认值</string>
|
||||
<!-- Context: Keyman Web Browser -->
|
||||
|
|
|
|||
|
|
@ -201,14 +201,14 @@
|
|||
<string name="all_languages_installed" comment="Text when all languages from a keyboard package have been installed">All languages already installed</string>
|
||||
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="drag_the_keyboard" comment="First line of adjusting keyboard height">Drag the keyboard to resize the height</string>
|
||||
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="rotate_the_device" comment="Second line of adjusting keyboard height">Rotate the device to adjust portrait and landscape</string>
|
||||
<string name="adjust_keyboard_instructions" comment="Instructions for adjusting keyboard height">Drag the keyboard to resize the height. Rotate the device to adjust portrait and landscape.</string>
|
||||
|
||||
<!-- Context: Adjust Keyboard Height menu -->
|
||||
<string name="reset_to_defaults" comment="Button to reset to default heights">Reset to Defaults</string>
|
||||
|
||||
<!-- Context: Keyboard height display format. %1$d = portrait percentage, %2$d = landscape percentage -->
|
||||
<string name="keyboard_height_format" comment="Format for displaying keyboard height percentages">%1$d%% Portrait | %2$d%% Landscape</string>
|
||||
|
||||
<!-- Context: Adjust Longpress Delay Time menu -->
|
||||
<string name="longpress_delay_time" comment="Current longpress delay time (seconds)">Delay Time: %1$.1f seconds</string>
|
||||
|
||||
|
|
|
|||
|
|
@ -453,10 +453,22 @@ final class KMKeyboard extends WebView {
|
|||
public void onResume() {
|
||||
DisplayMetrics dms = context.getResources().getDisplayMetrics();
|
||||
int kbWidth = (int) (dms.widthPixels / dms.density);
|
||||
|
||||
// Get the correct keyboard height for current orientation
|
||||
int kbHeight = KMManager.getKeyboardHeight(context);
|
||||
|
||||
// Check if there's a pending height update for this specific keyboard type and orientation
|
||||
int currentOrientation = KMManager.getOrientation(context);
|
||||
if (KMManager.getAndClearPendingHeightUpdate(this.keyboardType, currentOrientation)) {
|
||||
// There was a pending height update - force apply it now
|
||||
RelativeLayout.LayoutParams params = KMManager.getKeyboardLayoutParams();
|
||||
this.setLayoutParams(params);
|
||||
}
|
||||
|
||||
// Ensure window is loaded for javascript functions
|
||||
loadJavascript(KMString.format(
|
||||
"window.onload = function(){ setOskWidth(\"%d\");"+
|
||||
"setOskHeight(\"0\"); };", kbWidth));
|
||||
"setOskHeight(\"%d\"); };", kbWidth, kbHeight));
|
||||
if (this.getShouldShowHelpBubble()) {
|
||||
this.showHelpBubbleAfterDelay(2000);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -308,6 +308,12 @@ public final class KMManager {
|
|||
private static final String KMKey_KeyboardHeightPortrait = "keyboardHeightPortrait";
|
||||
private static final String KMKey_KeyboardHeightLandscape = "keyboardHeightLandscape";
|
||||
|
||||
// Preference keys for tracking pending keyboard height updates per keyboard type and orientation
|
||||
private static final String KMKey_PendingHeightUpdate_InappPortrait = "pendingHeightUpdate_inapp_portrait";
|
||||
private static final String KMKey_PendingHeightUpdate_InappLandscape = "pendingHeightUpdate_inapp_landscape";
|
||||
private static final String KMKey_PendingHeightUpdate_SystemPortrait = "pendingHeightUpdate_system_portrait";
|
||||
private static final String KMKey_PendingHeightUpdate_SystemLandscape = "pendingHeightUpdate_system_landscape";
|
||||
|
||||
public static final String KMKey_LongpressDelay = "longpressDelay";
|
||||
|
||||
public static final String KMKey_CustomHelpLink = "CustomHelpLink";
|
||||
|
|
@ -2415,12 +2421,11 @@ public final class KMManager {
|
|||
}
|
||||
height = defaultHeightForContext;
|
||||
} else {
|
||||
// Applying gating to 50%-200% of default height (following Keyman)
|
||||
if (height < (defaultHeightForContext / 2)) {
|
||||
height = (int) (defaultHeightForContext / 2);
|
||||
} else if (height > (defaultHeightForContext * 2)) {
|
||||
height = (int) (defaultHeightForContext * 2);
|
||||
}
|
||||
// Ensure keyboard height stay within min/max bounds
|
||||
int minKeyboardHeight = KMManager.getKeyboardHeightMin(context, orientation);
|
||||
int maxKeyboardHeight = KMManager.getKeyboardHeightMax(context, orientation);
|
||||
height = Math.max(minKeyboardHeight, height);
|
||||
height = Math.min(maxKeyboardHeight, height);
|
||||
|
||||
// Store the new height based on the current orientation
|
||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
|
|
@ -2437,16 +2442,22 @@ public final class KMManager {
|
|||
KeyboardHeight_Context_Portrait_Current = height;
|
||||
}
|
||||
editor.commit();
|
||||
|
||||
// Confirm new LayoutParams for in-app or system keyboards
|
||||
// If keyboard is not currently loaded, set a pending flag so height gets applied when keyboard loads
|
||||
if (isKeyboardLoaded(KeyboardType.KEYBOARD_TYPE_INAPP)) {
|
||||
InAppKeyboard.loadJavascript(KMString.format("setOskHeight('%s')", height));
|
||||
RelativeLayout.LayoutParams params = getKeyboardLayoutParams();
|
||||
InAppKeyboard.setLayoutParams(params);
|
||||
} else {
|
||||
setPendingHeightUpdate(KeyboardType.KEYBOARD_TYPE_INAPP, orientation);
|
||||
}
|
||||
if (isKeyboardLoaded(KeyboardType.KEYBOARD_TYPE_SYSTEM)) {
|
||||
SystemKeyboard.loadJavascript(KMString.format("setOskHeight('%s')", height));
|
||||
RelativeLayout.LayoutParams params = getKeyboardLayoutParams();
|
||||
SystemKeyboard.setLayoutParams(params);
|
||||
} else {
|
||||
setPendingHeightUpdate(KeyboardType.KEYBOARD_TYPE_SYSTEM, orientation);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2519,6 +2530,157 @@ public final class KMManager {
|
|||
return (resourceId > 0) ? context.getResources().getDimensionPixelSize(resourceId) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum allowed height of the keyboard frame for the current device orientation.
|
||||
* The maximum height is calculated as twice the default keyboard height for the orientation.
|
||||
* Use this method to get the upper bound for keyboard height adjustments.
|
||||
*
|
||||
* @param context The context.
|
||||
* @return The maximum allowed keyboard height in density-independent pixels (dp),
|
||||
* or {@link #KeyboardHeight_Reset} (0) if orientation is invalid.
|
||||
* @see #getKeyboardHeightMax(Context, int)
|
||||
* @see #getKeyboardHeightMin(Context)
|
||||
* @see #applyKeyboardHeight(Context, int)
|
||||
*/
|
||||
public static int getKeyboardHeightMax(Context context) {
|
||||
int orientation = getOrientation(context);
|
||||
return getKeyboardHeightMax(context, orientation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum allowed height of the keyboard frame for the specified orientation.
|
||||
* The maximum height is calculated as twice the default keyboard height for the orientation.
|
||||
* Use this method to get the upper bound for keyboard height adjustments.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param orientation The screen orientation: {@link Configuration#ORIENTATION_PORTRAIT}
|
||||
* or {@link Configuration#ORIENTATION_LANDSCAPE}.
|
||||
* @return The maximum allowed keyboard height in density-independent pixels (dp),
|
||||
* or {@link #KeyboardHeight_Reset} (0) if orientation is invalid.
|
||||
* @see #getKeyboardHeightMin(Context, int)
|
||||
* @see #applyKeyboardHeight(Context, int, int)
|
||||
*/
|
||||
public static int getKeyboardHeightMax(Context context, int orientation) {
|
||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
return (int) KMManager.KeyboardHeight_Context_Landscape_Default * 2;
|
||||
} else /* orientation == Configuration.ORIENTATION_PORTRAIT */ {
|
||||
return (int) KMManager.KeyboardHeight_Context_Portrait_Default * 2;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the minimum allowed height of the keyboard frame for the current device orientation.
|
||||
* The minimum height is calculated as half the default keyboard height for the orientation.
|
||||
* Use this method to get the lower bound for keyboard height adjustments.
|
||||
*
|
||||
* @param context The context.
|
||||
* @return The minimum allowed keyboard height in density-independent pixels (dp),
|
||||
* or {@link #KeyboardHeight_Reset} (0) if orientation is invalid.
|
||||
* @see #getKeyboardHeightMin(Context, int)
|
||||
* @see #getKeyboardHeightMax(Context)
|
||||
* @see #applyKeyboardHeight(Context, int)
|
||||
*/
|
||||
public static int getKeyboardHeightMin(Context context) {
|
||||
int orientation = getOrientation(context);
|
||||
return getKeyboardHeightMin(context, orientation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the minimum allowed height of the keyboard frame for the specified orientation.
|
||||
* The minimum height is calculated as half the default keyboard height for the orientation.
|
||||
* Use this method to get the lower bound for keyboard height adjustments.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param orientation The screen orientation: {@link Configuration#ORIENTATION_PORTRAIT}
|
||||
* or {@link Configuration#ORIENTATION_LANDSCAPE}.
|
||||
* @return The minimum allowed keyboard height in density-independent pixels (dp),
|
||||
* or {@link #KeyboardHeight_Reset} (0) if orientation is invalid.
|
||||
* @see #getKeyboardHeightMax(Context, int)
|
||||
* @see #applyKeyboardHeight(Context, int, int)
|
||||
*/
|
||||
public static int getKeyboardHeightMin(Context context, int orientation) {
|
||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
return (int) KMManager.KeyboardHeight_Context_Landscape_Default / 2;
|
||||
} else if (orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
return (int) KMManager.KeyboardHeight_Context_Portrait_Default / 2;
|
||||
} else {
|
||||
return KMManager.KeyboardHeight_Reset;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the preference key for tracking pending keyboard height updates.
|
||||
* This allows separate tracking for each keyboard type (in-app/system) and orientation.
|
||||
*
|
||||
* @param keyboardType The keyboard type: {@link KeyboardType#KEYBOARD_TYPE_INAPP}
|
||||
* or {@link KeyboardType#KEYBOARD_TYPE_SYSTEM}.
|
||||
* @param orientation The screen orientation: {@link Configuration#ORIENTATION_PORTRAIT}
|
||||
* or {@link Configuration#ORIENTATION_LANDSCAPE}.
|
||||
* @return The preference key string, or null if parameters are invalid.
|
||||
*/
|
||||
private static String getPendingHeightKey(KeyboardType keyboardType, int orientation) {
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
return KMKey_PendingHeightUpdate_InappPortrait;
|
||||
} else if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
return KMKey_PendingHeightUpdate_InappLandscape;
|
||||
}
|
||||
} else if (keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
return KMKey_PendingHeightUpdate_SystemPortrait;
|
||||
} else if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
return KMKey_PendingHeightUpdate_SystemLandscape;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a flag indicating that a keyboard height update is pending for the specified
|
||||
* keyboard type and orientation. This is used when the keyboard is not currently loaded,
|
||||
* so the height update will be applied when the keyboard loads.
|
||||
*
|
||||
* @param keyboardType The keyboard type: {@link KeyboardType#KEYBOARD_TYPE_INAPP}
|
||||
* or {@link KeyboardType#KEYBOARD_TYPE_SYSTEM}.
|
||||
* @param orientation The screen orientation: {@link Configuration#ORIENTATION_PORTRAIT}
|
||||
* or {@link Configuration#ORIENTATION_LANDSCAPE}.
|
||||
*/
|
||||
private static void setPendingHeightUpdate(KeyboardType keyboardType, int orientation) {
|
||||
String pendingKey = getPendingHeightKey(keyboardType, orientation);
|
||||
if (pendingKey == null) {
|
||||
return;
|
||||
}
|
||||
SharedPreferences prefs = appContext.getSharedPreferences(KMManager.KMEngine_PrefsKey, Context.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putBoolean(pendingKey, true);
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if there is a pending keyboard height update for the specified keyboard type
|
||||
* and orientation, and clears the flag if present.
|
||||
*
|
||||
* @param keyboardType The keyboard type: {@link KeyboardType#KEYBOARD_TYPE_INAPP}
|
||||
* or {@link KeyboardType#KEYBOARD_TYPE_SYSTEM}.
|
||||
* @param orientation The screen orientation: {@link Configuration#ORIENTATION_PORTRAIT}
|
||||
* or {@link Configuration#ORIENTATION_LANDSCAPE}.
|
||||
* @return true if there was a pending height update (which has been cleared), false otherwise.
|
||||
*/
|
||||
protected static boolean getAndClearPendingHeightUpdate(KeyboardType keyboardType, int orientation) {
|
||||
String pendingKey = getPendingHeightKey(keyboardType, orientation);
|
||||
if (pendingKey == null) {
|
||||
return false;
|
||||
}
|
||||
SharedPreferences prefs = appContext.getSharedPreferences(KMManager.KMEngine_PrefsKey, Context.MODE_PRIVATE);
|
||||
boolean hasPending = prefs.getBoolean(pendingKey, false);
|
||||
if (hasPending) {
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.remove(pendingKey);
|
||||
editor.commit();
|
||||
}
|
||||
return hasPending;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the size of the area the window would occupy.
|
||||
* API 30+
|
||||
|
|
|
|||
|
|
@ -82,6 +82,14 @@
|
|||
<string name="fatal_keyboard_error" comment="Fatal keyboard error (keyboard ID::packageID for language). Will load default keyboard"> Erro fatal de teclado com %1$s:%2$s para %3$s idioma. Carregando o teclado padrão.</string>
|
||||
<!-- Context: Fatal keyboard error. -->
|
||||
<string name="fatal_keyboard_error_short" comment="Error in keyboard (keyboard ID::packageID for language)."> Erro no teclado %1$s:%2$s para %3$s idioma.</string>
|
||||
<!-- Context: Alert Dialog body: System WebView not installed -->
|
||||
<string name="body_install_webview" comment="Notification when WebView not installed"> Keyman requer que o WebView seja instalado.\"</string>
|
||||
<!-- Context: Alert Dialog body: System WebView installed but not enabled -->
|
||||
<string name="body_enable_webview" comment="Notification when WebView installed but not enabled"> Keyman requer que o WebView seja ativado.\"</string>
|
||||
<!-- Context Button label: Install WebView -->
|
||||
<string name="label_install_webview" comment="Button label to install webview">Instalar WebView</string>
|
||||
<!-- Context Button label: Enable WebView -->
|
||||
<string name="label_enable_webview" comment="Button label to enable webview">Ativar WebView</string>
|
||||
<!-- Context: Query for associated dictionary -->
|
||||
<string name="query_associated_model" comment="Check if there's an available dictionary to download">Verificando o download do dicionário associado</string>
|
||||
<string name="cannot_query_associated_model" comment="Cannot reach server to check if there's an available dictionary to download">A ligação ao servidor do Keyman para verificar dicionários para descarregar falhou</string>
|
||||
|
|
@ -115,6 +123,8 @@
|
|||
<string name="failed_to_retrieve_file" comment="Failed to retrieve downloaded file">Falha ao recuperar o arquivo baixado</string>
|
||||
<!-- Context: General Updates -->
|
||||
<string name="update_check_unavailable" comment="Error message when a Keyman server can't be reached">Falha ao acessar o servidor!</string>
|
||||
<!-- Context: Update-check failure notification -->
|
||||
<string name="update_check_download_manager_disabled" comment="Notification that a system service needed for updates is disabled">Gerenciador de Downloads desativado - não é possível verificar atualizações</string>
|
||||
<!-- Context: General Updates -->
|
||||
<string name="update_check_current" comment="Notification that all resources are up to date">"Todos os recursos estão atualizados!"</string>
|
||||
<!-- Context: General Updates -->
|
||||
|
|
@ -138,10 +148,10 @@
|
|||
<!-- Context: Language Settings menu strings. Removed in Keyman 18 -->
|
||||
<string name="enable_predictions" comment="Enable predictions from the suggestion banner">Habilitar previsões</string>
|
||||
<!-- Context: Language Settings menu strings - radio buttons -->
|
||||
<string name="suggestions_radio_0" comment="Predictions and corrections disabled">Disable suggestions</string>
|
||||
<string name="suggestions_radio_1" comment="Suggestions Enabled: Predictions with no corrections">Predictions only</string>
|
||||
<string name="suggestions_radio_2" comment="Suggestions Enabled: Predictions with corrections">Predictions with corrections</string>
|
||||
<string name="suggestions_radio_3" comment="Suggestions Enabled: Predictions with auto-corrections">Predictions with auto-corrections</string>
|
||||
<string name="suggestions_radio_0" comment="Predictions and corrections disabled">Desativar sugestões</string>
|
||||
<string name="suggestions_radio_1" comment="Suggestions Enabled: Predictions with no corrections">Apenas previsões</string>
|
||||
<string name="suggestions_radio_2" comment="Suggestions Enabled: Predictions with corrections">Previsões com correções</string>
|
||||
<string name="suggestions_radio_3" comment="Suggestions Enabled: Predictions with auto-corrections">Previsões com correções automáticas</string>
|
||||
<!-- Context: Language Settings menu strings -->
|
||||
<string name="model_label">Dicionário</string>
|
||||
<plurals name="model_count">
|
||||
|
|
|
|||
23
android/docs/engine/KMAPro/index.md
Normal file
23
android/docs/engine/KMAPro/index.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
title: Keyman for Android APIs
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
The **`Keyman for Android`** app has the following APIs for integration:
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
The Keyman for Android app installs as an Input Method Extension. When selected as the active system keyboard, it provides the following APIs:
|
||||
|
||||
|
||||
## Intents
|
||||
|
||||
When the Keyman system keyboard changes the associated font name, the following Intent is broadcast so the integrating application can match the font:
|
||||
|
||||
```java
|
||||
intent = new Intent("com.tavultesoft.kmapro.keyboard_changed");
|
||||
intent.putExtra("fontName", fontName);
|
||||
sendBroadcast(intent);
|
||||
```
|
||||
|
|
@ -23,7 +23,7 @@ KMManager.applyKeyboardHeight(Context context, int height, int orientation)
|
|||
: The context
|
||||
|
||||
`height`
|
||||
: The height of the keyboard frame in *density-independent pixels (dp)*. Pass `KMManager.KeyboardHeight_Reset` to reset the keyboard height (for current orientation) to device-specific defaults.
|
||||
: The height of the keyboard frame in *density-independent pixels (dp)*. Pass `KMManager.KeyboardHeight_Reset` to reset the keyboard height (for the current orientation) to device-specific defaults.
|
||||
|
||||
`orientation` _(Optional)_
|
||||
: Accepts a [screen orientation](https://developer.android.com/training/multiscreen/screensizes#TaskUseOriQuali) value. This is most useful if you want to change the size of the keyboard in the other (non-current) orientation. If `orientation` is not defined, keyboard height is set for the current device orientation.
|
||||
|
|
@ -78,3 +78,5 @@ The following script illustrates the use of `applyKeyboardHeight()` to reset key
|
|||
|
||||
## See also
|
||||
* [getKeyboardHeight()](getKeyboardHeight)
|
||||
* [getKeyboardHeightMax()](getKeyboardHeightMax)
|
||||
* [getKeyboardHeightMin()](getKeyboardHeightMin)
|
||||
|
|
|
|||
|
|
@ -55,3 +55,5 @@ or
|
|||
## See also
|
||||
|
||||
- [applyKeyboardHeight()](applyKeyboardHeight)
|
||||
- [getKeyboardHeightMax](getKeyboardHeightMax)
|
||||
- [getKeyboardHeightMin](getKeyboardHeightMin)
|
||||
|
|
|
|||
57
android/docs/engine/KMManager/getKeyboardHeightMax.md
Normal file
57
android/docs/engine/KMManager/getKeyboardHeightMax.md
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
title: KMManager.getKeyboardHeightMax()
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
The **`getKeyboardHeightMax()`** method returns the maximum allowed height of the keyboard frame for this context.
|
||||
|
||||
## Syntax
|
||||
|
||||
``` javascript
|
||||
KMManager.getKeyboardHeightMax(Context context)
|
||||
```
|
||||
or
|
||||
``` javascript
|
||||
KMManager.getKeyboardHeightMax(Context context, int orientation)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
`context`
|
||||
: The context.
|
||||
|
||||
`orientation` _(Optional)_
|
||||
: Accepts a [screen orientation](https://developer.android.com/training/multiscreen/screensizes#TaskUseOriQuali) value. This is most useful if you want to get the size of the keyboard in the other (non-current) orientation. If `orientation` is not defined, maximum keyboard height is returned for the current device orientation.
|
||||
|
||||
### Returns
|
||||
|
||||
Returns the maximum allowed height of the keyboard frame in *density-independent pixels
|
||||
(dp)*.
|
||||
|
||||
## Description
|
||||
|
||||
Use this method to get the maximum allowed height of the keyboard frame.
|
||||
|
||||
## Examples
|
||||
|
||||
### Example: Using `getKeyboardHeightMax()`
|
||||
|
||||
The following script illustrate the use of `getKeyboardHeightMax()`:
|
||||
|
||||
``` javascript
|
||||
int maxKeyboardHeight = KMManager.getKeyboardHeightMax(this);
|
||||
```
|
||||
or
|
||||
```java
|
||||
import android.content.res.Configuration;
|
||||
...
|
||||
// Get the maximum allowed Keyman keyboard height for landscape mode.
|
||||
int maxKeyboardHeightLandscape = KMManager.getKeyboardHeightMax(this, Configuration.ORIENTATION_LANDSCAPE);
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [applyKeyboardHeight()](applyKeyboardHeight)
|
||||
- [getKeyboardHeight()](getKeyboardHeight)
|
||||
- [getKeyboardHeightMin()](getKeyboardHeightMin)
|
||||
57
android/docs/engine/KMManager/getKeyboardHeightMin.md
Normal file
57
android/docs/engine/KMManager/getKeyboardHeightMin.md
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
title: KMManager.getKeyboardHeightMin()
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
The **`getKeyboardHeightMin()`** method returns the minimum allowed height of the keyboard frame for this context.
|
||||
|
||||
## Syntax
|
||||
|
||||
``` javascript
|
||||
KMManager.getKeyboardHeightMin(Context context)
|
||||
```
|
||||
or
|
||||
``` javascript
|
||||
KMManager.getKeyboardHeightMin(Context context, int orientation)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
`context`
|
||||
: The context.
|
||||
|
||||
`orientation` _(Optional)_
|
||||
: Accepts a [screen orientation](https://developer.android.com/training/multiscreen/screensizes#TaskUseOriQuali) value. This is most useful if you want to get the size of the keyboard in the other (non-current) orientation. If `orientation` is not defined, minimum keyboard height is returned for the current device orientation.
|
||||
|
||||
### Returns
|
||||
|
||||
Returns the minimum allowed height of the keyboard frame in *density-independent pixels
|
||||
(dp)*.
|
||||
|
||||
## Description
|
||||
|
||||
Use this method to get the minimum allowed height of the keyboard frame.
|
||||
|
||||
## Examples
|
||||
|
||||
### Example: Using `getKeyboardHeightMin()`
|
||||
|
||||
The following script illustrate the use of `getKeyboardHeightMin()`:
|
||||
|
||||
``` javascript
|
||||
int minKeyboardHeight = KMManager.getKeyboardHeightMin(this);
|
||||
```
|
||||
or
|
||||
```java
|
||||
import android.content.res.Configuration;
|
||||
...
|
||||
// Get the minimum allowed Keyman keyboard height for landscape mode.
|
||||
int minKeyboardHeightLandscape = KMManager.getKeyboardHeightMin(this, Configuration.ORIENTATION_LANDSCAPE);
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [applyKeyboardHeight()](applyKeyboardHeight)
|
||||
- [getKeyboardHeight()](getKeyboardHeight)
|
||||
- [getKeyboardHeightMax()](getKeyboardHeightMax)
|
||||
|
|
@ -101,6 +101,12 @@ The KMManager is the core class which provides most of the methods and constants
|
|||
[`getKeyboardHeight()`](getKeyboardHeight)
|
||||
: returns the height of the keyboard frame
|
||||
|
||||
[`getKeyboardHeightMax()`](getKeyboardHeightMax)
|
||||
: returns the maximum allowed height of the keyboard frame
|
||||
|
||||
[`getKeyboardHeightMin()`](getKeyboardHeightMin)
|
||||
: returns the minimum allowed height of the keyboard frame
|
||||
|
||||
[`getKeyboardIndex()`](getKeyboardIndex)
|
||||
: returns index number of the specified keyboard in keyboards list
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,12 @@ see [What's New](whatsnew) for breaking changes</a>
|
|||
[KeyboardEventHandler](KeyboardEventHandler/)
|
||||
: Provides keyboard and lexical-model events and methods to notify registered listeners
|
||||
|
||||
[Keyman for Android app](KMAPro/)
|
||||
: Public APIs for integrating with the Keyman application
|
||||
|
||||
## See also
|
||||
|
||||
* [Keyman Engine for Android 18.0](/developer/engine/android/18.0/)
|
||||
* [Keyman Engine for Android 17.0](/developer/engine/android/17.0/)
|
||||
* [Keyman Engine for Android 16.0](/developer/engine/android/16.0/)
|
||||
* [Keyman Engine for Android 15.0](/developer/engine/android/15.0/)
|
||||
|
|
|
|||
|
|
@ -2,5 +2,7 @@
|
|||
title: What's New in Keyman Engine 19.0 for Android
|
||||
---
|
||||
|
||||
* Added API for broadcasting when Keyman system keyboard font changes (#15193)
|
||||
|
||||
## See Also
|
||||
* [Keyman Engine for Android Documentation](index)
|
||||
|
|
@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
|||
builder_describe \
|
||||
"Keyman common third party Delphi components" \
|
||||
clean configure build test reset \
|
||||
:cef4delphi :dcpcrypt :jwa :sentry
|
||||
:cef4delphi :dcpcrypt :jwa :sentry :tds2dbg
|
||||
|
||||
builder_parse "$@"
|
||||
builder_run_child_actions clean configure build test
|
||||
|
|
|
|||
|
|
@ -24,8 +24,10 @@ function do_test() {
|
|||
delphi_msbuild SentryClientTest.dproj "//p:Platform=Win32"
|
||||
delphi_msbuild SentryClientVclTest.dproj "//p:Platform=Win32"
|
||||
|
||||
do_map2pdb "$WIN32_TARGET_PATH/SentryClientTest.map" "$WIN32_TARGET"
|
||||
do_map2pdb "$WIN32_TARGET_PATH/SentryClientVclTest.map" "$WIN32_TARGET"
|
||||
sentrytool_delphiprep "$WIN32_TARGET_PATH/SentryClientTest.exe" -dpr SentryClientTest.dpr
|
||||
sentrytool_delphiprep "$WIN32_TARGET_PATH/SentryClientVclTest.exe" -dpr SentryClientVclTest.dpr
|
||||
tds2dbg "$WIN32_TARGET_PATH/SentryClientTest.exe"
|
||||
tds2dbg "$WIN32_TARGET_PATH/SentryClientVclTest.exe"
|
||||
|
||||
sentry-cli upload-dif -p keyman-windows --wait --include-sources .
|
||||
|
||||
|
|
|
|||
49
common/windows/delphi/ext/tds2dbg.txt
Normal file
49
common/windows/delphi/ext/tds2dbg.txt
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
Keyman Third Party Package Readme: Tds2Dbg
|
||||
===========================================
|
||||
|
||||
Name: Tds2Dbg
|
||||
Purpose: Tds2Dbg converts .tds to .dbg files
|
||||
Source: https://sourceforge.net/projects/tds2dbg/
|
||||
Version: 2014-12-22
|
||||
License: ISC (MIT compatible)
|
||||
Updated for: N/A
|
||||
Documentation: https://sourceforge.net/projects/tds2dbg/
|
||||
Download location: https://sourceforge.net/projects/tds2dbg/
|
||||
Licensed For: Unlimited developers
|
||||
Include Paths: N/A
|
||||
|
||||
|
||||
Installation notes
|
||||
------------------
|
||||
|
||||
Download from site above.
|
||||
|
||||
Build notes
|
||||
-----------
|
||||
|
||||
tds2dbg is used for building .dbg files from .tds files so that Delphi
|
||||
projects can be debugged in WinDbg/Visual Studio and with dump files.
|
||||
|
||||
This project builds with Borland C++ 5.5 and not other compilers;
|
||||
while it may build successfully with other compilers, there appear to
|
||||
be alignment issues. Hence, the executable is included in the repository
|
||||
to avoid requiring another build tool.
|
||||
|
||||
License - ISC
|
||||
-------------
|
||||
|
||||
Copyright (c) 2009-2010, Bjarne Juul Pasgaard
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice, this permission notice and the following disclaimer
|
||||
appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
1
common/windows/delphi/ext/tds2dbg/.gitignore
vendored
Normal file
1
common/windows/delphi/ext/tds2dbg/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/bin/
|
||||
8
common/windows/delphi/ext/tds2dbg/Build.txt
Normal file
8
common/windows/delphi/ext/tds2dbg/Build.txt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Get the free Borland C++ Builder 5.5 from
|
||||
https://downloads.embarcadero.com/free/c_builder
|
||||
|
||||
Ensure that the location of bcc32.exe is in your path
|
||||
and type "make.exe" in a command prompt with the
|
||||
current working directory set to the directory
|
||||
holder the sources for tds2dbg.
|
||||
|
||||
12
common/windows/delphi/ext/tds2dbg/ChangeLog
Normal file
12
common/windows/delphi/ext/tds2dbg/ChangeLog
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
tds2dbg 0.2.0
|
||||
|
||||
* Added support for conversion of public and static symbols.
|
||||
* Corrected padding and alignment.
|
||||
* Preliminary support for conversion of types. Still incomplete.
|
||||
* Can now convert a non-PE CodeView NB09 file to a PE CodeView file.
|
||||
* Can now generate bare CodeView files (i.e. no PE header).
|
||||
|
||||
tds2dbg 0.1.0
|
||||
|
||||
* Initial version
|
||||
|
||||
15
common/windows/delphi/ext/tds2dbg/LICENSE
Normal file
15
common/windows/delphi/ext/tds2dbg/LICENSE
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
Copyright (c) 2009-2010, Bjarne Juul Pasgaard
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice, this permission notice and the following disclaimer
|
||||
appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
22
common/windows/delphi/ext/tds2dbg/Makefile
Normal file
22
common/windows/delphi/ext/tds2dbg/Makefile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
info:
|
||||
echo The following builds require Borland C++ compiler to be installed and in the path; see Readme.txt for details.
|
||||
echo So, the tds2dbg.bin is kept in the repo in order to make builds simpler
|
||||
|
||||
BCC55DIR=c:\borland\bcc55
|
||||
|
||||
tds2dbg.exe: main.cpp tds2dbg.cpp fileutils.cpp log.cpp
|
||||
# $(CL) /Fe$< /EHsc $**
|
||||
path $(BCC55DIR)\bin;$(PATH)
|
||||
$(BCC55DIR)\bin\bcc32 -y -v -L$(BCC55DIR)\Lib -I$(BCC55DIR)\Include -e$< $**
|
||||
|
||||
test.exe: testa.cpp
|
||||
# $(CL) /Fe$< /EHsc $**
|
||||
$(BCC55DIR)\bin\bcc32 -y -v -M -L$(BCC55DIR)\Lib -I$(BCC55DIR)\Include -e$< $**
|
||||
|
||||
clean:
|
||||
-del /Q tds2dbg.obj fileutils.obj log.obj main.obj tds2dbg.tds
|
||||
-del /Q testa.obj test.exe test.tds test.dbg
|
||||
-rmdir /S /Q html
|
||||
|
||||
doc:
|
||||
doxygen tds2dbg.dcf
|
||||
64
common/windows/delphi/ext/tds2dbg/ReadMe.txt
Normal file
64
common/windows/delphi/ext/tds2dbg/ReadMe.txt
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
NAME
|
||||
|
||||
tds2dbg - Borland TDS debug symbol file to Microsft DBG debug symbol file
|
||||
converter.
|
||||
|
||||
SYNOPSIS
|
||||
|
||||
tds2dbg [ [-h|--help] | [-t|--types] [-s|--statics] [--] program.exe ]
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
tds2dbg will read the Borland debug symbol file associated with the
|
||||
Microsoft Windows executable program.exe (program.tds) and create a
|
||||
corresponding Microsoft DBG debug symbol file (program.dbg). Additionally,
|
||||
it will modify a flag in program.exe to signal that debug symbols are
|
||||
available externally to the executable.
|
||||
|
||||
The dbg files can be used with, say, windbg available from the
|
||||
Microsoft Debugging Tools at the Microsoft Windows Hardware Developer
|
||||
Central (http://www.microsoft.com/whdc).
|
||||
|
||||
OPTIONS
|
||||
|
||||
-h, --help Prints a help text. Running tds2dbg without arguments
|
||||
will do the same.
|
||||
-v, --verbose Each occurence of this option increases verbosity.
|
||||
-q, --quiet Operate silently.
|
||||
-t, --types Convert types (incomplete feature).
|
||||
-s, --statics Treat statics as publics.
|
||||
-b, --barecv Write bare code view data. No PE header is added.
|
||||
|
||||
KNOWN ISSUES
|
||||
|
||||
tds2dbg is currently only able to insert source code references, public
|
||||
symbols, and static symbols into the generated DBG file. Debug information
|
||||
on local variables is partially generated, but no debugger seems to be
|
||||
able to use this information. Additionally, conversion of types is not
|
||||
fully supported and is only done on request (the -t option).
|
||||
|
||||
VERSION
|
||||
|
||||
This is the documentation for tds2dbg version 0.2.0
|
||||
|
||||
AUTHOR
|
||||
|
||||
Copyright (C) 2009-2010, Bjarne Juul Pasgaard
|
||||
|
||||
LICENSE
|
||||
|
||||
Copyright (C) 2009-2010, Bjarne Juul Pasgaard
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice, this permission notice and the following disclaimer
|
||||
appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
34
common/windows/delphi/ext/tds2dbg/build.sh
Executable file
34
common/windows/delphi/ext/tds2dbg/build.sh
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env bash
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
# TODO: move this out of ext and into tools
|
||||
|
||||
builder_describe "tds2dbg component" clean configure build test
|
||||
builder_parse "$@"
|
||||
|
||||
#-------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
source "$KEYMAN_ROOT/resources/build/win/environment.inc.sh"
|
||||
|
||||
builder_describe_outputs \
|
||||
configure:project /resources/build/win/delphi_environment_generated.inc.sh \
|
||||
build:project "$WIN32_TARGET_PATH/tds2dbg.exe"
|
||||
|
||||
#-------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function do_build() {
|
||||
mkdir -p "$WIN32_TARGET_PATH"
|
||||
cp tds2dbg.bin "$WIN32_TARGET_PATH/tds2dbg.exe"
|
||||
|
||||
mkdir -p "$KEYMAN_ROOT/common/windows/bin/tools"
|
||||
cp "$WIN32_TARGET_PATH/tds2dbg.exe" "$KEYMAN_ROOT/common/windows/bin/tools/"
|
||||
}
|
||||
|
||||
builder_run_action clean:project clean_windows_project_files
|
||||
builder_run_action configure:project configure_windows_build_environment
|
||||
builder_run_action build:project do_build
|
||||
# builder_run_action test:project do_test
|
||||
158
common/windows/delphi/ext/tds2dbg/fileutils.cpp
Normal file
158
common/windows/delphi/ext/tds2dbg/fileutils.cpp
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
// Copyright (c) 2009-2010, Bjarne Juul Pasgaard
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice, this permission notice and the following disclaimer
|
||||
// appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
/// @file fileutils.cpp File utilities
|
||||
|
||||
#include "fileutils.h"
|
||||
|
||||
FileWrapper::FileWrapper(FILE* f) : m_f(f)
|
||||
{
|
||||
}
|
||||
|
||||
unsigned int
|
||||
FileWrapper::tell() const {
|
||||
return ftell(m_f);
|
||||
}
|
||||
|
||||
void
|
||||
FileWrapper::seek(unsigned int pos) throw(std::runtime_error) {
|
||||
if(fseek(m_f,pos,SEEK_SET)) {
|
||||
throw std::runtime_error("Failed to set read/write position");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
FileWrapper::skip(unsigned int amount) throw(std::runtime_error) {
|
||||
if(fseek(m_f,amount,SEEK_CUR)) {
|
||||
throw std::runtime_error("Failed to advance read/write position");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
FileWrapper::write1bLpfName(const std::string& name) throw(std::runtime_error)
|
||||
{
|
||||
unsigned char len = (unsigned char) (name.length());
|
||||
|
||||
if((sizeof len) != fwrite(&len,1,(sizeof len),m_f)) {
|
||||
throw std::runtime_error("Failed to write length field of string");
|
||||
}
|
||||
if((unsigned int)(len+1) != fwrite(name.c_str(),1,len+1,m_f)) {
|
||||
throw std::runtime_error("Failed to write string contents");
|
||||
}
|
||||
}
|
||||
|
||||
RecordReader::RecordReader(FileWrapper& tdsFile, unsigned int recSz) :
|
||||
m_tdsFile(tdsFile)
|
||||
{
|
||||
m_recPos = tdsFile.tell();
|
||||
m_endPos = m_recPos + recSz;
|
||||
}
|
||||
|
||||
RecordWriter::~RecordWriter()
|
||||
{
|
||||
WriteQCont::iterator it = m_writeQ.begin();
|
||||
while(m_writeQ.end() != it) {
|
||||
delete *it++;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RecordWriter::commit(FileWrapper& f) const throw(std::runtime_error)
|
||||
{
|
||||
WriteQCont::const_iterator it = m_writeQ.begin();
|
||||
while(m_writeQ.end() != it) {
|
||||
(*it++)->commit(f);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int
|
||||
RecordWriter::length() const
|
||||
{
|
||||
unsigned int len = 0;
|
||||
WriteQCont::const_iterator it = m_writeQ.begin();
|
||||
while(m_writeQ.end() != it) {
|
||||
len += (*it++)->length();
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
void
|
||||
RecordWriter::write1bLpfName(const std::string& name)
|
||||
{
|
||||
unsigned char len = (unsigned char) (name.length());
|
||||
|
||||
this->write(len);
|
||||
this->write(*(name.c_str()),len+1);
|
||||
}
|
||||
|
||||
RecordWriter::WriteQueueElement::~WriteQueueElement()
|
||||
{
|
||||
}
|
||||
|
||||
unsigned int
|
||||
RecordWriter::CopiedData::length() const
|
||||
{
|
||||
return m_data.size();
|
||||
}
|
||||
|
||||
void
|
||||
RecordWriter::CopiedData::commit(FileWrapper& f) const throw(std::runtime_error)
|
||||
{
|
||||
f.write(m_data.front(),m_data.size());
|
||||
}
|
||||
|
||||
RecordWriter::WriteQueueElement*
|
||||
RecordWriter::CopiedData::append(const unsigned char* src, unsigned int len)
|
||||
{
|
||||
m_data.reserve(m_data.size()+len);
|
||||
while(len--) {
|
||||
m_data.push_back(*src++);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
RecordWriter::ReferencedData::
|
||||
ReferencedData(const unsigned char* src, unsigned int len)
|
||||
: m_src(src), m_len(len)
|
||||
{
|
||||
}
|
||||
|
||||
unsigned int
|
||||
RecordWriter::ReferencedData::length() const
|
||||
{
|
||||
return m_len;
|
||||
}
|
||||
|
||||
void
|
||||
RecordWriter::ReferencedData::commit(FileWrapper& f) const
|
||||
throw(std::runtime_error)
|
||||
{
|
||||
f.write(*m_src,m_len);
|
||||
}
|
||||
|
||||
RecordWriter::WriteQueueElement*
|
||||
RecordWriter::ReferencedData::append(const unsigned char* src, unsigned int len)
|
||||
{
|
||||
CopiedData* c = new CopiedData();
|
||||
c->append(src,len);
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
// Local Variables:
|
||||
// mode:c++
|
||||
// c-basic-offset: 3
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
564
common/windows/delphi/ext/tds2dbg/fileutils.h
Normal file
564
common/windows/delphi/ext/tds2dbg/fileutils.h
Normal file
|
|
@ -0,0 +1,564 @@
|
|||
// Copyright (c) 2009-2010, Bjarne Juul Pasgaard
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice, this permission notice and the following disclaimer
|
||||
// appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
/// @file fileutils.h File utilities
|
||||
|
||||
#ifndef FILEUTILS_H
|
||||
#define FILEUTILS_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
|
||||
/// @brief Base class for file access wrappers.
|
||||
class FileWrapper {
|
||||
public:
|
||||
|
||||
/// @brief Constructor.
|
||||
///
|
||||
/// @param f The file stream being wrapped. Ownership not transferred.
|
||||
FileWrapper(FILE* f);
|
||||
|
||||
/// @brief Returns the current read/write position.
|
||||
/// @return The current write position.
|
||||
unsigned int tell() const;
|
||||
|
||||
/// @brief Sets the current read/write position.
|
||||
///
|
||||
/// @param pos The new (absolute) write position.
|
||||
///
|
||||
/// @throw runtime_error If an error occured.
|
||||
void seek(unsigned int pos) throw(std::runtime_error);
|
||||
|
||||
/// @brief Skips a number of bytes from the input stream.
|
||||
///
|
||||
/// @param amount The number of bytes to skip.
|
||||
///
|
||||
/// @throw runtime_error If an error occured.
|
||||
void skip(unsigned int amount) throw(std::runtime_error);
|
||||
|
||||
/// @brief Reads a sequence of structures from the current read
|
||||
/// position and throws an exception if end of file is
|
||||
/// reached prematurely.
|
||||
///
|
||||
/// @param dst The 1st structure to hold the data read in.
|
||||
/// @param num The number of structures to read.
|
||||
///
|
||||
/// @tparam The class of the structures to read.
|
||||
///
|
||||
/// @throw runtime_error If not all bytes could be read.
|
||||
template <class T>
|
||||
void read(T& dst, unsigned int num = 1) throw(std::runtime_error) {
|
||||
unsigned int n = fread(&dst,1,num*sizeof(T),m_f);
|
||||
if(num*sizeof(T) != n) {
|
||||
throw std::runtime_error("Unexpected end of file");
|
||||
}
|
||||
}
|
||||
|
||||
/// @brief Attempts to reads a sequence of structures from the
|
||||
/// current read position.
|
||||
///
|
||||
/// @param dst The 1st structure to hold the data read in.
|
||||
/// @param num The number of structures to read.
|
||||
///
|
||||
/// @return The number of bytes actually read.
|
||||
///
|
||||
/// @tparam The class of the structures to read.
|
||||
template <class T>
|
||||
unsigned int tryRead(T& dst, unsigned int num = 1) {
|
||||
return fread(&dst,1,num*sizeof(T),m_f);
|
||||
}
|
||||
|
||||
/// @brief Writes a sequence of bytes to the current write position.
|
||||
///
|
||||
/// @param src Reference to the 1st structure to be written.
|
||||
/// @param num The number of instances to write.
|
||||
///
|
||||
/// @return The number of bytes actually written.
|
||||
///
|
||||
/// @tparam T Class of the structure to write.
|
||||
///
|
||||
/// @throw runtime_error If an error occured.
|
||||
template <class T>
|
||||
unsigned int
|
||||
write(const T& src, unsigned int num = 1) throw(std::runtime_error) {
|
||||
unsigned int n = fwrite(&src,1,num*sizeof(T),m_f);
|
||||
if(n != num*sizeof(T)) {
|
||||
throw std::runtime_error("Write error in write()");
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
/// @brief Writes multiple copies of the same structure starting from the
|
||||
/// current write position.
|
||||
///
|
||||
/// @param src Reference to the structure to be written.
|
||||
/// @param num The number of copies to write.
|
||||
///
|
||||
/// @return The number of bytes actually written.
|
||||
///
|
||||
/// @tparam T Class of the structure to write.
|
||||
///
|
||||
/// @throw runtime_error If an error occured.
|
||||
template <class T>
|
||||
unsigned int
|
||||
writeRep(const T& src, unsigned int num = 1) throw(std::runtime_error);
|
||||
|
||||
/// @brief Writes a (1-byte) length-prefixed name to the current
|
||||
/// write position.
|
||||
///
|
||||
/// @param name The name to write.
|
||||
///
|
||||
/// @throw runtime_error If an error occured.
|
||||
void write1bLpfName(const std::string& name) throw(std::runtime_error);
|
||||
|
||||
protected:
|
||||
|
||||
FILE* m_f; ///< The file stream.
|
||||
|
||||
};
|
||||
|
||||
|
||||
template <class T>
|
||||
unsigned int
|
||||
FileWrapper::writeRep(const T& src, unsigned int num)
|
||||
throw(std::runtime_error)
|
||||
{
|
||||
unsigned int n = 0;
|
||||
while(num--) {
|
||||
unsigned int m = fwrite(&src,1,sizeof(T),m_f);
|
||||
if(sizeof(T) != m) {
|
||||
throw std::runtime_error("Write error in writeRep()");
|
||||
}
|
||||
n += m;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
/// @brief Reads a record sequentially from a file while keeping track
|
||||
/// of the number of bytes available.
|
||||
class RecordReader {
|
||||
public:
|
||||
|
||||
/// @brief Constructor.
|
||||
///
|
||||
/// @param tdsFile The file to read from.
|
||||
/// @param recSz The number of bytes in the record.
|
||||
RecordReader(FileWrapper& tdsFile, unsigned int recSz);
|
||||
|
||||
/// @brief Returns the current read position.
|
||||
///
|
||||
/// @return The current (absolute) read position.
|
||||
unsigned int tell() {
|
||||
return m_tdsFile.tell();
|
||||
}
|
||||
|
||||
/// @brief Determines whether an end-of-record condition is met.
|
||||
///
|
||||
/// @retval true if all bytes have been read.
|
||||
/// @retval false otherwise.
|
||||
bool eor() const {
|
||||
return (m_tdsFile.tell() >= m_endPos);
|
||||
}
|
||||
|
||||
/// @brief Sets the current absolute read position.
|
||||
///
|
||||
/// @param pos The new (absolute) read position.
|
||||
///
|
||||
/// @throw runtime_error In case of errors.
|
||||
void seek(unsigned int pos) throw(std::runtime_error) {
|
||||
m_tdsFile.seek(pos);
|
||||
}
|
||||
|
||||
/// @brief Skips a number of bytes from the input stream.
|
||||
///
|
||||
/// @param amount The number of bytes to skip.
|
||||
///
|
||||
/// @throw runtime_error In case of errors.
|
||||
void skip(unsigned int amount) throw(std::runtime_error) {
|
||||
m_tdsFile.skip(amount);
|
||||
}
|
||||
|
||||
/// @brief Reads a sequence of structures from the current read
|
||||
/// position in the TDS file.
|
||||
///
|
||||
/// @param dst The 1st structure to hold the data read in.
|
||||
/// @param num The number of structures to read.
|
||||
///
|
||||
/// @throw runtime_error In case of errors.
|
||||
template <class T>
|
||||
void read(T& dst, unsigned int num = 1) throw(std::runtime_error) {
|
||||
m_tdsFile.read(dst,num);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
FileWrapper& m_tdsFile; ///< The file to read from.
|
||||
|
||||
unsigned int m_recPos; ///< The position of the current record.
|
||||
|
||||
unsigned int m_endPos; ///< The position after the end of the record list.
|
||||
|
||||
};
|
||||
|
||||
/// @brief Registers data for later writing to a file while counting
|
||||
/// the number of bytes to be written.
|
||||
class RecordWriter {
|
||||
public:
|
||||
|
||||
/// @brief Destructor.
|
||||
~RecordWriter();
|
||||
|
||||
/// @brief Commits the data registered to a file at the current write
|
||||
/// position of the file.
|
||||
///
|
||||
/// @param file The file to write to.
|
||||
///
|
||||
/// @throw runtime_error In case of errors.
|
||||
void commit(FileWrapper& f) const throw(std::runtime_error);
|
||||
|
||||
/// @brief Returns the number of bytes registered for later writing.
|
||||
///
|
||||
/// @return The number of bytes registered.
|
||||
unsigned int length() const;
|
||||
|
||||
/// @brief Appends a sequence of structures to the tail of the
|
||||
/// write queue.
|
||||
///
|
||||
/// The data provided is copied into the internal write queue.
|
||||
///
|
||||
/// @param dst The 1st structure that holds the data to be written.
|
||||
/// @param num The number of structures to write.
|
||||
///
|
||||
/// @return The number of bytes written.
|
||||
template <class T>
|
||||
unsigned int write(const T& src, unsigned int num = 1) {
|
||||
unsigned int n = sizeof(T)*num;
|
||||
WriteQueueElement* e;
|
||||
|
||||
if(0 == m_writeQ.size()) {
|
||||
e = new CopiedData();
|
||||
m_writeQ.push_back(e);
|
||||
}
|
||||
|
||||
e = m_writeQ.back()->append(reinterpret_cast<const unsigned char*>(&src),n);
|
||||
if(e) {
|
||||
// New element created, append it to the queue.
|
||||
m_writeQ.push_back(e);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
/// @brief Writes multiple copies of the same structure starting from the
|
||||
/// current write position.
|
||||
///
|
||||
/// @param src Reference to the structure to be written.
|
||||
/// @param num The number of copies to write.
|
||||
///
|
||||
/// @return The number of bytes actually written.
|
||||
///
|
||||
/// @tparam T Class of the structure to write.
|
||||
template <class T>
|
||||
unsigned int writeRep(const T& src, unsigned int num = 1) {
|
||||
unsigned int n = 0;
|
||||
while(num--) {
|
||||
n+= this->write(src);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
/// @brief Appends a sequence of structures to the tail of the
|
||||
/// write queue.
|
||||
///
|
||||
/// This menthod appends a reference to the data to the write
|
||||
/// queue. The data provided is not copied.
|
||||
///
|
||||
/// @param dst The 1st structure that holds the data to be written.
|
||||
/// @param num The number of structures to write.
|
||||
///
|
||||
/// @return The number of bytes written.
|
||||
template <class T>
|
||||
unsigned int delayedWrite(const T& src, unsigned int num = 1) {
|
||||
unsigned int n = sizeof(T)*num;
|
||||
m_writeQ.
|
||||
push_back(new
|
||||
ReferencedData(reinterpret_cast<unsigned char*>(&src),n));
|
||||
return n;
|
||||
}
|
||||
|
||||
/// @brief Appends a (1-byte) length-prefixed name to the write queue.
|
||||
///
|
||||
/// @param name The name to write.
|
||||
void write1bLpfName(const std::string& name);
|
||||
|
||||
protected:
|
||||
|
||||
/// @brief Base class for write queue data.
|
||||
class WriteQueueElement
|
||||
{
|
||||
public:
|
||||
|
||||
/// @brief Destructor.
|
||||
virtual ~WriteQueueElement();
|
||||
|
||||
/// @brief Returns the number of bytes registered within this element.
|
||||
///
|
||||
/// @return The number of bytes registered within this element.
|
||||
virtual unsigned int length() const = 0;
|
||||
|
||||
/// @brief Commits the data in this element to the current write
|
||||
/// position of a file.
|
||||
///
|
||||
/// @param f The file to write to.
|
||||
///
|
||||
/// @throw runtime_error In case of errors.
|
||||
virtual void commit(FileWrapper& f) const throw(std::runtime_error) = 0;
|
||||
|
||||
/// @brief Appends a copy of a sequence of bytes to the current
|
||||
/// element.
|
||||
///
|
||||
/// @param src The first byte to copy.
|
||||
/// @param len The number of bytes to copy.
|
||||
///
|
||||
/// @return 0 if the bytes were appended to the current element, or
|
||||
/// a pointer to a new element that received the copied bytes.
|
||||
virtual
|
||||
WriteQueueElement* append(const unsigned char* src, unsigned int len) = 0;
|
||||
|
||||
};
|
||||
|
||||
/// @brief Data copied into the write queue.
|
||||
class CopiedData : public WriteQueueElement
|
||||
{
|
||||
public:
|
||||
|
||||
// Overridden base class method.
|
||||
unsigned int length() const;
|
||||
|
||||
// Overridden base class method.
|
||||
void commit(FileWrapper& f) const throw(std::runtime_error);
|
||||
|
||||
// Overridden base class method.
|
||||
WriteQueueElement* append(const unsigned char* src, unsigned int len);
|
||||
|
||||
protected:
|
||||
|
||||
std::vector<unsigned char> m_data;
|
||||
|
||||
};
|
||||
|
||||
/// @brief Data referenced from the write queue.
|
||||
class ReferencedData : public WriteQueueElement
|
||||
{
|
||||
public:
|
||||
|
||||
// Overridden base class method.
|
||||
unsigned int length() const;
|
||||
|
||||
// Overridden base class method.
|
||||
void commit(FileWrapper& f) const throw(std::runtime_error);
|
||||
|
||||
// Overridden base class method.
|
||||
WriteQueueElement* append(const unsigned char* src, unsigned int len);
|
||||
|
||||
/// @brief Constructor.
|
||||
///
|
||||
/// @param src The first byte to reference.
|
||||
/// @param len The number of subsequent bytes to reference.
|
||||
ReferencedData(const unsigned char* src, unsigned int len);
|
||||
|
||||
protected:
|
||||
|
||||
const unsigned char* m_src; ///< The first byte referenced.
|
||||
unsigned int m_len; ///< The number of bytes referenced.
|
||||
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
/// @brief Container underlying the internal write queue.
|
||||
typedef std::vector<WriteQueueElement*> WriteQCont;
|
||||
|
||||
/// @brief The internal write queue.
|
||||
WriteQCont m_writeQ;
|
||||
|
||||
};
|
||||
|
||||
/// @brief Postpones writing of a record until committed.
|
||||
///
|
||||
/// @note It is important to create an instance of this class before writing
|
||||
/// any records that should follow it (in file order).
|
||||
///
|
||||
/// @tparam R The record structure.
|
||||
template <class R>
|
||||
class PpRecordWriter {
|
||||
public:
|
||||
|
||||
/// @brief Constructor.
|
||||
///
|
||||
/// @param dbgFile The DBG file to write to.
|
||||
/// @param rec The record to be written when committed to.
|
||||
PpRecordWriter(FileWrapper& dbgFile, R& rec) :
|
||||
m_dbgFile(dbgFile), m_rec(rec), m_len(0)
|
||||
{
|
||||
m_recPos = dbgFile.tell();
|
||||
dbgFile.skip(sizeof(R));
|
||||
}
|
||||
|
||||
/// @brief Commits to the record.
|
||||
///
|
||||
/// This method will write out the record.
|
||||
///
|
||||
/// @throw runtime_error In case of errors.
|
||||
void commit() throw(std::runtime_error) {
|
||||
unsigned int oldPos = m_dbgFile.tell();
|
||||
m_dbgFile.seek(m_recPos);
|
||||
m_len = m_dbgFile.write(m_rec);
|
||||
m_dbgFile.seek(oldPos);
|
||||
}
|
||||
|
||||
/// @brief Returns the number of bytes written.
|
||||
/// @return The number of bytes written.
|
||||
unsigned int length() const {
|
||||
return m_len;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
/// @brief The DBG file to write to.
|
||||
FileWrapper& m_dbgFile;
|
||||
|
||||
/// @breif The record to write.
|
||||
R& m_rec;
|
||||
|
||||
/// @brief File position of the record.
|
||||
unsigned int m_recPos;
|
||||
|
||||
/// @brief Number of bytes written.
|
||||
unsigned int m_len;
|
||||
|
||||
};
|
||||
|
||||
/// @brief Postpones writing of a header with a length field to be
|
||||
/// computed until committed.
|
||||
///
|
||||
/// @tparam H The header structure.
|
||||
/// @tparam L The type of the length field.
|
||||
template <class H, class L>
|
||||
class HeaderWithLen {
|
||||
public:
|
||||
|
||||
/// @brief Constructor.
|
||||
///
|
||||
/// @param hdr The header to be written when committed to.
|
||||
/// Must remain available during the entire lifetime of the
|
||||
/// object created.
|
||||
/// @param lenFld The length field to update. Must remaining available
|
||||
/// during the entire lifetime of the object created.
|
||||
HeaderWithLen(H& hdr, L& lenFld) : m_hdr(hdr), m_lenFld(lenFld)
|
||||
{
|
||||
}
|
||||
|
||||
/// @brief Writes the header and the data registered by a RecordWriter.
|
||||
///
|
||||
/// This method will write out the header with an updated length field
|
||||
/// as well as the data registered by the RecordWriter.
|
||||
/// The length field will be computed as the size of the header, plus the
|
||||
/// size of the data written by the RecordWriter, minus the size of the
|
||||
/// length field itself.
|
||||
///
|
||||
/// @param f The file to write to.
|
||||
/// @param w The record writer that was used to write the data committed to.
|
||||
///
|
||||
/// @throw runtime_error In case of errors.
|
||||
void
|
||||
commit(FileWrapper& f, const RecordWriter& w) throw(std::runtime_error){
|
||||
m_lenFld = sizeof(H) + w.length()-sizeof(L);
|
||||
f.write(m_hdr);
|
||||
w.commit(f);
|
||||
}
|
||||
|
||||
/// @brief Returns the number of bytes (to be) written by the record writer
|
||||
/// and the header writer itself.
|
||||
///
|
||||
/// @return The number of bytes (to be) written.
|
||||
unsigned int length(const RecordWriter& w) const {
|
||||
return sizeof(H) + w.length();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
/// @brief The header to write.
|
||||
H& m_hdr;
|
||||
|
||||
/// @brief The length field to update.
|
||||
L& m_lenFld;
|
||||
|
||||
};
|
||||
|
||||
/// @brief Writes a sequence of bytes from one file object to another.
|
||||
///
|
||||
/// @param dst Destination file object.
|
||||
/// @param src Source file object.
|
||||
/// @param amount Number of bytes to copy.
|
||||
///
|
||||
/// @tparam D Class of the destination object.
|
||||
/// @tparam S Class of the source object.
|
||||
///
|
||||
/// @throw runtime_error In case of errors.
|
||||
template <class D, class S>
|
||||
void
|
||||
copyFileContent(D& dst, S& src, unsigned int amount = 1)
|
||||
throw(std::runtime_error)
|
||||
{
|
||||
unsigned char buf[512];
|
||||
unsigned int toRead = (sizeof buf);
|
||||
while(amount) {
|
||||
if(toRead>amount) {
|
||||
toRead = amount;
|
||||
}
|
||||
src.read(buf[0],toRead);
|
||||
amount -= toRead;
|
||||
dst.write(buf[0],toRead);
|
||||
}
|
||||
}
|
||||
|
||||
/// @brief Appends the contents of one file to another.
|
||||
///
|
||||
/// @param dst Destination file object.
|
||||
/// @param src Source file object.
|
||||
///
|
||||
/// @tparam D Class of the destination object.
|
||||
/// @tparam S Class of the source object.
|
||||
///
|
||||
/// @throw runtime_error In case of errors.
|
||||
template <class D, class S>
|
||||
void
|
||||
copyFile(D& dst, S& src) throw(std::runtime_error)
|
||||
{
|
||||
unsigned char buf[512];
|
||||
unsigned int bytesRead;
|
||||
do {
|
||||
bytesRead = src.tryRead(buf[0],(sizeof buf));
|
||||
dst.write(buf[0],bytesRead);
|
||||
} while((sizeof buf) == bytesRead);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Local Variables:
|
||||
// mode:c++
|
||||
// c-basic-offset: 3
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
44
common/windows/delphi/ext/tds2dbg/log.cpp
Normal file
44
common/windows/delphi/ext/tds2dbg/log.cpp
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
// Copyright (c) 2009-2010, Bjarne Juul Pasgaard
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice, this permission notice and the following disclaimer
|
||||
// appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
/// @file log.cpp Log utilitites
|
||||
|
||||
#include "log.h"
|
||||
|
||||
std::ostream& Log::operator()(unsigned int verbosity)
|
||||
{
|
||||
if(verbosity<m_verbosity) {
|
||||
return std::cout;
|
||||
} else {
|
||||
return m_nullStream;
|
||||
}
|
||||
}
|
||||
|
||||
Log::NullStreamBuf::NullStreamBuf()
|
||||
{
|
||||
}
|
||||
|
||||
Log& mylog()
|
||||
{
|
||||
static Log _log;
|
||||
return _log;
|
||||
}
|
||||
|
||||
|
||||
// Local Variables:
|
||||
// mode:c++
|
||||
// c-basic-offset: 3
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
82
common/windows/delphi/ext/tds2dbg/log.h
Normal file
82
common/windows/delphi/ext/tds2dbg/log.h
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
// Copyright (c) 2009-2010, Bjarne Juul Pasgaard
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice, this permission notice and the following disclaimer
|
||||
// appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
/// @file log.h Log utilities
|
||||
|
||||
#ifndef LOG_H
|
||||
#define LOG_H
|
||||
|
||||
#include <iostream>
|
||||
|
||||
/// @brief Logger class.
|
||||
class Log
|
||||
{
|
||||
public:
|
||||
|
||||
/// @brief Constructor.
|
||||
Log() : m_verbosity(0), m_nullStream(&m_nullStreamBuf) {}
|
||||
|
||||
/// @brief Sets the level of verbosity
|
||||
///
|
||||
/// @param verbosity New level of verbosity. 0 means silence.
|
||||
void setVerbosity(unsigned int verbosity) { m_verbosity = verbosity; }
|
||||
|
||||
/// @brief Returns a reference to a stream handling the requested level
|
||||
/// of verbosity.
|
||||
///
|
||||
/// @param verbosity The requested level of verbosity.
|
||||
std::ostream& operator()(unsigned int verbosity = 0);
|
||||
|
||||
protected:
|
||||
|
||||
/// @brief Helper class implementing a dummy stream buffer that
|
||||
/// discards everything sent to it.
|
||||
///
|
||||
/// @ingroup HMILoggingFeatures
|
||||
class NullStreamBuf : public std::streambuf
|
||||
{
|
||||
public:
|
||||
|
||||
/// @brief Constructor
|
||||
NullStreamBuf();
|
||||
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
/// @brief The current level of verbosity.
|
||||
unsigned int m_verbosity;
|
||||
|
||||
/// @brief Supporting stream buffer for m_nullStream.
|
||||
NullStreamBuf m_nullStreamBuf;
|
||||
|
||||
/// @brief Internal stream used as a null-stream that discards
|
||||
/// everything streamed to it.
|
||||
std::ostream m_nullStream;
|
||||
|
||||
};
|
||||
|
||||
/// @brief Accesser for the global Log instance.
|
||||
///
|
||||
/// @return Reference to the global log.
|
||||
Log& mylog();
|
||||
|
||||
#endif LOG_H
|
||||
|
||||
// Local Variables:
|
||||
// mode:c++
|
||||
// c-basic-offset: 3
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
115
common/windows/delphi/ext/tds2dbg/main.cpp
Normal file
115
common/windows/delphi/ext/tds2dbg/main.cpp
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
// Copyright (c) 2009-2010, Bjarne Juul Pasgaard
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice, this permission notice and the following disclaimer
|
||||
// appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
#include "tds2dbg.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <locale>
|
||||
|
||||
void printUsage(const char* argv0)
|
||||
{
|
||||
std::cerr
|
||||
<< "Usage: " << argv0
|
||||
<< " [-h|--help] [-t|--types] [-s|--statics] [--] exefilenamewithextension\n"
|
||||
"Options:\n"
|
||||
" -h, --help Prints this message\n"
|
||||
" -v, --verbose Increase verbosity\n"
|
||||
" -q, --quiet Operate silently\n"
|
||||
" -t, --types Convert types (incomplete feature)\n"
|
||||
" -s, --statics Treat statics as publics\n"
|
||||
" -b, --barecv Write bare code view data\n"
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int argNo = 1;
|
||||
unsigned int verbosity = 1;
|
||||
bool convertTypes = false;
|
||||
bool staticsAsPublics = false;
|
||||
bool bareCodeView = false;
|
||||
|
||||
while(argc > 1) {
|
||||
char* a = argv[argNo];
|
||||
if('-' != *a || 0==strcmp("--",a)) {
|
||||
break;
|
||||
} else if(0==strcmp("-h",a) || 0==strcmp("--help",a)) {
|
||||
printUsage(argv[0]);
|
||||
return 0;
|
||||
} else if(0==strcmp("--verbose",a) || 0==strcmp("-v",a)) {
|
||||
if(verbosity) ++verbosity;
|
||||
} else if(0==strcmp("--quiet",a) || 0==strcmp("-q",a)) {
|
||||
verbosity = 0;
|
||||
} else if(0==strcmp("--types",a) || 0==strcmp("-t",a)) {
|
||||
convertTypes = true;
|
||||
} else if(0==strcmp("--statics",a) || 0==strcmp("-s",a)) {
|
||||
staticsAsPublics = true;
|
||||
} else if(0==strcmp("--barecv",a) || 0==strcmp("-b",a)) {
|
||||
bareCodeView = true;
|
||||
} else {
|
||||
std::cerr << "Unknown option " << a << std::endl;
|
||||
printUsage(argv[0]);
|
||||
return 1;
|
||||
}
|
||||
--argc;
|
||||
++argNo;
|
||||
}
|
||||
|
||||
if(2 != argc) {
|
||||
printUsage(argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string exeFile(argv[argNo]);
|
||||
std::string::size_type dotP = exeFile.rfind('.');
|
||||
if(std::string::npos == dotP) {
|
||||
std::cerr
|
||||
<< "Argument exe file name must be specified with extension"
|
||||
<< std::endl;
|
||||
return 2;
|
||||
}
|
||||
|
||||
std::string tdsFile(exeFile.substr(0,dotP+1));
|
||||
std::string dbgFile(tdsFile);
|
||||
|
||||
const std::ctype<char>& ctf =
|
||||
std::use_facet<std::ctype<char> >(std::locale());
|
||||
std::string::size_type ep = dotP;
|
||||
while(exeFile.length() != ep) {
|
||||
exeFile[ep] = ctf.tolower(exeFile[ep]);
|
||||
++ep;
|
||||
}
|
||||
|
||||
std::string ext(exeFile.substr(dotP+1));
|
||||
|
||||
if(!ext.compare("tds") || !ext.compare("dbg")) {
|
||||
std::cerr
|
||||
<< "Executable file cannot have extension .tds or .dbg"
|
||||
<< std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
tdsFile.append("tds");
|
||||
dbgFile.append("dbg");
|
||||
|
||||
return tds2dbg(exeFile.c_str(),tdsFile.c_str(),dbgFile.c_str(),
|
||||
verbosity,convertTypes,staticsAsPublics,bareCodeView);
|
||||
}
|
||||
|
||||
// Local Variables:
|
||||
// mode:c++
|
||||
// c-basic-offset: 3
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
BIN
common/windows/delphi/ext/tds2dbg/tds2dbg.bin
Normal file
BIN
common/windows/delphi/ext/tds2dbg/tds2dbg.bin
Normal file
Binary file not shown.
2568
common/windows/delphi/ext/tds2dbg/tds2dbg.cpp
Normal file
2568
common/windows/delphi/ext/tds2dbg/tds2dbg.cpp
Normal file
File diff suppressed because it is too large
Load diff
1515
common/windows/delphi/ext/tds2dbg/tds2dbg.dcf
Normal file
1515
common/windows/delphi/ext/tds2dbg/tds2dbg.dcf
Normal file
File diff suppressed because it is too large
Load diff
38
common/windows/delphi/ext/tds2dbg/tds2dbg.h
Normal file
38
common/windows/delphi/ext/tds2dbg/tds2dbg.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
// Copyright (c) 2009-2010, Bjarne Juul Pasgaard
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice, this permission notice and the following disclaimer
|
||||
// appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
#ifndef TDS2DBGH
|
||||
#define TDS2DBGH
|
||||
|
||||
/// @brief Converts an exe and a tds file to a dbg file.
|
||||
///
|
||||
/// @param exeFileName Name of EXE file.
|
||||
/// @param tdsFileName Name of TDS file.
|
||||
/// @param dbgFileName Name of DBG file.
|
||||
/// @param verbosity Verbosity level. 0 means silence.
|
||||
/// @param doConvTypes Should types be converted?
|
||||
/// @param staticsAsPublics Treat statics as publics?
|
||||
/// @param bareCodeView Write bare code view (no header).
|
||||
///
|
||||
/// @todo doConvTypes == true is incomplete.
|
||||
int tds2dbg(const char* exeFileName,
|
||||
const char* tdsFileName,
|
||||
const char* dbgFileName,
|
||||
unsigned int verbosity,
|
||||
bool doConvTypes,
|
||||
bool staticsAsPublics,
|
||||
bool bareCodeView);
|
||||
|
||||
#endif
|
||||
31
common/windows/delphi/ext/tds2dbg/tds2dbg.sln
Normal file
31
common/windows/delphi/ext/tds2dbg/tds2dbg.sln
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.1000
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tds2dbg", "tds2dbg.vcxproj", "{40BFECE3-7FC0-4649-A3DC-E017FF84C75B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{40BFECE3-7FC0-4649-A3DC-E017FF84C75B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{40BFECE3-7FC0-4649-A3DC-E017FF84C75B}.Debug|x64.Build.0 = Debug|x64
|
||||
{40BFECE3-7FC0-4649-A3DC-E017FF84C75B}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{40BFECE3-7FC0-4649-A3DC-E017FF84C75B}.Debug|x86.Build.0 = Debug|Win32
|
||||
{40BFECE3-7FC0-4649-A3DC-E017FF84C75B}.Release|x64.ActiveCfg = Release|x64
|
||||
{40BFECE3-7FC0-4649-A3DC-E017FF84C75B}.Release|x64.Build.0 = Release|x64
|
||||
{40BFECE3-7FC0-4649-A3DC-E017FF84C75B}.Release|x86.ActiveCfg = Release|Win32
|
||||
{40BFECE3-7FC0-4649-A3DC-E017FF84C75B}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {50FB6E2C-4FEF-4828-A315-1017276BF47A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
119
common/windows/delphi/ext/tds2dbg/tds2dbg.vcxproj
Normal file
119
common/windows/delphi/ext/tds2dbg/tds2dbg.vcxproj
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{40BFECE3-7FC0-4649-A3DC-E017FF84C75B}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="fileutils.cpp" />
|
||||
<ClCompile Include="log.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="tds2dbg.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="fileutils.h" />
|
||||
<ClInclude Include="log.h" />
|
||||
<ClInclude Include="tds2dbg.h" />
|
||||
<ClInclude Include="tdscvstructs.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="tds2dbg.bin" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
50
common/windows/delphi/ext/tds2dbg/tds2dbg.vcxproj.filters
Normal file
50
common/windows/delphi/ext/tds2dbg/tds2dbg.vcxproj.filters
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="fileutils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="log.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="tds2dbg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="fileutils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="log.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="tds2dbg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="tdscvstructs.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="tds2dbg.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
1278
common/windows/delphi/ext/tds2dbg/tdscvstructs.h
Normal file
1278
common/windows/delphi/ext/tds2dbg/tdscvstructs.h
Normal file
File diff suppressed because it is too large
Load diff
27
common/windows/delphi/ext/tds2dbg/testa.cpp
Normal file
27
common/windows/delphi/ext/tds2dbg/testa.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
|
||||
static int a = 1;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
(void) argc; (void) argv;
|
||||
|
||||
int b = a+1;
|
||||
|
||||
printf("%i %i\n",a,b);
|
||||
|
||||
while(a<0xf0000000) {
|
||||
++a;
|
||||
printf("%i\n",a++);
|
||||
Sleep(1000);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Local Variables:
|
||||
// mode:c++
|
||||
// c-basic-offset: 3
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
|
|
@ -16,13 +16,13 @@ builder_parse "$@"
|
|||
|
||||
source "$KEYMAN_ROOT/resources/build/win/environment.inc.sh"
|
||||
|
||||
builder_describe_internal_dependency \
|
||||
prepublish:project build:project
|
||||
|
||||
builder_describe_outputs \
|
||||
configure:project /resources/build/win/delphi_environment_generated.inc.sh \
|
||||
build:project /common/windows/delphi/tools/devtools/$WIN32_TARGET_PATH/devtools.exe
|
||||
|
||||
builder_describe_internal_dependency \
|
||||
prepublish:project build:project
|
||||
|
||||
#-------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
builder_run_action clean:project clean_windows_project_files
|
||||
|
|
|
|||
|
|
@ -7,19 +7,20 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
|||
|
||||
builder_describe "Tool for validating klog is disabled for release builds" \
|
||||
clean configure build test prepublish edit
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#-------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
source "$KEYMAN_ROOT/resources/build/win/environment.inc.sh"
|
||||
|
||||
builder_describe_internal_dependency \
|
||||
prepublish:project build:project
|
||||
|
||||
builder_describe_outputs \
|
||||
configure:project /resources/build/win/delphi_environment_generated.inc.sh \
|
||||
build:project /common/windows/delphi/tools/test-klog/$WIN32_TARGET_PATH/test_klog.exe
|
||||
|
||||
builder_describe_internal_dependency \
|
||||
prepublish:project build:project
|
||||
|
||||
#-------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function do_build() {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ if "%1"=="" goto help
|
|||
if "%1"=="all" goto all
|
||||
if "%1"=="x86" goto build
|
||||
if "%1"=="x64" goto build
|
||||
if "%1"=="arm64" goto build
|
||||
|
||||
echo "Invalid parameter."
|
||||
goto help
|
||||
|
|
@ -15,9 +16,9 @@ goto help
|
|||
rem ----------------------------------
|
||||
|
||||
:help
|
||||
echo Usage: %0 x86^|x64^|all debug^|release [configure] [build] [test] [additional params for meson/ninja]
|
||||
echo Usage: %0 x86^|x64^|arm64^|all debug^|release [configure] [build] [test] [additional params for meson/ninja]
|
||||
echo or
|
||||
echo Usage: %0 x86^|x64 -c
|
||||
echo Usage: %0 x86^|x64^|arm64^ -c
|
||||
echo -c will leave your environment configured for Visual Studio for selected platform.
|
||||
echo.
|
||||
echo Otherwise, %0 is intended to be used by build.sh, not directly.
|
||||
|
|
@ -35,17 +36,37 @@ cmd /c build.bat x86 %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel!
|
|||
cd %KEYMAN_ROOT%\core
|
||||
cmd /c build.bat x64 %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel!
|
||||
|
||||
cd %KEYMAN_ROOT%\core
|
||||
cmd /c build.bat arm64 %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel!
|
||||
|
||||
goto :eof
|
||||
|
||||
rem ----------------------------------
|
||||
|
||||
:build
|
||||
|
||||
set "HOST_ARCH=%PROCESSOR_ARCHITECTURE%"
|
||||
|
||||
rem Map Windows arch strings to VsDevCmd expected values
|
||||
if /I "%HOST_ARCH%"=="AMD64" set "HOST_ARCH=amd64"
|
||||
if /I "%HOST_ARCH%"=="x86" set "HOST_ARCH=x86"
|
||||
if /I "%HOST_ARCH%"=="ARM64" set "HOST_ARCH=arm64"
|
||||
|
||||
|
||||
set ARCH=%1
|
||||
shift
|
||||
|
||||
if "%1"=="-c" goto :setup
|
||||
|
||||
rem Initialize MESON_CROSS_FILE as empty
|
||||
set "MESON_CROSS_FILE="
|
||||
|
||||
rem Check if cross file exists (using %~dp0 for script directory)
|
||||
if exist "%~dp0cross-%ARCH%.build" (
|
||||
echo [DEBUG] Using cross file cross-%ARCH%.build
|
||||
set "MESON_CROSS_FILE=--cross-file cross-%ARCH%.build"
|
||||
)
|
||||
|
||||
echo === Locating Visual Studio ===
|
||||
|
||||
rem From https://github.com/microsoft/vswhere
|
||||
|
|
@ -65,8 +86,7 @@ if not exist "!VsDevCmd_Path!" (
|
|||
|
||||
echo === Configuring VC++ ===
|
||||
set VSCMD_SKIP_SENDTELEMETRY=1
|
||||
call "!VsDevCmd_Path!" -arch=!ARCH! -no_logo -startdir=none || exit !errorlevel!
|
||||
|
||||
call "!VsDevCmd_Path!" -arch=!ARCH! -host_arch=!HOST_ARCH! -no_logo -startdir=none || exit !errorlevel!
|
||||
cd %KEYMAN_ROOT%\core
|
||||
|
||||
set BUILDTYPE=%1
|
||||
|
|
@ -81,9 +101,9 @@ if "!COMMAND!" == "configure" (
|
|||
echo === Configuring Keyman Core for Windows !ARCH! !BUILDTYPE! ===
|
||||
if exist build\!ARCH!\!BUILDTYPE! rd /s/q build\!ARCH!\!BUILDTYPE!
|
||||
if "%1" == "--no-tests" (
|
||||
meson setup build\!ARCH!\!BUILDTYPE! !STATIC_LIBRARY! --buildtype !BUILDTYPE! -Dkeyman_core_tests=false --werror %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel!
|
||||
meson setup !MESON_CROSS_FILE! build\!ARCH!\!BUILDTYPE! !STATIC_LIBRARY! --buildtype !BUILDTYPE! -Dkeyman_core_tests=false --werror %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel!
|
||||
) else (
|
||||
meson setup build\!ARCH!\!BUILDTYPE! !STATIC_LIBRARY! --buildtype !BUILDTYPE! -Dkeyman_core_tests=true --werror %1 %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel!
|
||||
meson setup !MESON_CROSS_FILE! build\!ARCH!\!BUILDTYPE! !STATIC_LIBRARY! --buildtype !BUILDTYPE! -Dkeyman_core_tests=true --werror %1 %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel!
|
||||
)
|
||||
shift
|
||||
)
|
||||
|
|
@ -103,7 +123,6 @@ if "!COMMAND!" == "test" (
|
|||
cd ..\..\..
|
||||
shift
|
||||
)
|
||||
|
||||
goto :eof
|
||||
|
||||
rem ----------------------------------
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ case $BUILDER_OS in
|
|||
":win Both x86 and x64"
|
||||
":x86 32-bit Windows (x86) build"
|
||||
":x64 64-bit Windows (x64) build"
|
||||
":arm64 64-bit Windows (arm64) build"
|
||||
)
|
||||
;;
|
||||
mac)
|
||||
|
|
@ -96,12 +97,14 @@ builder_describe_internal_dependency \
|
|||
build:mac build:mac-x86_64 \
|
||||
build:mac build:mac-arm64 \
|
||||
build:win build:x86 \
|
||||
build:win build:x64
|
||||
build:win build:x64 \
|
||||
build:win build:arm64 \
|
||||
|
||||
builder_describe_outputs \
|
||||
configure:win /core/build/win/$BUILDER_CONFIGURATION/ \
|
||||
configure:x86 /core/build/x86/$BUILDER_CONFIGURATION/build.ninja \
|
||||
configure:x64 /core/build/x64/$BUILDER_CONFIGURATION/build.ninja \
|
||||
configure:arm64 /core/build/arm64/$BUILDER_CONFIGURATION/build.ninja \
|
||||
configure:mac /core/build/mac/$BUILDER_CONFIGURATION/ \
|
||||
configure:mac-x86_64 /core/build/mac-x86_64/$BUILDER_CONFIGURATION/build.ninja \
|
||||
configure:mac-arm64 /core/build/mac-arm64/$BUILDER_CONFIGURATION/build.ninja \
|
||||
|
|
@ -110,6 +113,7 @@ builder_describe_outputs \
|
|||
build:win /core/build/win/$BUILDER_CONFIGURATION/BUILT \
|
||||
build:x86 /core/build/x86/$BUILDER_CONFIGURATION/src/libkeymancore.a \
|
||||
build:x64 /core/build/x64/$BUILDER_CONFIGURATION/src/libkeymancore.a \
|
||||
build:arm64 /core/build/arm64/$BUILDER_CONFIGURATION/src/libkeymancore.a \
|
||||
build:mac /core/build/mac/$BUILDER_CONFIGURATION/libkeymancore.a \
|
||||
build:mac-x86_64 /core/build/mac-x86_64/$BUILDER_CONFIGURATION/src/libkeymancore.a \
|
||||
build:mac-arm64 /core/build/mac-arm64/$BUILDER_CONFIGURATION/src/libkeymancore.a \
|
||||
|
|
@ -130,7 +134,7 @@ fi
|
|||
# Iterate through all possible targets; note that targets that cannot be built
|
||||
# on the current platform have already been excluded through the archtargets
|
||||
# settings above
|
||||
targets=(wasm x86 x64 mac-x86_64 mac-arm64 arch)
|
||||
targets=(wasm x86 x64 arm64 mac-x86_64 mac-arm64 arch)
|
||||
|
||||
do_action() {
|
||||
local action_function=do_$1
|
||||
|
|
@ -191,6 +195,10 @@ if builder_start_action test:win; then
|
|||
meson test -C "$MESON_PATH" $testparams
|
||||
MESON_PATH="$KEYMAN_ROOT/core/build/x64/$BUILDER_CONFIGURATION"
|
||||
meson test -C "$MESON_PATH" $testparams
|
||||
# We do not yet have CI/build hardware support for arm64 Windows testing
|
||||
#MESON_PATH="$KEYMAN_ROOT/core/build/arm64/$BUILDER_CONFIGURATION"
|
||||
#meson test -C "$MESON_PATH" $testparams
|
||||
|
||||
builder_finish_action success test:win
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ do_configure() {
|
|||
STANDARD_MESON_ARGS="$STANDARD_MESON_ARGS --cross-file wasm.defs.build --cross-file wasm.build --default-library static"
|
||||
fi
|
||||
|
||||
if [[ $target =~ ^(x86|x64)$ ]]; then
|
||||
if [[ $target =~ ^(x86|x64|arm64)$ ]]; then
|
||||
cmd //C build.bat $target $BUILDER_CONFIGURATION configure $BUILD_BAT_keyman_core_tests "${builder_extra_params[@]}"
|
||||
else
|
||||
pushd "$THIS_SCRIPT_PATH" > /dev/null
|
||||
|
|
@ -69,7 +69,7 @@ do_configure() {
|
|||
do_build() {
|
||||
local target=$1
|
||||
builder_start_action build:$target || return 0
|
||||
if [[ $target =~ ^(x86|x64)$ ]]; then
|
||||
if [[ $target =~ ^(x86|x64|arm64)$ ]]; then
|
||||
cmd //C build.bat $target $BUILDER_CONFIGURATION build "${builder_extra_params[@]}"
|
||||
elif $MESON_LOW_VERSION; then
|
||||
pushd "$MESON_PATH" > /dev/null
|
||||
|
|
@ -88,7 +88,7 @@ do_build() {
|
|||
do_test() {
|
||||
local target=$1
|
||||
builder_start_action test:$target || return 0
|
||||
if [[ $target =~ ^(x86|x64)$ ]]; then
|
||||
if [[ $target =~ ^(x86|x64|arm64)$ ]]; then
|
||||
cmd //C build.bat $target $BUILDER_CONFIGURATION test $testparams
|
||||
else
|
||||
if [[ $target == wasm ]] && builder_is_macos; then
|
||||
|
|
|
|||
13
core/cross-arm64.build
Normal file
13
core/cross-arm64.build
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'aarch64'
|
||||
cpu = 'arm64'
|
||||
endian = 'little'
|
||||
|
||||
[binaries]
|
||||
c = 'cl'
|
||||
cpp = 'cl'
|
||||
ar = 'lib'
|
||||
ld = 'link'
|
||||
strip = 'llvm-strip' # optional; MSVC doesn’t have a native strip
|
||||
pkgconfig = 'pkg-config' # optional; used only if you have pkg-config installed
|
||||
13
core/cross-x64.build
Normal file
13
core/cross-x64.build
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'x86_64'
|
||||
cpu = 'x86_64'
|
||||
endian = 'little'
|
||||
|
||||
[binaries]
|
||||
c = 'cl'
|
||||
cpp = 'cl'
|
||||
ar = 'lib'
|
||||
ld = 'link'
|
||||
strip = 'llvm-strip'
|
||||
pkgconfig = 'pkg-config'
|
||||
|
|
@ -9,35 +9,44 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
|||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
|
||||
CORE_LDML_H_FILE="../../include/ldml/keyman_core_ldml.h"
|
||||
CORE_LDML_TS_FILE="../../include/ldml/keyman_core_ldml.ts"
|
||||
|
||||
################################ Main script ################################
|
||||
|
||||
builder_describe "Build and run the constant builder for LDML" clean build run
|
||||
builder_describe "Build and run the constant builder for LDML" clean configure build run test
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
# TODO: build if out-of-date if test is specified
|
||||
# TODO: configure if npm has not been run, and build is specified
|
||||
builder_describe_internal_dependency \
|
||||
run:project build:project \
|
||||
test:project run:project
|
||||
|
||||
builder_describe_outputs \
|
||||
configure "/node_modules" \
|
||||
build "/core/include/ldml/ldml-const-builder/ldml-const-builder.js" \
|
||||
run "/core/include/ldml/ldml-const-builder/run.txt"
|
||||
|
||||
if builder_start_action clean; then
|
||||
rm -rf ../../include/ldml/build/
|
||||
# Not removing ${CORE_LDML_H_FILE} as it is checked in
|
||||
builder_finish_action success clean
|
||||
fi
|
||||
|
||||
if builder_start_action build; then
|
||||
# Generate index.ts
|
||||
npx tsc -b ../../include/ldml/tsconfig.build.json
|
||||
|
||||
builder_finish_action success build
|
||||
fi
|
||||
|
||||
if builder_start_action run; then
|
||||
function do_run() {
|
||||
node --enable-source-maps ../../include/ldml/ldml-const-builder/ldml-const-builder.js > ${CORE_LDML_H_FILE}
|
||||
touch ../../include/ldml/ldml-const-builder/run.txt
|
||||
echo "Updated ${CORE_LDML_H_FILE}"
|
||||
}
|
||||
|
||||
builder_finish_action success run
|
||||
fi
|
||||
function do_test() {
|
||||
if ! git diff --exit-code "${CORE_LDML_H_FILE}"; then
|
||||
builder_echo error "File ${CORE_LDML_TS_FILE} has changed, but /core/tools/ldml-const-builder has not been run."
|
||||
builder_echo error "Run ${COLOR_BRIGHT_WHITE}$KEYMAN_ROOT/core/tools/ldml-const-build/build.sh run${COLOR_RESET} and commit changes"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# clean: Not removing ${CORE_LDML_H_FILE} as it is checked in
|
||||
builder_run_action clean rm -rf ../../include/ldml/build/ ../../include/ldml/ldml-const-builder/ ../../include/ldml/coverage/
|
||||
builder_run_action configure node_select_version_and_npm_ci
|
||||
builder_run_action build tsc -b ../../include/ldml/tsconfig.build.json
|
||||
builder_run_action run do_run
|
||||
builder_run_action test do_test
|
||||
|
||||
|
|
|
|||
|
|
@ -1,55 +1,87 @@
|
|||
## API Report File for "@keymanapp/kmc-analyze"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/common-types';
|
||||
import { CompilerEvent } from '@keymanapp/common-types';
|
||||
import { Osk } from '@keymanapp/kmc-kmn';
|
||||
|
||||
// @public
|
||||
export class AnalyzeOskCharacterUse {
|
||||
constructor(callbacks: CompilerCallbacks, options?: AnalyzeOskCharacterUseOptions);
|
||||
analyze(file: string): Promise<boolean>;
|
||||
clear(): void;
|
||||
getStrings(format?: '.txt' | '.md' | '.json'): string[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AnalyzeOskCharacterUseOptions {
|
||||
includeCounts?: boolean;
|
||||
puaBase?: number;
|
||||
stripDottedCircle?: boolean;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class AnalyzeOskRewritePua {
|
||||
constructor(callbacks: CompilerCallbacks);
|
||||
analyze(file: string, mapping: Osk.StringResult[]): Promise<boolean>;
|
||||
clear(): void;
|
||||
get data(): {
|
||||
[index: string]: Uint8Array;
|
||||
};
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "AnalyzerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal
|
||||
export class AnalyzerMessages {
|
||||
// (undocumented)
|
||||
static readonly FATAL_UnexpectedException: number;
|
||||
// (undocumented)
|
||||
static readonly Fatal_UnexpectedException: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static readonly INFO_ScanningFile: number;
|
||||
// (undocumented)
|
||||
static readonly Info_ScanningFile: (o: {
|
||||
type: string;
|
||||
name: string;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
```
|
||||
## API Report File for "@keymanapp/kmc-analyze"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/developer-utils';
|
||||
import { CompilerEvent } from '@keymanapp/developer-utils';
|
||||
import { Osk } from '@keymanapp/kmc-kmn';
|
||||
|
||||
// @public
|
||||
export class AnalyzeOskCharacterUse {
|
||||
constructor(callbacks: CompilerCallbacks, options?: AnalyzeOskCharacterUseOptions);
|
||||
analyze(file: string): Promise<boolean>;
|
||||
clear(): void;
|
||||
getStrings(format?: '.txt' | '.md' | '.json'): string[];
|
||||
// @internal (undocumented)
|
||||
unitTestEndPoints: {
|
||||
loadPreviousMap: (filename: string) => Osk.StringResult[];
|
||||
addStrings: (strings: string[], filename: string) => void;
|
||||
stringToUnicodeSequence: typeof AnalyzeOskCharacterUse.stringToUnicodeSequence;
|
||||
};
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AnalyzeOskCharacterUseOptions {
|
||||
includeCounts?: boolean;
|
||||
mergeMapFile?: string;
|
||||
puaBase?: number;
|
||||
stripDottedCircle?: boolean;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class AnalyzeOskRewritePua {
|
||||
constructor(callbacks: CompilerCallbacks);
|
||||
analyze(file: string, mapping: Osk.StringResult[]): Promise<boolean>;
|
||||
clear(): void;
|
||||
get data(): {
|
||||
[index: string]: Uint8Array;
|
||||
};
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "AnalyzerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal
|
||||
export class AnalyzerMessages {
|
||||
// (undocumented)
|
||||
static readonly FATAL_UnexpectedException: number;
|
||||
// (undocumented)
|
||||
static readonly Fatal_UnexpectedException: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static readonly INFO_ScanningFile: number;
|
||||
// (undocumented)
|
||||
static readonly Info_ScanningFile: (o: {
|
||||
type: string;
|
||||
name: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static readonly WARN_PreviousMapDidIncludeCounts: number;
|
||||
// (undocumented)
|
||||
static readonly Warn_PreviousMapDidIncludeCounts: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static readonly WARN_PreviousMapDidNotIncludeCounts: number;
|
||||
// (undocumented)
|
||||
static readonly Warn_PreviousMapDidNotIncludeCounts: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static readonly WARN_PreviousMapFileCouldNotBeLoaded: number;
|
||||
// (undocumented)
|
||||
static readonly Warn_PreviousMapFileCouldNotBeLoaded: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static readonly WARN_PreviousMapFileCouldNotBeLoadedDueToError: number;
|
||||
// (undocumented)
|
||||
static readonly Warn_PreviousMapFileCouldNotBeLoadedDueToError: (o: {
|
||||
filename: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
```
|
||||
|
|
|
|||
258
developer/docs/api/etc/kmc-copy.api.md
Normal file
258
developer/docs/api/etc/kmc-copy.api.md
Normal file
|
|
@ -0,0 +1,258 @@
|
|||
## API Report File for "@keymanapp/kmc-copy"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerAsyncCallbacks } from '@keymanapp/developer-utils';
|
||||
import { CompilerBaseOptions } from '@keymanapp/developer-utils';
|
||||
import { CompilerCallbacks } from '@keymanapp/developer-utils';
|
||||
import { CompilerEvent } from '@keymanapp/developer-utils';
|
||||
import { CompilerFileSystemAsyncCallbacks } from '@keymanapp/developer-utils';
|
||||
import { CompilerNetAsyncCallbacks } from '@keymanapp/developer-utils';
|
||||
import { CompilerPathCallbacks } from '@keymanapp/developer-utils';
|
||||
import { GitHubUrls } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompiler } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifact } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerResult } from '@keymanapp/developer-utils';
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "CopierMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class CopierMessages {
|
||||
// (undocumented)
|
||||
static ERROR_CannotCreateFolder: number;
|
||||
// (undocumented)
|
||||
static Error_CannotCreateFolder: (o: {
|
||||
folderName: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_CannotDownloadFolderFromGitHub: number;
|
||||
// (undocumented)
|
||||
static Error_CannotDownloadFolderFromGitHub: (o: {
|
||||
ref: string;
|
||||
message?: string;
|
||||
cause?: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_CannotDownloadRepoFromGitHub: number;
|
||||
// (undocumented)
|
||||
static Error_CannotDownloadRepoFromGitHub: (o: {
|
||||
ref: string;
|
||||
message?: string;
|
||||
cause?: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_CannotFindInputProject: number;
|
||||
// (undocumented)
|
||||
static Error_CannotFindInputProject: (o: {
|
||||
project: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_CannotWriteOutputFile: number;
|
||||
// (undocumented)
|
||||
static Error_CannotWriteOutputFile: (o: {
|
||||
filename: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_CloudDoesNotHaveSource: number;
|
||||
// (undocumented)
|
||||
static Error_CloudDoesNotHaveSource: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_CouldNotFindDefaultBranchOnGitHub: number;
|
||||
// (undocumented)
|
||||
static Error_CouldNotFindDefaultBranchOnGitHub: (o: {
|
||||
ref: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_CouldNotRetrieveFromCloud: number;
|
||||
// (undocumented)
|
||||
static Error_CouldNotRetrieveFromCloud: (o: {
|
||||
id: string;
|
||||
message?: string;
|
||||
cause?: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FolderDownloadedFromGitHubIsNotAValidFolder: number;
|
||||
// (undocumented)
|
||||
static Error_FolderDownloadedFromGitHubIsNotAValidFolder: (o: {
|
||||
ref: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidCloudKeyboardId: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidCloudKeyboardId: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidKeyboardId: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidKeyboardId: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidLexicalModelId: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidLexicalModelId: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_KeymanCloudReturnedInvalidData: number;
|
||||
// (undocumented)
|
||||
static Error_KeymanCloudReturnedInvalidData: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_OutputPathAlreadyExists: number;
|
||||
// (undocumented)
|
||||
static Error_OutputPathAlreadyExists: (o: {
|
||||
outPath: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_PackageFileCouldNotBeRead: number;
|
||||
// (undocumented)
|
||||
static Error_PackageFileCouldNotBeRead: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static FATAL_UnexpectedException: number;
|
||||
// (undocumented)
|
||||
static Fatal_UnexpectedException: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static INFO_CannotDownloadBinaryFileFromGitHub: number;
|
||||
// (undocumented)
|
||||
static Info_CannotDownloadBinaryFileFromGitHub: (o: {
|
||||
ref: string;
|
||||
message?: string;
|
||||
cause?: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static INFO_DryRun: number;
|
||||
// (undocumented)
|
||||
static Info_DryRun: (o: {
|
||||
outPath: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static INFO_DryRunCreatingFolder: number;
|
||||
// (undocumented)
|
||||
static Info_DryRunCreatingFolder: (o: {
|
||||
path: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static INFO_DryRunWritingFile: number;
|
||||
// (undocumented)
|
||||
static Info_DryRunWritingFile: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static VERBOSE_CopyingFile: number;
|
||||
// (undocumented)
|
||||
static Verbose_CopyingFile: (o: {
|
||||
from: string;
|
||||
to: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static VERBOSE_DownloadingFile: number;
|
||||
// (undocumented)
|
||||
static Verbose_DownloadingFile: (o: {
|
||||
filename: string;
|
||||
url: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static VERBOSE_DownloadingFolder: number;
|
||||
// (undocumented)
|
||||
static Verbose_DownloadingFolder: (o: {
|
||||
path: string;
|
||||
url: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_CannotDownloadFileFromGitHub: number;
|
||||
// (undocumented)
|
||||
static Warn_CannotDownloadFileFromGitHub: (o: {
|
||||
ref: string;
|
||||
message?: string;
|
||||
cause?: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_FilenameCollides: number;
|
||||
// (undocumented)
|
||||
static Warn_FilenameCollides: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_FileNotFound: number;
|
||||
// (undocumented)
|
||||
static Warn_FileNotFound: (o: {
|
||||
filename: string;
|
||||
newFilename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_ModelIdDoesNotFollowLexicalModelConventions: number;
|
||||
// (undocumented)
|
||||
static Warn_ModelIdDoesNotFollowLexicalModelConventions: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_NoWordlistsFound: number;
|
||||
// (undocumented)
|
||||
static Warn_NoWordlistsFound: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface CopierOptions extends CompilerBaseOptions {
|
||||
dryRun: boolean;
|
||||
outPath: string;
|
||||
relocateExternalFiles?: boolean;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class KeymanProjectCopier implements KeymanCompiler {
|
||||
// Warning: (ae-forgotten-export) The symbol "CopierAsyncCallbacks" needs to be exported by the entry point main.d.ts
|
||||
//
|
||||
// (undocumented)
|
||||
asyncCallbacks: CopierAsyncCallbacks;
|
||||
// (undocumented)
|
||||
callbacks: CompilerCallbacks;
|
||||
// Warning: (ae-forgotten-export) The symbol "KeymanCloudSource" needs to be exported by the entry point main.d.ts
|
||||
//
|
||||
// (undocumented)
|
||||
cloudSource: KeymanCloudSource;
|
||||
// Warning: (ae-forgotten-export) The symbol "GitHubRef" needs to be exported by the entry point main.d.ts
|
||||
//
|
||||
// (undocumented)
|
||||
githubRef: GitHubRef;
|
||||
// (undocumented)
|
||||
init(callbacks: CompilerCallbacks, options: CopierOptions): Promise<boolean>;
|
||||
// (undocumented)
|
||||
isLocalOrigin(): boolean;
|
||||
// (undocumented)
|
||||
options: CopierOptions;
|
||||
// (undocumented)
|
||||
outPath: string;
|
||||
// (undocumented)
|
||||
outputId: string;
|
||||
// Warning: (ae-forgotten-export) The symbol "CopierResult" needs to be exported by the entry point main.d.ts
|
||||
run(source: string): Promise<CopierResult>;
|
||||
// (undocumented)
|
||||
sourceId: string;
|
||||
// @internal (undocumented)
|
||||
unitTestEndPoints: {
|
||||
getGithubSourceProject: (source: string) => Promise<GitHubRef>;
|
||||
getCloudSourceProject: (source: string) => Promise<GitHubRef>;
|
||||
};
|
||||
// Warning: (ae-forgotten-export) The symbol "CopierArtifacts" needs to be exported by the entry point main.d.ts
|
||||
write(artifacts: CopierArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
181
developer/docs/api/etc/kmc-generate.api.md
Normal file
181
developer/docs/api/etc/kmc-generate.api.md
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
## API Report File for "@keymanapp/kmc-generate"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerBaseOptions } from '@keymanapp/developer-utils';
|
||||
import { CompilerCallbacks } from '@keymanapp/developer-utils';
|
||||
import { CompilerEvent } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompiler } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifact } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerResult } from '@keymanapp/developer-utils';
|
||||
import { KeymanTargets } from '@keymanapp/common-types';
|
||||
|
||||
// @public
|
||||
export class AbstractGenerator {
|
||||
// (undocumented)
|
||||
protected get callbacks(): CompilerCallbacks;
|
||||
protected defaultArtifacts(): GeneratorArtifacts;
|
||||
protected get filenameMap(): {
|
||||
[index: string]: string;
|
||||
};
|
||||
protected fullCopyright: string;
|
||||
protected get includedPrefixes(): string[];
|
||||
init(callbacks: CompilerCallbacks, options: GeneratorOptions): Promise<boolean>;
|
||||
// (undocumented)
|
||||
protected get options(): GeneratorOptions;
|
||||
// (undocumented)
|
||||
protected static readonly SFile_GitIgnore = ".gitignore";
|
||||
// (undocumented)
|
||||
protected static readonly SFile_HistoryMD = "HISTORY.md";
|
||||
// (undocumented)
|
||||
protected static readonly SFile_LicenseMD = "LICENSE.md";
|
||||
// (undocumented)
|
||||
protected static readonly SFile_ReadmeHTM: string;
|
||||
// (undocumented)
|
||||
protected static readonly SFile_ReadmeMD = "README.md";
|
||||
// (undocumented)
|
||||
protected static readonly SFile_WelcomeHTM: string;
|
||||
// (undocumented)
|
||||
protected static readonly SPath_Source = "source/";
|
||||
protected get templateBasePath(): string;
|
||||
// @internal (undocumented)
|
||||
get test_tokenMap(): {
|
||||
[index: string]: string;
|
||||
};
|
||||
protected get tokenMap(): {
|
||||
[index: string]: string;
|
||||
};
|
||||
// Warning: (ae-forgotten-export) The symbol "GeneratorArtifacts" needs to be exported by the entry point main.d.ts
|
||||
write(artifacts: GeneratorArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "GeneratorMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class GeneratorMessages {
|
||||
// (undocumented)
|
||||
static ERROR_CannotCreateFolder: number;
|
||||
// (undocumented)
|
||||
static Error_CannotCreateFolder: (o: {
|
||||
folderName: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_CannotWriteOutputFile: number;
|
||||
// (undocumented)
|
||||
static Error_CannotWriteOutputFile: (o: {
|
||||
filename: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidKeymanKeyboardId: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidKeymanKeyboardId: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidLdmlKeyboardId: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidLdmlKeyboardId: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidLexicalModelId: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidLexicalModelId: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidTarget: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidTarget: (o: {
|
||||
target: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_OutputPathAlreadyExists: number;
|
||||
// (undocumented)
|
||||
static Error_OutputPathAlreadyExists: (o: {
|
||||
outPath: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static FATAL_UnexpectedException: number;
|
||||
// (undocumented)
|
||||
static Fatal_UnexpectedException: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_ModelIdDoesNotFollowLexicalModelConventions: number;
|
||||
// (undocumented)
|
||||
static Warn_ModelIdDoesNotFollowLexicalModelConventions: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface GeneratorOptions extends CompilerBaseOptions {
|
||||
author?: string;
|
||||
copyright?: string;
|
||||
description?: string;
|
||||
id: string;
|
||||
keymanVersion?: string;
|
||||
languageTags?: string[];
|
||||
name?: string;
|
||||
outPath: string;
|
||||
targets?: KeymanTargets.KeymanTarget[];
|
||||
version?: string;
|
||||
}
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "BasicGenerator" needs to be exported by the entry point main.d.ts
|
||||
//
|
||||
// @public
|
||||
export class KeymanKeyboardGenerator extends BasicGenerator implements KeymanCompiler {
|
||||
// Warning: (ae-forgotten-export) The symbol "GeneratorResult" needs to be exported by the entry point main.d.ts
|
||||
run(): Promise<GeneratorResult>;
|
||||
// (undocumented)
|
||||
static readonly SFile_Keyboard = "keyboard";
|
||||
// (undocumented)
|
||||
static readonly SFile_KeyboardKMN: string;
|
||||
// (undocumented)
|
||||
static readonly SFile_KeyboardKPS: string;
|
||||
// (undocumented)
|
||||
static readonly SFile_KeyboardKVKS: string;
|
||||
// (undocumented)
|
||||
static readonly SFile_Project: string;
|
||||
// (undocumented)
|
||||
static readonly SFile_TouchLayout: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class LdmlKeyboardGenerator extends BasicGenerator implements KeymanCompiler {
|
||||
run(): Promise<GeneratorResult>;
|
||||
// (undocumented)
|
||||
protected static readonly SFile_Keyboard = "keyboard";
|
||||
// (undocumented)
|
||||
static readonly SFile_KeyboardXML: string;
|
||||
// (undocumented)
|
||||
static readonly SFile_Package: string;
|
||||
// (undocumented)
|
||||
static readonly SFile_Project: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class LexicalModelGenerator extends BasicGenerator implements KeymanCompiler {
|
||||
run(): Promise<GeneratorResult>;
|
||||
// (undocumented)
|
||||
static readonly SFile_Model = "model";
|
||||
// (undocumented)
|
||||
static readonly SFile_ModelTs: string;
|
||||
// (undocumented)
|
||||
static readonly SFile_Package: string;
|
||||
// (undocumented)
|
||||
static readonly SFile_Project: string;
|
||||
// (undocumented)
|
||||
static readonly SFile_WordlistTsv: string;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
|
|
@ -1,119 +1,157 @@
|
|||
## API Report File for "@keymanapp/kmc-keyboard-info"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/common-types';
|
||||
import { CompilerEvent } from '@keymanapp/common-types';
|
||||
import { CompilerOptions } from '@keymanapp/common-types';
|
||||
import { KeymanCompiler } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerArtifact } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerResult } from '@keymanapp/common-types';
|
||||
import { KmpJsonFile } from '@keymanapp/common-types';
|
||||
|
||||
// @public
|
||||
export class KeyboardInfoCompiler implements KeymanCompiler {
|
||||
constructor();
|
||||
// Warning: (ae-forgotten-export) The symbol "KeyboardInfoFileLanguageFont" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// @internal (undocumented)
|
||||
fontSourceToKeyboardInfoFont(kpsFilename: string, kmpJsonData: KmpJsonFile.KmpJsonFile, source: string[]): Promise<KeyboardInfoFileLanguageFont>;
|
||||
init(callbacks: CompilerCallbacks, options: KeyboardInfoCompilerOptions): Promise<boolean>;
|
||||
run(inputFilename: string, outputFilename?: string): Promise<KeyboardInfoCompilerResult>;
|
||||
write(artifacts: KeyboardInfoCompilerArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KeyboardInfoCompilerArtifacts extends KeymanCompilerArtifacts {
|
||||
keyboard_info: KeymanCompilerArtifact;
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "KeyboardInfoCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class KeyboardInfoCompilerMessages {
|
||||
// (undocumented)
|
||||
static ERROR_CannotBuildWithoutKmpFile: number;
|
||||
// (undocumented)
|
||||
static Error_CannotBuildWithoutKmpFile: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FileDoesNotExist: number;
|
||||
// (undocumented)
|
||||
static Error_FileDoesNotExist: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FontFileCannotBeRead: number;
|
||||
// (undocumented)
|
||||
static Error_FontFileCannotBeRead: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FontFileMetaDataIsInvalid: number;
|
||||
// (undocumented)
|
||||
static Error_FontFileMetaDataIsInvalid: (o: {
|
||||
filename: string;
|
||||
message: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidAuthorEmail: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidAuthorEmail: (o: {
|
||||
email: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LicenseFileIsDamaged: number;
|
||||
// (undocumented)
|
||||
static Error_LicenseFileIsDamaged: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LicenseFileIsMissing: number;
|
||||
// (undocumented)
|
||||
static Error_LicenseFileIsMissing: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LicenseIsNotValid: number;
|
||||
// (undocumented)
|
||||
static Error_LicenseIsNotValid: (o: {
|
||||
filename: string;
|
||||
message: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_NoLicenseFound: number;
|
||||
// (undocumented)
|
||||
static Error_NoLicenseFound: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static FATAL_UnexpectedException: number;
|
||||
// (undocumented)
|
||||
static Fatal_UnexpectedException: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KeyboardInfoCompilerOptions extends CompilerOptions {
|
||||
sources: KeyboardInfoSources;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KeyboardInfoCompilerResult extends KeymanCompilerResult {
|
||||
artifacts: KeyboardInfoCompilerArtifacts;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KeyboardInfoSources {
|
||||
forPublishing: boolean;
|
||||
jsFilename?: string;
|
||||
kmpFilename: string;
|
||||
kpsFilename: string;
|
||||
lastCommitDate?: string;
|
||||
sourcePath: string;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
## API Report File for "@keymanapp/kmc-keyboard-info"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/developer-utils';
|
||||
import { CompilerEvent } from '@keymanapp/developer-utils';
|
||||
import { CompilerOptions } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompiler } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifact } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerResult } from '@keymanapp/developer-utils';
|
||||
import { KmpJsonFile } from '@keymanapp/common-types';
|
||||
|
||||
// @public
|
||||
export class KeyboardInfoCompiler implements KeymanCompiler {
|
||||
// Warning: (ae-forgotten-export) The symbol "KeyboardInfoFileLanguageFont" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// @internal (undocumented)
|
||||
fontSourceToKeyboardInfoFont(kpsFilename: string, kmpJsonData: KmpJsonFile.KmpJsonFile, source: string[]): Promise<KeyboardInfoFileLanguageFont>;
|
||||
init(callbacks: CompilerCallbacks, options: KeyboardInfoCompilerOptions): Promise<boolean>;
|
||||
run(inputFilename: string, outputFilename?: string): Promise<KeyboardInfoCompilerResult>;
|
||||
// @internal (undocumented)
|
||||
unitTestEndPoints: {
|
||||
fillLanguageMetadata: (language: KeyboardInfoFileLanguage, bcp47: string, commonScript: string, firstBcp47: string) => {
|
||||
commonScript: string;
|
||||
firstBcp47: string;
|
||||
};
|
||||
};
|
||||
write(artifacts: KeyboardInfoCompilerArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KeyboardInfoCompilerArtifacts extends KeymanCompilerArtifacts {
|
||||
keyboard_info: KeymanCompilerArtifact;
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "KeyboardInfoCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class KeyboardInfoCompilerMessages {
|
||||
// (undocumented)
|
||||
static ERROR_CannotBuildWithoutKmpFile: number;
|
||||
// (undocumented)
|
||||
static Error_CannotBuildWithoutKmpFile: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_DescriptionIsMissing: number;
|
||||
// (undocumented)
|
||||
static Error_DescriptionIsMissing: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FileDoesNotExist: number;
|
||||
// (undocumented)
|
||||
static Error_FileDoesNotExist: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FontFileCannotBeRead: number;
|
||||
// (undocumented)
|
||||
static Error_FontFileCannotBeRead: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FontFileMetaDataIsInvalid: number;
|
||||
// (undocumented)
|
||||
static Error_FontFileMetaDataIsInvalid: (o: {
|
||||
filename: string;
|
||||
message: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidAuthorEmail: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidAuthorEmail: (o: {
|
||||
email: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LicenseFileIsDamaged: number;
|
||||
// (undocumented)
|
||||
static Error_LicenseFileIsDamaged: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LicenseFileIsMissing: number;
|
||||
// (undocumented)
|
||||
static Error_LicenseFileIsMissing: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LicenseIsNotValid: number;
|
||||
// (undocumented)
|
||||
static Error_LicenseIsNotValid: (o: {
|
||||
filename: string;
|
||||
message: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_NoLicenseFound: number;
|
||||
// (undocumented)
|
||||
static Error_NoLicenseFound: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static FATAL_UnexpectedException: number;
|
||||
// (undocumented)
|
||||
static Fatal_UnexpectedException: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_ScriptDoesNotMatch: number;
|
||||
// (undocumented)
|
||||
static Hint_ScriptDoesNotMatch: (o: {
|
||||
script: string;
|
||||
bcp47: string;
|
||||
commonScript: string;
|
||||
firstBcp47: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_LanguageTagNotFound: number;
|
||||
// (undocumented)
|
||||
static Warn_LanguageTagNotFound: (o: {
|
||||
bcp47: string;
|
||||
langSubtag: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_LanguageTagNotFound2: number;
|
||||
// (undocumented)
|
||||
static Warn_LanguageTagNotFound2: (o: {
|
||||
bcp47: string;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KeyboardInfoCompilerOptions extends CompilerOptions {
|
||||
sources: KeyboardInfoSources;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KeyboardInfoCompilerResult extends KeymanCompilerResult {
|
||||
artifacts: KeyboardInfoCompilerArtifacts;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KeyboardInfoSources {
|
||||
forPublishing: boolean;
|
||||
jsFilename?: string;
|
||||
kmpFilename: string;
|
||||
kpsFilename: string;
|
||||
lastCommitDate?: string;
|
||||
sourcePath: string;
|
||||
}
|
||||
|
||||
// Warnings were encountered during analysis:
|
||||
//
|
||||
// src/keyboard-info-compiler.ts:674:14 - (ae-forgotten-export) The symbol "KeyboardInfoFileLanguage" needs to be exported by the entry point index.d.ts
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,330 +1,365 @@
|
|||
## API Report File for "@keymanapp/kmc-ldml"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/common-types';
|
||||
import { CompilerEvent } from '@keymanapp/common-types';
|
||||
import { CompilerOptions } from '@keymanapp/common-types';
|
||||
import { KeymanCompiler } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerArtifactOptional } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerResult } from '@keymanapp/common-types';
|
||||
import { KMXPlus } from '@keymanapp/common-types';
|
||||
import { LDMLKeyboardTestDataXMLSourceFile } from '@keymanapp/common-types';
|
||||
import { LDMLKeyboardXMLSourceFileReaderOptions } from '@keymanapp/common-types';
|
||||
import { UnicodeSetParser } from '@keymanapp/common-types';
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "LdmlCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class LdmlCompilerMessages {
|
||||
// (undocumented)
|
||||
static ERROR_CantReferenceSetFromUnicodeSet: number;
|
||||
// (undocumented)
|
||||
static Error_CantReferenceSetFromUnicodeSet: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_DisplayIsRepeated: number;
|
||||
// (undocumented)
|
||||
static Error_DisplayIsRepeated: (o: {
|
||||
output?: string;
|
||||
keyId?: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_DisplayNeedsToOrId: number;
|
||||
// (undocumented)
|
||||
static Error_DisplayNeedsToOrId: (o: {
|
||||
output?: string;
|
||||
keyId?: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_DuplicateTransformsType: number;
|
||||
// (undocumented)
|
||||
static Error_DuplicateTransformsType: (o: {
|
||||
types: string[];
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_DuplicateVariable: number;
|
||||
// (undocumented)
|
||||
static Error_DuplicateVariable: (o: {
|
||||
ids: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_EmptyTransformGroup: number;
|
||||
// (undocumented)
|
||||
static Error_EmptyTransformGroup: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_ExcessHardware: number;
|
||||
// (undocumented)
|
||||
static Error_ExcessHardware: (o: {
|
||||
formId: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_GestureKeyNotFoundInKeyBag: number;
|
||||
// (undocumented)
|
||||
static Error_GestureKeyNotFoundInKeyBag: (o: {
|
||||
keyId: string;
|
||||
parentKeyId: string;
|
||||
attribute: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_HardwareLayerHasTooManyRows: number;
|
||||
// (undocumented)
|
||||
static Error_HardwareLayerHasTooManyRows: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_IllegalCharacters: number;
|
||||
// (undocumented)
|
||||
static Error_IllegalCharacters: (o: {
|
||||
count: number;
|
||||
lowestCh: number;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_IllegalTransformAsterisk: number;
|
||||
// (undocumented)
|
||||
static Error_IllegalTransformAsterisk: (o: {
|
||||
from: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_IllegalTransformDollarsign: number;
|
||||
// (undocumented)
|
||||
static Error_IllegalTransformDollarsign: (o: {
|
||||
from: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_IllegalTransformPlus: number;
|
||||
// (undocumented)
|
||||
static Error_IllegalTransformPlus: (o: {
|
||||
from: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidFile: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidFile: (o: {
|
||||
errorText: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidHardware: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidHardware: (o: {
|
||||
formId: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidLocale: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidLocale: (o: {
|
||||
tag: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidModifier: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidModifier: (o: {
|
||||
layer: string;
|
||||
modifiers: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidQuadEscape: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidQuadEscape: (o: {
|
||||
cp: number;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidScanCode: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidScanCode: (o: {
|
||||
form?: string;
|
||||
codes?: string[];
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidTransformsType: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidTransformsType: (o: {
|
||||
types: string[];
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidVersion: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidVersion: (o: {
|
||||
version: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_KeyMissingToGapOrSwitch: number;
|
||||
// (undocumented)
|
||||
static Error_KeyMissingToGapOrSwitch: (o: {
|
||||
keyId: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_KeyNotFoundInKeyBag: number;
|
||||
// (undocumented)
|
||||
static Error_KeyNotFoundInKeyBag: (o: {
|
||||
keyId: string;
|
||||
col: number;
|
||||
row: number;
|
||||
layer: string;
|
||||
form: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MissingFlicks: number;
|
||||
// (undocumented)
|
||||
static Error_MissingFlicks: (o: {
|
||||
flickId: string;
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MissingMarkers: number;
|
||||
// (undocumented)
|
||||
static Error_MissingMarkers: (o: {
|
||||
ids: string[];
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MissingSetVariable: number;
|
||||
// (undocumented)
|
||||
static Error_MissingSetVariable: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MissingStringVariable: number;
|
||||
// (undocumented)
|
||||
static Error_MissingStringVariable: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MissingUnicodeSetVariable: number;
|
||||
// (undocumented)
|
||||
static Error_MissingUnicodeSetVariable: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MixedTransformGroup: number;
|
||||
// (undocumented)
|
||||
static Error_MixedTransformGroup: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MustBeAtLeastOneLayerElement: number;
|
||||
// (undocumented)
|
||||
static Error_MustBeAtLeastOneLayerElement: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_NeedSpacesBetweenSetVariables: number;
|
||||
// (undocumented)
|
||||
static Error_NeedSpacesBetweenSetVariables: (o: {
|
||||
item: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_RowOnHardwareLayerHasTooManyKeys: number;
|
||||
// (undocumented)
|
||||
static Error_RowOnHardwareLayerHasTooManyKeys: (o: {
|
||||
row: number;
|
||||
hardware: string;
|
||||
modifiers: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_TransformFromMatchesNothing: number;
|
||||
// (undocumented)
|
||||
static Error_TransformFromMatchesNothing: (o: {
|
||||
from: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnparseableReorderSet: number;
|
||||
// (undocumented)
|
||||
static Error_UnparseableReorderSet: (o: {
|
||||
from: string;
|
||||
set: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnparseableTransformFrom: number;
|
||||
// (undocumented)
|
||||
static Error_UnparseableTransformFrom: (o: {
|
||||
from: string;
|
||||
message: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_CharClassImplicitDenorm: number;
|
||||
// (undocumented)
|
||||
static Hint_CharClassImplicitDenorm: (o: {
|
||||
lowestCh: number;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_LocaleIsNotMinimalAndClean: number;
|
||||
// (undocumented)
|
||||
static Hint_LocaleIsNotMinimalAndClean: (o: {
|
||||
sourceLocale: string;
|
||||
locale: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_NoDisplayForMarker: number;
|
||||
// (undocumented)
|
||||
static Hint_NoDisplayForMarker: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_NoDisplayForSwitch: number;
|
||||
// (undocumented)
|
||||
static Hint_NoDisplayForSwitch: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_NormalizationDisabled: number;
|
||||
// (undocumented)
|
||||
static Hint_NormalizationDisabled: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_OneOrMoreRepeatedLocales: number;
|
||||
// (undocumented)
|
||||
static Hint_OneOrMoreRepeatedLocales: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_PUACharacters: number;
|
||||
// (undocumented)
|
||||
static Hint_PUACharacters: (o: {
|
||||
count: number;
|
||||
lowestCh: number;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_CharClassExplicitDenorm: number;
|
||||
// (undocumented)
|
||||
static Warn_CharClassExplicitDenorm: (o: {
|
||||
lowestCh: number;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_CustomForm: number;
|
||||
// (undocumented)
|
||||
static Warn_CustomForm: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_UnassignedCharacters: number;
|
||||
// (undocumented)
|
||||
static Warn_UnassignedCharacters: (o: {
|
||||
count: number;
|
||||
lowestCh: number;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface LdmlCompilerOptions extends CompilerOptions {
|
||||
readerOptions: LDMLKeyboardXMLSourceFileReaderOptions;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class LdmlKeyboardCompiler implements KeymanCompiler {
|
||||
// @internal
|
||||
compile(source: LDMLKeyboardXMLSourceFile, postValidate?: boolean): Promise<KMXPlus.KMXPlusFile>;
|
||||
// @internal
|
||||
getUsetParser(): Promise<UnicodeSetParser>;
|
||||
init(callbacks: CompilerCallbacks, options: LdmlCompilerOptions): Promise<boolean>;
|
||||
// Warning: (ae-forgotten-export) The symbol "LDMLKeyboardXMLSourceFile" needs to be exported by the entry point main.d.ts
|
||||
//
|
||||
// @internal
|
||||
load(filename: string): LDMLKeyboardXMLSourceFile | null;
|
||||
// @internal
|
||||
loadTestData(filename: string): LDMLKeyboardTestDataXMLSourceFile | null;
|
||||
// Warning: (ae-forgotten-export) The symbol "LdmlKeyboardCompilerResult" needs to be exported by the entry point main.d.ts
|
||||
run(inputFilename: string, outputFilename?: string): Promise<LdmlKeyboardCompilerResult>;
|
||||
// @internal
|
||||
validate(source: LDMLKeyboardXMLSourceFile): Promise<boolean>;
|
||||
// Warning: (ae-forgotten-export) The symbol "LdmlKeyboardCompilerArtifacts" needs to be exported by the entry point main.d.ts
|
||||
write(artifacts: LdmlKeyboardCompilerArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
## API Report File for "@keymanapp/kmc-ldml"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/developer-utils';
|
||||
import { CompilerEvent } from '@keymanapp/developer-utils';
|
||||
import { CompilerOptions } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompiler } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifactOptional } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerResult } from '@keymanapp/developer-utils';
|
||||
import { KMXPlus } from '@keymanapp/common-types';
|
||||
import { LDMLKeyboardTestDataXMLSourceFile } from '@keymanapp/developer-utils';
|
||||
import { LdmlKeyboardTypes } from '@keymanapp/common-types';
|
||||
import { LDMLKeyboardXMLSourceFileReaderOptions } from '@keymanapp/developer-utils';
|
||||
import { ObjectWithCompileContext } from '@keymanapp/common-types';
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "LdmlCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class LdmlCompilerMessages {
|
||||
// (undocumented)
|
||||
static ERROR_CantReferenceSetFromUnicodeSet: number;
|
||||
// (undocumented)
|
||||
static Error_CantReferenceSetFromUnicodeSet: (o: {
|
||||
id: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_DisplayIsRepeated: number;
|
||||
// (undocumented)
|
||||
static Error_DisplayIsRepeated: (o: {
|
||||
display?: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_DisplayNeedsToOrId: number;
|
||||
// (undocumented)
|
||||
static Error_DisplayNeedsToOrId: (o: {
|
||||
display?: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_DuplicateLayerWidth: number;
|
||||
// (undocumented)
|
||||
static Error_DuplicateLayerWidth: (o: {
|
||||
minDeviceWidth: number;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_DuplicateTransformsType: number;
|
||||
// (undocumented)
|
||||
static Error_DuplicateTransformsType: (o: {
|
||||
type: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_DuplicateVariable: number;
|
||||
// (undocumented)
|
||||
static Error_DuplicateVariable: (o: {
|
||||
id: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_EmptyTransformGroup: number;
|
||||
// (undocumented)
|
||||
static Error_EmptyTransformGroup: (compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_ExcessHardware: number;
|
||||
// (undocumented)
|
||||
static Error_ExcessHardware: (o: {
|
||||
formId: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_GestureKeyNotFoundInKeyBag: number;
|
||||
// (undocumented)
|
||||
static Error_GestureKeyNotFoundInKeyBag: (o: {
|
||||
keyId: string;
|
||||
parentKeyId: string;
|
||||
attribute: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_HardwareLayerHasTooManyRows: number;
|
||||
// (undocumented)
|
||||
static Error_HardwareLayerHasTooManyRows: (compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_IllegalCharacters: number;
|
||||
// (undocumented)
|
||||
static Error_IllegalCharacters: (o: {
|
||||
count: number;
|
||||
lowestCh: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_IllegalTransformAsterisk: number;
|
||||
// (undocumented)
|
||||
static Error_IllegalTransformAsterisk: (o: {
|
||||
from: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_IllegalTransformDollarsign: number;
|
||||
// (undocumented)
|
||||
static Error_IllegalTransformDollarsign: (o: {
|
||||
from: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_IllegalTransformPlus: number;
|
||||
// (undocumented)
|
||||
static Error_IllegalTransformPlus: (o: {
|
||||
from: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_IllegalTransformToUset: number;
|
||||
// (undocumented)
|
||||
static Error_IllegalTransformToUset: (o: {
|
||||
to: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidFile: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidFile: (o: {
|
||||
errorText: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidHardware: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidHardware: (o: {
|
||||
formId: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidLayerWidth: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidLayerWidth: (o: {
|
||||
minDeviceWidth: number;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidLocale: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidLocale: (o: {
|
||||
tag: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidMarkerIdentifier: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidMarkerIdentifier: (o: {
|
||||
id: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidModifier: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidModifier: (o: {
|
||||
modifiers: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidQuadEscape: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidQuadEscape: (o: {
|
||||
cp: string;
|
||||
recommended: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidScanCode: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidScanCode: (o: {
|
||||
codes: string;
|
||||
id: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidTransformsType: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidTransformsType: (o: {
|
||||
type: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidVariableIdentifier: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidVariableIdentifier: (o: {
|
||||
id: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidVersion: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidVersion: (o: {
|
||||
version: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_KeyMissingToGapOrSwitch: number;
|
||||
// (undocumented)
|
||||
static Error_KeyMissingToGapOrSwitch: (o: {
|
||||
keyId: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_KeyNotFoundInKeyBag: number;
|
||||
// (undocumented)
|
||||
static Error_KeyNotFoundInKeyBag: (o: {
|
||||
keyId: string;
|
||||
col: number;
|
||||
row: number;
|
||||
layer: string;
|
||||
form: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MissingFlicks: number;
|
||||
// (undocumented)
|
||||
static Error_MissingFlicks: (o: {
|
||||
id: string;
|
||||
flickId: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MissingMarkers: number;
|
||||
// (undocumented)
|
||||
static Error_MissingMarkers: (o: {
|
||||
ids: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MissingSetVariable: number;
|
||||
// (undocumented)
|
||||
static Error_MissingSetVariable: (o: {
|
||||
id: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MissingStringVariable: number;
|
||||
// (undocumented)
|
||||
static Error_MissingStringVariable: (o: {
|
||||
id: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MissingUnicodeSetVariable: number;
|
||||
// (undocumented)
|
||||
static Error_MissingUnicodeSetVariable: (o: {
|
||||
id: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MixedTransformGroup: number;
|
||||
// (undocumented)
|
||||
static Error_MixedTransformGroup: (compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MustBeAtLeastOneLayerElement: number;
|
||||
// (undocumented)
|
||||
static Error_MustBeAtLeastOneLayerElement: (compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_NeedSpacesBetweenSetVariables: number;
|
||||
// (undocumented)
|
||||
static Error_NeedSpacesBetweenSetVariables: (o: {
|
||||
item: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_RowOnHardwareLayerHasTooManyKeys: number;
|
||||
// (undocumented)
|
||||
static Error_RowOnHardwareLayerHasTooManyKeys: (o: {
|
||||
row: number;
|
||||
hardware: string;
|
||||
modifiers: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_TransformFromMatchesNothing: number;
|
||||
// (undocumented)
|
||||
static Error_TransformFromMatchesNothing: (o: {
|
||||
from: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnparseableTransformFrom: number;
|
||||
// (undocumented)
|
||||
static Error_UnparseableTransformFrom: (o: {
|
||||
from: string;
|
||||
message: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnparseableTransformTo: number;
|
||||
// (undocumented)
|
||||
static Error_UnparseableTransformTo: (o: {
|
||||
to: string;
|
||||
message: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_CharClassImplicitDenorm: number;
|
||||
// (undocumented)
|
||||
static Hint_CharClassImplicitDenorm: (o: {
|
||||
lowestCh: number;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_LocaleIsNotMinimalAndClean: number;
|
||||
// (undocumented)
|
||||
static Hint_LocaleIsNotMinimalAndClean: (o: {
|
||||
sourceLocale: string;
|
||||
locale: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_NoDisplayForMarker: number;
|
||||
// (undocumented)
|
||||
static Hint_NoDisplayForMarker: (o: {
|
||||
id: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_NoDisplayForSwitch: number;
|
||||
// (undocumented)
|
||||
static Hint_NoDisplayForSwitch: (o: {
|
||||
id: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_NormalizationDisabled: number;
|
||||
// (undocumented)
|
||||
static Hint_NormalizationDisabled: (compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_OneOrMoreRepeatedLocales: number;
|
||||
// (undocumented)
|
||||
static Hint_OneOrMoreRepeatedLocales: (compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_PUACharacters: number;
|
||||
// (undocumented)
|
||||
static Hint_PUACharacters: (o: {
|
||||
count: number;
|
||||
lowestCh: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_CharClassExplicitDenorm: number;
|
||||
// (undocumented)
|
||||
static Warn_CharClassExplicitDenorm: (o: {
|
||||
lowestCh: number;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_CustomForm: number;
|
||||
// (undocumented)
|
||||
static Warn_CustomForm: (o: {
|
||||
id: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_StringDenorm: number;
|
||||
// (undocumented)
|
||||
static Warn_StringDenorm: (o: {
|
||||
s: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_UnassignedCharacters: number;
|
||||
// (undocumented)
|
||||
static Warn_UnassignedCharacters: (o: {
|
||||
count: number;
|
||||
lowestCh: string;
|
||||
}, compileContext?: ObjectWithCompileContext) => CompilerEvent;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface LdmlCompilerOptions extends CompilerOptions {
|
||||
readerOptions: LDMLKeyboardXMLSourceFileReaderOptions;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class LdmlKeyboardCompiler implements KeymanCompiler {
|
||||
// @internal
|
||||
compile(source: LDMLKeyboardXMLSourceFile, postValidate?: boolean): Promise<KMXPlus.KMXPlusFile>;
|
||||
// @internal
|
||||
getUsetParser(): Promise<LdmlKeyboardTypes.UnicodeSetParser>;
|
||||
init(callbacks: CompilerCallbacks, options: LdmlCompilerOptions): Promise<boolean>;
|
||||
// Warning: (ae-forgotten-export) The symbol "LDMLKeyboardXMLSourceFile" needs to be exported by the entry point main.d.ts
|
||||
//
|
||||
// @internal
|
||||
load(filename: string): LDMLKeyboardXMLSourceFile | null;
|
||||
// @internal
|
||||
loadTestData(filename: string): LDMLKeyboardTestDataXMLSourceFile | null;
|
||||
// Warning: (ae-forgotten-export) The symbol "LdmlKeyboardCompilerResult" needs to be exported by the entry point main.d.ts
|
||||
run(inputFilename: string, outputFilename?: string): Promise<LdmlKeyboardCompilerResult>;
|
||||
// @internal
|
||||
validate(source: LDMLKeyboardXMLSourceFile): Promise<boolean>;
|
||||
// Warning: (ae-forgotten-export) The symbol "LdmlKeyboardCompilerArtifacts" needs to be exported by the entry point main.d.ts
|
||||
write(artifacts: LdmlKeyboardCompilerArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,115 +1,121 @@
|
|||
## API Report File for "@keymanapp/kmc-model-info"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/common-types';
|
||||
import { CompilerEvent } from '@keymanapp/common-types';
|
||||
import { CompilerOptions } from '@keymanapp/common-types';
|
||||
import { KeymanCompiler } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerArtifact } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerResult } from '@keymanapp/common-types';
|
||||
import { KmpJsonFile } from '@keymanapp/common-types';
|
||||
|
||||
// @public
|
||||
export class ModelInfoCompiler implements KeymanCompiler {
|
||||
constructor();
|
||||
init(callbacks: CompilerCallbacks, options: ModelInfoCompilerOptions): Promise<boolean>;
|
||||
run(inputFilename: string, outputFilename?: string): Promise<ModelInfoCompilerResult>;
|
||||
write(artifacts: ModelInfoCompilerArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ModelInfoCompilerArtifacts extends KeymanCompilerArtifacts {
|
||||
model_info: KeymanCompilerArtifact;
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "ModelInfoCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class ModelInfoCompilerMessages {
|
||||
// (undocumented)
|
||||
static ERROR_FileDoesNotExist: number;
|
||||
// (undocumented)
|
||||
static Error_FileDoesNotExist: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FileIsNotValid: number;
|
||||
// (undocumented)
|
||||
static Error_FileIsNotValid: (o: {
|
||||
filename: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidAuthorEmail: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidAuthorEmail: (o: {
|
||||
email: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LicenseFileIsDamaged: number;
|
||||
// (undocumented)
|
||||
static Error_LicenseFileIsDamaged: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LicenseFileIsMissing: number;
|
||||
// (undocumented)
|
||||
static Error_LicenseFileIsMissing: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LicenseIsNotValid: number;
|
||||
// (undocumented)
|
||||
static Error_LicenseIsNotValid: (o: {
|
||||
filename: string;
|
||||
message: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_NoLicenseFound: number;
|
||||
// (undocumented)
|
||||
static Error_NoLicenseFound: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static FATAL_UnexpectedException: number;
|
||||
// (undocumented)
|
||||
static Fatal_UnexpectedException: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_MetadataFieldInconsistent: number;
|
||||
// (undocumented)
|
||||
static Warn_MetadataFieldInconsistent: (o: {
|
||||
field: string;
|
||||
value: any;
|
||||
expected: any;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ModelInfoCompilerOptions extends CompilerOptions {
|
||||
sources: ModelInfoSources;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ModelInfoCompilerResult extends KeymanCompilerResult {
|
||||
artifacts: ModelInfoCompilerArtifacts;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class ModelInfoSources {
|
||||
forPublishing: boolean;
|
||||
kmpFileName: string;
|
||||
kmpJsonData: KmpJsonFile.KmpJsonFile;
|
||||
kpsFilename: string;
|
||||
lastCommitDate?: string;
|
||||
model_id: string;
|
||||
modelFileName: string;
|
||||
sourcePath: string;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
## API Report File for "@keymanapp/kmc-model-info"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/developer-utils';
|
||||
import { CompilerEvent } from '@keymanapp/developer-utils';
|
||||
import { CompilerOptions } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompiler } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifact } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerResult } from '@keymanapp/developer-utils';
|
||||
import { KmpJsonFile } from '@keymanapp/common-types';
|
||||
|
||||
// @public
|
||||
export class ModelInfoCompiler implements KeymanCompiler {
|
||||
constructor();
|
||||
init(callbacks: CompilerCallbacks, options: ModelInfoCompilerOptions): Promise<boolean>;
|
||||
run(inputFilename: string, outputFilename?: string): Promise<ModelInfoCompilerResult>;
|
||||
write(artifacts: ModelInfoCompilerArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ModelInfoCompilerArtifacts extends KeymanCompilerArtifacts {
|
||||
model_info: KeymanCompilerArtifact;
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "ModelInfoCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class ModelInfoCompilerMessages {
|
||||
// (undocumented)
|
||||
static ERROR_DescriptionIsMissing: number;
|
||||
// (undocumented)
|
||||
static Error_DescriptionIsMissing: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FileDoesNotExist: number;
|
||||
// (undocumented)
|
||||
static Error_FileDoesNotExist: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FileIsNotValid: number;
|
||||
// (undocumented)
|
||||
static Error_FileIsNotValid: (o: {
|
||||
filename: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidAuthorEmail: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidAuthorEmail: (o: {
|
||||
email: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LicenseFileIsDamaged: number;
|
||||
// (undocumented)
|
||||
static Error_LicenseFileIsDamaged: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LicenseFileIsMissing: number;
|
||||
// (undocumented)
|
||||
static Error_LicenseFileIsMissing: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LicenseIsNotValid: number;
|
||||
// (undocumented)
|
||||
static Error_LicenseIsNotValid: (o: {
|
||||
filename: string;
|
||||
message: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_NoLicenseFound: number;
|
||||
// (undocumented)
|
||||
static Error_NoLicenseFound: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static FATAL_UnexpectedException: number;
|
||||
// (undocumented)
|
||||
static Fatal_UnexpectedException: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_MetadataFieldInconsistent: number;
|
||||
// (undocumented)
|
||||
static Warn_MetadataFieldInconsistent: (o: {
|
||||
field: string;
|
||||
value: any;
|
||||
expected: any;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ModelInfoCompilerOptions extends CompilerOptions {
|
||||
sources: ModelInfoSources;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ModelInfoCompilerResult extends KeymanCompilerResult {
|
||||
artifacts: ModelInfoCompilerArtifacts;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class ModelInfoSources {
|
||||
forPublishing: boolean;
|
||||
kmpFileName: string;
|
||||
kmpJsonData: KmpJsonFile.KmpJsonFile;
|
||||
kpsFilename: string;
|
||||
lastCommitDate?: string;
|
||||
model_id: string;
|
||||
modelFileName: string;
|
||||
sourcePath: string;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,137 +1,152 @@
|
|||
## API Report File for "@keymanapp/kmc-model"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
/// <reference types="@keymanapp/common-types" />
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/common-types';
|
||||
import { CompilerEvent } from '@keymanapp/common-types';
|
||||
import { CompilerOptions } from '@keymanapp/common-types';
|
||||
import { KeymanCompiler } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerArtifact } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerResult } from '@keymanapp/common-types';
|
||||
|
||||
// @public
|
||||
export type CasedWordformToKeySpec = (term: string, applyCasing?: CasingFunction) => string;
|
||||
|
||||
// @public
|
||||
export class LexicalModelCompiler implements KeymanCompiler {
|
||||
// @internal
|
||||
generateLexicalModelCode(model_id: string, modelSource: LexicalModelSource, sourcePath: string): string;
|
||||
init(callbacks: CompilerCallbacks, _options: CompilerOptions): Promise<boolean>;
|
||||
// @internal
|
||||
loadFromFilename(filename: string): LexicalModelSource;
|
||||
run(inputFilename: string, outputFilename?: string): Promise<LexicalModelCompilerResult>;
|
||||
// @internal (undocumented)
|
||||
transpileSources(sources: Array<string>): Array<string>;
|
||||
write(artifacts: LexicalModelCompilerArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface LexicalModelCompilerArtifacts extends KeymanCompilerArtifacts {
|
||||
js: KeymanCompilerArtifact;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface LexicalModelCompilerResult extends KeymanCompilerResult {
|
||||
artifacts: LexicalModelCompilerArtifacts;
|
||||
}
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "LexicalModelDeclaration" needs to be exported by the entry point main.d.ts
|
||||
//
|
||||
// @public
|
||||
export interface LexicalModelSource extends LexicalModelDeclaration {
|
||||
readonly applyCasing?: CasingFunction;
|
||||
readonly languageUsesCasing?: boolean;
|
||||
readonly punctuation?: LexicalModelPunctuation;
|
||||
readonly rootClass?: string;
|
||||
readonly searchTermToKey?: WordformToKeySpec;
|
||||
// (undocumented)
|
||||
readonly sources: Array<string>;
|
||||
readonly wordBreaker?: WordBreakerSpec | SimpleWordBreakerSpec;
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "ModelCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class ModelCompilerMessages {
|
||||
// (undocumented)
|
||||
static ERROR_NoDefaultExport: number;
|
||||
// (undocumented)
|
||||
static Error_NoDefaultExport: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_SearchTermToKeyMustBeExplicitlySpecified: number;
|
||||
// (undocumented)
|
||||
static Error_SearchTermToKeyMustBeExplicitlySpecified: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnimplementedModelFormat: number;
|
||||
// (undocumented)
|
||||
static Error_UnimplementedModelFormat: (o: {
|
||||
format: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnknownModelFormat: number;
|
||||
// (undocumented)
|
||||
static Error_UnknownModelFormat: (o: {
|
||||
format: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnknownWordBreaker: number;
|
||||
// (undocumented)
|
||||
static Error_UnknownWordBreaker: (o: {
|
||||
spec: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnsupportedScriptOverride: number;
|
||||
// (undocumented)
|
||||
static Error_UnsupportedScriptOverride: (o: {
|
||||
option: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UTF16BEUnsupported: number;
|
||||
// (undocumented)
|
||||
static Error_UTF16BEUnsupported: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static FATAL_UnexpectedException: number;
|
||||
// (undocumented)
|
||||
static Fatal_UnexpectedException: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_DuplicateWordInSameFile: number;
|
||||
// (undocumented)
|
||||
static Hint_DuplicateWordInSameFile: (o: {
|
||||
wordform: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_MixedNormalizationForms: number;
|
||||
// (undocumented)
|
||||
static Hint_MixedNormalizationForms: (o: {
|
||||
wordform: string;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type SimpleWordBreakerSpec = 'default' | 'ascii' | WordBreakingFunction;
|
||||
|
||||
// @public
|
||||
export type SimpleWordformToKeySpec = (term: string) => string;
|
||||
|
||||
// @public
|
||||
export interface WordBreakerSpec {
|
||||
readonly joinWordsAt?: string[];
|
||||
// Warning: (ae-forgotten-export) The symbol "OverrideScriptDefaults" needs to be exported by the entry point main.d.ts
|
||||
readonly overrideScriptDefaults?: OverrideScriptDefaults;
|
||||
// (undocumented)
|
||||
readonly use: SimpleWordBreakerSpec;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type WordformToKeySpec = SimpleWordformToKeySpec | CasedWordformToKeySpec;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
## API Report File for "@keymanapp/kmc-model"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/developer-utils';
|
||||
import { CompilerEvent } from '@keymanapp/developer-utils';
|
||||
import { CompilerOptions } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompiler } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifact } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerResult } from '@keymanapp/developer-utils';
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "CasingFunction" needs to be exported by the entry point main.d.ts
|
||||
//
|
||||
// @public
|
||||
export type CasedWordformToKeySpec = (term: string, applyCasing?: CasingFunction) => string;
|
||||
|
||||
// @public
|
||||
export class LexicalModelCompiler implements KeymanCompiler {
|
||||
// @internal
|
||||
generateLexicalModelCode(model_id: string, modelSource: LexicalModelSource, sourcePath: string): string;
|
||||
init(callbacks: CompilerCallbacks, _options: CompilerOptions): Promise<boolean>;
|
||||
// @internal
|
||||
loadFromFilename(filename: string): LexicalModelSource;
|
||||
run(inputFilename: string, outputFilename?: string): Promise<LexicalModelCompilerResult>;
|
||||
// @internal (undocumented)
|
||||
transpileSources(sources: Array<string>): Array<string>;
|
||||
write(artifacts: LexicalModelCompilerArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface LexicalModelCompilerArtifacts extends KeymanCompilerArtifacts {
|
||||
js: KeymanCompilerArtifact;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface LexicalModelCompilerResult extends KeymanCompilerResult {
|
||||
artifacts: LexicalModelCompilerArtifacts;
|
||||
}
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "LexicalModelDeclaration" needs to be exported by the entry point main.d.ts
|
||||
//
|
||||
// @public
|
||||
export interface LexicalModelSource extends LexicalModelDeclaration {
|
||||
readonly applyCasing?: CasingFunction;
|
||||
readonly languageUsesCasing?: boolean;
|
||||
// Warning: (ae-forgotten-export) The symbol "LexicalModelPunctuation" needs to be exported by the entry point main.d.ts
|
||||
readonly punctuation?: LexicalModelPunctuation;
|
||||
readonly rootClass?: string;
|
||||
readonly searchTermToKey?: WordformToKeySpec;
|
||||
// (undocumented)
|
||||
readonly sources: Array<string>;
|
||||
readonly wordBreaker?: WordBreakerSpec | SimpleWordBreakerSpec;
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "ModelCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class ModelCompilerMessages {
|
||||
// (undocumented)
|
||||
static ERROR_ModelFileNotFound: number;
|
||||
// (undocumented)
|
||||
static Error_ModelFileNotFound: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_NoDefaultExport: number;
|
||||
// (undocumented)
|
||||
static Error_NoDefaultExport: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_SearchTermToKeyMustBeExplicitlySpecified: number;
|
||||
// (undocumented)
|
||||
static Error_SearchTermToKeyMustBeExplicitlySpecified: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnimplementedModelFormat: number;
|
||||
// (undocumented)
|
||||
static Error_UnimplementedModelFormat: (o: {
|
||||
format: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnknownModelFormat: number;
|
||||
// (undocumented)
|
||||
static Error_UnknownModelFormat: (o: {
|
||||
format: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnknownWordBreaker: number;
|
||||
// (undocumented)
|
||||
static Error_UnknownWordBreaker: (o: {
|
||||
spec: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnsupportedScriptOverride: number;
|
||||
// (undocumented)
|
||||
static Error_UnsupportedScriptOverride: (o: {
|
||||
option: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UTF16BEUnsupported: number;
|
||||
// (undocumented)
|
||||
static Error_UTF16BEUnsupported: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_WordlistFileNotFound: number;
|
||||
// (undocumented)
|
||||
static Error_WordlistFileNotFound: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static FATAL_UnexpectedException: number;
|
||||
// (undocumented)
|
||||
static Fatal_UnexpectedException: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_DuplicateWordInSameFile: number;
|
||||
// (undocumented)
|
||||
static Hint_DuplicateWordInSameFile: (o: {
|
||||
wordform: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_MixedNormalizationForms: number;
|
||||
// (undocumented)
|
||||
static Hint_MixedNormalizationForms: (o: {
|
||||
wordform: string;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "WordBreakingFunction" needs to be exported by the entry point main.d.ts
|
||||
//
|
||||
// @public
|
||||
export type SimpleWordBreakerSpec = 'default' | 'ascii' | WordBreakingFunction;
|
||||
|
||||
// @public
|
||||
export type SimpleWordformToKeySpec = (term: string) => string;
|
||||
|
||||
// @public
|
||||
export interface WordBreakerSpec {
|
||||
readonly joinWordsAt?: string[];
|
||||
// Warning: (ae-forgotten-export) The symbol "OverrideScriptDefaults" needs to be exported by the entry point main.d.ts
|
||||
readonly overrideScriptDefaults?: OverrideScriptDefaults;
|
||||
// (undocumented)
|
||||
readonly use: SimpleWordBreakerSpec;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type WordformToKeySpec = SimpleWordformToKeySpec | CasedWordformToKeySpec;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,296 +1,347 @@
|
|||
## API Report File for "@keymanapp/kmc-package"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/common-types';
|
||||
import { CompilerEvent } from '@keymanapp/common-types';
|
||||
import { CompilerOptions } from '@keymanapp/common-types';
|
||||
import { KeymanCompiler } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerArtifact } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/common-types';
|
||||
import { KeymanCompilerResult } from '@keymanapp/common-types';
|
||||
import { KmpJsonFile } from '@keymanapp/common-types';
|
||||
import { KpsFile } from '@keymanapp/common-types';
|
||||
|
||||
// @public
|
||||
export class KmpCompiler implements KeymanCompiler {
|
||||
// @internal
|
||||
buildKmpFile(kpsFilename: string, kmpJsonData: KmpJsonFile.KmpJsonFile): Promise<Uint8Array>;
|
||||
init(callbacks: CompilerCallbacks, options: KmpCompilerOptions): Promise<boolean>;
|
||||
// @internal (undocumented)
|
||||
loadKpsFile(kpsFilename: string): KpsFile.KpsFile;
|
||||
// (undocumented)
|
||||
readonly normalizePath: (path: string) => string;
|
||||
run(inputFilename: string, outputFilename?: string): Promise<KmpCompilerResult>;
|
||||
// @internal (undocumented)
|
||||
transformKpsFileToKmpObject(kpsFilename: string, kps: KpsFile.KpsFile): KmpJsonFile.KmpJsonFile;
|
||||
// @internal (undocumented)
|
||||
transformKpsToKmpObject(kpsFilename: string): KmpJsonFile.KmpJsonFile;
|
||||
write(artifacts: KmpCompilerArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KmpCompilerArtifacts extends KeymanCompilerArtifacts {
|
||||
kmp: KeymanCompilerArtifact;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KmpCompilerOptions extends CompilerOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KmpCompilerResult extends KeymanCompilerResult {
|
||||
artifacts: KmpCompilerArtifacts;
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "PackageCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class PackageCompilerMessages {
|
||||
// (undocumented)
|
||||
static ERROR_FileCouldNotBeRead: number;
|
||||
// (undocumented)
|
||||
static Error_FileCouldNotBeRead: (o: {
|
||||
filename: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FileDoesNotExist: number;
|
||||
// (undocumented)
|
||||
static Error_FileDoesNotExist: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FileRecordIsMissingName: number;
|
||||
// (undocumented)
|
||||
static Error_FileRecordIsMissingName: (o: {
|
||||
description: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FollowKeyboardVersionButNoKeyboards: number;
|
||||
// (undocumented)
|
||||
static Error_FollowKeyboardVersionButNoKeyboards: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FollowKeyboardVersionNotAllowedForModelPackages: number;
|
||||
// (undocumented)
|
||||
static Error_FollowKeyboardVersionNotAllowedForModelPackages: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidAuthorEmail: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidAuthorEmail: (o: {
|
||||
email: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidPackageFile: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidPackageFile: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_KeyboardContentFileNotFound: number;
|
||||
// (undocumented)
|
||||
static Error_KeyboardContentFileNotFound: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_KeyboardFileNotFound: number;
|
||||
// (undocumented)
|
||||
static Error_KeyboardFileNotFound: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_KeyboardFileNotValid: number;
|
||||
// (undocumented)
|
||||
static Error_KeyboardFileNotValid: (o: {
|
||||
filename: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LanguageTagIsNotValid: number;
|
||||
// (undocumented)
|
||||
static Error_LanguageTagIsNotValid: (o: {
|
||||
resourceType: string;
|
||||
id: string;
|
||||
lang: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_ModelMustHaveAtLeastOneLanguage: number;
|
||||
// (undocumented)
|
||||
static Error_ModelMustHaveAtLeastOneLanguage: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_PackageCannotContainBothModelsAndKeyboards: number;
|
||||
// (undocumented)
|
||||
static Error_PackageCannotContainBothModelsAndKeyboards: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_PackageMustContainAModelOrAKeyboard: number;
|
||||
// (undocumented)
|
||||
static Error_PackageMustContainAModelOrAKeyboard: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_PackageNameCannotBeBlank: number;
|
||||
// (undocumented)
|
||||
static Error_PackageNameCannotBeBlank: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static FATAL_UnexpectedException: number;
|
||||
// (undocumented)
|
||||
static Fatal_UnexpectedException: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_JsKeyboardFileHasNoTouchTargets: number;
|
||||
// (undocumented)
|
||||
static Hint_JsKeyboardFileHasNoTouchTargets: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_LanguageTagIsNotMinimal: number;
|
||||
// (undocumented)
|
||||
static Hint_LanguageTagIsNotMinimal: (o: {
|
||||
resourceType: string;
|
||||
id: string;
|
||||
actual: string;
|
||||
expected: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_PackageContainsSourceFile: number;
|
||||
// (undocumented)
|
||||
static Hint_PackageContainsSourceFile: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_PackageShouldNotRepeatLanguages: number;
|
||||
// (undocumented)
|
||||
static Hint_PackageShouldNotRepeatLanguages: (o: {
|
||||
resourceType: string;
|
||||
id: string;
|
||||
minimalTag: string;
|
||||
firstTag: string;
|
||||
secondTag: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static INFO_KeyboardFileHasNoKeyboardVersion: number;
|
||||
// (undocumented)
|
||||
static Info_KeyboardFileHasNoKeyboardVersion: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_AbsolutePath: number;
|
||||
// (undocumented)
|
||||
static Warn_AbsolutePath: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_DocFileDangerous: number;
|
||||
// (undocumented)
|
||||
static Warn_DocFileDangerous: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_FileInPackageDoesNotFollowFilenameConventions: number;
|
||||
// (undocumented)
|
||||
static Warn_FileInPackageDoesNotFollowFilenameConventions: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_FileIsNotABinaryKvkFile: number;
|
||||
// (undocumented)
|
||||
static Warn_FileIsNotABinaryKvkFile: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_JsKeyboardFileIsMissing: number;
|
||||
// (undocumented)
|
||||
static Warn_JsKeyboardFileIsMissing: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_KeyboardShouldHaveAtLeastOneLanguage: number;
|
||||
// (undocumented)
|
||||
static Warn_KeyboardShouldHaveAtLeastOneLanguage: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_KeyboardVersionsDoNotMatch: number;
|
||||
// (undocumented)
|
||||
static Warn_KeyboardVersionsDoNotMatch: (o: {
|
||||
keyboard: string;
|
||||
version: string;
|
||||
firstKeyboard: string;
|
||||
firstVersion: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_PackageNameDoesNotFollowKeyboardConventions: number;
|
||||
// (undocumented)
|
||||
static Warn_PackageNameDoesNotFollowKeyboardConventions: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_PackageNameDoesNotFollowLexicalModelConventions: number;
|
||||
// (undocumented)
|
||||
static Warn_PackageNameDoesNotFollowLexicalModelConventions: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_RedistFileShouldNotBeInPackage: number;
|
||||
// (undocumented)
|
||||
static Warn_RedistFileShouldNotBeInPackage: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "PackageValidation" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class PackageValidation {
|
||||
constructor(callbacks: CompilerCallbacks, options: CompilerOptions);
|
||||
// (undocumented)
|
||||
validate(filename: string, kmpJson: KmpJsonFile.KmpJsonFile): boolean;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class WindowsPackageInstallerCompiler implements KeymanCompiler {
|
||||
init(callbacks: CompilerCallbacks, options: WindowsPackageInstallerCompilerOptions): Promise<boolean>;
|
||||
run(inputFilename: string, outputFilename?: string): Promise<WindowsPackageInstallerCompilerResult>;
|
||||
write(artifacts: WindowsPackageInstallerCompilerArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface WindowsPackageInstallerCompilerArtifacts extends KeymanCompilerArtifacts {
|
||||
exe: KeymanCompilerArtifact;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface WindowsPackageInstallerCompilerOptions extends KmpCompilerOptions {
|
||||
sources: WindowsPackageInstallerSources;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface WindowsPackageInstallerCompilerResult extends KeymanCompilerResult {
|
||||
artifacts: WindowsPackageInstallerCompilerArtifacts;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface WindowsPackageInstallerSources {
|
||||
// (undocumented)
|
||||
appName?: string;
|
||||
// (undocumented)
|
||||
licenseFilename: string;
|
||||
// (undocumented)
|
||||
msiFilename: string;
|
||||
// (undocumented)
|
||||
setupExeFilename: string;
|
||||
// (undocumented)
|
||||
startDisabled: boolean;
|
||||
// (undocumented)
|
||||
startWithConfiguration: boolean;
|
||||
// (undocumented)
|
||||
titleImageFilename?: string;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
## API Report File for "@keymanapp/kmc-package"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/developer-utils';
|
||||
import { CompilerEvent } from '@keymanapp/developer-utils';
|
||||
import { CompilerOptions } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompiler } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifact } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerResult } from '@keymanapp/developer-utils';
|
||||
import { KmpJsonFile } from '@keymanapp/common-types';
|
||||
import { KpsFile } from '@keymanapp/developer-utils';
|
||||
|
||||
// @public
|
||||
export class KmpCompiler implements KeymanCompiler {
|
||||
// @internal
|
||||
buildKmpFile(kpsFilename: string, kmpJsonData: KmpJsonFile.KmpJsonFile): Promise<Uint8Array>;
|
||||
init(callbacks: CompilerCallbacks, options: KmpCompilerOptions): Promise<boolean>;
|
||||
// (undocumented)
|
||||
readonly normalizePath: (path: string) => string;
|
||||
run(inputFilename: string, outputFilename?: string): Promise<KmpCompilerResult>;
|
||||
// @internal (undocumented)
|
||||
transformKpsFileToKmpObject(kpsFilename: string, kps: KpsFile.KpsFile): KmpJsonFile.KmpJsonFile;
|
||||
// @internal (undocumented)
|
||||
transformKpsToKmpObject(kpsFilename: string): KmpJsonFile.KmpJsonFile;
|
||||
write(artifacts: KmpCompilerArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KmpCompilerArtifacts extends KeymanCompilerArtifacts {
|
||||
kmp: KeymanCompilerArtifact;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KmpCompilerOptions extends CompilerOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface KmpCompilerResult extends KeymanCompilerResult {
|
||||
artifacts: KmpCompilerArtifacts;
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "PackageCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class PackageCompilerMessages {
|
||||
// (undocumented)
|
||||
static ERROR_FileCouldNotBeRead: number;
|
||||
// (undocumented)
|
||||
static Error_FileCouldNotBeRead: (o: {
|
||||
filename: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FileDoesNotExist: number;
|
||||
// (undocumented)
|
||||
static Error_FileDoesNotExist: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FileRecordIsMissingName: number;
|
||||
// (undocumented)
|
||||
static Error_FileRecordIsMissingName: (o: {
|
||||
description: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FollowKeyboardVersionButNoKeyboards: number;
|
||||
// (undocumented)
|
||||
static Error_FollowKeyboardVersionButNoKeyboards: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_FollowKeyboardVersionNotAllowedForModelPackages: number;
|
||||
// (undocumented)
|
||||
static Error_FollowKeyboardVersionNotAllowedForModelPackages: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidAuthorEmail: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidAuthorEmail: (o: {
|
||||
email: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_KeyboardContentFileNotFound: number;
|
||||
// (undocumented)
|
||||
static Error_KeyboardContentFileNotFound: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_KeyboardFileNotFound: number;
|
||||
// (undocumented)
|
||||
static Error_KeyboardFileNotFound: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_KeyboardFileNotValid: number;
|
||||
// (undocumented)
|
||||
static Error_KeyboardFileNotValid: (o: {
|
||||
filename: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_LanguageTagIsNotValid: number;
|
||||
// (undocumented)
|
||||
static Error_LanguageTagIsNotValid: (o: {
|
||||
resourceType: string;
|
||||
id: string;
|
||||
lang: string;
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MissingKeyboardId: number;
|
||||
// (undocumented)
|
||||
static Error_MissingKeyboardId: (o: {
|
||||
index: number;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_MissingModelId: number;
|
||||
// (undocumented)
|
||||
static Error_MissingModelId: (o: {
|
||||
index: number;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_ModelMustHaveAtLeastOneLanguage: number;
|
||||
// (undocumented)
|
||||
static Error_ModelMustHaveAtLeastOneLanguage: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_PackageCannotContainBothModelsAndKeyboards: number;
|
||||
// (undocumented)
|
||||
static Error_PackageCannotContainBothModelsAndKeyboards: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_PackageFileHasEmptyVersion: number;
|
||||
// (undocumented)
|
||||
static Error_PackageFileHasEmptyVersion: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_PackageMustContainAModelOrAKeyboard: number;
|
||||
// (undocumented)
|
||||
static Error_PackageMustContainAModelOrAKeyboard: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_PackageMustNotContainItself: number;
|
||||
// (undocumented)
|
||||
static Error_PackageMustNotContainItself: (o: {
|
||||
outputFilename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_PackageNameCannotBeBlank: number;
|
||||
// (undocumented)
|
||||
static Error_PackageNameCannotBeBlank: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_RequiredParameterMissing: number;
|
||||
// (undocumented)
|
||||
static Error_RequiredParameterMissing: (o: {
|
||||
param: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static FATAL_UnexpectedException: number;
|
||||
// (undocumented)
|
||||
static Fatal_UnexpectedException: (o: {
|
||||
e: any;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_JsKeyboardFileHasNoTouchTargets: number;
|
||||
// (undocumented)
|
||||
static Hint_JsKeyboardFileHasNoTouchTargets: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_LanguageTagIsNotMinimal: number;
|
||||
// (undocumented)
|
||||
static Hint_LanguageTagIsNotMinimal: (o: {
|
||||
resourceType: string;
|
||||
id: string;
|
||||
actual: string;
|
||||
expected: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_PackageContainsSourceFile: number;
|
||||
// (undocumented)
|
||||
static Hint_PackageContainsSourceFile: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static HINT_PackageShouldNotRepeatLanguages: number;
|
||||
// (undocumented)
|
||||
static Hint_PackageShouldNotRepeatLanguages: (o: {
|
||||
resourceType: string;
|
||||
id: string;
|
||||
minimalTag: string;
|
||||
firstTag: string;
|
||||
secondTag: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static INFO_KeyboardFileHasNoKeyboardVersion: number;
|
||||
// (undocumented)
|
||||
static Info_KeyboardFileHasNoKeyboardVersion: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_AbsolutePath: number;
|
||||
// (undocumented)
|
||||
static Warn_AbsolutePath: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_CannotFindFontForKeyboard: number;
|
||||
// (undocumented)
|
||||
static Warn_CannotFindFontForKeyboard: (o: {
|
||||
id: string;
|
||||
fontFilename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_CannotFindMatchingKeyboardForVisualKeyboard: number;
|
||||
// (undocumented)
|
||||
static Warn_CannotFindMatchingKeyboardForVisualKeyboard: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_CannotReadFont: number;
|
||||
// (undocumented)
|
||||
static Warn_CannotReadFont: (o: {
|
||||
fontFilename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_DocFileDangerous: number;
|
||||
// (undocumented)
|
||||
static Warn_DocFileDangerous: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_FileInPackageDoesNotFollowFilenameConventions: number;
|
||||
// (undocumented)
|
||||
static Warn_FileInPackageDoesNotFollowFilenameConventions: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_FileIsNotABinaryKvkFile: number;
|
||||
// (undocumented)
|
||||
static Warn_FileIsNotABinaryKvkFile: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_JsKeyboardFileIsMissing: number;
|
||||
// (undocumented)
|
||||
static Warn_JsKeyboardFileIsMissing: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_KeyboardShouldHaveAtLeastOneLanguage: number;
|
||||
// (undocumented)
|
||||
static Warn_KeyboardShouldHaveAtLeastOneLanguage: (o: {
|
||||
id: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_KeyboardVersionsDoNotMatch: number;
|
||||
// (undocumented)
|
||||
static Warn_KeyboardVersionsDoNotMatch: (o: {
|
||||
keyboard: string;
|
||||
version: string;
|
||||
firstKeyboard: string;
|
||||
firstVersion: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_PackageNameDoesNotFollowKeyboardConventions: number;
|
||||
// (undocumented)
|
||||
static Warn_PackageNameDoesNotFollowKeyboardConventions: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_PackageNameDoesNotFollowLexicalModelConventions: number;
|
||||
// (undocumented)
|
||||
static Warn_PackageNameDoesNotFollowLexicalModelConventions: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_PackageVersionIsUnrecognizedFormat: number;
|
||||
// (undocumented)
|
||||
static Warn_PackageVersionIsUnrecognizedFormat: (o: {
|
||||
version: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_RedistFileShouldNotBeInPackage: number;
|
||||
// (undocumented)
|
||||
static Warn_RedistFileShouldNotBeInPackage: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static WARN_VisualKeyboardFileIsInvalid: number;
|
||||
// (undocumented)
|
||||
static Warn_VisualKeyboardFileIsInvalid: (o: {
|
||||
filename: string;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "PackageValidation" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class PackageValidation {
|
||||
constructor(callbacks: CompilerCallbacks, options: CompilerOptions);
|
||||
// (undocumented)
|
||||
validate(filename: string, outputFilename: string, kmpJson: KmpJsonFile.KmpJsonFile): boolean;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class WindowsPackageInstallerCompiler implements KeymanCompiler {
|
||||
init(callbacks: CompilerCallbacks, options: WindowsPackageInstallerCompilerOptions): Promise<boolean>;
|
||||
run(inputFilename: string, outputFilename?: string): Promise<WindowsPackageInstallerCompilerResult>;
|
||||
write(artifacts: WindowsPackageInstallerCompilerArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface WindowsPackageInstallerCompilerArtifacts extends KeymanCompilerArtifacts {
|
||||
exe: KeymanCompilerArtifact;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface WindowsPackageInstallerCompilerOptions extends KmpCompilerOptions {
|
||||
sources: WindowsPackageInstallerSources;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface WindowsPackageInstallerCompilerResult extends KeymanCompilerResult {
|
||||
artifacts: WindowsPackageInstallerCompilerArtifacts;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface WindowsPackageInstallerSources {
|
||||
// (undocumented)
|
||||
appName?: string;
|
||||
// (undocumented)
|
||||
licenseFilename: string;
|
||||
// (undocumented)
|
||||
msiFilename: string;
|
||||
// (undocumented)
|
||||
setupExeFilename: string;
|
||||
// (undocumented)
|
||||
startDisabled: boolean;
|
||||
// (undocumented)
|
||||
startWithConfiguration: boolean;
|
||||
// (undocumented)
|
||||
titleImageFilename?: string;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue