chore(web): Merge remote-tracking branch 'origin/master' into fix/web/pass-tab-enter-back-to-embedded-device

This commit is contained in:
Darcy Wong 2020-10-08 13:36:40 +07:00
commit d10c439ace
94 changed files with 769 additions and 375 deletions

1
.gitignore vendored
View file

@ -120,6 +120,7 @@
# /developer/inst/
/windows/src/developer/inst/*.wixpdb
/windows/src/developer/inst/download.mak
/windows/src/developer/inst/copydev.mak
# /developer/kmcmpdll/

View file

@ -1,5 +1,21 @@
# Keyman Version History
## 14.0.156 alpha 2020-10-08
* chore(windows): Move to Windows SDK 10.0.17763.0 (#3654)
* fix(windows): Some registry keys could have incorrect permissions 🍒 (#3668)
* fix(developer): ci uses repo tier and version (#3670)
* fix(windows): update CI for publishing desktop help (#3671)
* fix(web): ci uses repo tier and version (#3672)
* fix(windows): improve version numbers (#3678)
* chore: don't add tag to version in filenames (#3681)
## 14.0.155 alpha 2020-10-07
* refactor(common/models): centralizes suggestion & keep inits (#3645)
* fix(common/models): predictions after typed whitespace (#3657)
* fix(web): Fix how layer is separated from key name (#3659)
## 14.0.154 alpha 2020-10-05
* fix(windows): Upgrading keyboards with transient profiles (#3637)

View file

@ -1 +1 @@
14.0.155
14.0.157

View file

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

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/input-processor",
"version": "14.0.155",
"version": "14.0.157",
"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.155",
"@keymanapp/resources-gosh": "^14.0.157",
"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.155",
"@keymanapp/lexical-model-layer": "^14.0.155",
"@keymanapp/models-types": "^14.0.155",
"@keymanapp/web-environment": "^14.0.155",
"@keymanapp/web-utils": "^14.0.155",
"@keymanapp/keyboard-processor": "^14.0.157",
"@keymanapp/lexical-model-layer": "^14.0.157",
"@keymanapp/models-types": "^14.0.157",
"@keymanapp/web-environment": "^14.0.157",
"@keymanapp/web-utils": "^14.0.157",
"@types/node": "^11.9.4",
"eventemitter3": "^4.0.0",
"ts-node": "^8.0.2"

View file

@ -186,7 +186,7 @@ namespace com.keyman.text.prediction {
return this.predict_internal(transcription);
}
public acceptSuggestion(suggestion: Suggestion, outputTarget: OutputTarget): Promise<Suggestion> {
public applySuggestion(suggestion: Suggestion, outputTarget: OutputTarget): Promise<Suggestion> {
if(!outputTarget) {
throw "Accepting suggestions requires a destination OutputTarget instance."
}

View file

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

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/keyboard-processor",
"version": "14.0.155",
"version": "14.0.157",
"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.155",
"@keymanapp/resources-gosh": "^14.0.157",
"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.155",
"@keymanapp/web-environment": "^14.0.155",
"@keymanapp/web-utils": "^14.0.155",
"@keymanapp/models-types": "^14.0.157",
"@keymanapp/web-environment": "^14.0.157",
"@keymanapp/web-utils": "^14.0.157",
"@types/node": "^11.9.4",
"ts-node": "^8.0.2"
}

View file

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

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/recorder-core",
"version": "14.0.155",
"version": "14.0.157",
"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.155",
"@keymanapp/models-types": "^14.0.155",
"@keymanapp/web-environment": "^14.0.155",
"@keymanapp/web-utils": "^14.0.155"
"@keymanapp/keyboard-processor": "^14.0.157",
"@keymanapp/models-types": "^14.0.157",
"@keymanapp/web-environment": "^14.0.157",
"@keymanapp/web-utils": "^14.0.157"
},
"devDependencies": {
"typescript": "^3.8.3"

View file

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

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-sentry-manager",
"version": "14.0.155",
"version": "14.0.157",
"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.155",
"@keymanapp/web-environment": "^14.0.157",
"@sentry/browser": "^5.15.5"
}
}

View file

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

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-utils",
"version": "14.0.155",
"version": "14.0.157",
"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.155",
"@keymanapp/web-environment": "^14.0.155",
"@keymanapp/resources-gosh": "^14.0.157",
"@keymanapp/web-environment": "^14.0.157",
"@types/node": "^14.0.5",
"typescript": "^3.8.3"
}

View file

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

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-templates",
"version": "14.0.155",
"version": "14.0.157",
"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.155",
"@keymanapp/web-utils": "^14.0.155",
"@keymanapp/models-types": "^14.0.157",
"@keymanapp/web-utils": "^14.0.157",
"@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.155"
"@keymanapp/models-wordbreakers": "^14.0.157"
}
}

View file

@ -60,4 +60,26 @@ namespace models {
export function isSentinel(char: string): boolean {
return char == models.SENTINEL_CODE_UNIT;
}
/**
* Builds a Suggestion based on a Transform corresponding to a predictive-text op.
*
* Assumes that the Transform's `insert` property represents a completed word,
* as models generally delete the whole prefix, replacing it with the full lexical entry.
* @param transform
*/
export function transformToSuggestion(transform: Transform): Suggestion;
export function transformToSuggestion(transform: Transform, p: number): Suggestion & {p: number};
export function transformToSuggestion(transform: Transform, p?: number): Suggestion & {p?: number} {
let suggestion: Suggestion & {p?: number} = {
transform: transform,
transformId: transform.id,
displayAs: transform.insert
};
if(p === 0 || p) {
suggestion.p = p;
}
return suggestion;
}
}

View file

