chore(android): Merge remote-tracking branch 'origin/master' into feat/android/kmw-sentry

This commit is contained in:
Darcy Wong 2020-11-16 08:17:27 +07:00
commit 9942c5d2be
113 changed files with 2538 additions and 328 deletions

View file

@ -1,5 +1,37 @@
# Keyman Version History
## 14.0.181 alpha 2020-11-13
* fix(common/core/web): fixes no-output logic check, arrow keys (#3848)
* fix(common/core/web): adds missing null-check (#3859)
## 14.0.180 alpha 2020-11-12
* fix(windows): makefile format error (#3854)
## 14.0.179 alpha 2020-11-12
* fix(windows): Import OSK wrong for European layouts (#3830)
* fix(windows): SizeOfImage header was wrong for dbg (#3833)
* chore(windows): symbol server support (#3834)
* fix(windows): sporadic 8087 control word corruption (#3842)
## 14.0.178 alpha 2020-11-10
* fix(developer): Remove IE dependency from Developer Setup (#3839)
## 14.0.177 alpha 2020-11-07
* fix(developer): support for notany() and context() (#3816)
* fix(web): support for notany() and context() (#3817)
* fix(developer): debug window inherits editor font (#3829)
## 14.0.176 alpha 2020-11-05
* fix(developer): remove obsolete NRSIAllTags (#3819)
* fix(developer): Incorrect script:language map (#3818)
* fix(android/app): Remove network check on "Get Started" menu (#3823)
## 14.0.175 alpha 2020-11-04
* feat(android/engine): Add check for associated model on ModelPickerActivity (#3808)

View file

@ -1 +1 @@
14.0.176
14.0.182

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/input-processor",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/input-processor",
"version": "14.0.176",
"version": "14.0.182",
"description": "The core text and prediction processing engine for KeymanWeb",
"repository": {
"type": "git",
@ -18,7 +18,7 @@
},
"homepage": "https://github.com/keymanapp/keyman#readme",
"devDependencies": {
"@keymanapp/resources-gosh": "^14.0.176",
"@keymanapp/resources-gosh": "^14.0.182",
"chai": "^4.2.0",
"mocha": "^5.2.0",
"typescript": "^3.8.3"
@ -29,11 +29,11 @@
"test": "gosh ./unit_tests/test.sh"
},
"dependencies": {
"@keymanapp/keyboard-processor": "^14.0.176",
"@keymanapp/lexical-model-layer": "^14.0.176",
"@keymanapp/models-types": "^14.0.176",
"@keymanapp/web-environment": "^14.0.176",
"@keymanapp/web-utils": "^14.0.176",
"@keymanapp/keyboard-processor": "^14.0.182",
"@keymanapp/lexical-model-layer": "^14.0.182",
"@keymanapp/models-types": "^14.0.182",
"@keymanapp/web-environment": "^14.0.182",
"@keymanapp/web-utils": "^14.0.182",
"@types/node": "^11.9.4",
"eventemitter3": "^4.0.0",
"ts-node": "^8.0.2"

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/keyboard-processor",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/keyboard-processor",
"version": "14.0.176",
"version": "14.0.182",
"description": "Core module for Keyman keyboard support in KeymanWeb.",
"repository": {
"type": "git",
@ -18,7 +18,7 @@
},
"homepage": "https://github.com/keymanapp/keyman#readme",
"devDependencies": {
"@keymanapp/resources-gosh": "^14.0.176",
"@keymanapp/resources-gosh": "^14.0.182",
"chai": "^4.2.0",
"mocha": "^5.2.0",
"mocha-teamcity-reporter": "^3.0.0",
@ -31,9 +31,9 @@
"mocha": "mocha"
},
"dependencies": {
"@keymanapp/models-types": "^14.0.176",
"@keymanapp/web-environment": "^14.0.176",
"@keymanapp/web-utils": "^14.0.176",
"@keymanapp/models-types": "^14.0.182",
"@keymanapp/web-environment": "^14.0.182",
"@keymanapp/web-utils": "^14.0.182",
"@types/node": "^11.9.4",
"ts-node": "^8.0.2"
}

View file

@ -48,7 +48,7 @@ namespace com.keyman.text {
// case Codes.keyCodes['K_TABFWD']:
// return '\t';
default:
return '';
return null;
}
}
}

View file

@ -26,7 +26,7 @@ namespace com.keyman.text {
type PlainKeyboardStore = string;
export type KeyboardStoreElement = (string|StoreNonCharEntry);
export type ComplexKeyboardStore = KeyboardStoreElement[];
export type ComplexKeyboardStore = KeyboardStoreElement[];
type KeyboardStore = PlainKeyboardStore | ComplexKeyboardStore;
@ -65,12 +65,12 @@ namespace com.keyman.text {
/** Discriminant field - 'i' for `index()`.
*/
['t']: 'i';
/**
* Value: the Store from which to output
*/
['i']: KeyboardStore;
/**
* Offset: the offset in context for the corresponding `any()`.
*/
@ -81,7 +81,7 @@ namespace com.keyman.text {
/** Discriminant field - 'c' for `context()`.
*/
['t']: 'c';
/**
* Value: The offset into the current rule's context to be matched.
*/
@ -108,16 +108,16 @@ namespace com.keyman.text {
/**
* Cache of context storing and retrieving return values from KC
* Must be reset prior to each keystroke and after any text changes
* MCD 3/1/14
**/
* MCD 3/1/14
**/
class CachedContext {
_cache: string[][];
reset(): void {
this._cache = [];
reset(): void {
this._cache = [];
}
get(n: number, ln: number): string {
get(n: number, ln: number): string {
// return null; // uncomment this line to disable context caching
if(typeof this._cache[n] == 'undefined') {
return null;
@ -127,22 +127,22 @@ namespace com.keyman.text {
return this._cache[n][ln];
}
set(n: number, ln: number, val: string): void {
if(typeof this._cache[n] == 'undefined') {
this._cache[n] = [];
}
this._cache[n][ln] = val;
set(n: number, ln: number, val: string): void {
if(typeof this._cache[n] == 'undefined') {
this._cache[n] = [];
}
this._cache[n][ln] = val;
}
};
type CachedExEntry = {valContext: (string|number)[], deadContext: text.Deadkey[]};
/**
* An extended version of cached context storing designed to work with
/**
* An extended version of cached context storing designed to work with
* `fullContextMatch` and its helper functions.
*/
class CachedContextEx {
_cache: CachedExEntry[][];
reset(): void {
this._cache = [];
}
@ -157,11 +157,17 @@ namespace com.keyman.text {
return this._cache[n][ln];
}
set(n: number, ln: number, val: CachedExEntry): void {
if(typeof this._cache[n] == 'undefined') {
this._cache[n] = [];
}
this._cache[n][ln] = val;
set(n: number, ln: number, val: CachedExEntry): void {
if(typeof this._cache[n] == 'undefined') {
this._cache[n] = [];
}
this._cache[n][ln] = val;
}
clone(): CachedContextEx {
let r = new CachedContextEx();
r._cache = this._cache;
return r;
}
};
@ -172,6 +178,7 @@ namespace com.keyman.text {
cachedContext: CachedContext = new CachedContext();
cachedContextEx: CachedContextEx = new CachedContextEx();
ruleContextEx: CachedContextEx;
activeTargetOutput: OutputTarget;
ruleBehavior: RuleBehavior;
@ -191,7 +198,7 @@ namespace com.keyman.text {
constructor(variableStoreSerializer: VariableStoreSerializer = null) {
this.systemStores = {};
this.systemStores[KeyboardInterface.TSS_PLATFORM] = new PlatformSystemStore(this);
this.systemStores[KeyboardInterface.TSS_LAYER] = new MutableSystemStore(KeyboardInterface.TSS_LAYER, 'default');
@ -201,61 +208,61 @@ namespace com.keyman.text {
/**
* Function KSF
* Scope Public
*
*
* Saves the document's current focus settings on behalf of the keyboard. Often paired with insertText.
*/
*/
saveFocus(): void { }
/**
* A text-insertion method used by custom OSKs for helpHTML interaction, like with sil_euro_latin.
*
*
* This function currently bypasses web-core's standard text handling control path and all predictive text processing.
* It also has DOM-dependencies that help ensure KMW's active OutputTarget retains focus during use.
*/
insertText?: (Ptext: string, PdeadKey: number) => boolean;
/**
* Function registerKeyboard KR
* Function registerKeyboard KR
* Scope Public
* @param {Object} Pk Keyboard object
* Description Registers a keyboard with KeymanWeb once its script has fully loaded.
*
*
* In web-core, this also activates the keyboard; in other modules, this method
* may be replaced with other implementations.
*/
*/
registerKeyboard(Pk): void {
// NOTE: This implementation is web-core specific and is intentionally replaced, whole-sale,
// NOTE: This implementation is web-core specific and is intentionally replaced, whole-sale,
// by DOM-aware code.
let keyboard = new keyboards.Keyboard(Pk);
this.activeKeyboard = keyboard;
}
/**
* Used by DOM-aware KeymanWeb to add keyboard stubs, used by the `KeyboardManager` type
* Used by DOM-aware KeymanWeb to add keyboard stubs, used by the `KeyboardManager` type
* to optimize resource use.
*/
*/
registerStub?: (Pstub) => number;
/**
* Get *cached or uncached* keyboard context for a specified range, relative to caret
*
*
* @param {number} n Number of characters to move back from caret
* @param {number} ln Number of characters to return
* @param {Object} Pelem Element to work with (must be currently focused element)
* @return {string} Context string
*
* @return {string} Context string
*
* Example [abcdef|ghi] as INPUT, with the caret position marked by |:
* KC(2,1,Pelem) == "e"
* KC(3,3,Pelem) == "def"
* KC(10,10,Pelem) == "abcdef" i.e. return as much as possible of the requested string
*/
*/
context(n: number, ln: number, outputTarget: OutputTarget): string {
var v = this.cachedContext.get(n, ln);
if(v !== null) {
return v;
}
var r = this.KC_(n, ln, outputTarget);
this.cachedContext.set(n, ln, r);
return r;
@ -263,17 +270,17 @@ namespace com.keyman.text {
/**
* Get (uncached) keyboard context for a specified range, relative to caret
*
*
* @param {number} n Number of characters to move back from caret
* @param {number} ln Number of characters to return
* @param {Object} Pelem Element to work with (must be currently focused element)
* @return {string} Context string
*
* @return {string} Context string
*
* Example [abcdef|ghi] as INPUT, with the caret position marked by |:
* KC(2,1,Pelem) == "e"
* KC(3,3,Pelem) == "def"
* KC(10,10,Pelem) == "XXXXabcdef" i.e. return as much as possible of the requested string, where X = \uFFFE
*/
*/
private KC_(n: number, ln: number, outputTarget: OutputTarget): string {
var tempContext = '';
@ -285,29 +292,29 @@ namespace com.keyman.text {
return tempContext._kmwSubstr(-n)._kmwSubstr(0,ln);
}
/**
* Function nul KN
* Function nul KN
* Scope Public
* @param {number} n Length of context to check
* @param {Object} Ptarg Element to work with (must be currently focused element)
* @return {boolean} True if length of context is less than or equal to n
* Description Test length of context, return true if the length of the context is less than or equal to n
*
*
* Example [abc|def] as INPUT, with the caret position marked by |:
* KN(3,Pelem) == TRUE
* KN(2,Pelem) == FALSE
* KN(4,Pelem) == TRUE
*/
*/
nul(n: number, outputTarget: OutputTarget): boolean {
var cx=this.context(n+1, 1, outputTarget);
// With #31, the result will be a replacement character if context is empty.
return cx === "\uFFFE";
}
/**
* Function contextMatch KCM
* Function contextMatch KCM
* Scope Public
* @param {number} n Number of characters to move back from caret
* @param {Object} Ptarg Focused element
@ -315,7 +322,7 @@ namespace com.keyman.text {
* @param {number} ln Number of characters to return
* @return {boolean} True if selected context matches val
* Description Test keyboard context for match
*/
*/
contextMatch(n: number, outputTarget: OutputTarget, val: string, ln: number): boolean {
var cx=this.context(n, ln, outputTarget);
if(cx === val) {
@ -327,14 +334,14 @@ namespace com.keyman.text {
/**
* Builds the *cached or uncached* keyboard context for a specified range, relative to caret
*
*
* @param {number} n Number of characters to move back from caret
* @param {number} ln Number of characters to return
* @param {Object} Pelem Element to work with (must be currently focused element)
* @return {Array} Context array (of strings and numbers)
* @return {Array} Context array (of strings and numbers)
*/
private _BuildExtendedContext(n: number, ln: number, outputTarget: OutputTarget): CachedExEntry {
var cache: CachedExEntry = this.cachedContextEx.get(n, ln);
var cache: CachedExEntry = this.cachedContextEx.get(n, ln);
if(cache !== null) {
return cache;
} else {
@ -398,13 +405,14 @@ namespace com.keyman.text {
* @param {Object} Ptarg Focused element
* @param {Array} rule An array of ContextEntries to match.
* @return {boolean} True if the fully-specified rule context matches the current KMW state.
*
*
* A KMW 10+ function designed to bring KMW closer to Keyman Desktop functionality,
* near-directly modeling (externally) the compiled form of Desktop rules' context section.
*/
fullContextMatch(n: number, outputTarget: OutputTarget, rule: ContextEntry[]): boolean {
// Stage one: build the context index map.
var fullContext = this._BuildExtendedContext(n, rule.length, outputTarget);
this.ruleContextEx = this.cachedContextEx.clone();
var context = fullContext.valContext;
var deadContext = fullContext.deadContext;
@ -431,7 +439,7 @@ namespace com.keyman.text {
var r = rule[i] as ContextNonCharEntry;
switch(r.t) {
case 'd':
// We still need to set a flag here;
// We still need to set a flag here;
if(r['d'] !== context[i]) {
mismatch = true;
} else {
@ -457,7 +465,7 @@ namespace com.keyman.text {
deadContext[i].set();
}
// 'n' for 'notany'. If we actually match or if we have nul context (\uFFFE), notany fails.
} else if(r.n && (result || context[i] !== NUL_CONTEXT)) {
} else if(r.n && (result || context[i] === NUL_CONTEXT)) {
mismatch = true;
}
break;
@ -471,7 +479,7 @@ namespace com.keyman.text {
deadContext[i].set();
}
break;
case 'c':
case 'c':
if(context[r.c - 1] !== context[i]) {
mismatch = true;
} else if(deadContext[i] !== undefined) {
@ -500,12 +508,12 @@ namespace com.keyman.text {
}
/**
* Function KIK
* Function KIK
* Scope Public
* @param {Object} e keystroke event
* @return {boolean} true if keypress event
* Description Test if event as a keypress event
*/
*/
isKeypress(e: KeyEvent): boolean {
if(this.activeKeyboard.isMnemonic) { // I1380 - support KIK for positional layouts
return !e.LisVirtualKey; // will now return true for U_xxxx keys, but not for T_xxxx keys
@ -513,16 +521,16 @@ namespace com.keyman.text {
return KeyMapping._USKeyCodeToCharCode(e) ? true : false; // I1380 - support KIK for positional layouts
}
}
/**
* Function keyMatch KKM
* Function keyMatch KKM
* Scope Public
* @param {Object} e keystroke event
* @param {number} Lruleshift
* @param {number} Lrulekey
* @return {boolean} True if key matches rule
* Description Test keystroke with modifiers against rule
*/
*/
keyMatch(e: KeyEvent, Lruleshift:number, Lrulekey:number): boolean {
var retVal = false; // I3318
var keyCode = (e.Lcode == 173 ? 189 : e.Lcode); //I3555 (Firefox hyphen issue)
@ -535,7 +543,7 @@ namespace com.keyman.text {
if(e.vkCode > 255) {
keyCode = e.vkCode; // added to support extended (touch-hold) keys for mnemonic layouts
}
if(e.LisVirtualKey || keyCode > 255) {
if((Lruleshift & 0x4000) == 0x4000 || (keyCode > 255)) { // added keyCode test to support extended keys
retVal = ((Lrulekey == keyCode) && ((Lruleshift & modifierBitmask) == e.Lmodifiers)); //I3318, I3555
@ -554,7 +562,7 @@ namespace com.keyman.text {
* Function stateMatch KSM
* Scope Public
* @param {Object} e keystroke event
* @param {number} Lstate
* @param {number} Lstate
* Description Test keystroke against state key rules
*/
stateMatch(e: KeyEvent, Lstate: number) {
@ -567,7 +575,7 @@ namespace com.keyman.text {
* @param {Object} e
* @return {Object} Object with event's virtual key flag, key code, and modifiers
* Description Get object with extended key event information
*/
*/
keyInformation(e: KeyEvent): KeyInformation {
var ei = new KeyInformation();
ei['vk'] = e.LisVirtualKey;
@ -577,24 +585,24 @@ namespace com.keyman.text {
};
/**
* Function deadkeyMatch KDM
* Function deadkeyMatch KDM
* Scope Public
* @param {number} n offset from current cursor position
* @param {Object} Ptarg target element
* @param {number} d deadkey
* @return {boolean} True if deadkey found selected context matches val
* Description Match deadkey at current cursor position
*/
*/
deadkeyMatch(n: number, outputTarget: OutputTarget, d: number): boolean {
return outputTarget.hasDeadkeyMatch(n, d);
}
/**
* Function beep KB
* Function beep KB
* Scope Public
* @param {Object} Pelem element to flash
* Description Flash body as substitute for audible beep; notify embedded device to vibrate
*/
*/
beep(outputTarget: OutputTarget): void {
this.resetContextCache();
@ -624,21 +632,21 @@ namespace com.keyman.text {
return store;
}
}
/**
* Function any KA
* Function any KA
* Scope Public
* @param {number} n character position (index)
* @param {number} n character position (index)
* @param {string} ch character to find in string
* @param {string} s 'any' string
* @param {string} s 'any' string
* @return {boolean} True if character found in 'any' string, sets index accordingly
* Description Test for character matching
*/
*/
any(n: number, ch: KeyboardStoreElement, s: KeyboardStore): boolean {
if(ch == '') {
return false;
}
s = this._ExplodeStore(s);
var Lix = -1;
for(var i=0; i < s.length; i++) {
@ -658,18 +666,18 @@ namespace com.keyman.text {
/**
* Function _Index
* Scope Public
* Scope Public
* @param {string} Ps string
* @param {number} Pn index
* Description Returns the character from a store string according to the offset in the index array
*/
_Index(Ps: KeyboardStore, Pn: number): KeyboardStoreElement {
_Index(Ps: KeyboardStore, Pn: number): KeyboardStoreElement {
Ps = this._ExplodeStore(Ps);
if(this._AnyIndices[Pn-1] < Ps.length) { //I3319
return Ps[this._AnyIndices[Pn-1]];
} else {
/* Should not be possible for a compiled keyboard, but may arise
/* Should not be possible for a compiled keyboard, but may arise
* during the development of handwritten keyboards.
*/
console.warn("Unmatched contextual index() statement detected in rule with index " + Pn + "!");
@ -714,16 +722,16 @@ namespace com.keyman.text {
} else { // For keyboards developed during 10.0's alpha phase - t:'d' was assumed.
this.deadkeyOutput(Pdn, outputTarget, indexChar['d']);
}
}
}
}
/**
* Function deleteContext KDC
* Function deleteContext KDC
* Scope Public
* @param {number} dn number of context entries to overwrite
* @param {Object} Pelem element to output to
* @param {string} s string to output
* @param {Object} Pelem element to output to
* @param {string} s string to output
* Description Keyboard output
*/
deleteContext(dn: number, outputTarget: OutputTarget): void {
@ -765,11 +773,11 @@ namespace com.keyman.text {
}
/**
* Function output KO
* Function output KO
* Scope Public
* @param {number} dn number of characters to overwrite
* @param {Object} Pelem element to output to
* @param {string} s string to output
* @param {Object} Pelem element to output to
* @param {string} s string to output
* Description Keyboard output
*/
output(dn: number, outputTarget: OutputTarget, s:string): void {
@ -786,16 +794,45 @@ namespace com.keyman.text {
outputTarget.insertTextBeforeCaret(s);
outputTarget.restoreProperties();
}
/**
* Function deadkeyOutput KDO
* `contextExOutput` function emits the character or object at `contextOffset` from the
* current matched rule's context. Introduced in Keyman 14.0, in order to resolve a
* gap between desktop and web core functionality for context(n) matching on notany().
* See #917 for additional detail.
* @alias KCXO
* @public
* @param {number} Pdn number of characters to delete left of cursor
* @param {OutputTarget} outputTarget target to output to
* @param {number} contextLength length of current rule context to retrieve
* @param {number} contextOffset offset from start of current rule context, 1-based
*/
contextExOutput(Pdn: number, outputTarget: OutputTarget, contextLength: number, contextOffset: number): void {
this.resetContextCache();
if(Pdn >= 0) {
this.output(Pdn, outputTarget, "");
}
const context = this.ruleContextEx.get(contextLength, contextLength);
const dk = context.deadContext[contextOffset-1], vc = context.valContext[contextOffset-1];
if(dk) {
outputTarget.insertDeadkeyBeforeCaret(dk.d);
} else if(typeof vc == 'string') {
this.output(-1, outputTarget, vc);
} else {
throw new Error("contextExOutput: should never be a numeric valContext with no corresponding deadContext");
}
}
/**
* Function deadkeyOutput KDO
* Scope Public
* @param {number} Pdn no of character to overwrite (delete)
* @param {Object} Pelem element to output to
* @param {number} Pdn no of character to overwrite (delete)
* @param {Object} Pelem element to output to
* @param {number} Pd deadkey id
* Description Record a deadkey at current cursor position, deleting Pdn characters first
*/
*/
deadkeyOutput(Pdn: number, outputTarget: OutputTarget, Pd: number): void {
this.resetContextCache();
@ -806,36 +843,36 @@ namespace com.keyman.text {
outputTarget.insertDeadkeyBeforeCaret(Pd);
// _DebugDeadKeys(Pelem, 'KDeadKeyOutput: dn='+Pdn+'; deadKey='+Pd);
}
/**
* KIFS compares the content of a system store with a string value
*
* KIFS compares the content of a system store with a string value
*
* @param {number} systemId ID of the system store to test (only TSS_LAYER currently supported)
* @param {string} strValue String value to compare to
* @param {Object} Pelem Currently active element (may be needed by future tests)
* @return {boolean} True if the test succeeds
*/
* @param {Object} Pelem Currently active element (may be needed by future tests)
* @return {boolean} True if the test succeeds
*/
ifStore(systemId: number, strValue: string, outputTarget: OutputTarget): boolean {
var result=true;
let store = this.systemStores[systemId];
if(store) {
result = store.matches(strValue);
}
return result; //Moved from previous line, now supports layer selection, Build 350
return result; //Moved from previous line, now supports layer selection, Build 350
}
/**
* KSETS sets the value of a system store to a string
*
* KSETS sets the value of a system store to a string
*
* @param {number} systemId ID of the system store to set (only TSS_LAYER currently supported)
* @param {string} strValue String to set as the system store content
* @param {Object} Pelem Currently active element (may be needed in future tests)
* @param {string} strValue String to set as the system store content
* @param {Object} Pelem Currently active element (may be needed in future tests)
* @return {boolean} True if command succeeds
* (i.e. for TSS_LAYER, if the layer is successfully selected)
*
*
* Note that option/variable stores are instead set within keyboard script code, as they only
* affect keyboard behavior.
*/
*/
setStore(systemId: number, strValue: string, outputTarget: OutputTarget): boolean {
this.resetContextCache();
if(systemId == KeyboardInterface.TSS_LAYER) {
@ -848,15 +885,15 @@ namespace com.keyman.text {
/**
* Load an option store value from a cookie or default value
*
*
* @param {string} kbdName keyboard internal name
* @param {string} storeName store (option) name, embedded in cookie name
* @param {string} dfltValue default value
* @return {string} current or default option value
*
* @return {string} current or default option value
*
* This will only ever be called when the keyboard is loaded, as it is used by keyboards
* to initialize a store value on the keyboard's script object.
*/
*/
loadStore(kbdName: string, storeName:string, dfltValue:string): string {
this.resetContextCache();
if(this.variableStoreSerializer) {
@ -868,16 +905,16 @@ namespace com.keyman.text {
}
/**
* Save an option store value to a cookie
*
* Save an option store value to a cookie
*
* @param {string} storeName store (option) name, embedded in cookie name
* @param {string} optValue option value to save
* @return {boolean} true if save successful
*
*
* Note that a keyboard will freely manipulate the value of its variable stores on the
* script object within its own code. This function's use is merely to _persist_ that
* value across sessions, providing a custom user default for later uses of the keyboard.
*/
*/
saveStore(storeName:string, optValue:string): boolean {
this.resetContextCache();
var kbd=this.activeKeyboard;
@ -927,12 +964,12 @@ namespace com.keyman.text {
outputTarget.invalidateSelection();
outputTarget.deadkeys().resetMatched(); // I3318
outputTarget.deadkeys().resetMatched(); // I3318
this.resetContextCache();
// Capture the initial state of the OutputTarget before any rules are matched.
let preInput = Mock.from(outputTarget);
// Establishes the results object, allowing corresponding commands to set values here as appropriate.
this.ruleBehavior = new RuleBehavior();
@ -963,7 +1000,7 @@ namespace com.keyman.text {
* Publishes the KeyboardInterface's shorthand API names. As this assigns the current functions
* held by the longform versions, note that this should be called after replacing any of them via
* JS method extension.
*
*
* DOM-aware KeymanWeb should call this after its domKbdInterface.ts code is loaded, as it replaces
* a few. (This is currently done within its kmwapi.ts.)
*/
@ -994,6 +1031,7 @@ namespace com.keyman.text {
exportKBCallback('KDC', 'deleteContext');
exportKBCallback('KO', 'output');
exportKBCallback('KDO', 'deadkeyOutput');
exportKBCallback('KCXO', 'contextExOutput');
exportKBCallback('KIO', 'indexOutput');
exportKBCallback('KIFS', 'ifStore');
exportKBCallback('KSETS', 'setStore');

View file

@ -186,7 +186,7 @@ namespace com.keyman.text {
Lkc.Lstates |= this.stateKeys['K_SCROLL'] ? Codes.modifierCodes['SCROLL_LOCK'] : Codes.modifierCodes['NO_SCROLL_LOCK'];
// Set LisVirtualKey to false to ensure that nomatch rule does fire for U_xxxx keys
if(Lkc.kName.substr(0,2) == 'U_') {
if(Lkc.kName && Lkc.kName.substr(0,2) == 'U_') {
Lkc.LisVirtualKey=false;
}

View file

@ -0,0 +1,112 @@
const assert = require('chai').assert;
const fs = require('fs');
const vm = require('vm');
const KeyboardProcessor = require('../../../dist');
const KMWRecorder = require('../../../../tools/recorder/dist/nodeProctor');
// Required initialization setup.
global.com = KeyboardProcessor.com; // exports all keyboard-processor namespacing.
global.keyman = {}; // So that keyboard-based checks against the global `keyman` succeed.
// 10.0+ dependent keyboards, like khmer_angkor, will otherwise fail to load.
// Initialize supplementary plane string extensions
String.kmwEnableSupplementaryPlane(false);
const device = {
formFactor: 'desktop',
OS: 'windows',
browser: 'native'
}
let keyboard;
function runEngineRuleSet(ruleSet) {
for(let ruleDef of ruleSet) {
// Prepare the context!
const ruleSeq = new KMWRecorder.RecordedKeystrokeSequence(ruleDef);
const proctor = new KMWRecorder.NodeProctor(keyboard, device, assert.equal);
const target = new com.keyman.text.Mock();
ruleSeq.test(proctor, target);
}
}
/**
* Wrapper to simplify running tests -- supports either virtual key codes as string (e.g. 'A' is VK_A)
* or an array of integers. Does not currently support modifiers (not needed here).
* @param {String|Array} input Virtual key codes of each character (as string or array)
* @param {String} output Expected output
*/
function runStringRuleSet(input, output) {
const rule = {
"inputs":
typeof input == 'string'
? input.split("").map(ch =>
{ return { "type": "key", "keyCode": ch.charCodeAt(0), "states": 10752, "modifiers": 0, "modifierChanged": false, "isVirtualKey": true } })
: input.map(ch =>
{ return { "type": "key", "keyCode": ch, "states": 10752, "modifiers": 0, "modifierChanged": false, "isVirtualKey": true } }),
"output": output
};
return runEngineRuleSet([rule]);
}
// -----------
describe('Engine - notany() and context()', function() {
before(function() {
const kp = new KeyboardProcessor();
// These two lines will load a keyboard from its file; headless-mode `registerKeyboard` will
// automatically set the keyboard as active.
const script = new vm.Script(fs.readFileSync('../tests/resources/keyboards/test_917.js'));
script.runInThisContext();
keyboard = kp.activeKeyboard;
});
/*
* Isolated rule tests for validity of `context()` and `notany()` statements.
*/
describe('First set -- notany() in first context position', function() {
it("baseline: rule with nomatch is not executed", function() {
runStringRuleSet('ABC', 'abc');
});
it("rule with nomatch is executed with a plain char matched", function() {
runStringRuleSet('XBC', 'xBC');
});
it("rule with nomatch is executed with a deadkey matched", function() {
runStringRuleSet('DBC1', 'pass!');
});
});
describe('Second set -- notany() in second context position', function() {
it("rule with nomatch is executed with a plain char matched", function() {
runStringRuleSet('AXCD1', 'axXX1');
});
it("rule with nomatch is executed with a deadkey matched", function() {
runStringRuleSet('ADCD1', 'pass!');
});
});
describe('Third set -- notany() in third context position with initial if() testing AdjustIndex', function() {
it("rule with nomatch is executed with a plain char matched", function() {
runStringRuleSet('FGHI1', 'fgXX1');
});
it("rule with nomatch is executed with a deadkey matched", function() {
runStringRuleSet('FDHI1', 'pass!');
});
});
// This is actually a separate issue that was corrected in the same PR
// so we placed the test here for conciseness.
it('verify notany comparison flip correction from #3817', function() {
runStringRuleSet('YZ', 'pass!');
});
});

View file

@ -0,0 +1 @@
debug.log

View file

@ -0,0 +1 @@
if(typeof keyman === 'undefined') {console.log('Keyboard requires KeymanWeb 10.0 or later');if(typeof tavultesoft !== 'undefined') tavultesoft.keymanweb.util.alert("This keyboard requires KeymanWeb 10.0 or later");} else {KeymanWeb.KR(new Keyboard_test_917());}function Keyboard_test_917(){this.KI="Keyboard_test_917";this.KN="Test #917 - notany() and context()";this.KMINVER="14.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s8="aeiou";this.s10="web";this.s11="native";this.KVER="13.0.9999.0";this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,49)) {if(k.KFCM(4,t,['a',{t:'d',d:0},'X','X'])){r=m=1;k.KDC(4,t);k.KO(-1,t,"pass!");}else if(k.KFCM(4,t,['f',{t:'d',d:0},'X','X'])){r=m=1;k.KDC(4,t);k.KO(-1,t,"pass!");}else if(k.KFCM(3,t,[{t:'d',d:0},'B','C'])){r=m=1;k.KDC(3,t);k.KO(-1,t,"pass!");}}else if(k.KKM(e,16384,67)) {if(k.KFCM(2,t,[{t:'a',a:this.s8,n:1},'b'])){r=m=1;k.KDC(2,t);k.KCXO(-1,t,2,1);k.KO(-1,t,"BC");}}else if(k.KKM(e,16384,68)) {if(k.KFCM(3,t,['a',{t:'a',a:this.s8,n:1},'c'])){r=m=1;k.KDC(3,t);k.KO(-1,t,"a");k.KCXO(-1,t,3,2);k.KO(-1,t,"XX");}else if(1){r=m=1;k.KDC(0,t);k.KDO(-1,t,0);}}else if(k.KKM(e,16384,73)) {if(k.KFCM(3,t,['f',{t:'a',a:this.s8,n:1},'h'])&&k.KIFS(31,this.s10,t)){r=m=1;k.KDC(3,t);k.KO(-1,t,"f");k.KCXO(-1,t,3,2);k.KO(-1,t,"XX");}else if(k.KFCM(3,t,['f',{t:'a',a:this.s8,n:1},'h'])&&k.KIFS(31,this.s11,t)){r=m=1;k.KDC(3,t);k.KO(-1,t,"f");k.KCXO(-1,t,3,2);k.KO(-1,t,"XX");}}else if(k.KKM(e,16384,90)) {if(k.KFCM(1,t,[{t:'a',a:this.s8,n:1}])){r=m=1;k.KDC(1,t);k.KO(-1,t,"pass!");}}return r;};}

View file

@ -0,0 +1,46 @@
c test_917 generated from template at 2020-11-04 06:59:27
c with name "test_917"
c store(&VERSION) '14.0'
store(&NAME) 'Test #917 - notany() and context()'
store(&COPYRIGHT) '©'
store(&KEYBOARDVERSION) '1.0'
store(&TARGETS) 'web'
c store(&VISUALKEYBOARD) 'test_917.kvks'
c store(&LAYOUTFILE) 'test_917.keyman-touch-layout'
begin Unicode > use(main)
group(main) using keys
c type: 'abc' > 'abc'
c type: 'xbc' > 'xBC'
c type: 'dbc' > DK(1) 'BC'
c type: 'dbc1' > 'pass!'
c
store(vow) 'aeiou'
notany(vow) 'b' + 'c' > context(1) 'BC'
+ 'd' > dk(1)
dk(1) 'BC' + '1' > 'pass!'
c type: 'adcd' > 'a' DK(1) 'XX'
c type: 'adcd1' > 'pass!'
c type: 'axcd' > 'axXX'
c type: 'axcd1' > 'axXX1'
'a' notany(vow) 'c' + 'd' > context(1) context(2) 'XX'
'a' dk(1) 'XX' + '1' > 'pass!'
c Test for AdjustIndex correctness
c type: 'fghi' > 'fgXX'
c type: 'fghi1' > 'fgXX1'
c type: 'fdhi' > 'f' DK(1) 'XX'
c type: 'fdhi1' > 'pass!'
if(&platform = 'web') 'f' notany(vow) 'h' + 'i' > context(2) context(3) 'XX'
c this platform matches for node-based tests ('web' doesn't!)
if(&platform = 'native') 'f' notany(vow) 'h' + 'i' > context(2) context(3) 'XX'
'f' dk(1) 'XX' + '1' > 'pass!'
c Test notany issue also resolved by #3817
c type: 'yz' > 'pass!'
notany(vow) + 'z' > 'pass!'

View file

@ -4,6 +4,8 @@
<BuildPath></BuildPath>
<CompilerWarningsAsErrors>False</CompilerWarningsAsErrors>
<WarnDeprecatedCode>True</WarnDeprecatedCode>
<CheckFilenameConventions>False</CheckFilenameConventions>
<ProjectType>keyboard</ProjectType>
</Options>
<Files>
<File>
@ -39,5 +41,16 @@
<Copyright>© 2018 SIL International</Copyright>
</Details>
</File>
<File>
<ID>id_1bccf5634ecd6605fe682279eed62c73</ID>
<Filename>test_917.kmn</Filename>
<Filepath>test_917.kmn</Filepath>
<FileVersion>1.0</FileVersion>
<FileType>.kmn</FileType>
<Details>
<Name>Test #917 - notany() and context()</Name>
<Copyright>©</Copyright>
</Details>
</File>
</Files>
</KeymanDeveloperProject>

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/recorder-core",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/recorder-core",
"version": "14.0.176",
"version": "14.0.182",
"description": "Core classes used to develop KeymanWeb test cases based on keystrokes",
"main": "index.js",
"scripts": {
@ -17,10 +17,10 @@
},
"homepage": "https://github.com/keymanapp/keyman#readme",
"dependencies": {
"@keymanapp/keyboard-processor": "^14.0.176",
"@keymanapp/models-types": "^14.0.176",
"@keymanapp/web-environment": "^14.0.176",
"@keymanapp/web-utils": "^14.0.176"
"@keymanapp/keyboard-processor": "^14.0.182",
"@keymanapp/models-types": "^14.0.182",
"@keymanapp/web-environment": "^14.0.182",
"@keymanapp/web-utils": "^14.0.182"
},
"devDependencies": {
"typescript": "^3.8.3"

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-sentry-manager",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-sentry-manager",
"version": "14.0.176",
"version": "14.0.182",
"description": "Common setup for KeymanWeb's Sentry-based error reporting",
"main": "dist/index.js",
"scripts": {
@ -20,7 +20,7 @@
"typescript": "^3.8.3"
},
"dependencies": {
"@keymanapp/web-environment": "^14.0.176",
"@keymanapp/web-environment": "^14.0.182",
"@sentry/browser": "^5.15.5"
}
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-utils",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-utils",
"version": "14.0.176",
"version": "14.0.182",
"description": "Common utility functions used throughout other Keyman packages",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@ -20,8 +20,8 @@
},
"homepage": "https://github.com/keymanapp/keyman#readme",
"devDependencies": {
"@keymanapp/resources-gosh": "^14.0.176",
"@keymanapp/web-environment": "^14.0.176",
"@keymanapp/resources-gosh": "^14.0.182",
"@keymanapp/web-environment": "^14.0.182",
"@types/node": "^14.0.5",
"typescript": "^3.8.3"
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-templates",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-templates",
"version": "14.0.176",
"version": "14.0.182",
"description": "Backing model implementations (templates) for Keyman's modelling layer",
"keywords": [
"lm",
@ -42,8 +42,8 @@
"url": "https://github.com/keymanapp/keyman/issues"
},
"devDependencies": {
"@keymanapp/models-types": "^14.0.176",
"@keymanapp/web-utils": "^14.0.176",
"@keymanapp/models-types": "^14.0.182",
"@keymanapp/web-utils": "^14.0.182",
"@types/chai": "^4.2.11",
"@types/mocha": "^7.0.2",
"@types/node": "^14.0.4",
@ -52,6 +52,6 @@
"typescript": "^3.8.3"
},
"dependencies": {
"@keymanapp/models-wordbreakers": "^14.0.176"
"@keymanapp/models-wordbreakers": "^14.0.182"
}
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-types",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-types",
"version": "14.0.176",
"version": "14.0.182",
"description": "Type definitions in used in the modeling (lexical model/predictive text) component of Keyman.",
"types": "./index.d.ts",
"scripts": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-wordbreakers",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-wordbreakers",
"version": "14.0.176",
"version": "14.0.182",
"description": "Word breakers bundled in the modeling layer",
"keywords": [
"lexical model",
@ -40,7 +40,7 @@
"url": "https://github.com/keymanapp/keyman/issues"
},
"devDependencies": {
"@keymanapp/models-types": "^14.0.176",
"@keymanapp/models-types": "^14.0.182",
"@types/chai": "^4.2.11",
"@types/mocha": "^7.0.2",
"chai": "^4.2.0",

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/lexical-model-layer",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/lexical-model-layer",
"version": "14.0.176",
"version": "14.0.182",
"description": "Keyman/Predictive Text integration layer",
"main": "build/index.js",
"scripts": {
@ -21,8 +21,8 @@
},
"homepage": "https://github.com/keymanapp/keyman#readme",
"devDependencies": {
"@keymanapp/models-types": "^14.0.176",
"@keymanapp/resources-gosh": "^14.0.176",
"@keymanapp/models-types": "^14.0.182",
"@keymanapp/resources-gosh": "^14.0.182",
"@types/node": "^10.17.21",
"chai": "^4.2.0",
"karma": "^4.2.0",
@ -46,10 +46,10 @@
"typescript": "^3.8.3"
},
"dependencies": {
"@keymanapp/models-templates": "^14.0.176",
"@keymanapp/models-wordbreakers": "^14.0.176",
"@keymanapp/web-environment": "^14.0.176",
"@keymanapp/web-utils": "^14.0.176",
"@keymanapp/models-templates": "^14.0.182",
"@keymanapp/models-wordbreakers": "^14.0.182",
"@keymanapp/web-environment": "^14.0.182",
"@keymanapp/web-utils": "^14.0.182",
"es6-shim": "^0.35.5",
"string.prototype.codepointat": "^0.2.1",
"string.prototype.startswith": "^0.2.0"

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/lexical-model-compiler",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/lexical-model-compiler",
"version": "14.0.176",
"version": "14.0.182",
"description": "Keyman Developer lexical model compiler",
"keywords": [
"keyboard",
@ -37,14 +37,14 @@
"node": ">=12.0.0"
},
"dependencies": {
"@keymanapp/models-types": "^14.0.176",
"@keymanapp/models-types": "^14.0.182",
"commander": "^3.0.0",
"typescript": "^3.8.3",
"xml2js": "^0.4.19"
},
"devDependencies": {
"@keymanapp/models-templates": "^14.0.176",
"@keymanapp/models-wordbreakers": "^14.0.176",
"@keymanapp/models-templates": "^14.0.182",
"@keymanapp/models-wordbreakers": "^14.0.182",
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.7",
"@types/node": "^10.14.6",

View file

@ -16,5 +16,5 @@
"lerna",
"typescript"
],
"version": "14.0.176"
"version": "14.0.182"
}

View file

@ -1,5 +1,5 @@
{
"name": "@keymanapp/resources-gosh",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/resources-gosh",
"version": "14.0.176",
"version": "14.0.182",
"description": "Good Ol' Shell",
"author": "Marc Durdin <marc@keyman.com> (https://github.com/mcdurdin)",
"contributors": [

View file

@ -1,5 +1,5 @@
{
"name": "@keymanapp/web-environment",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-environment",
"version": "14.0.176",
"version": "14.0.182",
"description": "A compilation utility for passing select environment variables into our TS builds",
"author": "Joshua Horton <joshua_horton@sil.org> (https://github.com/jahorton)",
"homepage": "https://github.com/keymanapp/keyman",
@ -17,6 +17,6 @@
"url": "https://github.com/keymanapp/keyman/issues"
},
"devDependencies": {
"@keymanapp/resources-gosh": "^14.0.176"
"@keymanapp/resources-gosh": "^14.0.182"
}
}

2
web/package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "keyman",
"version": "14.0.176",
"version": "14.0.182",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "keyman",
"version": "14.0.176",
"version": "14.0.182",
"description": "Facilitates text input in any language.",
"repository": {
"type": "git",
@ -18,8 +18,8 @@
},
"homepage": "https://github.com/keymanapp/keyman#readme",
"devDependencies": {
"@keymanapp/resources-gosh": "^14.0.176",
"@keymanapp/web-sentry-manager": "^14.0.176",
"@keymanapp/resources-gosh": "^14.0.182",
"@keymanapp/web-sentry-manager": "^14.0.182",
"@sentry/cli": "^1.52.3",
"chai": "^4.2.0",
"google-closure-compiler-java": "^20200224.0.0",
@ -52,13 +52,13 @@
"sentry-cli": "sentry-cli"
},
"dependencies": {
"@keymanapp/input-processor": "^14.0.176",
"@keymanapp/keyboard-processor": "^14.0.176",
"@keymanapp/lexical-model-layer": "^14.0.176",
"@keymanapp/models-types": "^14.0.176",
"@keymanapp/recorder-core": "^14.0.176",
"@keymanapp/web-environment": "^14.0.176",
"@keymanapp/web-utils": "^14.0.176",
"@keymanapp/input-processor": "^14.0.182",
"@keymanapp/keyboard-processor": "^14.0.182",
"@keymanapp/lexical-model-layer": "^14.0.182",
"@keymanapp/models-types": "^14.0.182",
"@keymanapp/recorder-core": "^14.0.182",
"@keymanapp/web-environment": "^14.0.182",
"@keymanapp/web-utils": "^14.0.182",
"@types/node": "^11.9.4",
"es6-shim": "^0.35.5",
"eventemitter3": "^4.0.0",

View file

@ -1664,11 +1664,20 @@ namespace com.keyman.osk {
var classes=key.className, cs = ' kmw-key-touched';
// For phones, use key preview rather than highlighting the key,
// except for space, bksp, enter, shift and popup keys
var usePreview = ((this.keytip != null)
&& (classes.indexOf('kmw-key-shift') < 0)
&& (classes.indexOf('kmw-spacebar') < 0)
&& (key.id.indexOf('popup') < 0 ));
var usePreview = ((this.keytip != null) && (key.id.indexOf('popup') < 0 ));
if(usePreview) {
// Previews are not permitted for keys using any of the following CSS styles.
var excludedClasses = ['kmw-key-shift', // special keys
'kmw-key-shift-on', // active special keys (shift, when in shift layer
'kmw-spacebar', // space
'kmw-key-blank', // Keys that are only used for layout control
'kmw-key-hidden'];
for(let c=0; c < excludedClasses.length; c++) {
usePreview = usePreview && (classes.indexOf(excludedClasses[c]) < 0);
}
}
if(usePreview) {
this.showKeyTip(key,on);

View file

@ -51,6 +51,7 @@
<h2><a href="./rotation-events">Test page for evaluating issues with mobile device rotation events.</a></h2>
<h2><a href="./issue382">Test page for automatic key-cap scaling.</a></h2>
<h2><a href="./issue3701">Test page for fat-finger interaction with beep feedback</a></h2>
<h2><a href="./issue917-context-and-notany/">Test page for context() and notany() interaction</a></h2>
<p><a href="../">Return to main index.</a>
</body>
</html>

View file

@ -0,0 +1,107 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!-- Set the viewport width to match phone and tablet device widths -->
<meta name="viewport" content="width=device-width,user-scalable=no" />
<!-- Allow KeymanWeb to be saved to the iPhone home screen -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- Enable IE9 Standards mode -->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>KeymanWeb Testing Page - context() and notany() interaction (#917)</title>
<!-- Your page CSS -->
<style type='text/css'>
body {font-family: Tahoma,helvetica;}
h3 {font-size: 1em;font-weight:normal;color: darkred; margin-bottom: 4px}
.test {font-size: 1.5em; width:80%; min-height:30px; border: 1px solid gray;}
#KeymanWebControl {width:50%;min-width:600px;}
</style>
<!-- Insert uncompiled KeymanWeb source scripts -->
<script src="../../release/unminified/web/keymanweb.js" type="application/javascript"></script>
<!--
For desktop browsers, a script for the user interface must be inserted here.
Standard UIs are toggle, button, float and toolbar.
The toolbar UI is best for any page designed to support keyboards for
a large number of languages.
-->
<script src="../../release/unminified/web/kmwuitoggle.js"></script>
<!-- Initialization: set paths to keyboards, resources and fonts as required -->
<script>
var kmw=window.keyman;
kmw.init({
attachType:'auto'
}).then(function() {
kmw.addKeyboards({id:'test_917',name:'test_917',languages:{id:'en',name:'English'}, filename:'test_917/build/test_917.js'});
});
</script>
</head>
<!-- Sample page HTML -->
<body>
<h2>KeymanWeb Sample Page -context() and notany() interaction (<a href="https://github.com/keymanapp/keyman/issues/917">#917</a>)</h2>
<p>KeymanWeb did not support notany() and context() together. This keyboard tests various scenarios in the implementation (14.0 min):</p>
<table>
<thead><tr><th>Input</th><th>Result</th><th>Notes</th></tr></thead>
<tbody>
<tr><td>abc</td><td>'abc'</td><td>Should not match rule on line 19</td></tr>
<tr><td>xbc</td><td>'xBC'</td><td>Basic character match at start of context (notany vowel) on line 19</td></tr>
<tr><td>dbc</td><td>DK(1) 'BC'</td><td>Deadkey match at start of context on line 19</td></tr>
<tr><td>adcd</td><td>'a' DK(1) 'XX'</td><td>Second position in context, match deadkey rule on line 27</td></tr>
<tr><td>adcd?</td><td>'pass!'</td><td>Verifies that deadkey is conserved through rule match on line 27</td></tr>
<tr><td>axcd</td><td>'axXX'</td><td>Verifies that match occurs for character on line 27</td></tr>
<tr><td>axcd?</td><td>'axXX?'</td><td>Sanity check for line 27</td></tr>
<tr><td>fghi</td><td>'fgXX'</td><td>Testing adjusted index for `if` statement on line 35</td></tr>
<tr><td>fghi?</td><td>'fgXX?'</td><td>Sanity check for line 35</td></tr>
<tr><td>fdhi</td><td>'f' DK(1) XX'</td><td>Testing deadkey match for adjusted index for `if` statement on line 35</td></tr>
<tr><td>fdhi?</td><td>'pass!'</td><td>Verifies that deadkey is conserved thrghou rule match on line 35</td></tr>
</tbody>
</table>
<div>
<!--
The following DIV is used to position the Button or Toolbar User Interfaces on the page.
If omitted, those User Interfaces will appear at the top of the document body.
(It is ignored by other User Interfaces.)
-->
<div id='KeymanWebControl'></div>
<h3>Type in your language in this text area:</h3>
<textarea id='ta1' class='test' placeholder='Type here'></textarea>
<h3>or in this input field:</h3>
<input class='test' value='' placeholder='or here'/>
<h3><a href="./">Return to testing home page</a></h3>
<input id="btnPredict" type="button" onclick="togglePredictions();" value="Disable predictions"/>
<input id="btnCorrect" type="button" onclick="toggleCorrections();" value="Disable corrections"/>
</div>
</body>
<!--
*** DEVELOPER NOTE -- FIREFOX CONFIGURATION FOR TESTING ***
*
* If the URL bar starts with <b>file://</b>, Firefox may not load the font used
* to display the special characters used in the On-Screen Keyboard.
*
* To work around this Firefox bug, navigate to <b>about:config</b>
* and set <b>security.fileuri.strict_origin_policy</b> to <b>false</b>
* while testing.
*
* Firefox resolves website-based CSS URI references correctly without needing
* any configuration change, so this change should only be made for file-based testing.
*
***
-->
</html>

View file

@ -0,0 +1,6 @@
test_917 Change History
====================
1.0 (2020-11-04)
----------------
* Created by

View file

@ -0,0 +1,21 @@
The MIT License (MIT)
©
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,29 @@
test_917 keyboard
==============
©
Version 1.0
Description
-----------
test_917 generated from template
Links
-----
Supported Platforms
-------------------
* Windows
* macOS
* Linux
* Web
* iPhone
* iPad
* Android phone
* Android tablet
* Mobile devices
* Desktop devices
* Tablet devices

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>test_917</title>
<style type="text/css">
p { font: 10pt Tahoma; }
h1 { font: bold 16pt Tahoma; color: #4444cc; margin-bottom: 2px }
h2 { font: bold 12pt Tahoma; color: #4444cc; }
</style>
</head>
<body>
<h1>test_917</h1>
<p>
test_917 1.0 generated from template.
</p>
<p>©</p>
</body>
</html>

View file

@ -0,0 +1,36 @@
c test_917 generated from template at 2020-11-04 06:59:27
c with name "test_917"
c store(&VERSION) '14.0'
store(&NAME) 'test_917'
store(&COPYRIGHT) '©'
store(&KEYBOARDVERSION) '1.0'
store(&TARGETS) 'any'
store(&VISUALKEYBOARD) 'test_917.kvks'
store(&LAYOUTFILE) 'test_917.keyman-touch-layout'
begin Unicode > use(main)
group(main) using keys
c type: 'abc' > 'abc'
c type: 'xbc' > 'xBC'
c type: 'dbc' > DK(1) 'BC'
store(vow) 'aeiou'
notany(vow) 'b' + 'c' > context(1) 'BC'
+ 'd' > dk(1)
dk(1) 'BC' + '?' > 'pass!'
c type: 'adcd' > 'a' DK(1) 'XX'
c type: 'adcd?' > 'pass!'
c type: 'axcd' > 'axXX'
c type: 'axcd?' > 'axXX?'
'a' notany(vow) 'c' + 'd' > context(1) context(2) 'XX'
'a' dk(1) 'XX' + '?' > 'pass!'
c Test for AdjustIndex correctness
c type: 'fghi' > 'fgXX'
c type: 'fghi?' > 'fgXX?'
c type: 'fdhi' > 'f' DK(1) 'XX'
c type: 'fdhi?' > 'pass!'
if(&platform = 'web') 'f' notany(vow) 'h' + 'i' > context(2) context(3) 'XX'
'f' dk(1) 'XX' + '?' > 'pass!'

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<Package>
<System>
<KeymanDeveloperVersion>13.0.9999.0</KeymanDeveloperVersion>
<FileVersion>7.0</FileVersion>
</System>
<Options>
<ExecuteProgram></ExecuteProgram>
<ReadMeFile>readme.htm</ReadMeFile>
<MSIFileName></MSIFileName>
<MSIOptions></MSIOptions>
<FollowKeyboardVersion/>
</Options>
<StartMenu>
<Folder></Folder>
<Items/>
</StartMenu>
<Info>
<Name URL="">test_917</Name>
<Copyright URL="">©</Copyright>
<Author URL=""></Author>
<Version URL=""></Version>
</Info>
<Files>
<File>
<Name>..\build\test_917.kmx</Name>
<Description></Description>
<CopyLocation>0</CopyLocation>
<FileType>.kmx</FileType>
</File>
<File>
<Name>..\build\test_917.js</Name>
<Description></Description>
<CopyLocation>0</CopyLocation>
<FileType>.js</FileType>
</File>
<File>
<Name>..\build\test_917.kvk</Name>
<Description></Description>
<CopyLocation>0</CopyLocation>
<FileType>.kvk</FileType>
</File>
<File>
<Name>welcome.htm</Name>
<Description></Description>
<CopyLocation>0</CopyLocation>
<FileType>.htm</FileType>
</File>
<File>
<Name>readme.htm</Name>
<Description></Description>
<CopyLocation>0</CopyLocation>
<FileType>.htm</FileType>
</File>
</Files>
<Keyboards>
<Keyboard>
<Name>test_917</Name>
<ID>test_917</ID>
<Version>1.0</Version>
<Languages/>
</Keyboard>
</Keyboards>
<Strings/>
</Package>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<visualkeyboard>
<header>
<version>10.0</version>
<kbdname>test_917</kbdname>
<flags/>
</header>
</visualkeyboard>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Start Using test_917</title>
<style type="text/css">
p { font: 10pt Tahoma; }
h1 { font: bold 16pt Tahoma; color: #4444cc; margin-bottom: 2px }
h2 { font: bold 12pt Tahoma; color: #4444cc; }
</style>
</head>
<body>
<h1>Start Using test_917</h1>
<p>
test_917 1.0 generated from template.
</p>
<h1>Keyboard Layout</h1>
<!-- Insert Keyboard Layout Images or HTML here -->
<p>©</p>
</body>
</html>

View file

@ -0,0 +1,7 @@
{
"license": "mit",
"languages": [
],
"description": "test_917 generated from template"
}

View file

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<KeymanDeveloperProject>
<Options>
<BuildPath>$PROJECTPATH\build</BuildPath>
<CompilerWarningsAsErrors>True</CompilerWarningsAsErrors>
<WarnDeprecatedCode>True</WarnDeprecatedCode>
<CheckFilenameConventions>True</CheckFilenameConventions>
<ProjectType>keyboard</ProjectType>
</Options>
<Files>
<File>
<ID>id_8da317fcfaf031055ee9c2eb9e37cd18</ID>
<Filename>test_917.kmn</Filename>
<Filepath>source\test_917.kmn</Filepath>
<FileVersion>1.0</FileVersion>
<FileType>.kmn</FileType>
<Details>
<Name>test_917</Name>
<Copyright>©</Copyright>
</Details>
</File>
<File>
<ID>id_7ef252dbb1aa15741f7e0694c9d8ede2</ID>
<Filename>test_917.kps</Filename>
<Filepath>source\test_917.kps</Filepath>
<FileVersion></FileVersion>
<FileType>.kps</FileType>
<Details>
<Name>test_917</Name>
<Copyright>©</Copyright>
</Details>
</File>
<File>
<ID>id_ede98e4633e239f933cbfd1f4e1b766c</ID>
<Filename>HISTORY.md</Filename>
<Filepath>HISTORY.md</Filepath>
<FileVersion></FileVersion>
<FileType>.md</FileType>
</File>
<File>
<ID>id_53e892b8b41cc4caece1cfd5ef21d6e7</ID>
<Filename>LICENSE.md</Filename>
<Filepath>LICENSE.md</Filepath>
<FileVersion></FileVersion>
<FileType>.md</FileType>
</File>
<File>
<ID>id_0730bb7c2e8f9ea2438b52e419dd86c9</ID>
<Filename>README.md</Filename>
<Filepath>README.md</Filepath>
<FileVersion></FileVersion>
<FileType>.md</FileType>
</File>
<File>
<ID>id_e7fcb5e5546db6914d2f9d00de067f23</ID>
<Filename>test_917.keyboard_info</Filename>
<Filepath>test_917.keyboard_info</Filepath>
<FileVersion></FileVersion>
<FileType>.keyboard_info</FileType>
</File>
<File>
<ID>id_00188325e13e88dc8f51b78b3fcd756e</ID>
<Filename>test_917.kmx</Filename>
<Filepath>source\..\build\test_917.kmx</Filepath>
<FileVersion></FileVersion>
<FileType>.kmx</FileType>
<ParentFileID>id_7ef252dbb1aa15741f7e0694c9d8ede2</ParentFileID>
</File>
<File>
<ID>id_48e2443376bf0ead24ae53bb23ec7608</ID>
<Filename>test_917.js</Filename>
<Filepath>source\..\build\test_917.js</Filepath>
<FileVersion></FileVersion>
<FileType>.js</FileType>
<ParentFileID>id_7ef252dbb1aa15741f7e0694c9d8ede2</ParentFileID>
</File>
<File>
<ID>id_6ca4926c8522c0080861ceeeb2abb05a</ID>
<Filename>test_917.kvk</Filename>
<Filepath>source\..\build\test_917.kvk</Filepath>
<FileVersion></FileVersion>
<FileType>.kvk</FileType>
<ParentFileID>id_7ef252dbb1aa15741f7e0694c9d8ede2</ParentFileID>
</File>
<File>
<ID>id_356e5d149c1e539356d72698c1e401a6</ID>
<Filename>welcome.htm</Filename>
<Filepath>source\welcome.htm</Filepath>
<FileVersion></FileVersion>
<FileType>.htm</FileType>
<ParentFileID>id_7ef252dbb1aa15741f7e0694c9d8ede2</ParentFileID>
</File>
<File>
<ID>id_8da344c4cea6f467013357fe099006f5</ID>
<Filename>readme.htm</Filename>
<Filepath>source\readme.htm</Filepath>
<FileVersion></FileVersion>
<FileType>.htm</FileType>
<ParentFileID>id_7ef252dbb1aa15741f7e0694c9d8ede2</ParentFileID>
</File>
</Files>
</KeymanDeveloperProject>

View file

@ -273,3 +273,40 @@ MKVER_V=$(MKVER_APP) $(MKVER_COMMON_PARAMS) -v $(MKVER_VERSION_TXT) version.in v
MKVER_M=$(MKVER_APP) $(MKVER_COMMON_PARAMS) -m manifest.in manifest.xml
# Token replacement for all other file types; pattern: $(MKVER_U) <f.in> <f.out>
MKVER_U=$(MKVER_APP) $(MKVER_COMMON_PARAMS) -u
#
# Symstore
#
# KEYMAN_SYMSTOREPATH defaults to sibling folder "symbols". If it is not present,
# then we won't attempt to write symbols to the store.
!IFNDEF KEYMAN_SYMSTOREPATH
KEYMAN_SYMSTOREPATH=$(KEYMAN_ROOT)\..\symbols
!ENDIF
# Nearly matches algorithm from resources/build/build-utils.sh
# For now, we'll use it only for SYMSTORE, where it is for reference
# only. Thus using the variable name __VERSION_WITH_TAG. Issues:
# 1. always appends tier, even for stable
# 2. test builds will append a branch name for master/beta/stable-x.y
# 3. this is only available for `make symbols` (VERSION_WIN, VERSION_TIER
# are defined in Targets.mak only here)
# Fixing this properly would be possible but take a fair bit more
# work than I want to do just now. The intent is to make it possible to find
# symbols in the symstore index which we can purge later on.
__VERSION_WITH_TAG=$(VERSION_WIN)-$(VERSION_TIER)
!IFNDEF TEAMCITY_VERSION
__VERSION_WITH_TAG=$(__VERSION_WITH_TAG)-local
!ELSE
!IFDEF TEAMCITY_PR_NUMBER
__VERSION_WITH_TAG=$(__VERSION_WITH_TAG)-test-$(TEAMCITY_PR_NUMBER)
!ENDIF
!ENDIF
# This command depends on VERSION_WIN and VERSION_TIER being defined, through
# `make symbols` (i.e. don't call `make wrap-symbols`)
SYMSTORE="C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add \
/s "$(KEYMAN_SYMSTOREPATH)" \
/v "$(VERSION_WIN)" \
/c "Version: $(__VERSION_WITH_TAG)" \
/compress /f

View file

@ -2,6 +2,8 @@
# Header.mak - used for makefiles which are in parent folders
#
HEADER_MAK=1
!IFNDEF TARGETS
!ERROR You must define the targets before including the Header.mak file!
!ENDIF
@ -17,7 +19,8 @@ ROOT=c:\keyman\windows
!include $(ROOT)\src\Defines.mak
#
# These three targets are the standard targets for all
# The targets build, signcode, symbols, backup are standard
# targets for all projects
#
build: $(BUILDPREREQ)
@ -27,12 +30,18 @@ build: $(BUILDPREREQ)
signcode:
$(MAKE) -DTARGET=signcode $(TARGETS)
symbols:
$(MAKE) -DTARGET=symbols $(TARGETS)
backup:
$(MAKE) -DTARGET=backup $(TARGETS)
!ELSE
signcode:
rem no signcode required
symbols:
rem no symbols required
backup:
rem no backup required
!ENDIF

View file

@ -66,3 +66,16 @@ dirs:
vcvars32:
vcvars32.bat
# This command injects the current version and tier into the VERSION_WIN and VERSION_TIER defines and then
# calls "make wrap-symbols", but it only runs if the symbols folder exists
!IFNDEF HEADER_MAK
# we don't want this target for Makefiles with Header.mak, as they just call into sub-projects
symbols:
if exist $(KEYMAN_SYMSTOREPATH) \
cmd /C \
for /f %v in ($(KEYMAN_ROOT)\VERSION.md) do \
for /f %t in ($(KEYMAN_ROOT)\TIER.md) do \
$(MAKE) -DVERSION_TIER=%t -DVERSION_WIN=%v wrap-symbols
!ENDIF

View file

@ -50,6 +50,7 @@
<DCC_UsePackage>RESTComponents;FireDAC;FireDACSqliteDriver;soaprtl;FireDACIBDriver;soapmidas;FireDACCommon;RESTBackendComponents;soapserver;CloudService;FireDACCommonDriver;inet;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
<SanitizedProjectName>build_standards_data</SanitizedProjectName>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_UsePackage>DBXSqliteDriver;bindcompdbx;IndyIPCommon;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;svnui;mbColorLibD10;dsnapcon;FireDACADSDriver;scFontCombo;DCPdelphi2009;FireDACMSAccDriver;fmxFireDAC;vclimg;Jcl;vcltouch;JvCore;vcldb;bindcompfmx;svn;FireDACPgDriver;inetdb;DbxCommonDriver;fmx;fmxdae;xmlrtl;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;IndyIPClient;bindcompvcl;EmbeddedWebBrowser_XE;VCLRESTComponents;dbxcds;VclSmp;JvDocking;adortl;JclVcl;vclie;bindengine;DBXMySQLDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;IndyProtocols;keyman_components;FireDACCommonODBC;fmxase;$(DCC_UsePackage)</DCC_UsePackage>

View file

@ -6,8 +6,8 @@
build: version.res dirs
$(DCC32) Buildpkg.dpr
$(TDS2DBG) buildpkg.exe
$(SENTRYTOOL_DELPHIPREP) buildpkg.exe -dpr buildpkg.dpr
$(TDS2DBG) buildpkg.exe
$(COPY) Buildpkg.exe $(PROGRAM)\online
$(COPY) Buildpkg.exe $(PROGRAM)\buildtools
if exist buildpkg.dbg $(COPY) buildpkg.dbg $(DEBUGPATH)\buildtools

View file

@ -62,6 +62,7 @@
<DCC_AssertionsAtRuntime>false</DCC_AssertionsAtRuntime>
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<Manifest_File>None</Manifest_File>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
@ -212,8 +213,8 @@
<VersionInfoKeys Name="Comments"/>
</VersionInfoKeys>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k160.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp160.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k260.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Platforms>

View file

@ -15,6 +15,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Developer Tools" $(PROGRAM)\buildtools\importkeyboard.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\buildtools\importkeyboard.exe /t keyman-developer
$(SYMSTORE) $(DEBUGPATH)\buildtools\importkeyboard.pdb /t keyman-developer
backup:
$(WZZIP) $(BUILD)\buildtools\importkeyboard.zip $(BACKUPDEFAULTS) importkeyboard.exe

View file

@ -49,6 +49,7 @@
<DCC_K>false</DCC_K>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
<SanitizedProjectName>sentrytool</SanitizedProjectName>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_UsePackage>DBXSqliteDriver;IndyIPCommon;RESTComponents;bindcompdbx;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;svnui;mbColorLibD10;dsnapcon;FireDACADSDriver;scFontCombo;DCPdelphi2009;FireDACMSAccDriver;fmxFireDAC;vclimg;Jcl;FireDAC;vcltouch;JvCore;vcldb;bindcompfmx;svn;FireDACSqliteDriver;FireDACPgDriver;inetdb;CEF4Delphi;soaprtl;DbxCommonDriver;fmx;FireDACIBDriver;fmxdae;xmlrtl;soapmidas;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;EmbeddedWebBrowser_XE;VCLRESTComponents;soapserver;dbxcds;VclSmp;JvDocking;adortl;JclVcl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;IndyProtocols;inetdbxpress;keyman_components;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
@ -76,7 +77,6 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<DCC_RemoteDebug>false</DCC_RemoteDebug>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
<VerInfo_Locale>1033</VerInfo_Locale>
<Manifest_File>(None)</Manifest_File>
<Debugger_CWD>C:\Projects\keyman\app\windows\src\engine\tsysinfox64</Debugger_CWD>

View file

@ -6,8 +6,8 @@
build: version.res dirs
$(DCC32) insthelp.dpr
$(TDS2DBG) insthelp.exe
$(SENTRYTOOL_DELPHIPREP) insthelp.exe -dpr insthelp.dpr
$(TDS2DBG) insthelp.exe
$(COPY) insthelp.exe $(ROOT)\bin\desktop\insthelp.exe
test-manifest:
@ -20,6 +20,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Desktop Install Helper" $(ROOT)\bin\desktop\insthelp.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\desktop\insthelp.exe /t keyman-windows
$(SYMSTORE) $(DEBUGPATH)\desktop\insthelp.dbg /t keyman-windows
backup:
$(WZZIP) $(BUILD)\desktop\insthelp.zip $(BACKUPDEFAULTS) insthelp.exe

View file

@ -7,8 +7,8 @@
build: version.res manifest.res dirs
$(DELPHI_MSBUILD) kmbrowserhost.dproj /p:Platform=Win32
$(TDS2DBG) $(WIN32_TARGET_PATH)\kmbrowserhost.exe
$(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmbrowserhost.exe -dpr kmbrowserhost.dpr
$(TDS2DBG) $(WIN32_TARGET_PATH)\kmbrowserhost.exe
$(COPY) $(WIN32_TARGET_PATH)\kmbrowserhost.exe $(PROGRAM)\desktop
if exist $(WIN32_TARGET_PATH)\kmbrowserhost.dbg $(COPY) $(WIN32_TARGET_PATH)\kmbrowserhost.dbg $(DEBUGPATH)\desktop
@ -23,6 +23,10 @@ signcode:
install:
$(COPY) $(PROGRAM)\desktop\kmbrowserhost.exe "$(INSTALLPATH_KEYMANDESKTOP)"
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\desktop\kmbrowserhost.exe /t keyman-windows
$(SYMSTORE) $(DEBUGPATH)\desktop\kmbrowserhost.dbg /t keyman-windows
backup:
$(WZZIP) $(BUILD)\desktop\kmbrowserhost.zip $(BACKUPDEFAULTS) $(WIN32_TARGET_PATH)\kmbrowserhost.exe $(WIN32_TARGET_PATH)\kmbrowserhost.dbg

View file

@ -62,6 +62,7 @@
<DCC_Define>SENTRY_NOVCL;$(DCC_Define)</DCC_Define>
<VerInfo_Locale>3081</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_UsePackage>DBXSqliteDriver;bindcompdbx;IndyIPCommon;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;svnui;mbColorLibD10;dsnapcon;FireDACADSDriver;scFontCombo;DCPdelphi2009;FireDACMSAccDriver;fmxFireDAC;vclimg;Jcl;vcltouch;JvCore;vcldb;bindcompfmx;svn;FireDACPgDriver;inetdb;CEF4Delphi;DbxCommonDriver;fmx;fmxdae;xmlrtl;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;IndyIPClient;bindcompvcl;EmbeddedWebBrowser_XE;VCLRESTComponents;dbxcds;VclSmp;JvDocking;adortl;JclVcl;vclie;bindengine;DBXMySQLDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;IndyProtocols;keyman_components;FireDACCommonODBC;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
@ -70,7 +71,6 @@
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
<Manifest_File>(None)</Manifest_File>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_UsePackage>DBXSqliteDriver;bindcompdbx;IndyIPCommon;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;vclimg;Jcl;vcltouch;vcldb;bindcompfmx;FireDACPgDriver;inetdb;DbxCommonDriver;fmx;fmxdae;xmlrtl;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;IndyIPClient;bindcompvcl;VCLRESTComponents;dbxcds;VclSmp;adortl;JclVcl;vclie;bindengine;DBXMySQLDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;IndyProtocols;FireDACCommonODBC;fmxase;$(DCC_UsePackage)</DCC_UsePackage>

View file

@ -6,10 +6,10 @@
build: version.res manifest.res #icons
$(DELPHI_MSBUILD) kmconfig.dproj /p:Platform=Win32
$(TDS2DBG) $(WIN32_TARGET_PATH)\kmconfig.exe
$(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmconfig.exe -dpr kmconfig.exe
$(TDS2DBG) $(WIN32_TARGET_PATH)\kmconfig.exe
$(COPY) $(WIN32_TARGET_PATH)\kmconfig.exe $(PROGRAM)\desktop
if exist $(WIN32_TARGET_PATH)\kmconfig.exe $(COPY) $(WIN32_TARGET_PATH)\kmconfig.exe $(DEBUGPATH)\desktop
if exist $(WIN32_TARGET_PATH)\kmconfig.dbg $(COPY) $(WIN32_TARGET_PATH)\kmconfig.dbg $(DEBUGPATH)\desktop
#icons:
#rc icons.rc
@ -19,6 +19,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman for Windows" $(PROGRAM)\desktop\kmconfig.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\desktop\kmconfig.exe /t keyman-windows
$(SYMSTORE) $(DEBUGPATH)\desktop\kmconfig.dbg /t keyman-windows
backup:
$(WZZIP) $(BUILD)\desktop\kmconfig.zip $(BACKUPDEFAULTS) kmconfig.exe

View file

@ -58,6 +58,7 @@
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
<SanitizedProjectName>kmconfig</SanitizedProjectName>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_UsePackage>DBXSqliteDriver;IndyIPCommon;RESTComponents;bindcompdbx;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;svnui;mbColorLibD10;dsnapcon;FireDACADSDriver;scFontCombo;DCPdelphi2009;FireDACMSAccDriver;fmxFireDAC;vclimg;Jcl;FireDAC;vcltouch;JvCore;vcldb;bindcompfmx;svn;FireDACSqliteDriver;FireDACPgDriver;inetdb;CEF4Delphi;soaprtl;DbxCommonDriver;fmx;FireDACIBDriver;fmxdae;xmlrtl;soapmidas;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;EmbeddedWebBrowser_XE;VCLRESTComponents;soapserver;dbxcds;VclSmp;JvDocking;adortl;JclVcl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;IndyProtocols;inetdbxpress;keyman_components;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
@ -87,7 +88,6 @@
<DCC_ConsoleTarget>true</DCC_ConsoleTarget>
<DCC_MapFile>3</DCC_MapFile>
<Debugger_RunParams>reset engine.compatibility.text_services_framework.notepad.exe 0</Debugger_RunParams>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
<DCC_Description>Keyman Config</DCC_Description>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
@ -107,7 +107,6 @@
<DCC_Description>Keyman Config</DCC_Description>
<DCC_ConsoleTarget>true</DCC_ConsoleTarget>
<DCC_RemoteDebug>true</DCC_RemoteDebug>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">

View file

@ -6,8 +6,8 @@
build: version.res manifest.res icons xml
$(DCC32) kmshell.dpr
$(TDS2DBG) kmshell.exe
$(SENTRYTOOL_DELPHIPREP) kmshell.exe -dpr kmshell.dpr
$(TDS2DBG) kmshell.exe
$(COPY) kmshell.exe $(PROGRAM)\desktop
if exist kmshell.dbg $(COPY) kmshell.dbg $(DEBUGPATH)\desktop
@ -34,6 +34,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Desktop" $(PROGRAM)\desktop\kmshell.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\desktop\kmshell.exe /t keyman-windows
$(SYMSTORE) $(DEBUGPATH)\desktop\kmshell.dbg /t keyman-windows
backup:
$(WZZIP) $(BUILD)\desktop\kmshell.zip $(BACKUPDEFAULTS) kmshell.exe

View file

@ -6,8 +6,8 @@
build: version.res manifest.res icons locale
$(DCC32) setup.dpr
$(TDS2DBG) setup.exe
$(SENTRYTOOL_DELPHIPREP) setup.exe -dpr setup.dpr
$(TDS2DBG) setup.exe
$(COPY) setup.exe $(PROGRAM)\desktop
locale:
@ -25,6 +25,10 @@ clean: def-clean
signcode:
rem SIGNCODE /d "Keyman Desktop Setup" $(PROGRAM)\desktop\setup.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\desktop\setup.exe /t keyman-windows
$(SYMSTORE) $(DEBUGPATH)\desktop\setup.dbg /t keyman-windows
backup:
$(WZZIP) $(BUILD)\desktop\setup.zip $(BACKUPDEFAULTS) setup.exe

View file

@ -65,6 +65,7 @@
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<ImageDebugInfo>true</ImageDebugInfo>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<Icon_MainIcon>setup_Icon.ico</Icon_MainIcon>
@ -90,7 +91,6 @@
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
<DCC_DebugInfoInExe>false</DCC_DebugInfoInExe>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">

View file

@ -7,8 +7,8 @@
build: version.res manifest.res icons dirs xml
cd $(ROOT)\src\developer\tike
$(DCC32) tike.dpr
$(TDS2DBG) tike.exe
$(SENTRYTOOL_DELPHIPREP) tike.exe -dpr tike.dpr
$(TDS2DBG) tike.exe
$(COPY) tike.exe $(PROGRAM)\developer
$(COPY) kmlmc.cmd $(PROGRAM)\developer
if exist tike.dbg $(COPY) tike.dbg $(DEBUGPATH)\developer
@ -72,6 +72,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Developer" $(PROGRAM)\developer\tike.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\developer\tike.exe /t keyman-developer
$(SYMSTORE) $(DEBUGPATH)\developer\tike.dbg /t keyman-developer
backup:
$(WZZIP) $(BUILD)\developer\tike.zip $(BACKUPDEFAULTS) tike.exe

View file

@ -1171,8 +1171,7 @@ begin
if FFont = nil then
begin
FDefaultFont := True;
//TODO:FFont := EditorMemo.AltFont;
FFont := Font; //TODO scrap this
FFont := EditorMemo.CharFont;
end
else
FDefaultFont := False;

View file

@ -2884,9 +2884,7 @@ begin
FDebugForm.OnClearBreakpoint := DebugClearBreakpoint;
FDebugForm.OnUpdateExecutionPoint := DebugUpdateExecutionPoint;
FDebugForm.Visible := True;
// TODO: FDebugForm.EditorMemo := frameSource.memo;
FDebugForm.EditorMemo := frameSource;
FDebugStatusForm := TfrmDebugStatus.Create(Self);
FDebugStatusForm.BorderStyle := bsNone;

View file

@ -1,18 +1,18 @@
(*
Name: CompileKeymanWeb
Copyright: Copyright (C) SIL International.
Documentation:
Description:
Documentation:
Description:
Create Date: 26 Apr 2006
Modified Date: 24 Aug 2015
Authors: mcdurdin
Related Files:
Dependencies:
Related Files:
Dependencies:
Bugs:
Todo:
Notes:
Bugs:
Todo:
Notes:
History: 26 Apr 2006 - mcdurdin - Add support for ContextEx and Context, and lots of polish
21 Jun 2006 - mcdurdin - Add embedded javascript output (for IMX support)
21 Jun 2006 - mcdurdin - Add semicolons as necessary to javascript
@ -89,10 +89,10 @@
27 May 2015 - mcdurdin - I4724 - Compiler generates warnings for JSON files if output path is source path
24 Aug 2015 - mcdurdin - I4872 - OSK font and Touch Layout font should be the same in Developer
24 Aug 2015 - mcdurdin - I4866 - Add warn on deprecated features to project and compile
24 Aug 2015 - mcdurdin - I4865 - Add treat hints and warnings as errors into project
28 Feb 2018 - jahorton - GH 281 - Changed the compilation targets for KMW 10 to better support deadkeys.
*)
unit CompileKeymanWeb; // I3306 // I3310
@ -218,6 +218,7 @@ type
function JavaScript_String(ch: DWord): string; // I2242
function IsKeyboardVersion10OrLater: Boolean;
function IsKeyboardVersion14OrLater: Boolean;
procedure ReportError(line: Integer; msgcode: LongWord; const text: string); // I1971
function ExpandSentinel(pwsz: PWideChar): TSentinelRecord;
@ -936,9 +937,17 @@ var
end;
CODE_DEADKEY:
Result := Result + nlt + Format('k.KDO(%d,t,%d);', [len, recContext.Deadkey.Deadkey]); // I4611
CODE_NOTANY:
begin
// #917: Minimum version required is 14.0: the KCXO function was only added for 14.0
// Note that this is checked in compiler.cpp as well, so this error can probably never occur
if not IsKeyboardVersion14OrLater then
ReportError(fkp.Line, CERR_NotSupportedInKeymanWebContext, Format('Statement notany in context() match requires version 14.0+ of KeymanWeb', [GetCodeName(recContext.Code)])); // I1971 // I4061
Result := Result + nlt + Format('k.KCXO(%d,t,%d,%d);', [len, AdjustIndex(fkp.dpContext, xstrlen(fkp.dpContext)), AdjustIndex(fkp.dpContext, ContextIndex)]);
end;
else
begin
ReportError(fkp.Line, CERR_NotSupportedInKeymanWebContext, Format('Statement %s is not currently supported in CODE_CONTEXT match', [GetCodeName(recContext.Code)])); // I1971 // I4061
ReportError(fkp.Line, CERR_NotSupportedInKeymanWebContext, Format('Statement %s is not currently supported in context() match', [GetCodeName(recContext.Code)])); // I1971 // I4061
//CODE_NUL: ; // todo: check if context is longer than that...
Result := Result + nlt + '/*.*/ '; // I4611
end;
@ -2174,6 +2183,11 @@ begin
Result := fk.version >= VERSION_100;
end;
function TCompileKeymanWeb.IsKeyboardVersion14OrLater: Boolean;
begin
Result := fk.version >= VERSION_140;
end;
procedure TCompileKeymanWeb.CheckStoreForInvalidFunctions(key: PFILE_KEY; store: PFILE_STORE); // I1520
var
n: Integer;

View file

@ -47,6 +47,9 @@ signcode:
backup:
@rem
wrap-symbols:
@rem
clean:
cd $(ROOT)\src\developer\inst
-del /Q download.mak

View file

@ -7,6 +7,7 @@
build: version.res dirs
$(MSBUILD) kmanalyze.sln $(MSBUILD_BUILD)
$(COPY) $(TARGET_PATH)\kmanalyze.exe $(PROGRAM)\developer
$(COPY) $(TARGET_PATH)\kmanalyze.pdb $(DEBUGPATH)\developer
clean: def-clean
$(MSBUILD) kmanalyze.sln $(MSBUILD_CLEAN)
@ -14,13 +15,17 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Developer Keyboard Analyzer" $(PROGRAM)\developer\kmanalyze.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\developer\kmanalyze.exe /t keyman-developer
$(SYMSTORE) $(DEBUGPATH)\developer\kmanalyze.pdb /t keyman-developer
backup:
$(WZZIP) $(BUILD)\developer\kmanalyze.exe $(BACKUPDEFAULTS) kmanalyze.exe
test-manifest:
@rem
@rem
#install:
# $(COPY) $(PROGRAM)\developer\kmanalyze.exe "$(INSTALLPATH_KEYMANDEVELOPER)\kmanalyze.exe"
!include ..\..\Target.mak

View file

@ -1287,6 +1287,7 @@ DWORD ProcessSystemStore(PFILE_KEYBOARD fk, DWORD SystemID, PFILE_STORE sp)
else if (wcsncmp(p, L"8.0", 3) == 0) fk->version = VERSION_80;
else if (wcsncmp(p, L"9.0", 3) == 0) fk->version = VERSION_90;
else if (wcsncmp(p, L"10.0", 4) == 0) fk->version = VERSION_100;
else if (wcsncmp(p, L"14.0", 4) == 0) fk->version = VERSION_140; // Adds support for #917 -- context() with notany() for KeymanWeb
else return CERR_InvalidVersion;
if (fk->version < VERSION_60) FOldCharPosMatching = TRUE;
@ -1488,6 +1489,15 @@ DWORD CheckStatementOffsets(PFILE_KEYBOARD fk, PFILE_GROUP gp, PWSTR context, PW
int contextOffset = *(p + 2);
if (contextOffset > xstrlen(context))
return CERR_ContextExHasInvalidOffset;
// Due to a limitation in earlier versions of KeymanWeb, the minimum version
// for context() referring to notany() is 14.0. See #917 for details.
if (CompileTarget == CKF_KEYMANWEB) {
for (q = context, i = 1; *q && i < contextOffset; q = incxstr(q), i++);
if (*q == UC_SENTINEL && *(q + 1) == CODE_NOTANY) {
VERIFY_KEYBOARD_VERSION(fk, VERSION_140, CERR_140FeatureOnlyContextAndNotAnyWeb);
}
}
}
}
}

View file

@ -203,6 +203,7 @@ BEGIN
CERR_90FeatureOnlyEmbedCSS "Embedding CSS requires store(&version) '9.0'"
CERR_90FeatureOnlyTargets "&TARGETS system store requires store(&version) '9.0'"
CERR_ContextAndIndexInvalidInMatchNomatch "context and index statements cannot be used in a match or nomatch statement"
CERR_140FeatureOnlyContextAndNotAnyWeb "For web and touch platforms, context() statement referring to notany() requires store(&version) '14.0'"
CWARN_PlatformNotInTargets "The specified platform is not a target platform"
END

View file

@ -16,14 +16,14 @@ build: version.res dirs
$(COPY) $(WIN32_TARGET_PATH)\kmcmpdll.dll ..\tike\kmcmpdll.dll
-mkdir ..\kmcomp\$(WIN32_TARGET_PATH)
$(COPY) $(WIN32_TARGET_PATH)\kmcmpdll.dll ..\kmcomp\$(WIN32_TARGET_PATH)\kmcmpdll.dll
$(MSBUILD) kmcmpdll.sln $(MSBUILD_BUILD) /p:Platform=x64
$(COPY) $(X64_TARGET_PATH)\kmcmpdll.x64.dll $(PROGRAM)\developer\kmcmpdll.x64.dll
$(COPY) $(X64_TARGET_PATH)\kmcmpdll.x64.lib $(OUTLIB)\kmcmpdll.x64.lib
$(COPY) $(X64_TARGET_PATH)\kmcmpdll.x64.pdb $(DEBUGPATH)\developer\kmcmpdll.x64.pdb
-mkdir ..\kmcomp\$(WIN64_TARGET_PATH)
$(COPY) $(X64_TARGET_PATH)\kmcmpdll.x64.dll ..\kmcomp\$(WIN64_TARGET_PATH)\kmcmpdll.x64.dll
clean: def-clean
$(MSBUILD) kmcmpdll.sln $(MSBUILD_CLEAN)
@ -32,14 +32,20 @@ signcode:
$(SIGNCODE) /d "Keyman Developer Compiler" $(PROGRAM)\developer\kmcmpdll.dll
$(SIGNCODE) /d "Keyman Developer Compiler" $(PROGRAM)\developer\kmcmpdll.x64.dll
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\developer\kmcmpdll.dll /t keyman-developer
$(SYMSTORE) $(PROGRAM)\developer\kmcmpdll.x64.dll /t keyman-developer
$(SYMSTORE) $(DEBUGPATH)\developer\kmcmpdll.pdb /t keyman-developer
$(SYMSTORE) $(DEBUGPATH)\developer\kmcmpdll.x64.pdb /t keyman-developer
backup:
$(WZZIP) $(BUILD)\developer\kmcmpdll.zip $(BACKUPDEFAULTS) $(PROGRAM)\developer\kmcmpdll.dll $(PROGRAM)\developer\kmcmpdll.x64.dll
test-manifest:
@rem This target needed as dependency for TIKE and KMCMPDLL
install:
$(COPY) $(PROGRAM)\developer\kmcmpdll.dll "$(INSTALLPATH_KEYMANDEVELOPER)\kmcmpdll.dll"
$(COPY) $(PROGRAM)\developer\kmcmpdll.x64.dll "$(INSTALLPATH_KEYMANDEVELOPER)\kmcmpdll.x64.dll"
!include ..\..\Target.mak

View file

@ -11,8 +11,8 @@ TARGET_GROUP=developer
build: version.res manifest.res dirs icons
$(DELPHI_MSBUILD) kmcomp.dproj /p:Platform=Win32
$(TDS2DBG) $(WIN32_TARGET_PATH)\kmcomp.exe
$(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmcomp.exe -dpr kmcomp.dpr
$(TDS2DBG) $(WIN32_TARGET_PATH)\kmcomp.exe
$(COPY) $(WIN32_TARGET_PATH)\kmcomp.exe $(PROGRAM)\developer
if exist $(WIN32_TARGET_PATH)\kmcomp.dbg $(COPY) $(WIN32_TARGET_PATH)\kmcomp.dbg $(DEBUGPATH)\developer
@ -25,7 +25,7 @@ build: version.res manifest.res dirs icons
if exist $(WIN64_TARGET_PATH)\kmcomp.x64.map del $(WIN64_TARGET_PATH)\kmcomp.x64.map
ren $(WIN64_TARGET_PATH)\kmcomp.map kmcomp.x64.map
$(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\kmcomp.x64.exe -dpr kmcomp.dpr
# $(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\kmcomp.x64.exe -dpr kmcomp.dpr
$(COPY) $(WIN64_TARGET_PATH)\kmcomp.x64.exe $(PROGRAM)\developer\kmcomp.x64.exe
if exist $(WIN64_TARGET_PATH)\kmcomp.dbg $(COPY) $(WIN64_TARGET_PATH)\kmcomp.dbg $(DEBUGPATH)\developer\kmcomp.x64.dbg
@ -39,6 +39,12 @@ signcode:
$(SIGNCODE) /d "Keyman Developer Command-Line Compiler" $(PROGRAM)\developer\kmcomp.exe
$(SIGNCODE) /d "Keyman Developer Command-Line Compiler" $(PROGRAM)\developer\kmcomp.x64.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\developer\kmcomp.exe /t keyman-developer
$(SYMSTORE) $(PROGRAM)\developer\kmcomp.x64.exe /t keyman-developer
$(SYMSTORE) $(DEBUGPATH)\developer\kmcomp.dbg /t keyman-developer
#TODO: $(SYMSTORE) $(DEBUGPATH)\developer\kmcomp.x64.dbg /t keyman-developer
backup:
$(WZZIP) $(BUILD)\developer\kmcomp.zip $(BACKUPDEFAULTS) $(PROGRAM)\developer\kmcomp.exe $(PROGRAM)\developer\kmcomp.x64.exe

View file

@ -137,6 +137,7 @@ type
FKeyStateNull: TKeyboardState;
FXxxxVk: UINT;
FHas102ndKey: Boolean;
function GetMaxShiftState: TKBDShiftState;
function ProcessDeadKey(
iKeyDead: UINT; // The index into the VirtualKey of the dead key
@ -148,6 +149,7 @@ type
procedure ScanKeyboard(hkl: HKL);
function WriteOutputKMNFile: string;
function WriteOutputKVKSFile: string;
procedure Detect102ndKey(hkl: HKL);
public
constructor Create(inputHKL, layoutFile, layoutText: string);
destructor Destroy; override;
@ -463,8 +465,13 @@ begin
else if FRGFDeadKey[ss, False] then
begin
// It's a dead key
// This does not match the "Fill from layout" result because deadkeys are
// left blank in "Fill from layout". However, this is better because it
// matches the actual Windows layout. "Fill from layout" cannot deduce the
// character to put onto a deadkey currently (unlike Windows deadkeys,
// there is no isolated "default" for a Keyman deadkey).
vkk := TVisualKeyboardKey.Create;
vkk.VKey := FVK;
vkk.VKey := MapScanCodeToUSVK(FSC);
vkk.Text := st[1];
vkk.Flags := [kvkkUnicode];
vkk.Shift := KBDShiftStateToVisualKeyboardShiftState[ss];
@ -486,7 +493,7 @@ begin
begin
// It's some characters; put 'em in there.
vkk := TVisualKeyboardKey.Create;
vkk.VKey := FVK;
vkk.VKey := MapScanCodeToUSVK(FSC);
vkk.Text := st;
vkk.Flags := [kvkkUnicode];
vkk.Shift := KBDShiftStateToVisualKeyboardShiftState[ss];
@ -788,6 +795,22 @@ begin
end;
end;
end;
Detect102ndKey(hkl);
end;
// duplicate of TOnScreenKeyboard.UpdateEuroLayout
procedure TLoader.Detect102ndKey(hkl: HKL);
var
k102, kbackslash: UINT;
begin
k102 := MapVirtualKeyExW($56, 1, hkl);
kbackslash := MapVirtualKeyExW($2b, 1, hkl);
if k102 <> 0 then k102 := MapVirtualKeyExW(k102, 2, hkl);
if kbackslash <> 0 then kbackslash := MapVirtualKeyExW(kbackslash, 2, hkl);
FHas102ndKey := (kbackslash <> k102) and (k102 <> 0);
end;
procedure TLoader.Main(var KMN, KVKS: string);
@ -915,6 +938,9 @@ begin
end;
end;
if FHas102ndKey then
vk.Header.Flags := vk.Header.Flags + [kvkh102];
vk.SaveToStream(ss, kvksfXML);
Result := ss.DataString;

View file

@ -7,8 +7,8 @@
build: version.res manifest.res dirs icons
$(DELPHI_MSBUILD) kmconvert.dproj /p:Platform=Win32
$(TDS2DBG) $(WIN32_TARGET_PATH)\kmconvert.exe
$(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmconvert.exe -dpr kmconvert.dpr
$(TDS2DBG) $(WIN32_TARGET_PATH)\kmconvert.exe
$(COPY) $(WIN32_TARGET_PATH)\kmconvert.exe $(PROGRAM)\developer
if exist $(WIN32_TARGET_PATH)\kmconvert.dbg $(COPY) $(WIN32_TARGET_PATH)\kmconvert.dbg $(DEBUGPATH)\developer
@ -21,6 +21,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Developer Conversion Utility" $(PROGRAM)\developer\kmconvert.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\developer\kmconvert.exe /t keyman-developer
$(SYMSTORE) $(DEBUGPATH)\developer\kmconvert.dbg /t keyman-developer
backup:
$(WZZIP) $(BUILD)\developer\kmconvert.zip $(BACKUPDEFAULTS) kmconvert.exe

View file

@ -56,6 +56,7 @@
<DCC_UsePackage>RESTComponents;FireDAC;FireDACSqliteDriver;soaprtl;FireDACIBDriver;soapmidas;FireDACCommon;RESTBackendComponents;soapserver;CloudService;FireDACCommonDriver;inet;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
<SanitizedProjectName>kmconvert</SanitizedProjectName>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_UsePackage>DBXSqliteDriver;bindcompdbx;IndyIPCommon;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;svnui;mbColorLibD10;dsnapcon;FireDACADSDriver;scFontCombo;DCPdelphi2009;FireDACMSAccDriver;fmxFireDAC;vclimg;Jcl;vcltouch;JvCore;vcldb;bindcompfmx;svn;FireDACPgDriver;inetdb;CEF4Delphi;DbxCommonDriver;fmx;fmxdae;xmlrtl;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;IndyIPClient;bindcompvcl;EmbeddedWebBrowser_XE;VCLRESTComponents;dbxcds;VclSmp;JvDocking;adortl;JclVcl;vclie;bindengine;DBXMySQLDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;IndyProtocols;keyman_components;FireDACCommonODBC;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
@ -66,7 +67,6 @@
<DCC_ConsoleTarget>true</DCC_ConsoleTarget>
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
<Manifest_File>(None)</Manifest_File>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">

View file

@ -16,13 +16,17 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Developer Decompiler" $(PROGRAM)\developer\kmdecomp.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\developer\kmdecomp.exe /t keyman-developer
$(SYMSTORE) $(DEBUGPATH)\developer\kmdecomp.pdb /t keyman-developer
backup:
$(WZZIP) $(BUILD)\developer\kmdecomp.zip $(BACKUPDEFAULTS) $(PROGRAM)\developer\kmdecomp.exe
$(WZZIP) $(BUILD)\developer\kmdecomp.zip $(BACKUPDEFAULTS) $(PROGRAM)\developer\kmdecomp.exe
test-manifest:
@rem This target needed as dependency for KMDECOMP
install:
$(COPY) $(PROGRAM)\developer\kmdecomp.exe "$(INSTALLPATH_KEYMANDEVELOPER)\kmdecomp.exe"
!include ..\..\Target.mak

View file

@ -9,10 +9,15 @@ VERSION_TXT_PATH=..\..
build: dirs version.res
$(MSBUILD) imsample.sln $(MSBUILD_BUILD)
$(COPY) imsample.dll $(PROGRAM)\developer
$(COPY) imsample.pdb $(PROGRAM)\developer
signcode:
$(SIGNCODE) /d "Keyman IMX Sample" $(PROGRAM)\developer\imsample.dll
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\developer\imsample.dll /t keyman-developer
$(SYMSTORE) $(DEBUGPATH)\developer\imsample.pdb /t keyman-developer
backup:
$(WZZIP) $(BUILD)\developer\imsample.zip $(BACKUPDEFAULTS) imsample.dll

View file

@ -6,8 +6,8 @@
build: version.res manifest.res icons
$(DCC32) setup.dpr
$(TDS2DBG) setup.exe
$(SENTRYTOOL_DELPHIPREP) setup.exe -dpr setup.dpr
$(TDS2DBG) setup.exe
$(COPY) setup.exe $(PROGRAM)\developer
if exist setup.dbg $(COPY) setup.dbg $(DEBUGPATH)\developer\devsetup.dbg
-del devsetup.dbg
@ -25,6 +25,13 @@ clean: def-clean
signcode:
rem SIGNCODE /d "Keyman Developer Setup" $(PROGRAM)\developer\setup.exe
wrap-symbols:
# This is slightly non-standard due to renamed devsetup.dbg above
# we should be able to clean this up in the future when we remove the
# zipped debug symbols
$(SYMSTORE) $(PROGRAM)\developer\setup.exe /t keyman-developer
$(SYMSTORE) $(ROOT)\src\developer\setup\setup.dbg /t keyman-developer
backup:
$(WZZIP) $(BUILD)\developer\devsetup.zip $(BACKUPDEFAULTS) setup.exe

View file

@ -41,25 +41,16 @@ type
ssErrorUnableToContactServer,
ssErrorUnableToContactServerDetailed,
ssStatusCheckingWindowsInstaller,
ssStatusCheckingInternetExplorer,
ssStatusCheckingMSXML,
ssStatusCheckingForUpdates,
ssStatusInstalling,
ssStatusComplete,
ssQueryUpdateWindowsInstaller,
ssQueryUpdateInternetExplorer,
ssQueryUpdateMSXML,
ssQueryUpdateVersion,
ssQueryRestart,
ssErrorUnableToAutomaticallyRestart,
ssRedistIEUpdateRequired,
ssMustRestart,
ssRedistRequired,
ssCheckForUpdatesError
);
@ -80,29 +71,18 @@ const
'Unable to contact server',
'Unable to contact server, error was: %0:s',
'Checking Windows Installer version',
'Checking Internet Explorer version',
'Checking MSXML version',
'Checking for updates online',
'Installing Keyman Developer',
'Installation Complete',
'An updated version of Windows Installer is required to install Keyman Developer. Do you want to download and install it now?',
'Internet Explorer 5.5 or later is required to install Keyman Developer. Do you want to download it now?',
'MSXML 3.0 is required to install Keyman Developer. Do you want to download it now?',
'Version %1:s of Keyman Developer has been released and is available for download. This update is %0:dKB. '+
'Do you want to download and install the updated version (recommended)?',
'You must restart Windows before Setup can complete. When you restart Windows, Setup will continue. Restart now?',
'Windows was not able to be automatically restarted. You should restart Windows before you try and start Keyman Developer.',
'Internet Explorer 5.5 or later is required to install Keyman Developer.',
'You must restart Windows to complete Setup. When you restart Windows, Setup will finish.',
'A redistributable %0:s is required but is not available in the install path. This redistributable can be downloaded from the Keyman website.',
'The online update check failed with an error: %0:s'
);

View file

@ -90,7 +90,6 @@ type
procedure CheckNewVersion;
function InstallMSI: Boolean;
procedure Status(const Text: WideString = '');
function CheckDependencies: Boolean;
procedure DownloadRedistFile(AOwner: TfrmDownloadProgress; var Result: Boolean);
function InstallNewVersion: Boolean;
function IsNewerVersionInstalled(const NewVersion: WideString): Boolean;
@ -223,36 +222,6 @@ begin
Result := (FInstalledVersion.Version <> '') and (CompareVersions(NewVersion, FInstalledVersion.Version) >= 0);
end;
function TfrmRun.CheckDependencies: Boolean;
const
SInternetExplorerHome = 'https://www.microsoft.com/ie/';
begin
Result := False;
// Check Internet Explorer version
Status(FInstallInfo.Text(ssStatusCheckingInternetExplorer));
with TRegistryErrorControlled.Create do // I2890
try
RootKey := HKEY_LOCAL_MACHINE;
if not OpenKeyReadOnly('Software\Microsoft\Internet Explorer') or not ValueExists('Version') or
(CompareVersions(ReadString('Version'), '9.0') > 0) then
begin
if FSilent or (MessageDlgW(FInstallInfo.Text(ssQueryUpdateInternetExplorer),
mtConfirmation, mbOkCancel, 0) = mrCancel) then
begin
LogError(FInstallInfo.Text(ssRedistIEUpdateRequired), False);
Exit;
end;
TUtilExecute.URL(SInternetExplorerHome);
Exit;
end;
finally
Free;
end;
Result := True;
end;
function TfrmRun.InstallNewVersion: Boolean;
begin
Result := False;
@ -423,8 +392,6 @@ end;
function TfrmRun.DoInstall(Silent, PromptForReboot: Boolean): Boolean; // I1901 // I3355 // I3500
begin
Result := False; // I1901
FPromptForReboot := PromptForReboot; // I3355 // I3500
FSilent := Silent;
@ -439,8 +406,6 @@ begin
StatusMax := 6;
if not CheckDependencies then Exit;
SetupMSI;
CheckInstalledVersion;

View file

@ -22,6 +22,10 @@ backup:
cd $(ROOT)\src\engine\inst\insthelper
$(MAKE) backup
wrap-symbols:
cd $(ROOT)\src\engine\inst\insthelper
$(MAKE) symbols
msm:
#
# Copy files for installation

View file

@ -8,9 +8,10 @@ VERSION_TXT_PATH=..\..
build: dirs version.res
$(DCC32) insthelper.dpr
$(TDS2DBG) insthelper.dll
$(SENTRYTOOL_DELPHIPREP) insthelper.dll -dpr insthelper.dpr
$(TDS2DBG) insthelper.dll
$(COPY) insthelper.dll $(PROGRAM)\inst
$(COPY) insthelper.dbg $(DEBUGPATH)\inst
clean: def-clean
-del *.dll
@ -18,6 +19,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Engine Install Helper" $(PROGRAM)\inst\insthelper.dll
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\inst\insthelper.dll /t keyman-windows
$(SYMSTORE) $(DEBUGPATH)\inst\insthelper.dbg /t keyman-windows
backup:
$(WZZIP) $(BUILD)\inst\insthelper.zip $(BACKUPDEFAULTS) insthelper.dll

View file

@ -7,8 +7,8 @@
build: version.res manifest.res keymanmenuitem.res icons.res osktoolbar.res dirs
rc langswitch\langswitchmanager.rc
$(DCC32) keyman.dpr
$(TDS2DBG) keyman.exe
$(SENTRYTOOL_DELPHIPREP) keyman.exe -dpr keyman.dpr
$(TDS2DBG) keyman.exe
$(COPY) keyman.exe $(PROGRAM)\engine
if exist keyman.dbg $(COPY) keyman.dbg $(DEBUGPATH)\engine
@ -17,6 +17,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Engine" $(PROGRAM)\engine\keyman.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\engine\keyman.dll /t keyman-engine-windows
$(SYMSTORE) $(DEBUGPATH)\engine\keyman.dbg /t keyman-engine-windows
backup:
$(WZZIP) $(BUILD)\engine\keyman.zip $(BACKUPDEFAULTS) keyman.exe

View file

@ -21,6 +21,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Engine" $(PROGRAM)\engine\keyman32.dll
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\engine\keyman32.dll /t keyman-engine-windows
$(SYMSTORE) $(DEBUGPATH)\engine\keyman32.pdb /t keyman-engine-windows
backup:
$(WZZIP) $(BUILD)\engine\keyman32.zip $(BACKUPDEFAULTS) keyman32.dll

View file

@ -21,6 +21,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keyman64.dll
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\engine\keyman64.dll /t keyman-engine-windows
$(SYMSTORE) $(DEBUGPATH)\engine\keyman64.pdb /t keyman-engine-windows
backup:
$(WZZIP) $(BUILD)\engine\keyman64.zip $(BACKUPDEFAULTS) keyman64.dll

View file

@ -4,7 +4,7 @@
!include ..\..\Defines.mak
build:
build:
mc -U keymanmc.mc
rc keymanmc.rc
link -dll -noentry keymanmc.res
@ -20,6 +20,9 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Engine" $(PROGRAM)\engine\keymanmc.dll
wrap-symbols:
rem no symbols
backup:
$(WZZIP) $(BUILD)\engine\keymanmc.zip $(BACKUPDEFAULTS) keymanmc.dll

View file

@ -22,6 +22,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keymanx64.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\engine\keymanx64.exe /t keyman-engine-windows
$(SYMSTORE) $(DEBUGPATH)\engine\keymanx64.pdb /t keyman-engine-windows
backup:
$(WZZIP) $(BUILD)\engine\keymanx64.exe $(BACKUPDEFAULTS) keymanx64.exe

View file

@ -8,8 +8,8 @@ build: version.res manifest.res kbd_noicon.res dirs
gentlb -Tkmcomapi.tlb kmcomapi.ridl
$(DELPHI_MSBUILD) kmcomapi.dproj /p:Platform=Win32
$(TDS2DBG) $(WIN32_TARGET_PATH)\kmcomapi.dll
$(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmcomapi.dll -dpr kmcomapi.dpr
$(TDS2DBG) $(WIN32_TARGET_PATH)\kmcomapi.dll
$(COPY) $(WIN32_TARGET_PATH)\kmcomapi.dll $(PROGRAM)\engine
if exist $(WIN32_TARGET_PATH)\kmcomapi.dbg $(COPY) $(WIN32_TARGET_PATH)\kmcomapi.dbg $(DEBUGPATH)\engine
@ -44,6 +44,12 @@ install:
$(COPY) $(PROGRAM)\engine\kmcomapi.x64.dll "$(INSTALLPATH_KEYMANENGINE)"
cmd /c regsvr32 /s "$(INSTALLPATH_KEYMANENGINE)\kmcomapi.x64.dll"
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\engine\kmcomapi.dll /t keyman-engine-windows
$(SYMSTORE) $(PROGRAM)\engine\kmcomapi.x64.dll /t keyman-engine-windows
$(SYMSTORE) $(DEBUGPATH)\engine\kmcomapi.dbg /t keyman-engine-windows
#TODO: $(SYMSTORE) $(PROGRAM)\engine\kmcomapi.x64.dbg /t keyman-engine-windows
backup:
$(WZZIP) $(BUILD)\engine\kmcomapi.zip $(BACKUPDEFAULTS) $(WIN32_TARGET_PATH)\kmcomapi.dll $(WIN64_TARGET_PATH)\kmcomapi.x64.dll $(WIN32_TARGET_PATH)\kmcomapi.dbg

View file

@ -84,7 +84,6 @@
<DCC_UsePackage>vclie50;Vcl50;Inetdb50;Inet50;Vcldb50;Vclx50;Vclbde50;proide50;keyman_components;$(DCC_UsePackage)</DCC_UsePackage>
<VerInfo_Locale>1033</VerInfo_Locale>
<DebugSourcePath>C:\keyman\7.0\src\keyman\kmshell\startup\;$(DebugSourcePath)</DebugSourcePath>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
<DCC_DebugInfoInTds>true</DCC_DebugInfoInTds>
@ -137,6 +136,7 @@
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<Debugger_HostApplication>C:\Projects\keyman\open\windows\src\test\test-kmcomapi-win64\Win64\Debug\kmcomapi_win64_host.exe</Debugger_HostApplication>
<Debugger_RunParams>-r:Keyman.Test.Console.KeymanAPIHost.TKeymanAPITest.Test_IKeymanPackageInstalled,Keyman.Test.Console.KeymanAPIHost.TKeymanAPITest.Test_IKeymanPackageFile</Debugger_RunParams>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">

View file

@ -20,6 +20,12 @@ signcode:
$(SIGNCODE) /d "Keyman Engine Text Service" $(PROGRAM)\engine\kmtip.dll
$(SIGNCODE) /d "Keyman Engine Text Service" $(PROGRAM)\engine\kmtip64.dll
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\engine\kmtip.dll /t keyman-engine-windows
$(SYMSTORE) $(PROGRAM)\engine\kmtip64.dll /t keyman-engine-windows
$(SYMSTORE) $(DEBUGPATH)\engine\kmtip.pdb /t keyman-engine-windows
$(SYMSTORE) $(DEBUGPATH)\engine\kmtip64.pdb /t keyman-engine-windows
backup:
$(WZZIP) $(BUILD)\engine\kmtip.zip x86\kmtip.pdb $(BACKUPDEFAULTS) x86\kmtip.dll
$(WZZIP) $(BUILD)\engine\kmtip64.zip x64\kmtip64.pdb $(BACKUPDEFAULTS) x64\kmtip64.dll

View file

@ -18,6 +18,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Engine Mnemonic Keyboard Recompiler" $(PROGRAM)\engine\mcompile.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\engine\mcompile.exe /t keyman-engine-windows
$(SYMSTORE) $(DEBUGPATH)\engine\mcompile.pdb /t keyman-engine-windows
backup:
$(WZZIP) $(BUILD)\engine\mcompile.exe $(BACKUPDEFAULTS) mcompile.exe

View file

@ -17,8 +17,8 @@ build: version.res manifest.res dirs
del tsysinfox64.bin
$(DCC32) tsysinfo.dpr
$(TDS2DBG) tsysinfo.exe
$(SENTRYTOOL_DELPHIPREP) tsysinfo.exe -dpr tsysinfo.dpr
$(TDS2DBG) tsysinfo.exe
$(COPY) tsysinfo.exe $(PROGRAM)\engine
if exist tsysinfo.dbg $(COPY) tsysinfo.dbg $(DEBUGPATH)\engine
@ -28,6 +28,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Engine Diagnostics" $(PROGRAM)\engine\tsysinfo.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\engine\tsysinfo.exe /t keyman-engine-windows
$(SYMSTORE) $(DEBUGPATH)\engine\tsysinfo.dbg /t keyman-engine-windows
backup:
$(WZZIP) $(BUILD)\engine\tsysinfo.zip $(BACKUPDEFAULTS) tsysinfo.exe

View file

@ -6,7 +6,7 @@
build: version.res manifest.res dirs
$(DELPHI_MSBUILD) tsysinfox64.dproj /p:Platform=Win64
$(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\tsysinfox64.exe -dpr tsysinfox64.dpr
#$(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\tsysinfox64.exe -dpr tsysinfox64.dpr
$(COPY) $(WIN64_TARGET_PATH)\tsysinfox64.exe $(PROGRAM)\engine
clean: def-clean
@ -14,6 +14,10 @@ clean: def-clean
signcode:
$(SIGNCODE) /d "Keyman Engine x64 Diagnostics" $(PROGRAM)\engine\tsysinfox64.exe
wrap-symbols:
$(SYMSTORE) $(PROGRAM)\engine\tsysinfox64.exe /t keyman-engine-windows
#$(SYMSTORE) $(DEBUGPATH)\engine\tsysinfox64.dbg /t keyman-engine-windows
backup:
$(WZZIP) $(BUILD)\engine\tsysinfox64.zip $(BACKUPDEFAULTS) $(WIN64_TARGET_PATH)\*.map $(WIN64_TARGET_PATH)\tsysinfox64.exe

View file

@ -5,7 +5,6 @@ interface
uses
System.AnsiStrings,
System.Math,
System.SysUtils,
Winapi.ImageHlp,
Winapi.Windows,
@ -175,6 +174,25 @@ begin
Result := True;
end;
///
/// This is a thread-safe version of Set8087CW that avoids the global
/// variable Default8087CW. We would get occasional situations where
/// exceptions were raised on 2 threads simultaneously, which could lead to a
/// race where the first thread set Default8087CW to $1340, and then the second
/// thread would read that and think that is the default to keep. We want to
/// avoid touching Default8087CW altogether here.
///
/// See also https://stackoverflow.com/a/39684636/1836776 and RSP-13643.
///
procedure Set8087CW_Threadsafe(ANewCW: Word);
var
L8087CW: Word;
asm
mov L8087CW, ANewCW
fnclex
fldcw L8087CW
end;
///
/// First chance exception handler. We just want to take a copy of the raw
/// stack here.
@ -189,11 +207,12 @@ const
{$ENDIF}
var
Skip: Integer;
LastMask: TArithmeticExceptionMask;
LastMask: WORD;
begin
// Floating point state may be broken here, so let's mask it out and continue
// We'll restore state afterwards
LastMask := System.Math.SetExceptionMask([]);
LastMask := Get8087CW;
Set8087CW_Threadsafe($1332);
if ExceptionInfo.ExceptionRecord.ExceptionCode = cDelphiException
then Skip := DELPHI_FRAMES_TO_SKIP
@ -201,7 +220,7 @@ begin
CaptureStackTraceForException(ExceptionInfo.ExceptionRecord.ExceptionAddress, ExceptionInfo, Skip);
// Restore FP state
System.Math.SetExceptionMask(LastMask);
Set8087CW_Threadsafe(LastMask);
Result := 0; //EXCEPTION_CONTINUE_SEARCH;
end;

View file

@ -8,10 +8,10 @@ build: dirs # version.res manifest.res
$(DELPHI_MSBUILD) SentryClientTest.dproj /p:Platform=Win32
$(DELPHI_MSBUILD) SentryClientVclTest.dproj /p:Platform=Win32
$(TDS2DBG) $(WIN32_TARGET_PATH)\SentryClientTest.exe
$(TDS2DBG) $(WIN32_TARGET_PATH)\SentryClientVclTest.exe
$(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
upload-symbols:
sentry-cli upload-dif -p keyman-windows --wait --include-sources .

Some files were not shown because too many files have changed in this diff Show more