@ -1,4 +1,5 @@
/// <reference path="./trie-model.ts" />
/// <reference path="./quote-behavior.ts" />
// Add all namespaces defined here to the global scope:
if (typeof module != 'undefined' && typeof module.exports != 'undefined') {

View file

@ -0,0 +1,46 @@
namespace models {
export enum QuoteBehavior {
noQuotes = "no-quotes",
useQuotes = "use-quotes",
default = "default-quotes"
}
// For an "enum/namespace merge". See https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-namespaces-with-classes
export namespace QuoteBehavior {
/**
* Applies the specified quote behavior to the provided `Transform`, mutating it as appropriate.
* @param transform The Transform to be mutated
* @param punctuation The active `LexicalModelPunctuation` settings
* @param defaultTo The default quote behavior to use (in case the current value is `.default`)
*/
export function apply(behavior: QuoteBehavior, text: string, punctuation: LexicalModelPunctuation, defaultTo: QuoteBehavior): string {
if(defaultTo == QuoteBehavior.default || !defaultTo) {
throw "Specified quote behavior may be ambiguous - default behavior not specified (may not be .default)";
}
if(behavior == QuoteBehavior.default) {
behavior = defaultTo;
}
switch(behavior) {
case QuoteBehavior.noQuotes:
return text;
case QuoteBehavior.useQuotes:
let {open, close} = punctuation.quotesForKeepSuggestion;
// TODO: Is this the right thing to do under RTL?
// We need an extra pass over this section to validate it.
if(punctuation.isRTL) {
let temp = close;
close = open;
open = temp;
}
// This part's simple enough, at least.
return open + text + close;
default:
throw "Unsupported quote behavior state detected; implementation missing!";
}
}
}
}

View file

@ -124,18 +124,16 @@
let prefix = this.getLastWord(newContext.left);
// Return suggestions from the trie.
return makeDistribution(this._trie.lookup(prefix).map(({text, p}) => ({
transform: {
// Insert the suggestion from the Trie, verbatim
return makeDistribution(this._trie.lookup(prefix).map(({text, p}) =>
models.transformToSuggestion({
insert: text,
// Delete whatever the prefix that the user wrote.
deleteLeft: leftDelOffset + prefix.kmwLength()
// Note: a separate capitalization/orthography engine can take this
// result and transform it as needed.
deleteLeft: leftDelOffset + prefix.kmwLength(),
},
displayAs: text,
p: p
})));
p
)));
/* Helper */

View file

@ -0,0 +1,70 @@
/*
* Unit tests for common utility functions/methods.
*/
var assert = require('chai').assert;
var models = require('../').models;
describe('Common utility functions', function() {
// TODO: unit tests for other common utility functions
describe('transformToSuggestion', function() {
it('p: undefined', function() {
let suggestion = {
transform: {
insert: 'hello',
deleteLeft: 0,
id: 0
},
transformId: 0,
displayAs: 'hello'
};
assert.deepEqual(models.transformToSuggestion(suggestion.transform), suggestion);
});
it('p: 0', function() {
let suggestion = {
transform: {
insert: 'hello',
deleteLeft: 0,
id: 0
},
transformId: 0,
displayAs: 'hello',
p: 0
};
assert.deepEqual(models.transformToSuggestion(suggestion.transform, 0), suggestion);
});
it('p > 0', function() {
let suggestion = {
transform: {
insert: 'hello',
deleteLeft: 0,
id: 0
},
transformId: 0,
displayAs: 'hello',
p: 0.5
};
assert.deepEqual(models.transformToSuggestion(suggestion.transform, 0.5), suggestion);
});
it('properly handles the transformId', function() {
let suggestion = {
transform: {
insert: 'hello',
deleteLeft: 0,
id: 3
},
transformId: 3, // Ensures there isn't a separate ID seed in use.
displayAs: 'hello'
};
assert.deepEqual(models.transformToSuggestion(suggestion.transform), suggestion);
});
});
});

View file

@ -0,0 +1,150 @@
/*
* Unit tests for quote behaviors.
*/
var assert = require('chai').assert;
var QuoteBehavior = require('../').models.QuoteBehavior;
describe('Quote behaviors', function() {
describe('Script directionality', function() {
it('(default)', function() {
let englishPunctuation = {
quotesForKeepSuggestion: { open: `“`, close: `”`},
insertAfterWord: " "
}
var plainQuotedHello;
plainQuotedHello = QuoteBehavior.apply(QuoteBehavior.useQuotes, "hello", englishPunctuation, QuoteBehavior.useQuotes);
assert.equal(plainQuotedHello, "“hello”");
});
it('LTR', function() {
let englishPunctuation = {
quotesForKeepSuggestion: { open: `“`, close: `”`},
insertAfterWord: " ",
isRTL: false
}
var plainQuotedHello;
plainQuotedHello = QuoteBehavior.apply(QuoteBehavior.useQuotes, "hello", englishPunctuation, QuoteBehavior.useQuotes);
assert.equal(plainQuotedHello, "“hello”");
});
it.skip('RTL', function() {
// TODO:
});
});
describe('Application', function() {
it('.useQuotes', function() {
let englishPunctuation = {
quotesForKeepSuggestion: { open: `“`, close: `”`},
insertAfterWord: " "
}
var plainQuotedHello;
plainQuotedHello = QuoteBehavior.apply(QuoteBehavior.useQuotes, "hello", englishPunctuation, QuoteBehavior.useQuotes);
assert.equal(plainQuotedHello, "“hello”");
plainQuotedHello = QuoteBehavior.apply(QuoteBehavior.useQuotes, "hello", englishPunctuation, QuoteBehavior.noQuotes);
assert.equal(plainQuotedHello, "“hello”");
let angleQuotePunctuation = {
quotesForKeepSuggestion: { open: `«`, close: `»`},
insertAfterWord: " "
}
var angleQuotedHello;
angleQuotedHello = QuoteBehavior.apply(QuoteBehavior.useQuotes, "hello", angleQuotePunctuation, QuoteBehavior.useQuotes);
assert.equal(angleQuotedHello, "«hello»");
angleQuotedHello = QuoteBehavior.apply(QuoteBehavior.useQuotes, "hello", angleQuotePunctuation, QuoteBehavior.noQuotes);
assert.equal(angleQuotedHello, "«hello»");
});
it('.noQuotes', function() {
let englishPunctuation = {
quotesForKeepSuggestion: { open: `“`, close: `”`},
insertAfterWord: " "
}
var plainQuotedHello;
plainQuotedHello = QuoteBehavior.apply(QuoteBehavior.noQuotes, "hello", englishPunctuation, QuoteBehavior.useQuotes);
assert.equal(plainQuotedHello, "hello");
plainQuotedHello = QuoteBehavior.apply(QuoteBehavior.noQuotes, "hello", englishPunctuation, QuoteBehavior.noQuotes);
assert.equal(plainQuotedHello, "hello");
let angleQuotePunctuation = {
quotesForKeepSuggestion: { open: `«`, close: `»`},
insertAfterWord: " "
}
var angleQuotedHello;
angleQuotedHello = QuoteBehavior.apply(QuoteBehavior.noQuotes, "hello", angleQuotePunctuation, QuoteBehavior.useQuotes);
assert.equal(angleQuotedHello, "hello");
angleQuotedHello = QuoteBehavior.apply(QuoteBehavior.noQuotes, "hello", angleQuotePunctuation, QuoteBehavior.noQuotes);
assert.equal(angleQuotedHello, "hello");
});
it('.default -> .useQuotes', function() {
let englishPunctuation = {
quotesForKeepSuggestion: { open: `“`, close: `”`},
insertAfterWord: " "
}
var plainQuotedHello;
plainQuotedHello = QuoteBehavior.apply(QuoteBehavior.default, "hello", englishPunctuation, QuoteBehavior.useQuotes);
assert.equal(plainQuotedHello, "“hello”");
let angleQuotePunctuation = {
quotesForKeepSuggestion: { open: `«`, close: `»`},
insertAfterWord: " "
}
var angleQuotedHello;
angleQuotedHello = QuoteBehavior.apply(QuoteBehavior.default, "hello", angleQuotePunctuation, QuoteBehavior.useQuotes);
assert.equal(angleQuotedHello, "«hello»");
});
it('.default -> .noQuotes', function() {
let englishPunctuation = {
quotesForKeepSuggestion: { open: `“`, close: `”`},
insertAfterWord: " "
}
var plainQuotedHello;
plainQuotedHello = QuoteBehavior.apply(QuoteBehavior.default, "hello", englishPunctuation, QuoteBehavior.noQuotes);
assert.equal(plainQuotedHello, "hello");
let angleQuotePunctuation = {
quotesForKeepSuggestion: { open: `«`, close: `»`},
insertAfterWord: " "
}
var angleQuotedHello;
angleQuotedHello = QuoteBehavior.apply(QuoteBehavior.default, "hello", angleQuotePunctuation, QuoteBehavior.noQuotes);
assert.equal(angleQuotedHello, "hello");
});
it('Error case: .default as fall-back behavior', function() {
let englishPunctuation = {
quotesForKeepSuggestion: { open: `“`, close: `”`},
insertAfterWord: " "
}
assert.throws(function() {
QuoteBehavior.apply(QuoteBehavior.default, "hello", englishPunctuation, QuoteBehavior.default);
});
assert.throws(function() {
QuoteBehavior.apply(QuoteBehavior.useQuotes, "hello", englishPunctuation, QuoteBehavior.default);
});
assert.throws(function() {
QuoteBehavior.apply(QuoteBehavior.noQuotes, "hello", englishPunctuation, QuoteBehavior.default);
});
});
});
});

View file

@ -17,73 +17,65 @@ EX_USAGE=64
display_usage ( ) {
echo "Usage: $0 [-test] [-version version] [-tier tier]"
echo "Usage: $0 [-test] [-publish-to-npm]"
echo " $0 -help"
echo
echo " -help displays this screen and exits"
echo " -version version sets the package version before building"
echo " -test runs tests"
echo " -publish-to-npm publishes the current version to the npm package index"
echo " -tier tier also sets the package version tier and npm tag (alpha, beta, stable) before building or publishing"
echo " If version has 4 components, only first three are used."
echo " -dry-run do test, etc, but don't actually publish"
}
################################ Main script ################################
run_tests=0
install_dependencies=1
publish_version=
publish_tier=
lastkey=
should_publish=0
npm_dist_tag=
should_dry_run=0
# Process command-line arguments
while [[ $# -gt 0 ]] ; do
key="$1"
if [[ -z "$lastkey" ]]; then
case $key in
-help|-h)
display_usage
exit
;;
-test)
run_tests=1
install_dependencies=0
;;
-version)
lastkey=$key
;;
-tier)
lastkey=$key
;;
-publish-to-npm)
should_publish=1
;;
*)
echo "$0: invalid option: $key"
display_usage
exit $EX_USAGE
esac
else
case $lastkey in
-version)
publish_version=$key
;;
-tier)
publish_tier=$key
;;
*)
# Should be impossible to reach ;-)
echo "$0: invalid option: $lastkey"
display_usage
exit $EX_USAGE
esac
lastkey=
fi
case $key in
-help|-h)
display_usage
exit
;;
-dry-run)
should_dry_run=1
;;
-test)
run_tests=1
install_dependencies=0
;;
-version)
echo "Warning: -version is now ignored"
;;
-tier)
echo "Warning: -tier is now ignored"
;;
-publish-to-npm)
should_publish=1
;;
*)
echo "$0: invalid option: $key"
display_usage
exit $EX_USAGE
esac
shift # past the processed argument
done
# Dry run settings
if (( should_dry_run )); then
DRY_RUN=--dry-run
else
DRY_RUN=
fi
publish_version=`cat "$KEYMAN_ROOT/VERSION.md"`
publish_tier=`cat "$KEYMAN_ROOT/TIER.md"`
# Validate the publish_version
if [ ! -z "$publish_version" ]; then
# Remove final component if more than 3 components passed
@ -145,5 +137,5 @@ if (( should_publish )); then
# a package in the @keymanapp scope on the public npm package index.
#
# See `npm help publish` for more details.
npm publish --access public --tag "${npm_dist_tag:=latest}" || fail "Could not publish ${npm_dist_tag} release."
npm publish $DRY_RUN --access public --tag "${npm_dist_tag:=latest}" || fail "Could not publish ${npm_dist_tag} release."
fi

View file

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

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-types",
"version": "14.0.155",
"version": "14.0.157",
"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.155",
"version": "14.0.157",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/models-wordbreakers",
"version": "14.0.155",
"version": "14.0.157",
"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.155",
"@keymanapp/models-types": "^14.0.157",
"@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.155",
"version": "14.0.157",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/lexical-model-layer",
"version": "14.0.155",
"version": "14.0.157",
"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.155",
"@keymanapp/resources-gosh": "^14.0.155",
"@keymanapp/models-types": "^14.0.157",
"@keymanapp/resources-gosh": "^14.0.157",
"@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.155",
"@keymanapp/models-wordbreakers": "^14.0.155",
"@keymanapp/web-environment": "^14.0.155",
"@keymanapp/web-utils": "^14.0.155",
"@keymanapp/models-templates": "^14.0.157",
"@keymanapp/models-wordbreakers": "^14.0.157",
"@keymanapp/web-environment": "^14.0.157",
"@keymanapp/web-utils": "^14.0.157",
"es6-shim": "^0.35.5",
"string.prototype.codepointat": "^0.2.1",
"string.prototype.startswith": "^0.2.0"

View file

@ -398,8 +398,15 @@ describe('Correction Distance Modeler', function() {
let iter = searchSpace.getBestMatches();
// While there's no input, insertion operations can produce suggestions.
let results = iter.next();
assert.isFalse(results.done);
let resultState = iter.next();
let results = resultState.value;
// Just one suggestion should be returned.
assert.equal(results.length, 1);
assert.equal(results[0].totalCost, 0); // Gives a perfect match
assert.equal(results[0].inputSequence.length, 0); // for a state with no input and
assert.equal(results[0].matchString, ''); // an empty match string.
assert.isFalse(resultState.done);
});
});
});

View file

@ -8,16 +8,7 @@ var ModelCompositor = require('../../build/intermediate').ModelCompositor;
describe('Custom Punctuation', function () {
it('appears in the keep suggestion', function () {
let dummySuggestions = [
{
transform: {
insert: 'Hrllo',
deleteLeft: 0,
},
tag: 'keep',
displayAs: 'Hrllo',
},
{
let dummySuggestions = [{
transform: {
insert: 'Hello',
deleteLeft: 0,

View file

@ -2,6 +2,8 @@
* Integration tests for the model compositor with the trie model.
*/
const { models } = require('../../build/intermediate');
var assert = require('chai').assert;
var TrieModel = require('../../build/intermediate').models.TrieModel;
var ModelCompositor = require('../../build/intermediate').ModelCompositor;
@ -66,4 +68,70 @@ describe('ModelCompositor', function() {
// 'the' should be the intended the result here.
assert.isAbove(theSuggestion.p, thrSuggestion.p);
});
// The nomenclature's a minor sneak-peek from child PRs.
describe('toAnnotatedSuggestion', function() {
let baseSuggestion = {
transform: {
insert: 'hello',
deleteLeft: 0,
id: 0
},
transformId: 0,
displayAs: 'hello'
};
let englishPunctuation = {
quotesForKeepSuggestion: { open: `“`, close: `”`},
insertAfterWord: ' '
};
let angledPunctuation = {
quotesForKeepSuggestion: { open: `«`, close: `»`},
insertAfterWord: " "
}
describe("'keep'", function() {
let annotationTest = function(punctuation, displayText, quoteStyle) {
let options = {
punctuation: punctuation
};
let model = new models.DummyModel(options);
let compositor = new ModelCompositor(model);
var keep;
if(quoteStyle) {
keep = compositor.toAnnotatedKeepSuggestion(baseSuggestion, quoteStyle);
} else {
keep = compositor.toAnnotatedKeepSuggestion(baseSuggestion);
}
// Make sure we didn't accidentally leak any mutations to the parameter.
assert.notDeepEqual(keep, baseSuggestion);
assert.equal(keep.displayAs, displayText);
assert.equal(keep.tag, 'keep');
}
it('quoteBehavior: (.default)', function() {
annotationTest(englishPunctuation, "“hello”");
annotationTest(angledPunctuation, "«hello»");
});
it('quoteBehavior: .useQuotes', function() {
annotationTest(englishPunctuation, "“hello”", models.QuoteBehavior.useQuotes);
annotationTest(angledPunctuation, "«hello»", models.QuoteBehavior.useQuotes);
});
it('quoteBehavior: .noQuotes', function() {
annotationTest(englishPunctuation, "hello", models.QuoteBehavior.noQuotes);
annotationTest(angledPunctuation, "hello", models.QuoteBehavior.noQuotes);
});
it.skip('RTL test', function() {
// TODO:
});
});
});
});

View file

@ -11,6 +11,10 @@ namespace correction {
transformDistributions: Distribution<Transform>[] = [];
replacements: TrackedContextSuggestion;
activeReplacement: number = -1;
get isNew(): boolean {
return this.transformDistributions.length == 0;
}
}
export class TrackedContextState {

View file

@ -319,7 +319,8 @@ namespace correction {
this.completedPaths = [this.rootNode];
// Adds a base level queue to handle initial insertions.
let baseTier = new SearchSpaceTier(0, this.rootNode.buildInsertionEdges());
// Start with _just_ the root node. Necessary for proper empty-token, empty-input handling!
let baseTier = new SearchSpaceTier(0, [this.rootNode]);
this.tierOrdering.push(baseTier);
this.selectionQueue.enqueue(baseTier);
}

View file

@ -40,7 +40,6 @@ class ModelCompositor {
}
private predictFromCorrections(corrections: ProbabilityMass<Transform>[], context: Context): Distribution<Suggestion> {
let punctuation = this.punctuation;
let returnedPredictions: Distribution<Suggestion> = [];
for(let correction of corrections) {
@ -55,25 +54,6 @@ class ModelCompositor {
pair.sample.transformId = transform.id;
}
let preserveWhitespace: boolean = false;
if(this.isWhitespace(transform)) {
// Detect start of new word; prevent whitespace loss here.
let postContext = models.applyTransform(transform, context);
preserveWhitespace = (this.lexicalModel.wordbreak(postContext) == '');
}
// Prepends the original whitespace, ensuring it is preserved if
// the suggestion is accepted.
if(preserveWhitespace) {
models.prependTransform(pair.sample.transform, transform);
}
// The model is trying to add a word; thus, add some custom formatting
// to that word.
if (pair.sample.transform.insert.length > 0) {
pair.sample.transform.insert += punctuation.insertAfterWord;
}
let prediction = {sample: pair.sample, p: pair.p * inputProb};
return prediction;
}, this);
@ -106,28 +86,37 @@ class ModelCompositor {
let keepOptionText = this.lexicalModel.wordbreak(postContext);
let keepOption: Suggestion = null;
let predictionRoots: ProbabilityMass<Transform>[]
let rawPredictions: Distribution<Suggestion> = [];
// Section 1: determining 'prediction roots'.
// Used to restore whitespaces if operations would remove them.
let prefixTransform: Transform;
// Section 1: determining 'prediction roots'.
if(!this.contextTracker) {
let predictionRoots: ProbabilityMass<Transform>[];
// Generates raw prediction distributions for each valid input. Can only 'correct'
// against the final input.
//
// This is the old, 12.0-13.0 'correction' style.
predictionRoots = transformDistribution.map(function(alt) {
let transform = alt.sample;
if(allowSpace) {
// Detect start of new word; prevent whitespace loss here.
predictionRoots = [{sample: inputTransform, p: 1.0}];
prefixTransform = inputTransform;
} else {
predictionRoots = transformDistribution.map(function(alt) {
let transform = alt.sample;
// Filter out special keys unless they're expected.
if(this.isWhitespace(transform) && !allowSpace) {
return null;
} else if(this.isBackspace(transform) && !allowBksp) {
return null;
}
// Filter out special keys unless they're expected.
if(this.isWhitespace(transform) && !allowSpace) {
return null;
} else if(this.isBackspace(transform) && !allowBksp) {
return null;
}
return alt;
}, this);
return alt;
}, this);
}
// Remove `null` entries.
predictionRoots = predictionRoots.filter(tuple => !!tuple);
@ -151,6 +140,16 @@ class ModelCompositor {
// The 'eventual' logic will be significantly more complex, though still manageable.
let searchSpace = contextState.searchSpace[0];
let newEmptyToken = false;
// Detect if we're starting a new context state.
let contextTokens = contextState.tokens;
if(contextTokens.length == 0 || contextTokens[contextTokens.length - 1].isNew) {
if(this.isEmpty(inputTransform) || this.isWhitespace(inputTransform)) {
newEmptyToken = true;
prefixTransform = inputTransform;
}
}
// TODO: whitespace, backspace filtering. Do it here.
// Whitespace is probably fine, actually. Less sure about backspace.
@ -175,7 +174,8 @@ class ModelCompositor {
// Replace the existing context with the correction.
let correctionTransform: Transform = {
insert: correction, // insert correction string
deleteLeft: lexicalModel.wordbreak(context).length, // remove actual token string
// remove actual token string. If new token, there should be nothing to delete.
deleteLeft: newEmptyToken ? 0 : lexicalModel.wordbreak(context).length,
id: finalInput.id
}
@ -217,13 +217,18 @@ class ModelCompositor {
let displayText = prediction.sample.displayAs;
if(displayText == keepOptionText || (lexicalModel.toKey && displayText == lexicalModel.toKey(keepOptionText)) ) {
keepOption = prediction.sample;
// Ensure we keep any original casing, etc that may have been stripped.
keepOption.transform.insert = keepOptionText + punctuation.insertAfterWord;
keepOption.displayAs = keepOptionText;
// Specifying 'keep' helps uses of the LMLayer find it quickly
// if/when desired.
keepOption.tag = 'keep';
// Preserve the original, pre-keyed version of the text.
let baseTransform = prediction.sample.transform;
let keepTransform = {
insert: keepOptionText,
deleteLeft: baseTransform.deleteLeft,
deleteRight: baseTransform.deleteRight,
id: baseTransform.id
}
keepOption = models.transformToSuggestion(keepTransform, prediction.p);
keepOption = this.toAnnotatedKeepSuggestion(keepOption, models.QuoteBehavior.noQuotes);
} else {
let existingSuggestion = suggestionDistribMap[displayText];
if(existingSuggestion) {
@ -236,32 +241,11 @@ class ModelCompositor {
// Generate a default 'keep' option if one was not otherwise produced.
if(!keepOption && keepOptionText != '') {
keepOption = {
displayAs: keepOptionText,
transformId: inputTransform.id,
// Replicate the original transform, modified for appropriate language insertion syntax.
transform: {
insert: inputTransform.insert + punctuation.insertAfterWord,
deleteLeft: inputTransform.deleteLeft,
deleteRight: inputTransform.deleteRight,
id: inputTransform.id
},
tag: 'keep'
};
}
let keepTransform = models.transformToSuggestion(inputTransform, 1); // 1 is a filler value; goes unused b/c is for a 'keep'.
// This is the one case where the transform doesn't insert the full word; we need to override the displayAs param.
keepTransform.displayAs = keepOptionText;
// Add the surrounding quotes to the "keep" option's display string:
if (keepOption) {
let { open, close } = punctuation.quotesForKeepSuggestion;
// Should we also ensure that we're using the default quote marks first?
// Or is it reasonable to say that the "left" mark is always the one
// called "open"?
if(!punctuation.isRTL) {
keepOption.displayAs = open + keepOption.displayAs + close;
} else {
keepOption.displayAs = close + keepOption.displayAs + open;
}
keepOption = this.toAnnotatedKeepSuggestion(keepTransform);
}
// Section 3: Finalize suggestions, truncate list to the N (MAX_SUGGESTIONS) most optimal, return.
@ -295,9 +279,36 @@ class ModelCompositor {
suggestions = [ keepOption ].concat(suggestions);
}
// Apply 'after word' punctuation. We delay until now so that utility functions relying on the
// unmodified Transform may execute properly.
suggestions.forEach(function(suggestion) {
if (suggestion.transform.insert.length > 0) {
suggestion.transform.insert += punctuation.insertAfterWord;
// If this is a suggestion after wordbreak input, make sure we preserve the wordbreak transform!
if(prefixTransform) {
models.prependTransform(suggestion.transform, prefixTransform);
}
}
});
return suggestions;
}
private toAnnotatedKeepSuggestion(suggestion: Suggestion & {p?: number},
quoteBehavior: models.QuoteBehavior = models.QuoteBehavior.default): Suggestion & {p?: number} {
// A method-internal 'import' of the enum.
let QuoteBehavior = models.QuoteBehavior;
return {
transform: suggestion.transform,
transformId: suggestion.transformId,
displayAs: QuoteBehavior.apply(quoteBehavior, suggestion.displayAs, this.punctuation, QuoteBehavior.useQuotes),
tag: 'keep',
p: suggestion.p
};
}
/**
* Returns the punctuation used for this model, filling out unspecified fields
*/

View file

@ -52,10 +52,3 @@ How to run the tests
./build.sh -test
How to update the package version
---------------------------------
**NOTE**: this step should only be performed on the CI server:
./build.sh -version MAJOR.MINOR.${BUILD_NUMBER} [-tier (alpha|beta)]

View file

@ -24,80 +24,72 @@ build () {
}
display_usage ( ) {
echo "Usage: $0 [-test] [-version version] [-tier tier]"
echo "Usage: $0 [-test] [-publish-to-npm]"
echo " $0 -help"
echo
echo " -help displays this screen and exits"
echo " -version version sets the package version before building"
echo " -test runs unit tests after building"
echo " -tdd runs unit tests WITHOUT building"
echo " -publish-to-npm publishes the current version to the npm package index"
echo " -tier tier also sets the package version tier and npm tag (alpha, beta, stable) before building or publishing"
echo " If version has 4 components, only first three are used."
echo " -dry-run do build, etc, but don't actually publish"
}
################################ Main script ################################
run_tests=0
install_dependencies=1
publish_version=
publish_tier=
lastkey=
should_publish=0
npm_dist_tag=
should_dry_run=0
# Process command-line arguments
while [[ $# -gt 0 ]] ; do
key="$1"
if [[ -z "$lastkey" ]]; then
case $key in
-help|-h)
display_usage
exit
;;
-skip-package-install|-S)
install_dependencies=0
;;
-test)
run_tests=1
;;
-tdd)
run_tests=1
install_dependencies=0
;;
-version)
lastkey=$key
;;
-tier)
lastkey=$key
;;
-publish-to-npm)
should_publish=1
;;
*)
echo "$0: invalid option: $key"
display_usage
exit $EX_USAGE
esac
else
case $lastkey in
-version)
publish_version=$key
;;
-tier)
publish_tier=$key
;;
*)
# Should be impossible to reach ;-)
echo "$0: invalid option: $lastkey"
display_usage
exit $EX_USAGE
esac
lastkey=
fi
case $key in
-help|-h)
display_usage
exit
;;
-dry-run)
should_dry_run=1
;;
-skip-package-install|-S)
install_dependencies=0
;;
-test)
run_tests=1
;;
-tdd)
run_tests=1
install_dependencies=0
;;
-version)
echo "Warning: -version is now ignored"
;;
-tier)
echo "Warning: -tier is now ignored"
;;
-publish-to-npm)
should_publish=1
;;
*)
echo "$0: invalid option: $key"
display_usage
exit $EX_USAGE
esac
shift # past the processed argument
done
# Dry run settings
if (( should_dry_run )); then
DRY_RUN=--dry-run
else
DRY_RUN=
fi
publish_version=`cat "$KEYMAN_ROOT/VERSION.md"`
publish_tier=`cat "$KEYMAN_ROOT/TIER.md"`
# Validate the publish_version
if [ ! -z "$publish_version" ]; then
# Remove final component if more than 3 components passed
@ -155,5 +147,5 @@ if (( should_publish )); then
# a package in the @keymanapp scope on the public npm package index.
#
# See `npm help publish` for more details.
npm publish --access public --tag "${npm_dist_tag:=latest}" || fail "Could not publish ${npm_dist_tag} release."
npm publish $DRY_RUN --access public --tag "${npm_dist_tag:=latest}" || fail "Could not publish ${npm_dist_tag} release."
fi

View file

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

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/lexical-model-compiler",
"version": "14.0.155",
"version": "14.0.157",
"description": "Keyman Developer lexical model compiler",
"keywords": [
"keyboard",
@ -37,14 +37,14 @@
"node": ">=12.0.0"
},
"dependencies": {
"@keymanapp/models-types": "^14.0.155",
"@keymanapp/models-types": "^14.0.157",
"commander": "^3.0.0",
"typescript": "^3.8.3",
"xml2js": "^0.4.19"
},
"devDependencies": {
"@keymanapp/models-templates": "^14.0.155",
"@keymanapp/models-wordbreakers": "^14.0.155",
"@keymanapp/models-templates": "^14.0.157",
"@keymanapp/models-wordbreakers": "^14.0.157",
"@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.155"
"version": "14.0.157"
}

View file

@ -8,9 +8,9 @@ default:
echo Please don't call this file directly -- used by Makefile
copyredist-desktop:
-mkdir $(ROOT)\release\$VERSION
copy /Y firstvoices.msi $(ROOT)\release\$VERSION\firstvoices.msi
copy /Y firstvoices.exe $(ROOT)\release\$VERSION\firstvoices-$VERSION.exe
-mkdir $(ROOT)\release\$Version
copy /Y firstvoices.msi $(ROOT)\release\$Version\firstvoices.msi
copy /Y firstvoices.exe $(ROOT)\release\$Version\firstvoices-$Version.exe
prepareredist:
rem prepareredist
@ -20,5 +20,5 @@ clean:
candle-desktop:
$(WIXHEAT) dir ..\xml -o desktopui.wxs -ag -cg DesktopUI -dr INSTALLDIR -suid -var var.DESKTOPUISOURCE -wx -nologo
$(WIXCANDLE) -dOEMNAME="$(OEMNAME)" -dPRODUCTNAME="$(PRODUCTNAME)" -dROOT="$(ROOT)" -dVERSION=$VERSION -dRELEASE=$RELEASE -dPRODUCTID=$GUID1 -dDESKTOPUISOURCE=..\xml firstvoices.wxs desktopui.wxs
$(WIXCANDLE) -dOEMNAME="$(OEMNAME)" -dPRODUCTNAME="$(PRODUCTNAME)" -dROOT="$(ROOT)" -dVERSION=$VersionWin -dRELEASE=$VersionRelease -dPRODUCTID=$GUID1 -dDESKTOPUISOURCE=..\xml firstvoices.wxs desktopui.wxs

View file

@ -1,7 +1,7 @@
<!ENTITY Company "">
<!ENTITY ProductName "Keyman Desktop for FirstVoices">
<!ENTITY Edition "">
<!ENTITY Version "$RELEASE">
<!ENTITY Version "$VersionRelease">
<!ENTITY EvaluationPeriod "30">

View file

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

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/resources-gosh",
"version": "14.0.155",
"version": "14.0.157",
"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.155",
"version": "14.0.157",
"lockfileVersion": 1
}

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/web-environment",
"version": "14.0.155",
"version": "14.0.157",
"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.155"
"@keymanapp/resources-gosh": "^14.0.157"
}
}

2
web/package-lock.json generated
View file

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

View file

@ -1,6 +1,6 @@
{
"name": "keyman",
"version": "14.0.155",
"version": "14.0.157",
"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.155",
"@keymanapp/web-sentry-manager": "^14.0.155",
"@keymanapp/resources-gosh": "^14.0.157",
"@keymanapp/web-sentry-manager": "^14.0.157",
"@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.155",
"@keymanapp/keyboard-processor": "^14.0.155",
"@keymanapp/lexical-model-layer": "^14.0.155",
"@keymanapp/models-types": "^14.0.155",
"@keymanapp/recorder-core": "^14.0.155",
"@keymanapp/web-environment": "^14.0.155",
"@keymanapp/web-utils": "^14.0.155",
"@keymanapp/input-processor": "^14.0.157",
"@keymanapp/keyboard-processor": "^14.0.157",
"@keymanapp/lexical-model-layer": "^14.0.157",
"@keymanapp/models-types": "^14.0.157",
"@keymanapp/recorder-core": "^14.0.157",
"@keymanapp/web-environment": "^14.0.157",
"@keymanapp/web-utils": "^14.0.157",
"@types/node": "^11.9.4",
"es6-shim": "^0.35.5",
"eventemitter3": "^4.0.0",

View file

@ -386,14 +386,19 @@ namespace com.keyman.text {
osk.vkbd.keyPending = null;
// Changes for Build 353 to resolve KMEI popup key issues
keyName=keyName.replace('popup-',''); //remove popup prefix if present (unlikely)
var t=keyName.split('-'),layer=(t.length>1?t[0]:core.keyboardProcessor.layerId);
keyName=t[t.length-1];
keyName=keyName.replace('popup-',''); //remove popup prefix if present (unlikely)
// Can't just split on '-' because some layers like ctrl-shift contain it.
let separatorIndex = keyName.lastIndexOf('-');
var layer = core.keyboardProcessor.layerId;
if (separatorIndex > 0) {
layer = keyName.substring(0, separatorIndex);
keyName = keyName.substring(separatorIndex+1);
}
if(layer == 'undefined') {
layer=core.keyboardProcessor.layerId;
}
// Note: this assumes Lelem is properly attached and has an element interface.
// Currently true in the Android and iOS apps.
var Lelem=keymanweb.domManager.getLastActiveElement(),keyShiftState=com.keyman.text.KeyboardProcessor.getModifierState(layer);

View file

@ -266,7 +266,7 @@ namespace com.keyman.osk {
}
// Apply the Suggestion!
return keyman.core.languageProcessor.acceptSuggestion(this.suggestion, target);
return keyman.core.languageProcessor.applySuggestion(this.suggestion, target);
}
}

View file

@ -162,7 +162,7 @@ NMAKE=nmake.exe
CL=cl.exe
MSBUILD=msbuild.exe
# /maxcpucount see https://devblogs.microsoft.com/cppblog/precompiled-header-pch-issues-and-recommendations/
MT="C:\Program Files (x86)\Windows Kits\8.1\bin\x86\mt.exe"
MT=mt.exe
VCBUILD=error
!IFDEF DEBUG

View file

@ -91,7 +91,7 @@ In Visual Studio 2017, you need to have the following installed:
#### Individual components
* Windows Universal CRT SDK
* Windows 8.1 SDK
* Windows 10.0.17763.0 SDK
Configure Visual Studio to use two-space tab stops:
1. Open the options dialog: Tools > Options.

View file

@ -14,7 +14,7 @@
<SccProjectName />
<SccLocalPath />
<ProjectGuid>{D737021A-16A7-9AED-C550-640E9E0582B2}</ProjectGuid>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View file

@ -5,6 +5,15 @@
#
SHLVL=0
set -e
set -u
## START STANDARD BUILD SCRIPT INCLUDE
# adjust relative paths as necessary
THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")"
. "$(dirname "$THIS_SCRIPT")/../../../resources/build/build-utils.sh"
## END STANDARD BUILD SCRIPT INCLUDE
#
# Allows us to check for existence of subfolders in help/
#
@ -19,7 +28,6 @@ shopt -s nullglob
# These are passed via environment:
#
# HELP_KEYMAN_COM = the home of the help.keyman.com repository
# MAJOR_VERSION = 10.0, 11.0, etc
#
# That repo must have push to origin configured and logged in
#
@ -29,11 +37,6 @@ if [ -z ${HELP_KEYMAN_COM+x} ]; then
exit 1
fi
if [ -z ${MAJOR_VERSION+x} ]; then
>&2 echo "Not uploading documentation: must set MAJOR_VERSION in environment."
exit 1
fi
if [ ! -d "$HELP_KEYMAN_COM/products/desktop/" ]; then
>&2 echo "HELP_KEYMAN_COM path ($HELP_KEYMAN_COM) does not appear to be valid."
exit 1
@ -82,7 +85,7 @@ function upload_keyman_desktop_help {
return 0
fi
local dstpath="$HELP_KEYMAN_COM/products/desktop/$MAJOR_VERSION/docs"
local dstpath="$HELP_KEYMAN_COM/products/desktop/$VERSION_RELEASE/docs"
mkdir -p "$dstpath"
@ -92,6 +95,7 @@ function upload_keyman_desktop_help {
#
# Commit and push to the help.keyman.com repo
# TODO: turn this into a pull request
#
function commit_and_push {
@ -100,7 +104,7 @@ function commit_and_push {
pushd $HELP_KEYMAN_COM
git config user.name "Keyman Build Server"
git config user.email "keyman-server@users.noreply.github.com"
git add products/desktop/$MAJOR_VERSION/docs || return 1
git add products/desktop/$VERSION_RELEASE/docs || return 1
git diff --cached --no-ext-diff --quiet --exit-code && {
# if no changes then don't do anything.
echo "No changes to commit"

View file

@ -7,36 +7,36 @@ SIGNCODE_BUILD=1
!include ..\..\Defines.mak
copydebug:
-mkdir $(ROOT)\release\$VERSION
-mkdir $(ROOT)\release\$Version
echo mkdir c:\kmsymbols > $(ROOT)\src\install.bat
echo mkdir c:\kmsymbols\$VERSION >> $(ROOT)\src\install.bat
echo copy *.tds c:\kmsymbols\$VERSION >> $(ROOT)\src\install.bat
echo copy *.dbg c:\kmsymbols\$VERSION >> $(ROOT)\src\install.bat
echo copy *.pdb c:\kmsymbols\$VERSION >> $(ROOT)\src\install.bat
echo mkdir c:\kmsymbols\$Version >> $(ROOT)\src\install.bat
echo copy *.tds c:\kmsymbols\$Version >> $(ROOT)\src\install.bat
echo copy *.dbg c:\kmsymbols\$Version >> $(ROOT)\src\install.bat
echo copy *.pdb c:\kmsymbols\$Version >> $(ROOT)\src\install.bat
echo regedit /s tds.reg >> $(ROOT)\src\install.bat
$(WZZIP) $(ROOT)\src\tds.zip $(ROOT)\src\install.bat $(ROOT)\src\buildtools\inst\tds.reg
rem Disabling symsrv upload from the build agents (2018-06-19 mcdurdin)
# "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\symstore" add /r /f $(ROOT)\debug\*.* /s c:\Tavultesoft\Debug\Symbols /t "Keyman" /v "Build $VERSION" /c "Release $VERSION"
# "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\symstore" add /r /f $(ROOT)\bin\*.* /s c:\Tavultesoft\Debug\Symbols /t "Keyman" /v "Build $VERSION" /c "Release $VERSION"
# "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\symstore" add /r /f $(ROOT)\debug\*.* /s c:\Tavultesoft\Debug\Symbols /t "Keyman" /v "Build $Version" /c "Release $Version"
# "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\symstore" add /r /f $(ROOT)\bin\*.* /s c:\Tavultesoft\Debug\Symbols /t "Keyman" /v "Build $Version" /c "Release $Version"
# ping localhost # delay for a few seconds
# $(WZSE) $(ROOT)\src\tds.zip -setup -t $(ROOT)\src\buildtools\inst\tds_dialog.txt -c .\install.bat
copy $(ROOT)\src\tds.zip $(ROOT)\release\$VERSION\tds-$VERSION.zip
copy $(ROOT)\src\tds.zip $(ROOT)\release\$Version\tds-$Version.zip
-del $(ROOT)\src\tds.zip
del $(ROOT)\src\install.bat
# wait 1 second -- gives winzip time to finish
# ping -n 2 127.0.0.1
# copy $(ROOT)\src\tds.exe $(ROOT)\release\$VERSION\tds-$VERSION.exe
# copy $(ROOT)\src\tds.exe $(ROOT)\release\$Version\tds-$Version.exe
cd $(BUILD)
$(WZZIP) -r $(ROOT)\release\$VERSION\debug-$VERSION.zip *.zip
$(WZZIP) -r $(ROOT)\release\$Version\debug-$Version.zip *.zip
uploadsymbols:
rem Disabling symsrv upload from the build agents (2018-06-19 mcdurdin)
# "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\symstore" add /r /f $(ROOT)\debug\*.* /s c:\Tavultesoft\Debug\Symbols /t "Keyman" /v "Build $VERSION" /c "Release $VERSION"
# "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\symstore" add /r /f $(ROOT)\bin\*.* /s c:\Tavultesoft\Debug\Symbols /t "Keyman" /v "Build $VERSION" /c "Release $VERSION"
# "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\symstore" add /r /f $(ROOT)\debug\*.* /s c:\Tavultesoft\Debug\Symbols /t "Keyman" /v "Build $Version" /c "Release $Version"
# "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\symstore" add /r /f $(ROOT)\bin\*.* /s c:\Tavultesoft\Debug\Symbols /t "Keyman" /v "Build $Version" /c "Release $Version"

View file

@ -5,6 +5,6 @@
!include ..\..\Defines.mak
srcbackup:
-mkdir $(ROOT)\release\$VERSION
-mkdir $(ROOT)\release\$Version
cd $(ROOT)\src
$(WZZIP) -r -x!*.ipch -x!*.sdf -x!*.db $(ROOT)\release\$VERSION\src-$VERSION.zip *.*
$(WZZIP) -r -x!*.ipch -x!*.sdf -x!*.db $(ROOT)\release\$Version\src-$Version.zip *.*

View file

@ -6,5 +6,5 @@
install:
if not exist $(KEYMAN_SITE_ROOT)\help.keyman.com\products\desktop exit 1
-rd /s/q $(KEYMAN_SITE_ROOT)\help.keyman.com\products\desktop\$RELEASE\docs
xcopy /s/q/y $(ROOT)\bin\help\php\desktop\* $(KEYMAN_SITE_ROOT)\help.keyman.com\products\desktop\$RELEASE\docs\ #
-rd /s/q $(KEYMAN_SITE_ROOT)\help.keyman.com\products\desktop\$VersionRelease\docs
xcopy /s/q/y $(ROOT)\bin\help\php\desktop\* $(KEYMAN_SITE_ROOT)\help.keyman.com\products\desktop\$VersionRelease\docs\ #

View file

@ -12,10 +12,10 @@ default:
echo Please don't call this file directly -- used by Makefile
copyredist-desktop:
-mkdir $(ROOT)\release\$VERSION
copy /Y keymandesktop.msi $(ROOT)\release\$VERSION\keymandesktop.msi
copy /Y keymandesktop.exe $(ROOT)\release\$VERSION\keymandesktop-$VERSION.exe
copy /Y $(ROOT)\bin\desktop\setup.exe $(ROOT)\release\$VERSION\setup.exe
-mkdir $(ROOT)\release\$Version
copy /Y keymandesktop.msi $(ROOT)\release\$Version\keymandesktop.msi
copy /Y keymandesktop.exe $(ROOT)\release\$Version\keymandesktop-$Version.exe
copy /Y $(ROOT)\bin\desktop\setup.exe $(ROOT)\release\$Version\setup.exe
prepareredist:
rem prepareredist
@ -31,7 +31,7 @@ candle: candle-desktop candle-cef candle-locale
candle-desktop:
$(WIXHEAT) dir ..\kmshell\xml -o desktopui.wxs -ag -cg DesktopUI -dr INSTALLDIR -suid -var var.DESKTOPUISOURCE -wx -nologo
$(WIXCANDLE) -dVERSION=$VERSION -dRELEASE=$RELEASE -dPRODUCTID=$GUID1 -dDESKTOPUISOURCE=..\kmshell\xml keymandesktop.wxs desktopui.wxs
$(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease -dPRODUCTID=$GUID1 -dDESKTOPUISOURCE=..\kmshell\xml keymandesktop.wxs desktopui.wxs
#
# Chromium Embedded Framework
@ -47,7 +47,7 @@ heat-cef:
-rmdir /s/q $(KEYMAN_WIX_TEMP_CEF)
candle-cef: heat-cef
$(WIXCANDLE) -dVERSION=$VERSION -dRELEASE=$RELEASE -dCefSourceDir=$(KEYMAN_CEF4DELPHI_ROOT) cef.wxs
$(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease -dCefSourceDir=$(KEYMAN_CEF4DELPHI_ROOT) cef.wxs
#
# Locale files
@ -56,4 +56,4 @@ candle-cef: heat-cef
candle-locale:
# locale files are in desktop/locale/*
$(WIXHEAT) dir ..\kmshell\locale -o locale.wxs -ag -cg Locale -dr INSTALLDIR -var var.LOCALESOURCE -wx -nologo
$(WIXCANDLE) -dVERSION=$VERSION -dRELEASE=$RELEASE -dPRODUCTID=$GUID1 -dLOCALESOURCE=..\kmshell\locale locale.wxs
$(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease -dPRODUCTID=$GUID1 -dLOCALESOURCE=..\kmshell\locale locale.wxs

View file

@ -3,7 +3,7 @@
<assemblyIdentity
type="win32"
name="tavultesoft.keymandeveloper.insthelp"
version="$VERSION"
version="$VersionWin"
processorArchitecture="x86"/>
<description>Keyman Engine Installation Assistant</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="sil.keyman.kmbrowserhost" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="sil.keyman.kmbrowserhost" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Desktop Browser Host Process</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -1,7 +1,7 @@
<!ENTITY Company "">
<!ENTITY ProductName "Keyman Desktop">
<!ENTITY Edition "">
<!ENTITY Version "$RELEASE">
<!ENTITY Version "$VersionRelease">
<!ENTITY EvaluationPeriod "30">

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="tavultesoft.keymandesktop.kmshell" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="tavultesoft.keymandesktop.kmshell" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Desktop</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="tavultesoft.keymandesktop.setup" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="tavultesoft.keymandesktop.setup" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Desktop Setup</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="tavultesoft.keymandesktop.setup" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="tavultesoft.keymandesktop.setup" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Desktop Setup</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="tavultesoft.keymandeveloper.tike" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="tavultesoft.keymandeveloper.tike" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Developer</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -15,15 +15,15 @@ setup:
#
cd $(ROOT)\src\developer\inst
$(MKVER_U) copydev.in copydev.mak
$(MKVER_U) download.in download.mak
#
# Build the installation archive
#
$(MAKE) -fcopydev.mak candle
$(MAKE) -fdownload.mak candle
$(WIXLIGHT) -sice:ICE91 -sice:ICE60 -dWixUILicenseRtf=License.rtf -out keymandeveloper.msi -ext WixUIExtension $(DEVELOPER_FILES)
$(MAKE) -fcopydev.mak clean-heat
$(MAKE) -fdownload.mak clean-heat
#
# Sign the installation archive
@ -36,7 +36,7 @@ setup:
#
cd $(ROOT)\src\developer\inst
$(MAKE) -fcopydev.mak
$(MAKE) -fdownload.mak
build:
@rem
@ -49,7 +49,7 @@ backup:
clean:
cd $(ROOT)\src\developer\inst
-del /Q copydev.mak
-del /Q download.mak
-del /Q *.msi
-del /Q *.msp
-del /Q *.wixobj
@ -66,9 +66,9 @@ clean:
test-releaseexists:
cd $(ROOT)\src\developer\inst
$(MKVER_U) copydev.in copydev.mak
$(MKVER_U) download.in download.mak
$(MAKE) -fcopydev.mak test-releaseexists
$(MAKE) -fdownload.mak test-releaseexists
install:
@rem

View file

@ -1,7 +1,7 @@
!include ..\..\Defines.mak
##
## In this file, $VERSION and $RELEASE will be replaced by mkver. These are not
## In this file, $Version, $VersionWin, and $VersionRelease will be replaced by mkver. These are not
## Make variables, but mkver variables.
##
@ -22,19 +22,19 @@ KEYMAN_DEVELOPER_TEMPLATES_ROOT=$(ROOT)\src\developer\kmconvert\data
KEYMAN_MODELCOMPILER_ROOT=$(KEYMAN_ROOT)\developer\js
copykmdev: makeinstaller
-mkdir $(ROOT)\release\$VERSION
copy /Y $(ROOT)\src\developer\inst\keymandeveloper.msi $(ROOT)\release\$VERSION\keymandeveloper.msi
copy /Y $(ROOT)\src\developer\inst\keymandeveloper-$VERSION.exe $(ROOT)\release\$VERSION\keymandeveloper-$VERSION.exe
-mkdir $(ROOT)\release\$Version
copy /Y $(ROOT)\src\developer\inst\keymandeveloper.msi $(ROOT)\release\$Version\keymandeveloper.msi
copy /Y $(ROOT)\src\developer\inst\keymandeveloper-$Version.exe $(ROOT)\release\$Version\keymandeveloper-$Version.exe
test-releaseexists:
if exist $(ROOT)\release\$VERSION\keymandeveloper*.msi echo. & echo Release $VERSION already exists. Delete it or update src\version.txt and try again & exit 1
if exist $(ROOT)\release\$Version\keymandeveloper*.msi echo. & echo Release $Version already exists. Delete it or update VERSION.md and try again & exit 1
candle: heat-cef heat-xml heat-templates heat-model-compiler
$(WIXCANDLE) -dVERSION=$VERSION -dRELEASE=$RELEASE kmdev.wxs
$(WIXCANDLE) -dVERSION=$VERSION -dRELEASE=$RELEASE -dXmlSourceDir=$(ROOT)\src\developer\TIKE\xml xml.wxs
$(WIXCANDLE) -dVERSION=$VERSION -dRELEASE=$RELEASE -dCefSourceDir=$(KEYMAN_CEF4DELPHI_ROOT) cef.wxs
$(WIXCANDLE) -dVERSION=$VERSION -dRELEASE=$RELEASE -dTemplatesSourceDir=$(KEYMAN_DEVELOPER_TEMPLATES_ROOT) templates.wxs
$(WIXCANDLE) -dVERSION=$VERSION -dRELEASE=$RELEASE -dModelCompilerSourceDir=$(KEYMAN_WIX_TEMP_MODELCOMPILER) kmlmc.wxs
$(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease kmdev.wxs
$(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease -dXmlSourceDir=$(ROOT)\src\developer\TIKE\xml xml.wxs
$(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease -dCefSourceDir=$(KEYMAN_CEF4DELPHI_ROOT) cef.wxs
$(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease -dTemplatesSourceDir=$(KEYMAN_DEVELOPER_TEMPLATES_ROOT) templates.wxs
$(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease -dModelCompilerSourceDir=$(KEYMAN_WIX_TEMP_MODELCOMPILER) kmlmc.wxs
clean-heat: clean-heat-model-compiler
@ -73,9 +73,9 @@ heat-model-compiler:
cd $(KEYMAN_MODELCOMPILER_ROOT)
!ifdef GIT_BASH_FOR_KEYMAN
$(GIT_BASH_FOR_KEYMAN) build.sh -version "$VERSION" -tier "$(TIER)"
$(GIT_BASH_FOR_KEYMAN) build.sh
!else
start /wait .\build.sh -version "$VERSION" -tier "$(TIER)"
start /wait .\build.sh
!endif
# We use `npm pack` to extract only the aspects of the model-compiler actually needed for distribution.
# While we could use npm-bundle or similar, that adds extra, unwanted cruft; our approach gives us more
@ -141,9 +141,9 @@ clean-heat-model-compiler:
makeinstaller:
cd $(ROOT)\src\developer\inst
echo [Setup] > setup.inf
echo Version=$VERSION >> setup.inf
echo Version=$Version >> setup.inf
echo MSIFileName=keymandeveloper.msi >> setup.inf
echo Title=Keyman Developer $RELEASE >>setup.inf
echo Title=Keyman Developer $VersionRelease >>setup.inf
$(WZZIP) setup.zip keymandeveloper.msi setup.inf
copy /b $(ROOT)\bin\developer\setup.exe + setup.zip keymandeveloper-$VERSION.exe
$(SIGNCODE) /d "Keyman Developer" keymandeveloper-$VERSION.exe
copy /b $(ROOT)\bin\developer\setup.exe + setup.zip keymandeveloper-$Version.exe
$(SIGNCODE) /d "Keyman Developer" keymandeveloper-$Version.exe

View file

@ -21,7 +21,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{E92CC897-8228-4728-8110-028088D7A99C}</ProjectGuid>
<RootNamespace>kcframe</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View file

@ -21,7 +21,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{7E26FE08-721E-424B-9DA0-4A0DCA88A86E}</ProjectGuid>
<RootNamespace>kmcmpdll</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="tavultesoft.keymandeveloper.kmcomp" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="tavultesoft.keymandeveloper.kmcomp" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Developer Command Line Compiler</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="tavultesoft.keymandeveloper.kmconvert" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="tavultesoft.keymandeveloper.kmconvert" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Developer Conversion Utility</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -12,7 +12,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{963D608A-6689-469C-AE42-F56696DD42CC}</ProjectGuid>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

View file

@ -14,6 +14,7 @@
<SccProjectName />
<SccLocalPath />
<ProjectGuid>{0C9DB8F9-B788-8782-A97D-4F8294AA0B4E}</ProjectGuid>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="tavultesoft.keymandeveloper.setup" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="tavultesoft.keymandeveloper.setup" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Desktop Setup</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -8,8 +8,8 @@ default:
echo Please don't call this file directly -- used by Makefile
copyredist:
-mkdir $(ROOT)\release\$VERSION
copy /Y $(ROOT)\src\engine\inst\keymanengine.msm $(ROOT)\release\$VERSION\keymanengine-$VERSION.msm
-mkdir $(ROOT)\release\$Version
copy /Y $(ROOT)\src\engine\inst\keymanengine.msm $(ROOT)\release\$Version\keymanengine-$Version.msm
prepareredist:
rem
@ -18,4 +18,4 @@ clean:
rem
candle:
$(WIXCANDLE) -dVERSION=$VERSION -dRELEASE=$RELEASE -ext WixUtilExtension keymanengine.wxs components.wxs
$(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease -ext WixUtilExtension keymanengine.wxs components.wxs

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="keyman" version="$VERSiON" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="keyman" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Engine</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -1,18 +1,18 @@
(*
Name: main
Copyright: Copyright (C) SIL International.
Documentation:
Description:
Documentation:
Description:
Create Date: 1 Aug 2006
Modified Date: 25 Oct 2016
Authors: mcdurdin
Related Files:
Dependencies:
Related Files:
Dependencies:
Bugs:
Todo:
Notes:
Bugs:
Todo:
Notes:
History: 01 Aug 2006 - mcdurdin - Initial version
02 Aug 2006 - mcdurdin - Timeout when Beta expires
04 Dec 2006 - mcdurdin - Block Keyman loading if KM5/6 running
@ -35,8 +35,9 @@ uses
Vcl.Dialogs,
Vcl.Forms,
Winapi.Windows,
System.Win.Registry,
System.Classes,
System.SysUtils,
System.Win.Registry,
GetOsVersion,
Keyman.System.Security,
@ -189,17 +190,30 @@ end;
procedure InitialiseRegistrySecurity;
var
r: TRegistry;
procedure ProcessKey(const root: string);
var
s: string;
str: TStringList;
begin
if r.OpenKey('\' + root, True) then
begin
str := TStringList.Create;
try
r.GetKeyNames(str);
GrantPermissionToAllApplicationPackages(r.CurrentKey, KEY_READ);
for s in str do
ProcessKey(root + '\' + s);
finally
str.Free;
end;
end;
end;
begin
r := TRegistry.Create;
try
if r.OpenKey(SRegKey_KeymanRoot_CU, True) then
begin
GrantPermissionToAllApplicationPackages(r.CurrentKey, KEY_READ);
// #1680 - on some systems, HKCU\Software\Keyman\Keyman Engine is not
// inheriting permissions from HKCU\Software\Keyman
if r.OpenKey('\' + SRegKey_KeymanEngineRoot_CU, True) then
GrantPermissionToAllApplicationPackages(r.CurrentKey, KEY_READ);
end;
ProcessKey(SRegKey_KeymanRoot_CU);
finally
r.Free;
end;

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity type="win32" name="tavultesoft.keymanengine.keyman" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="tavultesoft.keymanengine.keyman" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Engine</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -13,7 +13,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{BD5564FB-35A5-4A3C-B96A-4A6578E2B593}</ProjectGuid>
<RootNamespace>Keyman32</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View file

@ -21,6 +21,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{D1115FB2-230D-4FD8-90B9-982E49953D18}</ProjectGuid>
<RootNamespace>Keyman32</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View file

@ -22,6 +22,7 @@
<ProjectGuid>{A34650EA-D6E8-4229-8091-6BF1443565B5}</ProjectGuid>
<RootNamespace>keymanx64</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="tavultesoft.keymanengine.keymanx64" version="$VERSION" processorArchitecture="amd64"/>
<assemblyIdentity type="win32" name="tavultesoft.keymanengine.keymanx64" version="$VersionWin" processorArchitecture="amd64"/>
<description>Keyman Engine x64</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="tavultesoft.keymanengine.kmcomapi" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="tavultesoft.keymanengine.kmcomapi" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Engine API</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -20,6 +20,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{93391ECB-E2F1-4D23-B85E-6FDEB7ACF9B4}</ProjectGuid>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="tavultesoft.keymanengine.mcompile" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="tavultesoft.keymanengine.mcompile" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Engine x64</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -15,6 +15,7 @@
<Keyword>Win32Proj</Keyword>
<RootNamespace>mtop</RootNamespace>
<ProjectName>mcompile</ProjectName>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="tavultesoft.keymanengine.tsysinfo" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="tavultesoft.keymanengine.tsysinfo" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Engine Diagnostics</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="tavultesoft.keymanengine.tsysinfox64" version="$VERSION" processorArchitecture="x86"/>
<assemblyIdentity type="win32" name="tavultesoft.keymanengine.tsysinfox64" version="$VersionWin" processorArchitecture="x86"/>
<description>Keyman Engine Diagnostics x64</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View file

@ -22,6 +22,7 @@
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{40BFECE3-7FC0-4649-A3DC-E017FF84C75B}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View file

@ -1,5 +1,5 @@
<?php
$COPYRIGHT = "Copyright &copy;1994-2001 Tavultesoft";
$KEYMANVERSION = "$VERSION";
$COPYRIGHT = "Copyright &copy;1994-2020 SIL International";
$KEYMANVERSION = "$Version";
$DOCVERSION = "$DATE";
?>

View file

@ -22,6 +22,7 @@
<ProjectGuid>{8B6195B3-F6F8-45E7-9FCD-A5437180DAE1}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>enumtsfcpp</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View file

@ -5,7 +5,7 @@
<assemblyIdentity
type="win32"
name="tavultesoft.keymanengine.kmkb0045"
version="$VERSION"
version="$VersionWin"
processorArchitecture="x86"/>
<description>Tavultesoft KMKB0045</description>

View file

@ -14,6 +14,7 @@
<ProjectGuid>{A4DF65F2-7C94-4CE9-93CD-625641B056B5}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>importkeyboard</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View file

@ -23,7 +23,7 @@
<ProjectGuid>{748219AC-3BDE-40FC-8E93-7516C4BCE81D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>cppshareddata</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">