diff --git a/HISTORY.md b/HISTORY.md index fa43b82dec..c6193efc80 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,32 @@ # Keyman Version History +## 15.0.170 alpha 2021-12-16 + +* docs(linux): Document how to disable error reporting (#6051) +* fix(linux): fix release version number for Sentry reporting (#6052) +* fix(linux): Fix package description (#6054) + +## 15.0.169 alpha 2021-12-15 + +* fix(mac): display Unicode package name correctly instead of '????' (#6016) +* fix(linux): Improve ibus-keyman tests (#6044) + +## 15.0.168 alpha 2021-12-14 + +* feat(linux): Add support for Ubuntu 22.04 Jammy (#6037) + +## 15.0.167 alpha 2021-12-13 + +* fix(windows): remove unused variable (#6039) + +## 15.0.166 alpha 2021-12-11 + +* chore(windows): version.rc use macros instead of mkver (#6019) +* chore(windows): move from Borland make to nmake (#6020) +* chore(windows): use findstr instead of Borland grep (#6021) +* chore(windows): replace mkver with mkver.sh (#6022) +* chore(windows): build without delphi (#6030) + ## 15.0.165 alpha 2021-12-08 * fix(web): font size was not consistently set (#5906) diff --git a/VERSION.md b/VERSION.md index 6ac68bcba1..165c53dbb6 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -15.0.166 \ No newline at end of file +15.0.171 \ No newline at end of file diff --git a/common/core/web/input-processor/package-lock.json b/common/core/web/input-processor/package-lock.json index 39c9b081b7..36180e2589 100644 --- a/common/core/web/input-processor/package-lock.json +++ b/common/core/web/input-processor/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/input-processor", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/input-processor/package.json b/common/core/web/input-processor/package.json index 3c4530c00b..687f5698f0 100644 --- a/common/core/web/input-processor/package.json +++ b/common/core/web/input-processor/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/input-processor", - "version": "15.0.166", + "version": "15.0.171", "description": "The core text and prediction processing engine for KeymanWeb", "repository": { "type": "git", @@ -18,8 +18,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/lexical-model-compiler": "^15.0.166", - "@keymanapp/resources-gosh": "^15.0.166", + "@keymanapp/lexical-model-compiler": "^15.0.171", + "@keymanapp/resources-gosh": "^15.0.171", "@types/node": "^11.9.4", "chai": "^4.3.4", "mocha": "^8.4.0", @@ -34,11 +34,11 @@ "mocha": "mocha" }, "dependencies": { - "@keymanapp/keyboard-processor": "^15.0.166", - "@keymanapp/lexical-model-layer": "^15.0.166", - "@keymanapp/models-types": "^15.0.166", - "@keymanapp/web-environment": "^15.0.166", - "@keymanapp/web-utils": "^15.0.166", + "@keymanapp/keyboard-processor": "^15.0.171", + "@keymanapp/lexical-model-layer": "^15.0.171", + "@keymanapp/models-types": "^15.0.171", + "@keymanapp/web-environment": "^15.0.171", + "@keymanapp/web-utils": "^15.0.171", "eventemitter3": "^4.0.0" } } diff --git a/common/core/web/keyboard-processor/package-lock.json b/common/core/web/keyboard-processor/package-lock.json index adfda67f2a..d1372c9dba 100644 --- a/common/core/web/keyboard-processor/package-lock.json +++ b/common/core/web/keyboard-processor/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/keyboard-processor", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/keyboard-processor/package.json b/common/core/web/keyboard-processor/package.json index 9dd586874c..33f4a81166 100644 --- a/common/core/web/keyboard-processor/package.json +++ b/common/core/web/keyboard-processor/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/keyboard-processor", - "version": "15.0.166", + "version": "15.0.171", "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": "^15.0.166", + "@keymanapp/resources-gosh": "^15.0.171", "chai": "^4.3.4", "mocha": "^8.4.0", "mocha-teamcity-reporter": "^4.0.0", @@ -32,9 +32,9 @@ "mocha": "mocha" }, "dependencies": { - "@keymanapp/models-types": "^15.0.166", - "@keymanapp/web-environment": "^15.0.166", - "@keymanapp/web-utils": "^15.0.166", + "@keymanapp/models-types": "^15.0.171", + "@keymanapp/web-environment": "^15.0.171", + "@keymanapp/web-utils": "^15.0.171", "@types/node": "^11.9.4" } } diff --git a/common/core/web/tools/recorder/package-lock.json b/common/core/web/tools/recorder/package-lock.json index b9e505ae3b..93bb4719e4 100644 --- a/common/core/web/tools/recorder/package-lock.json +++ b/common/core/web/tools/recorder/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/recorder-core", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/tools/recorder/package.json b/common/core/web/tools/recorder/package.json index e9c4eb70af..49ac325354 100644 --- a/common/core/web/tools/recorder/package.json +++ b/common/core/web/tools/recorder/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/recorder-core", - "version": "15.0.166", + "version": "15.0.171", "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": "^15.0.166", - "@keymanapp/models-types": "^15.0.166", - "@keymanapp/web-environment": "^15.0.166", - "@keymanapp/web-utils": "^15.0.166", + "@keymanapp/keyboard-processor": "^15.0.171", + "@keymanapp/models-types": "^15.0.171", + "@keymanapp/web-environment": "^15.0.171", + "@keymanapp/web-utils": "^15.0.171", "@types/node": "^11.9.4" }, "devDependencies": { diff --git a/common/core/web/tools/sentry-manager/package-lock.json b/common/core/web/tools/sentry-manager/package-lock.json index 00f796a5ac..6f58a4a009 100644 --- a/common/core/web/tools/sentry-manager/package-lock.json +++ b/common/core/web/tools/sentry-manager/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-sentry-manager", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/core/web/tools/sentry-manager/package.json b/common/core/web/tools/sentry-manager/package.json index c3da4565ec..61dfed6ebf 100644 --- a/common/core/web/tools/sentry-manager/package.json +++ b/common/core/web/tools/sentry-manager/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-sentry-manager", - "version": "15.0.166", + "version": "15.0.171", "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": "^15.0.166", + "@keymanapp/web-environment": "^15.0.171", "@sentry/browser": "^5.27.4" } } diff --git a/common/core/web/utils/package-lock.json b/common/core/web/utils/package-lock.json index ae043e4f27..429b38724a 100644 --- a/common/core/web/utils/package-lock.json +++ b/common/core/web/utils/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-utils", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/core/web/utils/package.json b/common/core/web/utils/package.json index d7ce9ba727..edd552b80a 100644 --- a/common/core/web/utils/package.json +++ b/common/core/web/utils/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-utils", - "version": "15.0.166", + "version": "15.0.171", "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": "^15.0.166", - "@keymanapp/web-environment": "^15.0.166", + "@keymanapp/resources-gosh": "^15.0.171", + "@keymanapp/web-environment": "^15.0.171", "@types/node": "^14.0.5", "typescript": "^3.8.3" } diff --git a/common/models/templates/package-lock.json b/common/models/templates/package-lock.json index 3ce9e075f8..bcdfbd1198 100644 --- a/common/models/templates/package-lock.json +++ b/common/models/templates/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-templates", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/models/templates/package.json b/common/models/templates/package.json index 39b9203a83..c2ceaf97bd 100644 --- a/common/models/templates/package.json +++ b/common/models/templates/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-templates", - "version": "15.0.166", + "version": "15.0.171", "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": "^15.0.166", - "@keymanapp/web-utils": "^15.0.166", + "@keymanapp/models-types": "^15.0.171", + "@keymanapp/web-utils": "^15.0.171", "@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": "^15.0.166" + "@keymanapp/models-wordbreakers": "^15.0.171" } } diff --git a/common/models/types/package-lock.json b/common/models/types/package-lock.json index 9fc4e62fd8..ec83cbe537 100644 --- a/common/models/types/package-lock.json +++ b/common/models/types/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-types", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/models/types/package.json b/common/models/types/package.json index fdb3767358..7d79bbeb48 100644 --- a/common/models/types/package.json +++ b/common/models/types/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-types", - "version": "15.0.166", + "version": "15.0.171", "description": "Type definitions in used in the modeling (lexical model/predictive text) component of Keyman.", "types": "./index.d.ts", "scripts": { diff --git a/common/models/wordbreakers/package-lock.json b/common/models/wordbreakers/package-lock.json index 3faeb889b9..133ebec0dc 100644 --- a/common/models/wordbreakers/package-lock.json +++ b/common/models/wordbreakers/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-wordbreakers", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/models/wordbreakers/package.json b/common/models/wordbreakers/package.json index 6f2ab90962..eb8d3d7355 100644 --- a/common/models/wordbreakers/package.json +++ b/common/models/wordbreakers/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-wordbreakers", - "version": "15.0.166", + "version": "15.0.171", "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": "^15.0.166", + "@keymanapp/models-types": "^15.0.171", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "chai": "^4.3.4", diff --git a/common/predictive-text/package-lock.json b/common/predictive-text/package-lock.json index 391f09b0a5..617bafe3e8 100644 --- a/common/predictive-text/package-lock.json +++ b/common/predictive-text/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-layer", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/predictive-text/package.json b/common/predictive-text/package.json index cf1f670dc3..0cb1c79821 100644 --- a/common/predictive-text/package.json +++ b/common/predictive-text/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-layer", - "version": "15.0.166", + "version": "15.0.171", "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": "^15.0.166", - "@keymanapp/resources-gosh": "^15.0.166", + "@keymanapp/models-types": "^15.0.171", + "@keymanapp/resources-gosh": "^15.0.171", "@types/node": "^10.17.21", "chai": "^4.3.4", "karma": "^6.3.4", @@ -46,10 +46,10 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/models-templates": "^15.0.166", - "@keymanapp/models-wordbreakers": "^15.0.166", - "@keymanapp/web-environment": "^15.0.166", - "@keymanapp/web-utils": "^15.0.166", + "@keymanapp/models-templates": "^15.0.171", + "@keymanapp/models-wordbreakers": "^15.0.171", + "@keymanapp/web-environment": "^15.0.171", + "@keymanapp/web-utils": "^15.0.171", "es6-shim": "^0.35.5", "string.prototype.codepointat": "^0.2.1", "string.prototype.startswith": "^0.2.0" diff --git a/developer/js/package-lock.json b/developer/js/package-lock.json index c3373e0404..a779076483 100644 --- a/developer/js/package-lock.json +++ b/developer/js/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-compiler", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/developer/js/package.json b/developer/js/package.json index 77753f145a..6ee67f7016 100644 --- a/developer/js/package.json +++ b/developer/js/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-compiler", - "version": "15.0.166", + "version": "15.0.171", "description": "Keyman Developer lexical model compiler", "keywords": [ "keyboard", @@ -37,14 +37,14 @@ "node": ">=12.0.0" }, "dependencies": { - "@keymanapp/models-types": "^15.0.166", + "@keymanapp/models-types": "^15.0.171", "commander": "^3.0.0", "typescript": "^3.8.3", "xml2js": "^0.4.19" }, "devDependencies": { - "@keymanapp/models-templates": "^15.0.166", - "@keymanapp/models-wordbreakers": "^15.0.166", + "@keymanapp/models-templates": "^15.0.171", + "@keymanapp/models-wordbreakers": "^15.0.171", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", "@types/node": "^10.14.6", diff --git a/docs/build/windows.md b/docs/build/windows.md index 84f6953a90..df9245c2d0 100644 --- a/docs/build/windows.md +++ b/docs/build/windows.md @@ -147,18 +147,26 @@ choco install git jq python ninja pandoc refreshenv # choco meson (0.55) is too old, 0.56 required: python -m pip install meson + # choco rustup is not currently working: Invoke-WebRequest -Uri https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe -OutFile $env:TEMP\rustup-init.exe & "$env:TEMP\rustup-init.exe" refreshenv +``` + +Restart PowerShell (because `refreshenv` doesn't seem to pick up the rust environment), then +```ps1 +# Elevated Powershell rustup target add i686-pc-windows-msvc ``` **Environment variables**: * [`KEYMAN_ROOT`](#keyman_root) +* `PATH`: add your Python scripts folder to your path: it will normally be `%appdata%\Python\Python310\Scripts`. ```bat SET KEYMAN_ROOT=c:\Projects\keyman\keyman +SET PATH=%path%;%appdata%\Python\Python310\Scripts ``` To check whether environment variables are set, run `SET ` in command @@ -223,6 +231,14 @@ Invoke-WebRequest -Uri https://github.com/rustwasm/wasm-pack/releases/download/v Start Delphi IDE once after installation as it will create various environment files and take you through required registration. + * Note: It is possible to build all components that do _not_ require Delphi by + adding the environment variable `NODELPHI=1` before starting the build. + Currently many components are Delphi-based, but if you are working just in + Keyman Core, the compiler, or Keyman Engine's C++ components, you may be + able to get away without building them. In this situation, we recommend + copying the relevant Delphi-built components into windows/bin folders from a + compatible installed version of Keyman for testing and debugging purposes. + * Visual C++ 2019 Community or Professional ```ps1 diff --git a/lerna.json b/lerna.json index c70cdaaa45..562e5d3cef 100644 --- a/lerna.json +++ b/lerna.json @@ -20,5 +20,5 @@ "ts-node", "typescript" ], - "version": "15.0.166" + "version": "15.0.171" } diff --git a/linux/.pbuilderrc b/linux/.pbuilderrc index 7eb25cb256..0257f09b30 100644 --- a/linux/.pbuilderrc +++ b/linux/.pbuilderrc @@ -14,7 +14,7 @@ DEBIAN_SUITES=($UNSTABLE_CODENAME $TESTING_CODENAME $STABLE_CODENAME $STABLE_BAC "experimental" "unstable" "testing" "stable") # List of Ubuntu suites. Update these when needed. -UBUNTU_SUITES=("impish" "hirsute" "groovy" "focal" "bionic") +UBUNTU_SUITES=("jammy" "impish" "hirsute" "focal" "bionic") # Mirrors to use. Update these to your preferred mirror. DEBIAN_MIRROR="deb.debian.org" diff --git a/linux/Jenkinsfile b/linux/Jenkinsfile index 46ab0f7508..fa111cfbe2 100644 --- a/linux/Jenkinsfile +++ b/linux/Jenkinsfile @@ -5,7 +5,7 @@ @Library('lsdev-pipeline-library') _ keymanPackaging { - distributionsToPackage = 'bionic focal hirsute' + distributionsToPackage = 'bionic focal hirsute jammy' arches = 'amd64 i386' packagesToBuild = ['keyman', 'kmflcomp', 'libkmfl', 'ibus-kmfl'] } diff --git a/linux/debian/com.keyman.config.appdata.xml b/linux/debian/com.keyman.config.appdata.xml index e275797552..f137be461d 100644 --- a/linux/debian/com.keyman.config.appdata.xml +++ b/linux/debian/com.keyman.config.appdata.xml @@ -7,24 +7,24 @@ Keyman SIL International https://keyman.com/cdn/dev/img/keyman-logo.png - Keyman Keyboards - Keyman makes it possible for you to type in over 1,000 languages + Keyman for Linux + Keyman makes it possible for you to type in over 2,000 languages

-Keyman makes it possible for you to type in over 1,000 languages on Windows, macOS, Linux, +Keyman makes it possible for you to type in over 2,000 languages on Windows, macOS, Linux, iPhone, iPad, Android tablets and phones, and even instantly in your web browser. With the world’s most powerful keyboarding engine, intuitive and rapid text input is now possible in your language, and for over 99% of the global population’s mother tongues!

- Originally created in 1993 to type Lao on Windows, Keyman is now a free and -open source keyboarding platform which allows anyone to write a keyboard layout +Originally created in 1993 to type Lao on Windows, Keyman is now a free and +open source keyboarding platform which allows anyone to write and use a keyboard layout for their language. Keyman is available for many platforms, including Windows, macOS, iOS, Android, Linux and the web.

- Keyboard layouts are defined with a clear and easy to understand keyboard +Keyboard layouts are defined with a clear and easy to understand keyboard grammar. Keyman's contextual input model means keyboard layouts can be intelligent and make it simple to type even the most complex languages. Keyboard layouts are distributed through an open catalog to all major desktop @@ -39,7 +39,7 @@ and mobile platforms. - The Keyman Keyboards main window with a keyboard welcome window. + The Keyman for Linux configuration window with a keyboard welcome window. https://keyman.com/go/linux/11.0/linux-configuration.png diff --git a/linux/debian/com.keyman.ibus_keyman.metainfo.xml b/linux/debian/com.keyman.ibus_keyman.metainfo.xml index 36242f2a10..eb02001da0 100644 --- a/linux/debian/com.keyman.ibus_keyman.metainfo.xml +++ b/linux/debian/com.keyman.ibus_keyman.metainfo.xml @@ -12,8 +12,7 @@ ​ ​

This input method provides the Keyman IM engine for IBus. With this module, you can - use keyboard layouts designed for Keyman version 11 or earlier under the IBus - platform. + use keyboard layouts designed for Keyman under the IBus platform.

Originally created in 1993 to type Lao on Windows, Keyman is now a free and diff --git a/linux/debian/control b/linux/debian/control index d85071e60d..c604915f56 100644 --- a/linux/debian/control +++ b/linux/debian/control @@ -51,7 +51,7 @@ Depends: Recommends: onboard-keyman, Description: Type in your language with Keyman for Linux - Keyman makes it possible for you to type in over 1,000 languages on Windows, + Keyman makes it possible for you to type in over 2,000 languages on Windows, macOS, Linux, iPhone, iPad, Android tablets and phones, and even instantly in your web browser. With the world’s most powerful keyboarding engine, intuitive and rapid text input is now possible in your language, and for @@ -98,8 +98,8 @@ Description: Keyman for Linux configuration Keyboard layouts are distributed through an open catalog to all major desktop and mobile platforms. . - Python module to install, uninstall and view information about Keyman - keyboard packages. + This package contains the Python module to install, uninstall and view + information about Keyman keyboard packages. Package: libkmnkbp-dev Architecture: amd64 arm64 armel armhf i386 mipsel mips64el ppc64el riscv64 @@ -121,7 +121,7 @@ Description: Development files for Keyman keyboard processing library and mobile platforms. . The Keyman keyboardprocessor library processes input from input method engines - and applies rules from compiled Keyman 11 or earlier kmx keyboard files. + and applies rules from compiled Keyman keyboard files. . This package contains development headers and libraries. @@ -149,7 +149,7 @@ Description: Keyman keyboard processing library and mobile platforms. . The Keyman keyboardprocessor library processes input from input method engines - and applies rules from compiled Keyman 11 or earlier kmx keyboard files. + and applies rules from compiled Keyman keyboard files. Package: ibus-keyman Architecture: amd64 arm64 armel armhf i386 mipsel mips64el ppc64el riscv64 @@ -173,9 +173,8 @@ Description: Keyman engine for IBus Keyboard layouts are distributed through an open catalog to all major desktop and mobile platforms. . - IBus-keyman is a IM (input method) Engine for multiple languages, based on + ibus-keyman is a IM (input method) Engine for multiple languages, based on IBus. . This package provides the Keyman IM engine for IBus. With this module, you - can use keyboard layouts designed for Keyman version 11 or earlier under the - IBus platform. + can use keyboard layouts designed for Keyman under the IBus platform. diff --git a/linux/debian/km-config.desktop b/linux/debian/km-config.desktop index 5646f67601..91cacce96a 100644 --- a/linux/debian/km-config.desktop +++ b/linux/debian/km-config.desktop @@ -1,8 +1,8 @@ [Desktop Entry] -Name=Keyman Keyboards -Name[en_GB]=Keyman Keyboards -Comment=Configure Keyman keyboards -Comment[en_GB]=Configure Keyman keyboards +Name=Keyman Configuration +Name[en_GB]=Keyman Configuration +Comment=Configure Keyman for Linux keyboards +Comment[en_GB]=Configure Keyman for Linux keyboards Exec=km-config %u Icon=km-config Terminal=false diff --git a/linux/help/common/index.md b/linux/help/common/index.md index 4d4f39ba05..c6fae9b3c9 100644 --- a/linux/help/common/index.md +++ b/linux/help/common/index.md @@ -64,3 +64,14 @@ sudo dpkg --purge ibus-kmfl libkmfl **A.** Most keyboards will work without change. A small subset of keyboards require features which are not yet available in Keyman for Linux. These features will be progressively implemented. + +## Q. How can I disable automatically reporting errors? + +**A.** If Keyman crashes, it will automatically send a report to the development team. This report +is anonymous and contains only technical details relating to the crash. It does not include keystroke +data or personally identifying data. If you don't want these automatic error reports to be sent you +can set the environment variable `KEYMAN_NOSENTRY`: + +```bash +export KEYMAN_NOSENTRY=1 +``` diff --git a/linux/ibus-keyman/tests/testfixture.cpp b/linux/ibus-keyman/tests/testfixture.cpp index f5c481c6cd..20162bbfdb 100644 --- a/linux/ibus-keyman/tests/testfixture.cpp +++ b/linux/ibus-keyman/tests/testfixture.cpp @@ -347,6 +347,7 @@ static void test_source(IBusKeymanTestsFixture *fixture, gconstpointer user_data keyman_put_options_todconf(data->test_name, data->test_name, key, value); } } + g_settings_sync(); switch_keyboard(fixture, kmxfile.c_str()); if (test_source.caps_lock_state() != get_caps_lock_state(fixture)) { diff --git a/linux/keyman-config/keyman_config/__init__.py b/linux/keyman-config/keyman_config/__init__.py index abeb47c6b7..2d2409d9d3 100644 --- a/linux/keyman-config/keyman_config/__init__.py +++ b/linux/keyman-config/keyman_config/__init__.py @@ -61,7 +61,7 @@ else: sentry_sdk.init( dsn=SentryUrl, environment=__environment__, - release=__version__, + release='release-' + __versionwithtag__, integrations=[sentry_logging], ) set_user({'id': hash(getpass.getuser())}) diff --git a/linux/scripts/cow.sh b/linux/scripts/cow.sh index 957ed3dc98..ab5768a92f 100755 --- a/linux/scripts/cow.sh +++ b/linux/scripts/cow.sh @@ -3,7 +3,7 @@ # If needed set cowbuilder up for building Keyman Debian packages # Then cowbuilder update -distributions='bionic focal hirsute impish' +distributions='bionic focal hirsute impish jammy' dpkgcheck=`dpkg-query -l cowbuilder` if [ $? != 0 ]; then diff --git a/linux/scripts/launchpad.sh b/linux/scripts/launchpad.sh index 6e2ff177ac..041dc6a909 100755 --- a/linux/scripts/launchpad.sh +++ b/linux/scripts/launchpad.sh @@ -40,7 +40,7 @@ echo "ppa: ${ppa}" if [ "${DIST}" != "" ]; then distributions="${DIST}" else - distributions="bionic focal hirsute impish" + distributions="bionic focal hirsute impish jammy" fi if [ "${PACKAGEVERSION}" != "" ]; then diff --git a/mac/Keyman4Mac/Keyman4Mac/AppDelegate.m b/mac/Keyman4Mac/Keyman4Mac/AppDelegate.m index e360ac8e54..e8c9506f52 100644 --- a/mac/Keyman4Mac/Keyman4Mac/AppDelegate.m +++ b/mac/Keyman4Mac/Keyman4Mac/AppDelegate.m @@ -283,7 +283,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef } NSString *packagePath = [kmxPath stringByDeletingLastPathComponent]; - NSDictionary *infoDict = [KMXFile infoDictionaryFromFilePath:kmxPath]; + NSDictionary *infoDict = [KMXFile keyboardInfoFromKmxFile:kmxPath]; NSString *kvkFilename = [infoDict objectForKey:kKMVisualKeyboardKey]; if (kvkFilename && [kvkFilename length]) { NSString *kvkPath = [packagePath stringByAppendingPathComponent:kvkFilename]; @@ -328,7 +328,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef self.kmxList = [NSMutableArray arrayWithArray:[self KMXFiles]]; NSMutableArray *kmxDesc = [[NSMutableArray alloc] initWithCapacity:0]; for (NSString *path in self.kmxList) { - NSDictionary *infoDict = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *infoDict = [KMXFile keyboardInfoFromKmxFile:path]; if (!infoDict) continue; diff --git a/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj b/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj index 4978b10031..a583e8588f 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj +++ b/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj @@ -7,6 +7,9 @@ objects = { /* Begin PBXBuildFile section */ + 290BC680274B9DB1005CD1C3 /* KMPackageInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 290BC67F274B9DB1005CD1C3 /* KMPackageInfo.m */; }; + 290BC75E274F3FD7005CD1C3 /* KMKeyboardInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 290BC75D274F3FD7005CD1C3 /* KMKeyboardInfo.m */; }; + 296FE2FC275DD21600F46898 /* KMPackageReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 296FE2FB275DD21600F46898 /* KMPackageReader.m */; }; 293EA3E627140D8100545EED /* KMAboutWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 293EA3E827140D8100545EED /* KMAboutWindowController.xib */; }; 293EA3EB27140DEC00545EED /* preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = 293EA3ED27140DEC00545EED /* preferences.xib */; }; 293EA3F427181FDA00545EED /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 293EA3F627181FDA00545EED /* Localizable.strings */; }; @@ -122,6 +125,12 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 290BC67E274B9DB1005CD1C3 /* KMPackageInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KMPackageInfo.h; sourceTree = ""; }; + 290BC67F274B9DB1005CD1C3 /* KMPackageInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KMPackageInfo.m; sourceTree = ""; }; + 290BC75C274F3FD7005CD1C3 /* KMKeyboardInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KMKeyboardInfo.h; sourceTree = ""; }; + 290BC75D274F3FD7005CD1C3 /* KMKeyboardInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KMKeyboardInfo.m; sourceTree = ""; }; + 296FE2FA275DD21600F46898 /* KMPackageReader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KMPackageReader.h; sourceTree = ""; }; + 296FE2FB275DD21600F46898 /* KMPackageReader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KMPackageReader.m; sourceTree = ""; }; 293EA3E527140D3A00545EED /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 293EA3E727140D8100545EED /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/KMAboutWindowController.xib; sourceTree = ""; }; 293EA3EA27140D8E00545EED /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/KMAboutWindowController.strings; sourceTree = ""; }; @@ -437,6 +446,12 @@ E240F598202DED740000067D /* KMPackage.m */, 9A3D6C5B221531B0008785A3 /* KMOSVersion.h */, 9A3D6C5C221531B0008785A3 /* KMOSVersion.m */, + 290BC67E274B9DB1005CD1C3 /* KMPackageInfo.h */, + 290BC75C274F3FD7005CD1C3 /* KMKeyboardInfo.h */, + 290BC75D274F3FD7005CD1C3 /* KMKeyboardInfo.m */, + 290BC67F274B9DB1005CD1C3 /* KMPackageInfo.m */, + 296FE2FA275DD21600F46898 /* KMPackageReader.h */, + 296FE2FB275DD21600F46898 /* KMPackageReader.m */, 293EA3F627181FDA00545EED /* Localizable.strings */, ); path = Keyman4MacIM; @@ -808,6 +823,7 @@ 98F3C8931A8D739500F675E3 /* KMConfigurationWindowController.m in Sources */, 9A3D6C5D221531B0008785A3 /* KMOSVersion.m in Sources */, 989C9C111A7876DE00A20425 /* main.m in Sources */, + 290BC680274B9DB1005CD1C3 /* KMPackageInfo.m in Sources */, 98BF924F1BF02DC20002126A /* KMBarView.m in Sources */, E240F599202DED740000067D /* KMPackage.m in Sources */, 984B8F441AF1C3D900E096A8 /* OSKWindowController.m in Sources */, @@ -821,12 +837,14 @@ 98BF92441BF01CBE0002126A /* KMAboutWindowController.m in Sources */, 98FE10631B4DEE5600525F54 /* KMInfoWindowController.m in Sources */, 9836B3721AE5F11D00780482 /* unzip.c in Sources */, + 296FE2FC275DD21600F46898 /* KMPackageReader.m in Sources */, 9832472E1A9EABC70010B90C /* KMConfigColumn1CellView.m in Sources */, E22020F6200506F300B74FAC /* KMInputMethodSafariClientEventHandler.m in Sources */, E24C79EA1FFFCC7500D8E46F /* KMInputMethodBrowserClientEventHandler.m in Sources */, 98FE105E1B4DE8F400525F54 /* NSWindow+SuppMethods.m in Sources */, 9836B3741AE5F11D00780482 /* ZipArchive.mm in Sources */, 983247B21A9EB9690010B90C /* KMConfigColumn3CellView.m in Sources */, + 290BC75E274F3FD7005CD1C3 /* KMKeyboardInfo.m in Sources */, 98BF92521BF03D4D0002126A /* KMAboutBGView.m in Sources */, 98BF92571BF0431F0002126A /* KMAboutWindow.m in Sources */, 98BCD1F61B4E5998004E1AFD /* NSString+SuppMethods.m in Sources */, diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m index 638b3bf367..687f6c68a2 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m @@ -133,17 +133,17 @@ if ([obj isKindOfClass:[NSArray class]]) { NSArray *pArray = (NSArray *)obj; NSString *packageFolder = [self packageFolderFromPath:[pArray objectAtIndex:0]]; - NSString *packageName = [self packageNameFromFolder:packageFolder]; + NSString *packageName = [self.AppDelegate packageNameFromPackageInfo:packageFolder]; [_tableContents addObject:[NSDictionary dictionaryWithObjectsAndKeys:packageName, @"HeaderTitle", nil]]; for (NSString *path in pArray) { - NSDictionary *info = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *info = [KMXFile keyboardInfoFromKmxFile:path]; if (info) [_tableContents addObject:info]; } } else { NSString *path = (NSString *)obj; - NSDictionary *info = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *info = [KMXFile keyboardInfoFromKmxFile:path]; if (info) [_tableContents addObject:info]; } @@ -169,10 +169,6 @@ return [self.AppDelegate packageFolderFromPath:path]; } -- (NSString *)packageNameFromFolder:(NSString *)packageFolder { - return [self.AppDelegate packageNameFromFolder:packageFolder]; -} - - (NSString *)keyboardsPath { return self.AppDelegate.keyboardsPath; } diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m index ef9e3ad03e..15e6ea5bd7 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m @@ -8,6 +8,8 @@ #import "KMInfoWindowController.h" #import "KMInputMethodAppDelegate.h" +#import "KMPackageInfo.h" +#import "KMKeyboardInfo.h" #import @interface KMInfoWindowController () @@ -15,7 +17,7 @@ @property (nonatomic, weak) IBOutlet NSTabView *tabView; @property (nonatomic, weak) IBOutlet WebView *detailsView; @property (nonatomic, weak) IBOutlet WebView *readmeView; -@property (nonatomic, strong) NSDictionary *infoDict; +@property (nonatomic, strong) KMPackageInfo *packageInfo; @property (nonatomic, strong) NSTabViewItem *readMeTab; @end @@ -27,6 +29,8 @@ - (void)windowDidLoad { [super windowDidLoad]; + // TODO: rename + [self.window setTitle:@"Keyboard/Package Info"]; [self.tabView setDelegate:self]; [self.detailsView setFrameLoadDelegate:(id)self]; [self.detailsView setPolicyDelegate:(id)self]; @@ -34,12 +38,13 @@ [self.readmeView setPolicyDelegate:(id)self]; } +// TODO: rename, refactor, reset PackageInfo directly rather than making getter do it? - (void)setPackagePath:(NSString *)packagePath { _packagePath = packagePath; - _infoDict = nil; + _packageInfo = nil; [self.tabView selectTabViewItemAtIndex:0]; if (packagePath != nil && packagePath.length) { - NSString *imgName = [self.infoDict objectForKey:kGraphicFile]; + NSString *imgName = self.packageInfo.graphicFilename; if (imgName != nil) { NSString *imgFile = [packagePath stringByAppendingPathComponent:imgName]; NSImage *img = [[NSImage alloc] initWithContentsOfFile:imgFile]; @@ -55,9 +60,9 @@ else [self.detailsView.mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; - NSString *readMeFile = [self.infoDict objectForKey:kReadMeFile]; - if (readMeFile != nil) { - [self.readmeView.mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[packagePath stringByAppendingPathComponent:readMeFile]]]]; + NSString *readmeFilename = self.packageInfo.readmeFilename; + if (readmeFilename != nil) { + [self.readmeView.mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[packagePath stringByAppendingPathComponent:readmeFilename]]]]; if (_readMeTab != nil && ![self.tabView.tabViewItems containsObject:_readMeTab]) { [self.tabView addTabViewItem:_readMeTab]; _readMeTab = nil; @@ -120,33 +125,22 @@ ""; NSString *pBodyFormat = @"

%@


"; - NSMutableString *kbsStr = [NSMutableString stringWithString:@""]; - NSArray *kbs = [[self AppDelegate] keyboardNamesFromFolder:self.packagePath]; - if (kbs != nil && kbs.count) { - for (NSArray *kbName in kbs) { - [kbsStr appendString:[NSString stringWithFormat:pBodyFormat, kbName]]; - } - } - else { - // This was the old logic (prior to fixing issue #994). Keeping as fallback, though - // it's unlikely to be useful/needed. - kbs = [self.infoDict objectForKey:kKeyboard]; + NSMutableString *keyboardString = [NSMutableString stringWithString:@""]; - if (kbs != nil && kbs.count) { - for (NSArray *kb in kbs) { - [kbsStr appendString:[NSString stringWithFormat:pBodyFormat, [kb objectAtIndex:0]]]; - } - } - else { - kbsStr = [NSMutableString stringWithString:@"


"]; + if (self.packageInfo.keyboards.count) { + for (KMKeyboardInfo *keyboard in self.packageInfo.keyboards) { + [keyboardString appendString:[NSString stringWithFormat:pBodyFormat, keyboard.name]]; } + } else { + keyboardString = [NSMutableString stringWithString:@"


"]; } - - NSArray *fonts = [self.infoDict objectForKey:kFont]; + + NSArray *fonts = self.packageInfo.fonts; NSMutableString *fontsStr = [NSMutableString stringWithString:@""]; + if (fonts != nil && fonts.count) { - for (NSArray *font in fonts) { - [fontsStr appendString:[NSString stringWithFormat:pBodyFormat, [font objectAtIndex:0]]]; + for (NSString *font in fonts) { + [fontsStr appendString:[NSString stringWithFormat:pBodyFormat, font]]; } } else { @@ -158,16 +152,17 @@ KeymanVersionInfo keymanVersionInfo = [[self AppDelegate] versionInfo]; NSString *shareUrl = [NSString stringWithFormat:@"https://%@/go/keyboard/%@/share", keymanVersionInfo.keymanCom, packageId]; - NSString *name = [[self.infoDict objectForKey:kName] objectAtIndex:0]; + + NSString *name = self.packageInfo.packageName; if (name == nil) name = @"Unknown Keyboard Package"; - NSString *version = [[self.infoDict objectForKey:kVersion] objectAtIndex:0]; + NSString *version = self.packageInfo.packageVersion; if (version == nil) version = @""; - NSString *authorV1 = [[self.infoDict objectForKey:kAuthor] objectAtIndex:0]; - NSString *authorV2 = [[self.infoDict objectForKey:kAuthor] objectAtIndex:1]; + NSString *authorV1 = self.packageInfo.authorName; + NSString *authorV2 = self.packageInfo.authorUrl; NSString *author = @""; if (authorV1.length && authorV2.length) author = [NSString stringWithFormat:linkFormat, authorV2, authorV1]; @@ -175,29 +170,17 @@ author = authorV1; else if (authorV2.length) author = [NSString stringWithFormat:linkFormat, authorV2, authorV2]; - - NSString *websiteV1 = [[self.infoDict objectForKey:kWebSite] objectAtIndex:0]; - NSString *websiteV2 = [[self.infoDict objectForKey:kWebSite] objectAtIndex:1]; + NSString *website = @""; - if (websiteV1.length && websiteV2.length) - website = [NSString stringWithFormat:linkFormat, websiteV2, websiteV1]; - else if (websiteV1.length) - website = websiteV1; - else if (websiteV2.length) - website = [NSString stringWithFormat:linkFormat, websiteV2, websiteV2]; + if (self.packageInfo.website.length) + website = [NSString stringWithFormat:linkFormat, self.packageInfo.website, self.packageInfo.website]; - NSString *copyrightV1 = [[self.infoDict objectForKey:kCopyright] objectAtIndex:0]; - NSString *copyrightV2 = [[self.infoDict objectForKey:kCopyright] objectAtIndex:1]; NSString *copyright = @""; - if (copyrightV1.length && copyrightV2.length) - copyright = [NSString stringWithFormat:linkFormat, copyrightV2, copyrightV1]; - else if (copyrightV1.length) - copyright = copyrightV1; - else if (copyrightV2.length) - copyright = [NSString stringWithFormat:linkFormat, copyrightV2, copyrightV2]; + if (self.packageInfo.copyright.length) + copyright = self.packageInfo.copyright; NSString *htmlStr = [NSString stringWithFormat:htmlFormat, name, shareUrl, shareUrl, - kbsStr, fontsStr, version, author, website, copyright]; + keyboardString, fontsStr, version, author, website, copyright]; return htmlStr; } @@ -207,13 +190,12 @@ } } -- (NSDictionary *)infoDict { - if (_infoDict == nil) { - NSString *infoFile = [self.packagePath stringByAppendingPathComponent:@"kmp.inf"]; - _infoDict = [self.AppDelegate infoDictionaryFromFile:infoFile]; +- (KMPackageInfo *)packageInfo { + if(_packageInfo == nil) { + _packageInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; } - - return _infoDict; + + return _packageInfo; } - (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id)listener { diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInputController.m index 88b529e5a4..1607e915e0 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputController.m @@ -224,7 +224,7 @@ NSMutableArray *servers; KMXFile *kmx = [[KMXFile alloc] initWithFilePath:path]; [self.AppDelegate setKmx:kmx]; KVKFile *kvk = nil; - NSDictionary *kmxInfo = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *kmxInfo = [KMXFile keyboardInfoFromKmxFile:path]; NSString *kvkFilename = [kmxInfo objectForKey:kKMVisualKeyboardKey]; if (kvkFilename != nil) { NSString *kvkFilePath = [self.AppDelegate kvkFilePathFromFilename:kvkFilename]; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h index 8821532263..8f4e652371 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h @@ -12,6 +12,7 @@ #import #import #import +#import "KMPackageReader.h" #import "KMInputController.h" #import "KMAboutWindowController.h" #import "KMInfoWindowController.h" @@ -26,24 +27,6 @@ extern NSString *const kKMSelectedKeyboardKey; extern NSString *const kKMActiveKeyboardsKey; extern NSString *const kKeymanKeyboardDownloadCompletedNotification; -extern NSString *const kPackage; -extern NSString *const kButtons; -extern NSString *const kStartMenu; -extern NSString *const kStartMenuEntries; -extern NSString *const kInfo; -extern NSString *const kFiles; - -extern NSString *const kAuthor; -extern NSString *const kCopyright; -extern NSString *const kFile; -extern NSString *const kFont; -extern NSString *const kGraphicFile; -extern NSString *const kKeyboard; -extern NSString *const kName; -extern NSString *const kReadMeFile; -extern NSString *const kVersion; -extern NSString *const kWebSite; - typedef struct { NSString *sentryEnvironment; NSString *versionRelease; @@ -118,9 +101,9 @@ typedef struct { - (NSString *)packagePathAtIndex:(NSUInteger)index; - (NSInteger)indexForPackageFolder:(NSString *)packageFolder; - (NSString *)packageFolderFromPath:(NSString *)path; -- (NSString *)packageNameFromFolder:(NSString *)packageFolder; +- (KMPackageInfo *)loadPackageInfo:(NSString *)path; +- (NSString *)packageNameFromPackageInfo:(NSString *)packageFolder; - (NSArray *)keyboardNamesFromFolder:(NSString *)packageFolder; -- (NSDictionary *)infoDictionaryFromFile:(NSString *)infoFile; - (NSString *)kvkFilePathFromFilename:(NSString *)kvkFilename; - (NSString *)oskWindowTitle; - (void)postKeyboardEventWithSource: (CGEventSourceRef)source code:(CGKeyCode) virtualKey postCallback:(PostEventCallback)postEvent; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m index 9eed4d5897..819b7fba96 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m @@ -19,6 +19,9 @@ #import "KMConfigurationWindowController.h" #import "KMDownloadKBWindowController.h" #import "ZipArchive.h" +#import "KMPackageReader.h" +#import "KMPackageInfo.h" +#import "KMKeyboardInfo.h" @import Sentry; /** NSUserDefaults keys */ @@ -31,28 +34,9 @@ NSString *const kKMLegacyApps = @"KMLegacyApps"; NSString *const kKeymanKeyboardDownloadCompletedNotification = @"kKeymanKeyboardDownloadCompletedNotification"; -NSString *const kPackage = @"[Package]"; -NSString *const kButtons = @"[Buttons]"; -NSString *const kStartMenu = @"[StartMenu]"; -NSString *const kStartMenuEntries = @"[StartMenuEntries]"; -NSString *const kInfo = @"[Info]"; -NSString *const kFiles = @"[Files]"; - -NSString *const kAuthor = @"Author"; -NSString *const kCopyright = @"Copyright"; -NSString *const kFile = @"File"; -NSString *const kFont = @"Font"; -NSString *const kGraphicFile = @"GraphicFile"; -NSString *const kKeyboard = @"Keyboard"; -NSString *const kName = @"Name"; -NSString *const kReadMeFile = @"ReadMeFile"; -NSString *const kVersion = @"Version"; -NSString *const kWebSite = @"WebSite"; -NSString *const kWelcome = @"Welcome"; - -typedef enum { - ctPackage, ctButtons, ctStartMenu, ctStartMenuEntries, ctInfo, ctFiles, ctUnknown -} ContentType; +@interface KMInputMethodAppDelegate () +@property (nonatomic, strong) KMPackageReader *packageReader; +@end @implementation KMInputMethodAppDelegate @synthesize kme = _kme; @@ -365,6 +349,15 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return _kme; } +- (KMPackageReader *)packageReader { + if (_packageReader == nil) { + _packageReader = [[KMPackageReader alloc] init]; + [_packageReader setDebugMode:self.debugMode]; + } + + return _packageReader; +} + - (void)setKmx:(KMXFile *)kmx { _kmx = kmx; [self.kme setKmx:_kmx]; @@ -448,6 +441,9 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef _debugMode = useVerboseLogging; if (_kme != nil) [_kme setUseVerboseLogging:useVerboseLogging]; + if (_packageReader != nil) { + [_packageReader setDebugMode:useVerboseLogging]; + } NSUserDefaults *userData = [NSUserDefaults standardUserDefaults]; [userData setBool:useVerboseLogging forKey:kKMUseVerboseLogging]; [userData synchronize]; @@ -464,6 +460,8 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return [userData boolForKey:kKMUseVerboseLogging]; } +#pragma mark - Keyman Data + /** * Locate and create the Keyman data path; currently in ~/Documents/Keyman-Keyboards */ @@ -602,35 +600,27 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return packageFolder; } -- (NSString *)packageNameFromFolder:(NSString *)packageFolder { +- (KMPackageInfo *)loadPackageInfo:(NSString *)path { + return [self.packageReader loadPackageInfo:path]; +} + +- (NSString *)packageNameFromPackageInfo:(NSString *)packageFolder { NSString *packageName = nil; - NSString *path = [[self keyboardsPath] stringByAppendingPathComponent:packageFolder]; - NSString *fileContents = [NSString stringWithContentsOfFile:[path stringByAppendingPathComponent:@"kmp.inf"] encoding:NSWindowsCP1252StringEncoding error:NULL]; - NSArray *lines = [fileContents componentsSeparatedByString:@"\n"]; - BOOL hasInfo = NO; - for (NSString *line in lines) { - if ([line startsWith:@"[Info]"]) { - hasInfo = YES; - continue; - } - if (hasInfo && [line startsWith:@"Name="]) { - NSString *value = [[[line substringFromIndex:5] componentsSeparatedByString:@","] objectAtIndex:0]; - packageName = [NSString stringWithString:[value stringByReplacingOccurrencesOfString:@"\"" withString:@""]]; - break; - } + NSString *path = [[self keymanDataPath] stringByAppendingPathComponent:packageFolder]; + KMPackageInfo *packageInfo = [self.packageReader loadPackageInfo:path]; + + if (packageInfo) { + packageName = packageInfo.packageName; } - - if (packageName == nil) - packageName = packageFolder; - + return packageName; } - (NSArray *)keyboardNamesFromFolder:(NSString *)packageFolder { NSMutableArray *kbNames = [[NSMutableArray alloc] initWithCapacity:0];; for (NSString *kmxFile in [self KMXFilesAtPath:packageFolder]) { - NSDictionary * infoDict = [KMXFile infoDictionaryFromFilePath:kmxFile]; + NSDictionary * infoDict = [KMXFile keyboardInfoFromKmxFile:kmxFile]; if (infoDict != nil) { NSString *name = [infoDict objectForKey:kKMKeyboardNameKey]; if (name != nil && [name length]) { @@ -643,155 +633,6 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return kbNames; } -- (NSDictionary *)infoDictionaryFromFile:(NSString *)infoFile { - NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithCapacity:0]; - NSMutableArray *files = [NSMutableArray arrayWithCapacity:0]; - NSMutableArray *fonts = [NSMutableArray arrayWithCapacity:0]; - NSMutableArray *kbs = [NSMutableArray arrayWithCapacity:0]; - - @try { - NSString *fileContents = [[NSString stringWithContentsOfFile:infoFile encoding:NSWindowsCP1252StringEncoding error:NULL] stringByReplacingOccurrencesOfString:@"\r" withString:@""]; - NSArray *lines = [fileContents componentsSeparatedByString:@"\n"]; - ContentType contentType = ctUnknown; - for (NSString *line in lines) { - if (!line.length) - continue; - - if ([line startsWith:kPackage]) { - contentType = ctPackage; - continue; - } - else if ([line startsWith:kButtons]) { - contentType = ctButtons; - continue; - } - else if ([line startsWith:kStartMenu]) { - contentType = ctStartMenu; - continue; - } - else if ([line startsWith:kStartMenuEntries]) { - contentType = ctStartMenuEntries; - continue; - } - else if ([line startsWith:kInfo]) { - contentType = ctInfo; - continue; - } - else if ([line startsWith:kFiles]) { - contentType = ctFiles; - continue; - } - - switch (contentType) { - case ctPackage: { - if ([line startsWith:kReadMeFile]) - [infoDict setObject:[line substringFromIndex:kReadMeFile.length+1] forKey:kReadMeFile]; - else if ([line startsWith:kGraphicFile]) - [infoDict setObject:[line substringFromIndex:kGraphicFile.length+1] forKey:kGraphicFile]; - - break; - } - case ctButtons: - break; - case ctStartMenu: - break; - case ctStartMenuEntries: { - if ([line startsWith:kWelcome]) { - NSString *s = [line substringFromIndex:kWelcome.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [infoDict setObject:@[v1, v2] forKey:kWelcome]; - } - - break; - } - case ctInfo: { - if ([line startsWith:kName]) { - NSString *s = [line substringFromIndex:kName.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [infoDict setObject:@[v1, v2] forKey:kName]; - } - else if ([line startsWith:kVersion]) { - NSString *s = [line substringFromIndex:kVersion.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [infoDict setObject:@[v1, v2] forKey:kVersion]; - } - else if ([line startsWith:kAuthor]) { - NSString *s = [line substringFromIndex:kAuthor.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [infoDict setObject:@[v1, v2] forKey:kAuthor]; - } - else if ([line startsWith:kCopyright]) { - NSString *s = [line substringFromIndex:kCopyright.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [infoDict setObject:@[v1, v2] forKey:kCopyright]; - } - else if ([line startsWith:kWebSite]) { - NSString *s = [line substringFromIndex:kWebSite.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [infoDict setObject:@[v1, v2] forKey:kWebSite]; - } - - break; - } - case ctFiles: { - NSUInteger x = [line rangeOfString:@"="].location; - if (x == NSNotFound) - continue; - - NSString *s = [line substringFromIndex:x+2]; - if ([s startsWith:kFile]) { - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFile.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [files addObject:@[v1, v2]]; - } - else if ([s startsWith:kFont]) { - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFont.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [fonts addObject:@[v1, v2]]; - } - else if ([s startsWith:kKeyboard]) { - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kKeyboard.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [kbs addObject:@[v1, v2]]; - } - - break; - } - default: - break; - } - } - } - @catch (NSException *e) { - NSLog(@"Error = %@", e.description); - return nil; - } - - if (files.count) - [infoDict setValue:files forKey:kFile]; - if (fonts.count) - [infoDict setValue:fonts forKey:kFont]; - if (kbs.count) - [infoDict setValue:kbs forKey:kKeyboard]; - - return infoDict.count?[NSDictionary dictionaryWithDictionary:infoDict]:nil; -} - - (NSString *)selectedKeyboard { if (_selectedKeyboard == nil) { NSUserDefaults *userData = [NSUserDefaults standardUserDefaults]; @@ -907,7 +748,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSInteger itag = 1000; [keyboards.submenu removeAllItems]; for (NSString *path in self.activeKeyboards) { - NSDictionary *infoDict = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *infoDict = [KMXFile keyboardInfoFromKmxFile:path]; if (!infoDict) continue; //NSString *str = [NSString stringWithFormat:@"%@ (%@)", [infoDict objectForKey:kKMKeyboardNameKey], [infoDict objectForKey:kKMKeyboardVersionKey]]; @@ -918,7 +759,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef [item setState:NSOnState]; KMXFile *kmx = [[KMXFile alloc] initWithFilePath:path]; [self setKmx:kmx]; - NSDictionary *kmxInfo = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *kmxInfo = [KMXFile keyboardInfoFromKmxFile:path]; NSString *kvkFilename = [kmxInfo objectForKey:kKMVisualKeyboardKey]; if (kvkFilename != nil) { NSString *kvkFilePath = [self kvkFilePathFromFilename:kvkFilename]; @@ -953,7 +794,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSString *path = [self.activeKeyboards objectAtIndex:0]; KMXFile *kmx = [[KMXFile alloc] initWithFilePath:path]; [self setKmx:kmx]; - NSDictionary *kmxInfo = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *kmxInfo = [KMXFile keyboardInfoFromKmxFile:path]; NSString *kvkFilename = [kmxInfo objectForKey:kKMVisualKeyboardKey]; if (kvkFilename != nil) { NSString *kvkFilePath = [self kvkFilePathFromFilename:kvkFilename]; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m index 5be21b2240..b77243aac0 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m @@ -8,11 +8,12 @@ #import "KMKeyboardHelpWindowController.h" #import "KMInputMethodAppDelegate.h" +#import "KMPackageInfo.h" #import @interface KMKeyboardHelpWindowController () @property (nonatomic, weak) IBOutlet WebView *welcomeView; -@property (nonatomic, strong) NSDictionary *infoDict; +@property (nonatomic, strong) KMPackageInfo *packageInfo; @end @implementation KMKeyboardHelpWindowController @@ -30,10 +31,10 @@ - (void)setPackagePath:(NSString *)packagePath { _packagePath = packagePath; - _infoDict = nil; + _packageInfo = nil; if (packagePath != nil && packagePath.length) { @try { - NSString *title = [[self.infoDict objectForKey:kName] objectAtIndex:0]; + NSString *title = self.packageInfo.packageName; if (title.length) [self.window setTitle:title]; } @@ -49,13 +50,12 @@ } } -- (NSDictionary *)infoDict { - if (_infoDict == nil) { - NSString *infoFile = [self.packagePath stringByAppendingPathComponent:@"kmp.inf"]; - _infoDict = [self.AppDelegate infoDictionaryFromFile:infoFile]; +- (KMPackageInfo*)packageInfo { + if(_packageInfo == nil) { + _packageInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; } - return _infoDict; + return _packageInfo; } - (IBAction)okAction:(id)sender { diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h new file mode 100644 index 0000000000..96adc5ff24 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h @@ -0,0 +1,55 @@ +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * KMKeyboardInfo.h + * Keyman + * + * Created by Shawn Schantz on 2021/11/25. + * + * Value object describing a keyboard element of a Keyman package. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface KMKeyboardInfoBuilder : NSObject +@property (nonatomic,copy) NSString* name; +@property (nonatomic,copy) NSString* identifier; +@property (nonatomic,copy) NSString* version; +@property (nonatomic,copy) NSString* oskFont; +@property (nonatomic,copy) NSString* displayFont; +@property (nonatomic,copy) NSArray* languages; + +- (instancetype)init; + +@end + +@interface KMLanguageInfo : NSObject +@property (nonatomic,readonly) NSString* name; +@property (nonatomic,readonly) NSString* identifier; + +- (instancetype)initWithName:(NSString*)name + identifier:(NSString*)identifier; +@end + +@interface KMKeyboardInfo : NSObject +@property (nonatomic,readonly) NSString* name; +@property (nonatomic,readonly) NSString* identifier; +@property (nonatomic,readonly) NSString* version; +@property (nonatomic,readonly) NSString* oskFont; +@property (nonatomic,readonly) NSString* displayFont; +@property (nonatomic,readonly) NSArray* languages; + +- (instancetype)initWithBuilder:(KMKeyboardInfoBuilder*)builder; + +- (instancetype)initWithName:(NSString*)name + identifier:(NSString*)identifier + version:(NSString*)version + oskFont:(NSString*)oskFont + displayFont:(NSString*)displayFont + languages:(NSArray*)languages; + +@end + +NS_ASSUME_NONNULL_END diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m new file mode 100644 index 0000000000..e9cad434b7 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m @@ -0,0 +1,79 @@ +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * KMKeyboardInfo.m + * Keyman + * + * Created by Shawn Schantz on 2021/11/25. + * + * Value object describing a keyboard element of a Keyman package. + */ + +#import "KMKeyboardInfo.h" + +@implementation KMKeyboardInfoBuilder +- (instancetype)init { + self = [super init]; + if (self) { + _name = nil; + _identifier = nil; + _version = nil; + _oskFont = nil; + _displayFont = nil; + _languages = nil; + } + return self; +} +@end + + +@implementation KMLanguageInfo + +- (instancetype)initWithName:(NSString*)name + identifier:(NSString*)identifier +{ + self = [super init]; + if (self) { + _name = [name copy]; + _identifier = [identifier copy]; + } + return self; +} + +@end + +@implementation KMKeyboardInfo + +- (instancetype)initWithBuilder:(KMKeyboardInfoBuilder *)builder { + self = [super init]; + if (self) { + _name = builder.name; + _identifier = builder.identifier; + _version = builder.version; + _oskFont = builder.oskFont; + _displayFont = builder.displayFont; + _languages = builder.languages; + } + return self; +} + +- (instancetype)initWithName:(NSString*)name + identifier:(NSString*)identifier + version:(NSString*)version + oskFont:(NSString*)oskFont + displayFont:(NSString*)displayFont + languages:(NSArray*)languages +{ + self = [super init]; + if (self) { + _name = [name copy]; + _identifier = [identifier copy]; + _version = [version copy]; + _oskFont = [oskFont copy]; + _displayFont = [displayFont copy]; + _languages = [languages copy]; + } + return self; +} + +@end diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h new file mode 100644 index 0000000000..1d466b439d --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h @@ -0,0 +1,69 @@ +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * KMPackageInfo.h + * Keyman + * + * Created by Shawn Schantz on 2021/11/22. + * + * Value object describing a Keyman package. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface KMPackageInfoBuilder : NSObject +@property (nonatomic,copy) NSString* packageName; +@property (nonatomic,copy) NSString* packageVersion; +@property (nonatomic,copy) NSString* readmeFilename; +@property (nonatomic,copy) NSString* graphicFilename; +@property (nonatomic,copy) NSString* fileVersion; +@property (nonatomic,copy) NSString* keymanDeveloperVersion; +@property (nonatomic,copy) NSString* copyright; +@property (nonatomic,copy) NSString* authorName; +@property (nonatomic,copy) NSString* authorUrl; +@property (nonatomic,copy) NSString* website; +@property (nonatomic,copy) NSArray* keyboards; +@property (nonatomic,copy) NSArray* files; +@property (nonatomic,copy) NSArray* fonts; + +- (instancetype)init; + +@end + + +@interface KMPackageInfo : NSObject +@property (nonatomic,readonly) NSString* packageName; +@property (nonatomic,readonly) NSString* packageVersion; +@property (nonatomic,readonly) NSString* readmeFilename; +@property (nonatomic,readonly) NSString* graphicFilename; +@property (nonatomic,readonly) NSString* fileVersion; +@property (nonatomic,readonly) NSString* keymanDeveloperVersion; +@property (nonatomic,readonly) NSString* copyright; +@property (nonatomic,readonly) NSString* authorName; +@property (nonatomic,readonly) NSString* authorUrl; +@property (nonatomic,readonly) NSString* website; +@property (nonatomic,readonly) NSArray* keyboards; +@property (nonatomic,readonly) NSArray* files; +@property (nonatomic,readonly) NSArray* fonts; + +- (instancetype)initWithBuilder:(KMPackageInfoBuilder *)builder; + +- (instancetype)initWithName:(NSString*)packageName + packageVersion:(NSString*)packageVersion + readmeFilename:(NSString*)readmeFilename + graphicFilename:(NSString*)graphicFilename + fileVersion:(NSString*)fileVersion + keymanDeveloperVersion:(NSString*)keymanDeveloperVersion + copyright:(NSString*)copyright + authorName:(NSString*)authorName + authorUrl:(NSString*)authorUrl + website:(NSString*)website + keyboards:(NSArray*)keyboards + fonts:(NSArray*)fonts + files:(NSArray*)files; + +@end + +NS_ASSUME_NONNULL_END diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m new file mode 100644 index 0000000000..cbec2199b5 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m @@ -0,0 +1,91 @@ +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * KMPackageInfo.m + * Keyman + * + * Created by Shawn Schantz on 2021/11/22. + * + * Value object describing a Keyman package. + */ + +#import "KMPackageInfo.h" + +@implementation KMPackageInfoBuilder +- (instancetype)init { + self = [super init]; + if (self) { + _packageName = nil; + _packageVersion = nil; + _readmeFilename = nil; + _graphicFilename = nil; + _fileVersion = nil; + _keymanDeveloperVersion = nil; + _copyright = nil; + _authorName = nil; + _authorUrl = nil; + _website = nil; + _keyboards = nil; + _fonts = nil; + _files = nil; + } + return self; +} +@end + +@implementation KMPackageInfo + +- (instancetype)initWithBuilder:(KMPackageInfoBuilder *)builder { + self = [super init]; + if (self) { + _packageName = builder.packageName; + _packageVersion = builder.packageVersion; + _readmeFilename = builder.readmeFilename; + _graphicFilename = builder.graphicFilename; + _fileVersion = builder.fileVersion; + _keymanDeveloperVersion = builder.keymanDeveloperVersion; + _copyright = builder.copyright; + _authorName = builder.authorName; + _authorUrl = builder.authorUrl; + _website = builder.website; + _keyboards = builder.keyboards; + _fonts = builder.fonts; + _files = builder.files; + } + return self; +} + +- (instancetype)initWithName:(NSString*)packageName + packageVersion:(NSString*)packageVersion + readmeFilename:(NSString*)readmeFilename + graphicFilename:(NSString*)graphicFilename + fileVersion:(NSString*)fileVersion + keymanDeveloperVersion:(NSString*)keymanDeveloperVersion + copyright:(NSString*)copyright + authorName:(NSString*)authorName + authorUrl:(NSString*)authorUrl + website:(NSString*)website + keyboards:(NSArray*)keyboards + fonts:(NSArray*)fonts + files:(NSArray*)files +{ + self = [super init]; + if (self) { + _packageName = [packageName copy]; + _packageVersion = [packageVersion copy]; + _readmeFilename = [readmeFilename copy]; + _graphicFilename = [graphicFilename copy]; + _fileVersion = [fileVersion copy]; + _keymanDeveloperVersion = [keymanDeveloperVersion copy]; + _copyright = [copyright copy]; + _authorName = [authorName copy]; + _authorUrl = [authorUrl copy]; + _website = [website copy]; + _keyboards = [keyboards copy]; + _fonts = [fonts copy]; + _files = [files copy]; + } + return self; +} + +@end diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.h b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.h new file mode 100644 index 0000000000..2c138d8215 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.h @@ -0,0 +1,29 @@ +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * KMPackageReader.m + * Keyman + * + * Created by Shawn Schantz on 2021/12/06. + * + * Read package information from kmp.json, if it exists. If not, read from kmp.inf. + * Then create and return KMPackageInfo object. + * + */ + +#import "KMPackageInfo.h" +#import "KMKeyboardInfo.h" +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface KMPackageReader : NSObject + +@property (assign, nonatomic) BOOL debugMode; + +- (instancetype)init; +- (KMPackageInfo *)loadPackageInfo:(NSString *)path; + +@end + +NS_ASSUME_NONNULL_END diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m new file mode 100644 index 0000000000..103430c2f5 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m @@ -0,0 +1,337 @@ +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * KMPackageReader.m + * Keyman + * + * Created by Shawn Schantz on 2021/12/06. + * + * Read package information from kmp.json, if it exists. If not, read from kmp.inf. + * Then create and return KMPackageInfo object. + * + */ + +#import "KMPackageReader.h" + +static NSString *const kPackageJsonFile = @"kmp.json"; +static NSString *const kPackageInfFile = @"kmp.inf"; + +static NSString *const kPackage = @"[Package]"; +static NSString *const kButtons = @"[Buttons]"; +static NSString *const kStartMenu = @"[StartMenu]"; +static NSString *const kStartMenuEntries = @"[StartMenuEntries]"; +static NSString *const kInfo = @"[Info]"; +static NSString *const kFiles = @"[Files]"; + +static NSString *const kAuthor = @"Author"; +static NSString *const kCopyright = @"Copyright"; +static NSString *const kFile = @"File"; +static NSString *const kFont = @"Font"; +static NSString *const kGraphicFile = @"GraphicFile"; +static NSString *const kKeyboard = @"Keyboard"; +static NSString *const kName = @"Name"; +static NSString *const kReadMeFile = @"ReadMeFile"; +static NSString *const kVersion = @"Version"; +static NSString *const kWebSite = @"WebSite"; +static NSString *const kWelcome = @"Welcome"; + +typedef enum { + ctPackage, ctButtons, ctStartMenu, ctStartMenuEntries, ctInfo, ctFiles, ctUnknown +} ContentType; + +@implementation KMPackageReader + +- (instancetype)init { + self = [super init]; + if (self) { + _debugMode = NO; + } + return self; +} + +/** + * Attempt to load Keyman Package Information from kmp.json. + * If kmp.json file is not found or not readable, load from legacy kmp.inf file. + * @param the full path of the package folder. + */ +- (KMPackageInfo *)loadPackageInfo:(NSString *)path { + KMPackageInfo *packageInfo = nil; + NSString *jsonFilename = [path stringByAppendingPathComponent:kPackageJsonFile]; + + packageInfo = [self loadPackageInfoFromJsonFile:jsonFilename]; + + if (packageInfo == nil) { + NSString *infoFilename = [path stringByAppendingPathComponent:kPackageInfFile]; + packageInfo = [self loadPackageInfoFromInfFile:infoFilename]; + } + + return packageInfo; +} + +- (NSString *)packageNameFromPackageInfo:(NSString *)path { + NSString *packageName = nil; + + KMPackageInfo *packageInfo = [self loadPackageInfo:path]; + packageName = packageInfo.packageName; + + return packageName; +} + + /** + * read JSON file and load it into KMPackageInfo object + * returns nil if the file does not exist or it cannot be parsed as JSON + */ +- (KMPackageInfo *) loadPackageInfoFromJsonFile:(NSString *)path { + KMPackageInfo * packageInfo = nil; + + if (self.debugMode) + NSLog(@"Loading JSON package info from path: %@", path); + NSError *readError = nil; + NSData *data = [NSData dataWithContentsOfFile:path options:kNilOptions error:&readError]; + NSDictionary *parsedData = nil; + + if (data == nil) { + NSLog(@"Error reading JSON file at path : %@, error: %@ ", path, readError); + } else { + NSError *parseError = nil; + parsedData = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&parseError]; + + if (parsedData == nil) { + NSLog(@"Error parsing JSON file at path : %@, error: %@ ", path, parseError); + } else { + packageInfo = [self createPackageInfoFromJsonData:parsedData]; + } + } + + return packageInfo; +} + +/** + * Creates a KeyboardInfo object using data loaded from kmp.json. + * @param keyboard an NSDictionary containing all the key-value pairs of a keyboard object from the kmp.json keyboards array + * @return the corresponding KeyboardInfo value object + */ +- (KMKeyboardInfo *) createKeyboardInfoFromJsonKeyboard:(NSDictionary *) keyboard { + + KMKeyboardInfoBuilder *builder = [[KMKeyboardInfoBuilder alloc] init]; + + NSArray *languages = keyboard[@"languages"]; + NSMutableArray *languageInfoArray = [NSMutableArray arrayWithCapacity:0]; + + for (NSDictionary *language in languages) { + KMLanguageInfo *languageInfo = [[KMLanguageInfo alloc] initWithName:language[@"name"] + identifier:language[@"id"]]; + + [languageInfoArray addObject:languageInfo]; + } + + builder.name = keyboard[@"name"]; + builder.identifier = keyboard[@"id"]; + builder.version = keyboard[@"version"]; + builder.oskFont = keyboard[@"oskFont"]; + builder.displayFont = keyboard[@"displayFont"]; + builder.languages = [languageInfoArray copy]; + + KMKeyboardInfo *keyboardInfo = [[KMKeyboardInfo alloc] initWithBuilder:builder]; + return keyboardInfo; +} + +- (KMPackageInfo *) createPackageInfoFromJsonData:(NSDictionary *) jsonData { + + NSMutableArray *keyboardInfoArray = [NSMutableArray arrayWithCapacity:0]; + NSMutableArray *fontArray = [NSMutableArray arrayWithCapacity:0]; + NSArray *keyboards = jsonData[@"keyboards"]; + + // loop through keyboards array to add keyboards, + // then loop through each keyboard's languages array to add languages + + for (NSDictionary *keyboard in keyboards) { + KMKeyboardInfo *keyboardInfo = [self createKeyboardInfoFromJsonKeyboard:keyboard]; + + // add oskFont to fontArray if not nil or empty string + if ([keyboardInfo.oskFont length]) { + [fontArray addObject:keyboardInfo.oskFont]; + } + + // add displayFont to fontArray if not not nil or empty string and not equal to oskFont + if ([keyboardInfo.displayFont length] && + ![keyboardInfo.displayFont isEqualToString:keyboardInfo.displayFont]) { + [fontArray addObject:keyboardInfo.displayFont]; + } + + [keyboardInfoArray addObject:keyboardInfo]; + } + + KMPackageInfoBuilder *builder = + [[KMPackageInfoBuilder alloc] init]; + + builder.packageName = jsonData[@"info"][@"name"][@"description"]; + builder.packageVersion = jsonData[@"info"][@"version"][@"description"]; + builder.readmeFilename = jsonData[@"options"][@"readmeFile"]; + builder.graphicFilename = jsonData[@"options"][@"graphicFile"]; + builder.fileVersion = jsonData[@"system"][@"fileVersion"]; + builder.keymanDeveloperVersion = jsonData[@"system"][@"keymanDeveloperVersion"]; + builder.copyright = jsonData[@"info"][@"copyright"][@"description"]; + builder.authorName = jsonData[@"info"][@"author"][@"description"]; + builder.authorUrl = jsonData[@"info"][@"author"][@"url"]; + builder.website = jsonData[@"info"][@"website"][@"url"]; + builder.keyboards = [keyboardInfoArray copy]; + builder.fonts = [fontArray copy]; + + KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithBuilder:builder]; + + return packageInfo; +} + +// TODO: refactor, break up and eliminate duplicate code +/** + * Creates a KMPackageInfo object from the specified kmp.inf file. + * This code is adapted from legacy method keyboardInfoFromInfFile that loaded data from inf file to NSDictionary. + * + * @param path the full path to the kmp.inf file + * @return the corresponding PackageInfo value object or nil if the file cannot be found or parsed +*/ +- (KMPackageInfo *) loadPackageInfoFromInfFile:(NSString *)path { + if (self.debugMode) + NSLog(@"Loading inf package info from path: %@", path); + + NSMutableArray *files = [NSMutableArray arrayWithCapacity:0]; + NSMutableArray *keyboardInfoArray = [NSMutableArray arrayWithCapacity:0]; + NSMutableArray *fontArray = [NSMutableArray arrayWithCapacity:0]; + KMPackageInfoBuilder *builder = [[KMPackageInfoBuilder alloc] init]; + + @try { + NSString *fileContents = [[NSString stringWithContentsOfFile:path encoding:NSWindowsCP1252StringEncoding error:NULL] stringByReplacingOccurrencesOfString:@"\r" withString:@""]; + NSArray *lines = [fileContents componentsSeparatedByString:@"\n"]; + ContentType contentType = ctUnknown; + for (NSString *line in lines) { + if (!line.length) + continue; + + if ([[line lowercaseString] hasPrefix:[kPackage lowercaseString]]) { + contentType = ctPackage; + continue; + } + else if ([[line lowercaseString] hasPrefix:[kButtons lowercaseString]]) { + contentType = ctButtons; + continue; + } + else if ([[line lowercaseString] hasPrefix:[kStartMenu lowercaseString]]) { + contentType = ctStartMenu; + continue; + } + else if ([[line lowercaseString] hasPrefix:[kStartMenuEntries lowercaseString]]) { + contentType = ctStartMenuEntries; + continue; + } + else if ([[line lowercaseString] hasPrefix:[kInfo lowercaseString]]) { + contentType = ctInfo; + continue; + } + else if ([[line lowercaseString] hasPrefix:[kFiles lowercaseString]]) { + contentType = ctFiles; + continue; + } + + switch (contentType) { + case ctPackage: { + if ([[line lowercaseString] hasPrefix:[kReadMeFile lowercaseString]]) + builder.readmeFilename = [line substringFromIndex:kReadMeFile.length+1]; + else if ([[line lowercaseString] hasPrefix:[kGraphicFile lowercaseString]]) + builder.graphicFilename = [line substringFromIndex:kGraphicFile.length+1]; + break; + } + case ctButtons: + break; + case ctStartMenu: + break; + case ctStartMenuEntries: + break; + case ctInfo: { + if ([[line lowercaseString] hasPrefix:[kName lowercaseString]]) { + NSString *s = [line substringFromIndex:kName.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + builder.packageName = v1; + } + else if ([[line lowercaseString] hasPrefix:[kVersion lowercaseString]]) { + NSString *s = [line substringFromIndex:kVersion.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + builder.packageVersion = v1; + } + else if ([[line lowercaseString] hasPrefix:[kAuthor lowercaseString]]) { + NSString *s = [line substringFromIndex:kAuthor.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + builder.authorName = v1; + builder.authorUrl = v2; + } + else if ([[line lowercaseString] hasPrefix:[kCopyright lowercaseString]]) { + NSString *s = [line substringFromIndex:kCopyright.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + builder.copyright = v1; + } + else if ([[line lowercaseString] hasPrefix:[kWebSite lowercaseString]]) { + NSString *s = [line substringFromIndex:kWebSite.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + builder.website = v1; + } + + break; + } + case ctFiles: { + NSUInteger x = [line rangeOfString:@"="].location; + if (x == NSNotFound) + continue; + + NSString *s = [line substringFromIndex:x+2]; + if ([[s lowercaseString] hasPrefix:[kFile lowercaseString]]) { + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFile.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *fileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + [files addObject:fileName]; + } + else if ([[s lowercaseString] hasPrefix:[kFont lowercaseString]]) { + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *fontName = [[[vs objectAtIndex:0] substringFromIndex:kFont.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *fontFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + [fontArray addObject:fontName]; + } + else if ([[s lowercaseString] hasPrefix:[kKeyboard lowercaseString]]) { + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *keyboardName = [[[vs objectAtIndex:0] substringFromIndex:kKeyboard.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *keyboardFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + + KMKeyboardInfoBuilder *builder = [[KMKeyboardInfoBuilder alloc] init]; + builder.name = keyboardName; + KMKeyboardInfo *keyboardInfo = [[KMKeyboardInfo alloc] initWithBuilder:builder]; + [keyboardInfoArray addObject:keyboardInfo]; + } + + break; + } + default: + break; + } + } + } + @catch (NSException *e) { + NSLog(@"Error = %@", e.description); + return nil; + } + + builder.keyboards = keyboardInfoArray; + builder.fonts = fontArray; + KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithBuilder:builder]; + return packageInfo; +} + +@end diff --git a/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.h b/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.h index b94c8aab86..01ba394582 100644 --- a/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.h +++ b/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.h @@ -45,7 +45,7 @@ extern NSString *const kKMVisualKeyboardKey; * \param path KMX file path * \returns NSDictionary with keyboard name, version, copyright & icon. */ -+ (NSDictionary *)infoDictionaryFromFilePath:(NSString *)path; ++ (NSDictionary *)keyboardInfoFromKmxFile:(NSString *)path; @end diff --git a/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.m b/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.m index a467309a11..ddc36a848d 100644 --- a/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.m +++ b/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.m @@ -163,8 +163,9 @@ NSString *const kKMVisualKeyboardKey = @"KMVisualKeyboardKey"; return YES; } -+ (NSDictionary *)infoDictionaryFromFilePath:(NSString *)path { ++ (NSDictionary *)keyboardInfoFromKmxFile:(NSString *)path { NSFileHandle *file = [NSFileHandle fileHandleForReadingAtPath:path]; + if (file == nil) { //NSLog(@"Failed to open file"); return nil; @@ -206,7 +207,7 @@ NSString *const kKMVisualKeyboardKey = @"KMVisualKeyboardKey"; if (cmp_str[i].dwSystemID == TSS_VISUALKEYBOARD) visualKeyboard = [KMXFile UTF16StringWithPointer:cmp_str[i].dpString inFile:file]; } - + [file seekToFileOffset:cmp_kb.dpBitmapOffset]; NSData *bitmapData = [file readDataOfLength:cmp_kb.dwBitmapSize]; NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:bitmapData]; @@ -214,8 +215,9 @@ NSString *const kKMVisualKeyboardKey = @"KMVisualKeyboardKey"; [file closeFile]; - if (!nameStr || !nameStr.length) + if (!nameStr || !nameStr.length) { nameStr = [path.lastPathComponent stringByReplacingOccurrencesOfString:@".kmx" withString:@""]; + } if (!verStr) verStr = @""; if (!copyrightStr) diff --git a/oem/firstvoices/windows/src/inst/Makefile b/oem/firstvoices/windows/src/inst/Makefile index be9f4ad9f6..1c62b64ab1 100644 --- a/oem/firstvoices/windows/src/inst/Makefile +++ b/oem/firstvoices/windows/src/inst/Makefile @@ -21,19 +21,18 @@ manual-setup: check setup setup: desktop prereq: - # - # Prepare make file to copy versioned filenames to release folder - # - +# +# Prepare make file to copy versioned filenames to release folder +# cd $(FVROOT)\src\inst $(MKVER_U) download.in download.mak cd $(FVROOT)\src\xml $(MKVER_U) sentry.init.js.in sentry.init.js - # - # Build FirstVoices keyboards fv_all.kmp - # +# +# Build FirstVoices keyboards fv_all.kmp +# cd $(KEYMAN_ROOT)\..\keyboards diff --git a/resources/gosh/package-lock.json b/resources/gosh/package-lock.json index 7d5aba26a4..49c2cec8d5 100644 --- a/resources/gosh/package-lock.json +++ b/resources/gosh/package-lock.json @@ -1,5 +1,5 @@ { "name": "@keymanapp/resources-gosh", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 1 } diff --git a/resources/gosh/package.json b/resources/gosh/package.json index 60ec62475b..f0f90aed2e 100644 --- a/resources/gosh/package.json +++ b/resources/gosh/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/resources-gosh", - "version": "15.0.166", + "version": "15.0.171", "description": "Good Ol' Shell", "author": "Marc Durdin (https://github.com/mcdurdin)", "contributors": [ diff --git a/resources/web-environment/package-lock.json b/resources/web-environment/package-lock.json index 98939dc977..fddbcd61d9 100644 --- a/resources/web-environment/package-lock.json +++ b/resources/web-environment/package-lock.json @@ -1,5 +1,5 @@ { "name": "@keymanapp/web-environment", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 1 } diff --git a/resources/web-environment/package.json b/resources/web-environment/package.json index 6e683278a2..d29104f85b 100644 --- a/resources/web-environment/package.json +++ b/resources/web-environment/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-environment", - "version": "15.0.166", + "version": "15.0.171", "description": "A compilation utility for passing select environment variables into our TS builds", "author": "Joshua Horton (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": "^15.0.166" + "@keymanapp/resources-gosh": "^15.0.171" } } diff --git a/web/package-lock.json b/web/package-lock.json index 59958205c5..757d13eeb4 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,6 +1,6 @@ { "name": "keyman", - "version": "15.0.166", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/web/package.json b/web/package.json index ad2bed2d02..046a28405c 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "keyman", - "version": "15.0.166", + "version": "15.0.171", "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": "^15.0.166", - "@keymanapp/web-sentry-manager": "^15.0.166", + "@keymanapp/resources-gosh": "^15.0.171", + "@keymanapp/web-sentry-manager": "^15.0.171", "@sentry/cli": "^1.52.3", "chai": "^4.3.4", "google-closure-compiler-java": "^20200224.0.0", @@ -52,13 +52,13 @@ "sentry-cli": "sentry-cli" }, "dependencies": { - "@keymanapp/input-processor": "^15.0.166", - "@keymanapp/keyboard-processor": "^15.0.166", - "@keymanapp/lexical-model-layer": "^15.0.166", - "@keymanapp/models-types": "^15.0.166", - "@keymanapp/recorder-core": "^15.0.166", - "@keymanapp/web-environment": "^15.0.166", - "@keymanapp/web-utils": "^15.0.166", + "@keymanapp/input-processor": "^15.0.171", + "@keymanapp/keyboard-processor": "^15.0.171", + "@keymanapp/lexical-model-layer": "^15.0.171", + "@keymanapp/models-types": "^15.0.171", + "@keymanapp/recorder-core": "^15.0.171", + "@keymanapp/web-environment": "^15.0.171", + "@keymanapp/web-utils": "^15.0.171", "@types/node": "^11.9.4", "es6-shim": "^0.35.5", "eventemitter3": "^4.0.0" diff --git a/windows/src/.gitignore b/windows/src/.gitignore index c2a0d553e6..0be24640bc 100644 --- a/windows/src/.gitignore +++ b/windows/src/.gitignore @@ -30,7 +30,6 @@ global/delphi/cust/MessageIdentifierConsts.pas # These are built from corresponding manifest.in and version.in **/manifest.xml -**/version.rc # Breakpad files generated for Sentry **/*.sym diff --git a/windows/src/Defines.mak b/windows/src/Defines.mak index 47a81c6b19..1fc45fd19a 100644 --- a/windows/src/Defines.mak +++ b/windows/src/Defines.mak @@ -15,8 +15,10 @@ EXT=$(ROOT)\src\ext INCLUDE=$(ROOT)\src\global\inc;$(INCLUDE) !ifndef EXCLUDEPATHDEFINES +!ifndef NODELPHI !include $(ROOT)\src\PathDefines.mak !endif +!endif PROGRAM=$(ROOT)\bin BUILD=$(ROOT)\build @@ -28,26 +30,26 @@ INSTALLPATH_KEYMANDEVELOPER=%ProgramFiles(X86)%\Keyman\Keyman Developer INSTALLPATH_KEYMANENGINE=%CommonProgramFiles(X86)%\Keyman\Keyman Engine !IFDEF DEBUG - MAKEFLAG_DEBUG=-DDEBUG - DELPHI_MSBUILD_FLAG_DEBUG=/p:Config=Debug +MAKEFLAG_DEBUG="DEBUG=$(DEBUG)" +DELPHI_MSBUILD_FLAG_DEBUG="/p:Config=Debug" !ELSE - DELPHI_MSBUILD_FLAG_DEBUG=/p:Config=Release +DELPHI_MSBUILD_FLAG_DEBUG="/p:Config=Release" !ENDIF !IFDEF USERDEFINES - MAKEFLAG_USERDEFINES=-DUSERDEFINES +MAKEFLAG_USERDEFINES="USERDEFINES=$(USERDEFINES)" !ENDIF !IFDEF SC_TIMESTAMP - MAKEFLAG_SC_TIMESTAMP=-DSC_TIMESTAMP +MAKEFLAG_SC_TIMESTAMP="SC_TIMESTAMP=$(SC_TIMESTAMP)" !ENDIF !IFDEF BUILDHELP - MAKEFLAG_BUILDHELP=-DBUILDHELP +MAKEFLAG_BUILDHELP="BUILDHELP=$(BUILDHELP)" !ENDIF !IFDEF BUILDRTF - MAKEFLAG_BUILDRTF=-DBUILDRTF +MAKEFLAG_BUILDRTF="BUILDRTF=$(BUILDRTF)" !ENDIF !IFDEF REL_SUFFIX @@ -55,23 +57,23 @@ INSTALLPATH_KEYMANENGINE=%CommonProgramFiles(X86)%\Keyman\Keyman Engine !ENDIF !IFDEF LINT - MAKEFLAG_LINT=-DLINT +MAKEFLAG_LINT="LINT=$(LINT)" !ENDIF !IFDEF NOUI - MAKEFLAG_QUIET=-DNOUI +MAKEFLAG_QUIET="NOUI=$(NOUI)" !ELSE !IFDEF QUIET - MAKEFLAG_QUIET=-DQUIET +MAKEFLAG_QUIET="QUIET=$(QUIET)" !ENDIF !ENDIF !IFDEF RELEASE_OEM - MAKEFLAG_RELEASE_OEM=-DRELEASE_OEM +MAKEFLAG_RELEASE_OEM="RELEASE_OEM=$(RELEASE_OEM)" !ENDIF !IFDEF QUICK_BUILD_KEYMAN - MAKEFLAG_QUICK_BUILD_KEYMAN=-DQUICK_BUILD_KEYMAN +MAKEFLAG_QUICK_BUILD_KEYMAN="QUICK_BUILD_KEYMAN=$(QUICK_BUILD_KEYMAN)" !ENDIF # @@ -97,7 +99,7 @@ DCC32PATH=C:\Program Files (x86)\Embarcadero\Studio\$(DELPHI_VERSION)\bin # Pass local configuration through to sub-instances of MAKE # -MAKE="$(DCC32PATH)\make" -l $(MAKEFLAG_QUICK_BUILD_KEYMAN) $(MAKEFLAG_USERDEFINES) $(MAKEFLAG_DEBUG) $(MAKEFLAG_BUILDHELP) $(MAKEFLAG_BUILDRTF) $(MAKEFLAG_SC_TIMESTAMP) $(MAKEFLAG_LINT) $(MAKEFLAG_QUIET) $(MAKEFLAG_RELEASE_OEM) +MAKE="nmake" /C $(MAKEFLAG_QUICK_BUILD_KEYMAN) $(MAKEFLAG_USERDEFINES) $(MAKEFLAG_DEBUG) $(MAKEFLAG_BUILDHELP) $(MAKEFLAG_BUILDRTF) $(MAKEFLAG_SC_TIMESTAMP) $(MAKEFLAG_LINT) $(MAKEFLAG_QUIET) $(MAKEFLAG_RELEASE_OEM) # # Delphi build commands @@ -118,13 +120,13 @@ DELPHIWARNINGS=-W+MESSAGE_DIRECTIVE -W+IMPLICIT_STRING_CAST -W+IMPLICIT_STRING_C DELPHIWARNINGS=-W-MESSAGE_DIRECTIVE -W-IMPLICIT_STRING_CAST -W-IMPLICIT_STRING_CAST_LOSS -W-EXPLICIT_STRING_CAST -W-EXPLICIT_STRING_CAST_LOSS -W-CVT_WCHAR_TO_ACHAR -W-CVT_NARROWING_STRING_LOST -W-CVT_ACHAR_TO_WCHAR -W-CVT_WIDENING_STRING_LOST -W-UNICODE_TO_LOCALE -W-LOCALE_TO_UNICODE -W-IMPLICIT_VARIANTS -W-IMPLICIT_INTEGER_CAST_LOSS -W-IMPLICIT_CONVERSION_LOSS -W-COMBINING_SIGNED_UNSIGNED64 -W-COMBINING_SIGNED_UNSIGNED64 !ENDIF -DELPHIDPRPARAMS=-Q -B -GD -H -VT -$C+ -$D+ -$J+ -$L+ -$O+ -$Q- -$R- -$W+ -$Y+ -E. $(DELPHIWARNINGS) -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -R$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -NU.\obj\Win32\$(TARGET_PATH) -E.\bin\Win32\$(TARGET_PATH) -DELPHIDPRPARAMS64=-Q -B -GD -H -VT -$C+ -$D+ -$J+ -$L+ -$O+ -$Q- -$R- -$W+ -$Y+ -E. $(DELPHIWARNINGS) -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -R$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -NU.\obj\Win64\$(TARGET_PATH) -E.\bin\Win64\$(TARGET_PATH) -DELPHIDPKPARAMS=-Q -B -GD -VT -$C+ -$D+ -$J+ -$L+ -$O+ -$Q- -$R- -$W+ -$Y+ -E. $(DELPHIWARNINGS) -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -R$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -LE$(OUTLIB) -LN$(OUTLIB) -NSData -NUobj\Win32\$(TARGET_PATH) +DELPHIDPRPARAMS=-Q -B -GD -H -VT -^$C+ -^$D+ -^$J+ -^$L+ -^$O+ -^$Q- -^$R- -^$W+ -^$Y+ -E. $(DELPHIWARNINGS) -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -R$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -NU.\obj\Win32\$(TARGET_PATH) -E.\bin\Win32\$(TARGET_PATH) +DELPHIDPRPARAMS64=-Q -B -GD -H -VT -^$C+ -^$D+ -^$J+ -^$L+ -^$O+ -^$Q- -^$R- -^$W+ -^$Y+ -E. $(DELPHIWARNINGS) -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -R$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -NU.\obj\Win64\$(TARGET_PATH) -E.\bin\Win64\$(TARGET_PATH) +DELPHIDPKPARAMS=-Q -B -GD -VT -^$C+ -^$D+ -^$J+ -^$L+ -^$O+ -^$Q- -^$R- -^$W+ -^$Y+ -E. $(DELPHIWARNINGS) -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -R$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -LE$(OUTLIB) -LN$(OUTLIB) -NSData -NUobj\Win32\$(TARGET_PATH) !IFDEF NOUI -DCC32="$(DCC32PATH)\dcc32.exe" $(DELPHIDPRPARAMS) -DCC32DPK="$(DCC32PATH)\dcc32.exe" $(DELPHIDPKPARAMS) +DCC32=cmd /c "$(DCC32PATH)\dcc32.exe" $(DELPHIDPRPARAMS) +DCC32DPK=cmd /c "$(DCC32PATH)\dcc32.exe" $(DELPHIDPKPARAMS) !ELSE !IFDEF QUIET DCC32=@$(DEVTOOLS) -dccq $(DELPHIDPRPARAMS) @@ -141,8 +143,14 @@ DCC64="$(DCC32PATH)\dcc64.exe" $(DELPHIDPRPARAMS64) -N0x64\ -Ex64\ # Delphi MSBuild related commands and macros # -# Warning: whitespace is horribly significant in the following macro -- particularly lack of space before && -DELPHI_MSBUILD=set DCC32PATH=$(DCC32PATH)&& $(ROOT)\src\buildtools\msbuild-wrapper.bat $(DELPHI_MSBUILD_FLAG_DEBUG) +DELPHI_MSBUILD=$(ROOT)\src\buildtools\msbuild-wrapper.bat "$(DCC32PATH)" $(DELPHI_MSBUILD_FLAG_DEBUG) + +!IFDEF NODELPHI +DCC32=echo skipping +DCC32DPK=echo skipping +DCC64=echo skipping +DELPHI_MSBUILD=echo skipping +!ENDIF # Visual C++ x86, x64 WIN32_TARGET_PATH=bin\Win32\$(TARGET_PATH) @@ -170,11 +178,11 @@ MT=mt.exe VCBUILD=error !IFDEF DEBUG - MSBUILD_BUILD=/t:Build /p:Configuration=Debug - MSBUILD_CLEAN=/t:Clean /p:Configuration=Debug +MSBUILD_BUILD=/t:Build /p:Configuration=Debug +MSBUILD_CLEAN=/t:Clean /p:Configuration=Debug !ELSE - MSBUILD_BUILD=/t:Rebuild /p:Configuration=Release - MSBUILD_CLEAN=/t:Clean /p:Configuration=Release +MSBUILD_BUILD=/t:Rebuild /p:Configuration=Release +MSBUILD_CLEAN=/t:Clean /p:Configuration=Release !ENDIF COPY=copy @@ -186,7 +194,9 @@ WZUNZIP=$(WZZIPPATH) e # TDSPACK=error! $(ROOT)\src\buildtools\tdspack\tdspack -e # TDSPACKCOMPRESS=error! $(ROOT)\src\buildtools\tdspack\tdspack -o -TDS2DBG=$(ROOT)\bin\buildtools\tds2dbg +# we are using cmd /c because tds2dbg is failing on direct execution +# from nmake +TDS2DBG=cmd /c $(ROOT)\bin\buildtools\tds2dbg SENTRYTOOL=$(ROOT)\bin\buildtools\sentrytool SENTRYTOOL_DELPHIPREP=$(SENTRYTOOL) delphiprep -r $(KEYMAN_ROOT) -i $(DELPHIINCLUDES) @@ -205,14 +215,12 @@ WIXHEAT=$(WIXPATH)\heat.exe LINKPATH=link.exe -TORTOISEPROC=C:\Progra~1\TortoiseSVN\bin\TortoiseProc.exe - # # Certificates and code signing # !ifdef SIGNCODE_BUILD -MAKE=$(MAKE) -DSIGNCODE_BUILD +MAKE=$(MAKE) "SIGNCODE_BUILD=$(SIGNCODE_BUILD)" !else MAKE=$(MAKE) !endif @@ -252,25 +260,14 @@ PLATFORM=Win32 # in the same way as /resources/build/build-utils.sh. # -MKVER_APP=$(PROGRAM)\buildtools\mkver +!ifdef GIT_BASH_FOR_KEYMAN +MKVER_SH=$(GIT_BASH_FOR_KEYMAN) $(ROOT)\src\buildtools\mkver.sh +!else +MKVER_SH=start /wait $(ROOT)\src\buildtools\mkver.sh +!endif -!IFDEF VERSION_TXT_PATH -MKVER_VERSION_TXT=$(VERSION_TXT_PATH)\version.in -!ELSE -MKVER_VERSION_TXT=..\version.in -!ENDIF - -MKVER_TIER_MD=$(KEYMAN_ROOT)\TIER.md -MKVER_VERSION_MD=$(KEYMAN_ROOT)\VERSION.md - -MKVER_COMMON_PARAMS=-tier "$(MKVER_TIER_MD)" -version "$(MKVER_VERSION_MD)" - -# Update a version.rc file -MKVER_V=$(MKVER_APP) $(MKVER_COMMON_PARAMS) -v $(MKVER_VERSION_TXT) version.in version.rc -# Update a manifest.xml file -MKVER_M=$(MKVER_APP) $(MKVER_COMMON_PARAMS) -m manifest.in manifest.xml -# Token replacement for all other file types; pattern: $(MKVER_U) -MKVER_U=$(MKVER_APP) $(MKVER_COMMON_PARAMS) -u +MKVER_M=$(MKVER_SH) manifest.in manifest.xml +MKVER_U=$(MKVER_SH) # # Symstore @@ -294,10 +291,10 @@ KEYMAN_SYMSTOREPATH=$(KEYMAN_ROOT)\..\symbols # 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 +__VERSION_WITH_TAG=$(__VERSION_WITH_TAG)-local !ELSE !IFDEF TEAMCITY_PR_NUMBER - __VERSION_WITH_TAG=$(__VERSION_WITH_TAG)-test-$(TEAMCITY_PR_NUMBER) +__VERSION_WITH_TAG=$(__VERSION_WITH_TAG)-test-$(TEAMCITY_PR_NUMBER) !ENDIF !ENDIF @@ -308,3 +305,5 @@ SYMSTORE="C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /v "$(VERSION_WIN)" \ /c "Version: $(__VERSION_WITH_TAG)" \ /compress /f + +CLEAN=-del /S /Q diff --git a/windows/src/Header.mak b/windows/src/Header.mak index dee277efbc..549d6689e5 100644 --- a/windows/src/Header.mak +++ b/windows/src/Header.mak @@ -24,14 +24,14 @@ ROOT=c:\keyman\windows # build: $(BUILDPREREQ) - $(MAKE) -DTARGET=build $(TARGETS) + $(MAKE) "TARGET=build" $(TARGETS) !IFNDEF NOTARGET_SIGNCODE signcode: - $(MAKE) -DTARGET=signcode $(TARGETS) + $(MAKE) "TARGET=signcode" $(TARGETS) symbols: - $(MAKE) -DTARGET=symbols $(TARGETS) + $(MAKE) "TARGET=symbols" $(TARGETS) !ELSE signcode: rem no signcode required @@ -42,20 +42,20 @@ symbols: build-release: !IFDEF RELEASE_TARGETS - $(MAKE) -DTARGET=build-release $(RELEASE_TARGETS) + $(MAKE) "TARGET=build-release" $(RELEASE_TARGETS) !ELSE @rem !ENDIF clean: - $(MAKE) -DTARGET=clean $(TARGETS) $(CLEANS) + $(MAKE) "TARGET=clean" $(TARGETS) $(CLEANS) install: - $(MAKE) -DTARGET=install $(TARGETS) + $(MAKE) "TARGET=install" $(TARGETS) test-manifest: !IFDEF MANIFESTS - $(MAKE) -DTARGET=test-manifest $(MANIFESTS) + $(MAKE) "TARGET=test-manifest" $(MANIFESTS) !ELSE - $(MAKE) -DTARGET=test-manifest $(TARGETS) + $(MAKE) "TARGET=test-manifest" $(TARGETS) !ENDIF \ No newline at end of file diff --git a/windows/src/Makefile b/windows/src/Makefile index 4b35eac954..482f913c51 100644 --- a/windows/src/Makefile +++ b/windows/src/Makefile @@ -6,7 +6,7 @@ default: @echo The following make targets are available: - @echo . build builds everything except help files (-DBUILDHELP to build help) + @echo . build builds everything except help files (BUILDHELP=1 to build help) @echo . install installs packages into Delphi IDE (run after a build) @echo . clean removes all temp files @echo . release make a release @@ -18,7 +18,7 @@ default: @echo . DEBUG Include debug information @echo . SC_TIMESTAMP Don't timestamp certificates (for internal releases only, offline) @echo . BUILDHELP Build the helpfiles (implicit when 'make release') - @echo . LINT Turns on $MESSAGE hints and warnings and all extra string warnings + @echo . LINT Turns on ^$MESSAGE hints and warnings and all extra string warnings @echo . QUIET Ignore hints and warnings @echo . RELEASE_OEM Build executables for third party products in oem folder (e.g. FirstVoices) @echo. @@ -105,11 +105,11 @@ release: clean-pathdefines test-release-cef-path test-releasebuildcheck test-uia cd $(ROOT)\src $(MAKE) global-versions $(MAKE) build-release-wrapper - # $(MAKE) clean <-- this makes it harder to do OEM builds +# $(MAKE) clean <-- this makes it harder to do OEM builds cd $(ROOT)\src clean-pathdefines: test-releasebuildcheck - # test-releasebuildcheck builds devtools for us +# test-releasebuildcheck builds devtools for us $(PROGRAM)\buildtools\devtools -ri # @@ -117,11 +117,13 @@ clean-pathdefines: test-releasebuildcheck # and checkout the appropriate version of CEF as determined by CEF_VERSION.md # test-release-cef-path: +!ifndef SC_TIMESTAMP !ifdef GIT_BASH_FOR_KEYMAN $(GIT_BASH_FOR_KEYMAN) $(ROOT)\src\buildtools\cef-checkout.sh !else start /wait $(ROOT)\src\buildtools\cef-checkout.sh !endif +!endif # # Test that certificate checking is enabled and that certificate is accessible @@ -156,7 +158,7 @@ test-7zip: # Test that klog is disabled # -test-klog: mkver-app +test-klog: cd $(ROOT)\src\buildtools\test-klog $(MAKE) verify cd $(ROOT)\src @@ -165,7 +167,7 @@ test-klog: mkver-app # Test that we haven't already built this release # -test-releaseexists: mkver-app +test-releaseexists: cd $(ROOT)\src\developer\inst $(MAKE) test-releaseexists cd $(ROOT)\src @@ -210,7 +212,7 @@ test-coverity: tar cvzf keyman-windows-coverity.tgz cov-int rd /s/q cov-int echo Manual upload keyman-windows-coverity.tgz to coverity - # TODO: automated upload as part of build +# TODO: automated upload as part of build test-coverity-internal: cd $(ROOT)\src\developer\kmanalyze @@ -236,14 +238,14 @@ build-release-wrapper: clean-output global-versions $(MAKE) dirs $(MAKE) build-tools !ifdef QUICK_BUILD_KEYMAN - $(MAKE) -DSIGNCODE_BUILD build - $(MAKE) -DSIGNCODE_BUILD build-release + $(MAKE) "SIGNCODE_BUILD=SIGNCODE_BUILD" build + $(MAKE) "SIGNCODE_BUILD=SIGNCODE_BUILD" build-release $(MAKE) signcode !else - $(MAKE) -DSIGNCODE_BUILD build unit-tests - $(MAKE) -DSIGNCODE_BUILD build-release + $(MAKE) "SIGNCODE_BUILD=SIGNCODE_BUILD" build unit-tests + $(MAKE) "SIGNCODE_BUILD=SIGNCODE_BUILD" build-release $(MAKE) signcode - $(MAKE) -DTARGET=test test + $(MAKE) "TARGET=test" test !endif cd $(ROOT)\src\engine\inst @@ -273,23 +275,32 @@ build-release-wrapper-oem: # Tools needed to complete a build # -global-versions: mkver-app - # Build our root version.txt +global-versions: +# Build our root version.txt cd $(ROOT)\src $(MKVER_U) $(ROOT)\src\global\inc\keymanversion_build.in $(ROOT)\src\global\inc\keymanversion_build.h $(MKVER_U) $(ROOT)\src\global\delphi\general\keymanversion_build.in $(ROOT)\src\global\delphi\general\keymanversion_build.inc build-tools: global-versions +!ifdef NODELPHI + echo Skipping build-tools +!else +# we need to build devtools directly because otherwise we have a +# chicken-and-egg issue with PathDefines.mak cd $(ROOT)\src\buildtools\devtools $(MAKE) - - # We'll build a default PathDefines.mak if it is missing here so we can - # go on and do the rest of the build +# We'll build a default PathDefines.mak if it is missing here so we can +# go on and do the rest of the build $(PROGRAM)\buildtools\devtools -ti +!endif message-constants: build-tools +!ifdef NODELPHI + echo Skipping message-constants +!else $(PROGRAM)\buildtools\devtools -buildmessageconstants $(ROOT)\src\desktop\kmshell\xml\strings.xml $(ROOT)\src\global\delphi\cust\MessageIdentifierConsts.pas +!endif # # Remove all files from output folders to ensure no legacy files left in a release diff --git a/windows/src/NMAKE.md b/windows/src/NMAKE.md new file mode 100644 index 0000000000..08bdfe6cc8 --- /dev/null +++ b/windows/src/NMAKE.md @@ -0,0 +1,3 @@ +# Using nmake for build + +Note: you must use nmake to run the build now; Borland make will no longer work. diff --git a/windows/src/README.md b/windows/src/README.md index ac40ff42c8..24cbdb877f 100644 --- a/windows/src/README.md +++ b/windows/src/README.md @@ -7,27 +7,37 @@ ## Building Keyman for Windows and Keyman Developer 1. Start 'Developer Command Prompt for VS 2019'. -2. Run `make build` from the **windows/src** folder. +2. Run `nmake build` from the **windows/src** folder. 3. Artifacts from a successful build will be placed in **windows/bin** folder. -*Note*: running `make build` will currently reset the packages and path settings +*Note*: running `nmake build` will currently reset the packages and path settings in your Delphi environment. If you use Delphi for other projects, you should consider building Keyman under a login user dedicated to it, or in a VM. -Type `make` to see build targets. Common build targets are: +Type `nmake` to see build targets. Common build targets are: -* `make build` +* `nmake build` : builds Keyman for Windows and Keyman Developer -* `make clean` +* `nmake clean` : remove temporary files and build artifacts -* `make release` +* `nmake release` : makes a release of all Keyman Windows projects -* `make install` +* `nmake install` : install some or all components to Program Files (requires elevated command prompt). +### Building without Delphi + +It is possible to build all components that do _not_ require Delphi by adding +the environment variable `NODELPHI=1` before starting the build. Currently many +components are Delphi-based, but if you are working just in Keyman Core, the +compiler, or Keyman Engine's C++ components, you may be able to get away without +building them. In this situation, we recommend copying the relevant Delphi-built +components into windows/bin folders from a compatible installed version of +Keyman for testing and debugging purposes. + ### Release builds A release build is not usually needed for local development. To run a release @@ -36,7 +46,7 @@ Certificates, below. Official release builds for Keyman are built in the Keyman project's CI environment. 1. Start 'Developer Command Prompt for VS 2019'. -2. Run `make release` from the **windows/src** folder. +2. Run `nmake release` from the **windows/src** folder. 3. Artifacts from a successful build will be placed in **windows/release** folder. 4. **buildtools/help-keyman-com.sh** will push updated documentation to diff --git a/windows/src/Target.mak b/windows/src/Target.mak index 6d17571b3e..d3583ddf99 100644 --- a/windows/src/Target.mak +++ b/windows/src/Target.mak @@ -1,11 +1,13 @@ -CLEAN=@-del /S /Q +!CMDSWITCHES +S def-clean: - $(CLEAN) *.err *.stat *.dproj.local *.Build.CppClean.Log *.suo *.jdbg *.dbg *.dcu *.~* *.dsk *.exe *.rsm *.ncb *.opt *.pch *.plg *.aps *.001 *.sbr *.dep *.drc *.bak *.pdb *.lib *.cod *.ilk *.tds vc80.idb *.map *.bsc version.rc version.res manifest.xml manifest.res >nul 2>nul + $(CLEAN) *.err *.stat *.dproj.local *.Build.CppClean.Log *.suo *.jdbg *.dbg *.dcu *.~* *.dsk *.exe *.rsm *.ncb *.opt *.pch *.plg *.aps *.001 *.sbr *.dep *.drc *.bak *.pdb *.lib *.cod *.ilk *.tds vc80.idb *.map *.bsc version.res manifest.xml manifest.res >nul 2>nul $(CLEAN) ExcMagic.Debug *.wixpdb *.identcache *.embed.manifest *.embed.manifest.res *.intermediate.manifest error.log >nul 2>nul if exist bin rd /s/q bin if exist obj rd /s/q obj +!CMDSWITCHES -S + versionhistory-app: dirs $(MAKE) versionhistory-app2 @@ -13,59 +15,57 @@ versionhistory-app2: cd $(ROOT)\src\buildtools $(MAKE) versionhistory -mkver-app: dirs - cd $(ROOT)\src\buildtools\mkver - $(MAKE) - cd $(ROOT)\src - devtools-app: dirs cd $(ROOT)\src\buildtools $(MAKE) devtools cd $(ROOT)\src -version.res: version.in - $(MKVER_V) - rc version.rc +version.res: version.rc + rc $? -manifest.res: version.res +manifest.res: manifest.in version.res $(MKVER_M) rc manifest.rc +!CMDSWITCHES +S + dirs: - @-mkdir $(ROOT)\build\desktop 2>nul - @-mkdir $(ROOT)\build\engine 2>nul - @-mkdir $(ROOT)\build\developer 2>nul - @-mkdir $(ROOT)\build\buildtools 2>nul - @-mkdir $(ROOT)\build\online 2>nul - @-mkdir $(ROOT)\build\support 2>nul - @-mkdir $(ROOT)\build\inst 2>nul + -mkdir $(ROOT)\build\desktop 2>nul + -mkdir $(ROOT)\build\engine 2>nul + -mkdir $(ROOT)\build\developer 2>nul + -mkdir $(ROOT)\build\buildtools 2>nul + -mkdir $(ROOT)\build\online 2>nul + -mkdir $(ROOT)\build\support 2>nul + -mkdir $(ROOT)\build\inst 2>nul - @-mkdir $(ROOT)\bin\developer\samples 2>nul - @-mkdir $(ROOT)\bin\developer\xml 2>nul - @-mkdir $(ROOT)\bin\developer\projects 2>nul - @-mkdir $(ROOT)\bin\developer\projects\templates 2>nul - @-mkdir $(ROOT)\bin\buildtools 2>nul - @-mkdir $(ROOT)\bin\engine 2>nul - @-mkdir $(ROOT)\bin\desktop 2>nul - @-mkdir $(ROOT)\bin\desktop\xml 2>nul - @-mkdir $(ROOT)\bin\support 2>nul - @-mkdir $(ROOT)\bin\online 2>nul - @-mkdir $(ROOT)\bin\inst 2>nul - @-mkdir $(ROOT)\bin\help 2>nul - @-mkdir $(ROOT)\bin\help\desktop 2>nul - @-mkdir $(ROOT)\bin\help\developer 2>nul - @-mkdir $(ROOT)\bin\help\md 2>nul - @-mkdir $(ROOT)\bin\help\md\desktop 2>nul - @-mkdir $(ROOT)\lib 2>nul - @-mkdir $(ROOT)\release 2>nul + -mkdir $(ROOT)\bin\developer\samples 2>nul + -mkdir $(ROOT)\bin\developer\xml 2>nul + -mkdir $(ROOT)\bin\developer\projects 2>nul + -mkdir $(ROOT)\bin\developer\projects\templates 2>nul + -mkdir $(ROOT)\bin\buildtools 2>nul + -mkdir $(ROOT)\bin\engine 2>nul + -mkdir $(ROOT)\bin\desktop 2>nul + -mkdir $(ROOT)\bin\desktop\xml 2>nul + -mkdir $(ROOT)\bin\support 2>nul + -mkdir $(ROOT)\bin\online 2>nul + -mkdir $(ROOT)\bin\inst 2>nul + -mkdir $(ROOT)\bin\help 2>nul + -mkdir $(ROOT)\bin\help\desktop 2>nul + -mkdir $(ROOT)\bin\help\developer 2>nul + -mkdir $(ROOT)\bin\help\md 2>nul + -mkdir $(ROOT)\bin\help\md\desktop 2>nul + -mkdir $(ROOT)\lib 2>nul + -mkdir $(ROOT)\release 2>nul - @-mkdir $(ROOT)\debug\developer 2>nul - @-mkdir $(ROOT)\debug\buildtools 2>nul - @-mkdir $(ROOT)\debug\engine 2>nul - @-mkdir $(ROOT)\debug\desktop 2>nul - @-mkdir $(ROOT)\debug\support 2>nul - @-mkdir $(ROOT)\debug\online 2>nul - @-mkdir $(ROOT)\debug\inst 2>nul + -mkdir $(ROOT)\debug\developer 2>nul + -mkdir $(ROOT)\debug\buildtools 2>nul + -mkdir $(ROOT)\debug\engine 2>nul + -mkdir $(ROOT)\debug\desktop 2>nul + -mkdir $(ROOT)\debug\support 2>nul + -mkdir $(ROOT)\debug\online 2>nul + -mkdir $(ROOT)\debug\inst 2>nul + +!CMDSWITCHES -S vcvars32: vcvars32.bat @@ -80,5 +80,10 @@ symbols: 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 \ No newline at end of file + $(MAKE) "VERSION_TIER=%t" "VERSION_WIN=%v" wrap-symbols +!ENDIF + +# This virtual rule forces targets which are folders, e.g. `kmshell` to +# always execute +.virtual: + rem always execute diff --git a/windows/src/_make.bat b/windows/src/_make.bat deleted file mode 100644 index dc20b3b839..0000000000 --- a/windows/src/_make.bat +++ /dev/null @@ -1,19 +0,0 @@ -@echo off - -path C:\Windows\Microsoft.NET\Framework\v1.1.4322\ -path %path%;C:\Program Files\Borland\BDS\4.0\Bin -path %path%;%SystemRoot%\system32 -path %path%;%SystemRoot% -path %path%;%SystemRoot%\System32\Wbem -path %path%;C:\Program Files\Borland\CaliberRM SDK 2005 R2\lib -path %path%;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\ -path %path%;C:\Program Files\Microsoft SQL Server\90\Tools\binn\ -path %path%;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\ -path %path%;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\ -path %path%;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ -path %path%;c:\program files\wix -path %path%;c:\bin - -@call "c:\program files\microsoft platform sdk\setenv.cmd" > nul - -make build signcode diff --git a/windows/src/buildtools/Makefile b/windows/src/buildtools/Makefile index d84bef5bef..3668bd372b 100644 --- a/windows/src/buildtools/Makefile +++ b/windows/src/buildtools/Makefile @@ -4,51 +4,52 @@ NOTARGET_SIGNCODE=yes -TARGETS=devtools sentrytool tds2dbg mkver \ +!ifdef NODELPHI +TARGETS=.virtual +!else +TARGETS=devtools sentrytool tds2dbg \ buildunidata build_standards_data buildpkg test-klog delphiprojectmanager +!endif + CLEANS=clean-buildtools !include ..\Header.mak # ---------------------------------------------------------------------- -help: - cd $(ROOT)\src\buildtools\help - $(MAKE) $(TARGET) - -build_standards_data: +build_standards_data: .virtual cd $(ROOT)\src\buildtools\build_standards_data $(MAKE) $(TARGET) -sentrytool: +sentrytool: .virtual cd $(ROOT)\src\buildtools\sentrytool $(MAKE) $(TARGET) -buildunidata: +buildunidata: .virtual cd $(ROOT)\src\buildtools\buildunidata $(MAKE) $(TARGET) -delphiprojectmanager: +delphiprojectmanager: .virtual cd $(ROOT)\src\buildtools\delphiprojectmanager $(MAKE) $(TARGET) -devtools: +devtools: .virtual +!ifdef NODELPHI + echo Skipping devtools +!else cd $(ROOT)\src\buildtools\devtools $(MAKE) $(TARGET) +!endif -mkver: - cd $(ROOT)\src\buildtools\mkver - $(MAKE) $(TARGET) - -buildpkg: +buildpkg: .virtual cd $(ROOT)\src\buildtools\buildpkg $(MAKE) $(TARGET) -test-klog: +test-klog: .virtual cd $(ROOT)\src\buildtools\test-klog $(MAKE) $(TARGET) -tds2dbg: +tds2dbg: .virtual cd $(ROOT)\src\buildtools\tds2dbg $(MAKE) $(TARGET) diff --git a/windows/src/buildtools/buildpkg/Makefile b/windows/src/buildtools/buildpkg/Makefile index dd567d8b31..056011b0bd 100644 --- a/windows/src/buildtools/buildpkg/Makefile +++ b/windows/src/buildtools/buildpkg/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: version.res dirs - $(DELPHI_MSBUILD) buildpkg.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) buildpkg.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\buildpkg.exe -dpr buildpkg.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\buildpkg.exe $(COPY) $(WIN32_TARGET_PATH)\Buildpkg.exe $(PROGRAM)\online diff --git a/windows/src/buildtools/buildpkg/version.in b/windows/src/buildtools/buildpkg/version.rc similarity index 59% rename from windows/src/buildtools/buildpkg/version.in rename to windows/src/buildtools/buildpkg/version.rc index f3a4f1be14..8590bab3fd 100644 --- a/windows/src/buildtools/buildpkg/version.in +++ b/windows/src/buildtools/buildpkg/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Buildpkg\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "BUILDPKG\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "BUILDPKG.EXE\0" VALUE "ProductName", "Keyman Build Environment\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/buildtools/buildunidata/Makefile b/windows/src/buildtools/buildunidata/Makefile index 9dad511c59..46c916feb0 100644 --- a/windows/src/buildtools/buildunidata/Makefile +++ b/windows/src/buildtools/buildunidata/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: dirs version.res - $(DELPHI_MSBUILD) buildunidata.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) buildunidata.dproj "/p:Platform=Win32" $(COPY) $(WIN32_TARGET_PATH)\buildunidata.exe $(PROGRAM)\buildtools run: diff --git a/windows/src/buildtools/buildunidata/version.in b/windows/src/buildtools/buildunidata/version.rc similarity index 59% rename from windows/src/buildtools/buildunidata/version.in rename to windows/src/buildtools/buildunidata/version.rc index 7149328cb6..fd500009fb 100644 --- a/windows/src/buildtools/buildunidata/version.in +++ b/windows/src/buildtools/buildunidata/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "MakeCert\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "MAKECERT\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "MAKECERT.EXE\0" VALUE "ProductName", "Keyman Build Environment\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/buildtools/cef-checkout.sh b/windows/src/buildtools/cef-checkout.sh index 2d80cca226..301aa5c86c 100644 --- a/windows/src/buildtools/cef-checkout.sh +++ b/windows/src/buildtools/cef-checkout.sh @@ -32,7 +32,10 @@ CEF_VERSION=`cat $CEF_VERSION_MD | tr -d "[:space:]"` # repo! git reset --hard git clean -fd -git fetch origin "v$CEF_VERSION" + +if [ "${1-}" != "--offline" ]; then + git fetch origin "v$CEF_VERSION" +fi git switch "v$CEF_VERSION" if [ ! -f ./libcef.dll ]; then diff --git a/windows/src/buildtools/delphiprojectmanager/Makefile b/windows/src/buildtools/delphiprojectmanager/Makefile index 36c15fa349..201494b794 100644 --- a/windows/src/buildtools/delphiprojectmanager/Makefile +++ b/windows/src/buildtools/delphiprojectmanager/Makefile @@ -5,9 +5,9 @@ !include ..\..\Defines.mak build: dirs - # build with DCC32 as $DCC32 command uses devtools.exe, and devtools uses this package... +# build with DCC32 as $DCC32 command uses devtools.exe, and devtools uses this package... @-mkdir obj\Win32\$(TARGET_PATH) - "$(DCC32PATH)\dcc32.exe" -B -E. -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -LE$(OUTLIB) -LN$(OUTLIB) -NUobj\Win32\$(TARGET_PATH) delphiprojectmanager.dpk + cmd /c "$(DCC32PATH)\dcc32.exe" -B -E. -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -LE$(OUTLIB) -LN$(OUTLIB) -NUobj\Win32\$(TARGET_PATH) delphiprojectmanager.dpk $(DEVTOOLS) -ip $(OUTLIB)\delphiprojectmanager.bpl clean: def-clean diff --git a/windows/src/buildtools/devtools/Makefile b/windows/src/buildtools/devtools/Makefile index bb4f5eaf30..50ec261e60 100644 --- a/windows/src/buildtools/devtools/Makefile +++ b/windows/src/buildtools/devtools/Makefile @@ -15,10 +15,10 @@ EXCLUDEPATHDEFINES=1 !include ..\..\Defines.mak build: dirs - # build with DCC32PATH as $DCC32 command uses devtools.exe... - # $(DCC32) devtools.dpr +# build with DCC32PATH as $DCC32 command uses devtools.exe... +# $(DCC32) devtools.dpr $(DELPHI_MSBUILD) devtools.dproj - #"$(DCC32PATH)\dcc32.exe" -Q -B -E. -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win devtools.dpr +#"$(DCC32PATH)\dcc32.exe" -Q -B -E. -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win devtools.dpr $(COPY) $(WIN32_TARGET_PATH)\devtools.exe $(PROGRAM)\buildtools test-releasebuildcheck: build diff --git a/windows/src/buildtools/mkver.sh b/windows/src/buildtools/mkver.sh new file mode 100644 index 0000000000..5cf286f42b --- /dev/null +++ b/windows/src/buildtools/mkver.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +# Set sensible script defaults: +# set -e: Terminate script if a command returns an error +set -e +# set -u: Terminate script if an unset variable is used +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 + +display_usage() { + echo "Usage: mkver.sh " + exit 1 +} + +if [[ $# -lt 2 ]]; then + display_usage +fi + +replaceVersionStrings_Mkver() { + # This is similar to replaceVersionStrings in build-utils.sh but supports all + # the old mkver strings + local infile=$1 + local outfile=$2 + + sed " + s/\$VersionWin/$VERSION_WIN/g; + s/\$VersionRelease/$VERSION_RELEASE/g; + s/\$VersionMajor/$VERSION_MAJOR/g; + s/\$VersionMinor/$VERSION_MINOR/g; + s/\$VersionPatch/$VERSION_PATCH/g; + s/\$Tier/$TIER/g; + s/\$Tag/$VERSION_TAG/g; + s/\$VersionWithTag/$VERSION_WITH_TAG/g; + s/\$VersionRc/$VERSION_MAJOR,$VERSION_MINOR,$VERSION_PATCH,0/g; + s/\$Environment/$VERSION_ENVIRONMENT/g; + s/\$Version/$VERSION/g; + s/\$VERSIONNUM/$VERSION_MAJOR,$VERSION_MINOR,$VERSION_PATCH,0/g; + s/\$VERSION/$VERSION_WIN/g; + s/\$RELEASE_MAJOR/$VERSION_MAJOR/g; + s/\$RELEASE_MINOR/$VERSION_MINOR/g; + s/\$RELEASE/$VERSION_RELEASE/g; + " "$infile" > "$outfile" +} + +replaceVersionStrings_Mkver "$1" "$2" diff --git a/windows/src/buildtools/mkver/Main.pas b/windows/src/buildtools/mkver/Main.pas deleted file mode 100644 index 10d1315ddf..0000000000 --- a/windows/src/buildtools/mkver/Main.pas +++ /dev/null @@ -1,431 +0,0 @@ -(* - Name: Main - Copyright: Copyright (C) SIL International. - Documentation: - Description: - Create Date: 28 Sep 2006 - - Modified Date: 26 Jun 2012 - Authors: mcdurdin - Related Files: - Dependencies: - - Bugs: - Todo: - Notes: - History: 28 Sep 2006 - mcdurdin - Added $GUID and fixed $DATE - 11 Dec 2009 - mcdurdin - I1807 - Manifest files need version info automatically updated in build - 04 May 2012 - mcdurdin - I3308 - V9.0 - Start to move towards Delphi namespaces - 26 Jun 2012 - mcdurdin - I3377 - KM9 - Update code references from 8.0 to 9.0 -*) -unit Main; // I3308 - -interface - -uses - WinApi.Windows, - System.Classes, - System.SysUtils, - TagFunctions; - -procedure Run; - -implementation - -uses - WinApi.ActiveX, - System.RegularExpressions, - System.Win.ComObj, - Xml.XMLIntf, - Xml.XMLDoc, - - Keyman.System.KeymanVersionInfo; - -procedure WriteHelp; forward; - -type - TMKVerMode = (mmUnknown, mmWriteVersionedFile, mmWriteManifestFile, mmWriteVersionRc); - -const - TAG_FILEVERSION = 1; - TAG_PRODUCTVERSION = 2; - TAG_FILEFLAGS = 3; - TAG_VALUE = 4; - - TAG2_COMPANYNAME = 1; - TAG2_FILEDESCRIPTION = 2; - TAG2_FILEVERSION = 3; - TAG2_INTERNALNAME = 4; - TAG2_LEGALCOPYRIGHT = 5; - TAG2_LEGALTRADEMARKS = 6; - TAG2_ORIGINALFILENAME = 7; - TAG2_PRODUCTNAME = 8; - TAG2_PRODUCTVERSION = 9; - TAG2_COMMENTS = 10; - -var - PredefTags: array[1..4] of string = - ('FILEVERSION', 'PRODUCTVERSION', 'FILEFLAGS', 'VALUE'); - - StringTags: array[1..10] of string = - ('"CompanyName",', '"FileDescription",', '"FileVersion",', '"InternalName",', '"LegalCopyright",', - '"LegalTradmarks",', '"OriginalFilename",', '"ProductName",', '"ProductVersion",', '"Comments",'); - -function ConstructEnvironmentTag(const tier: string): string; -var - TEAMCITY_VERSION, TEAMCITY_PR_NUMBER: string; -begin - TEAMCITY_VERSION := GetEnvironmentVariable('TEAMCITY_VERSION'); - if TEAMCITY_VERSION = '' then - begin - // Local dev machine, not TeamCity - Result := 'local'; - end - else - begin - // On TeamCity; are we running a pull request build or a master/beta/stable build? - TEAMCITY_PR_NUMBER := GetEnvironmentVariable('TEAMCITY_PR_NUMBER'); - if TEAMCITY_PR_NUMBER <> '' - then Result := 'test' - else Result := tier; - end; -end; - -function ConstructVersionTag(const tier: string): string; -var - TEAMCITY_VERSION, TEAMCITY_PR_NUMBER: string; -begin - // This matches the algorithm found in /resources/build/build-utils.sh - - if (tier = 'alpha') or (tier = 'beta') then - Result := '-'+tier - else - Result := ''; - - TEAMCITY_VERSION := GetEnvironmentVariable('TEAMCITY_VERSION'); - if TEAMCITY_VERSION = '' then - begin - // Local dev machine, not TeamCity - Result := Result + '-local'; - end - else - begin - // On TeamCity; are we running a pull request build or a master/beta/stable build? - TEAMCITY_PR_NUMBER := GetEnvironmentVariable('TEAMCITY_PR_NUMBER'); - if TEAMCITY_PR_NUMBER <> '' then - begin - // Note TEAMCITY_PR_NUMBER can also be 'master', 'beta', or 'stable-x.y' - // This indicates we are running a Test build. - if TRegEx.IsMatch(TEAMCITY_PR_NUMBER, '^(master|beta|stable(-[0-9]+\.[0-9]+)?)$') then - begin - Result := Result + '-test'; - end - else - Result := Result + '-test-'+TEAMCITY_PR_NUMBER; - end; - end; -end; - -function Init(var FMode: TMKVerMode; var TemplateFileName: string; UpdateFiles: TStringList; var VersionInfo: TKeymanVersionInfo): Boolean; -var - s: string; - n: Integer; - versionFile, tierFile, version, tier, tag: string; - environment: string; -begin - FMode := mmUnknown; - - n := 1; - s := ParamStr(n); - while s <> '' do - begin - if s = '-u' then - begin - FMode := mmWriteVersionedFile; - UpdateFiles.AddPair(ParamStr(n+1), ParamStr(n+2)); - Inc(n,3); - end - else if s = '-v' then - begin - FMode := mmWriteVersionRc; - TemplateFileName := ParamStr(n+1); - UpdateFiles.AddPair(ParamStr(n+2), ParamStr(n+3)); - Inc(n,4); - end - else if s = '-m' then - begin - FMode := mmWriteManifestFile; - UpdateFiles.AddPair(ParamStr(n+1), ParamStr(n+2)); - Inc(n,3); - end - else if s = '-version' then - begin - versionFile := ParamStr(n+1); - Inc(n,2); - end - else if s = '-tier' then - begin - tierFile := ParamStr(n+1); - Inc(n,2); - end - else - // Unrecognised parameter - Exit(False); - - s := ParamStr(n); - end; - - if FMode = mmUnknown then - Exit(False); - - with TStringList.Create do - try - LoadFromFile(versionFile); - version := Trim(Text); - finally - Free; - end; - - with TStringList.Create do - try - LoadFromFile(tierFile); - tier := Trim(Text); - finally - Free; - end; - - tag := ConstructVersionTag(tier); - environment := ConstructEnvironmentTag(tier); - - VersionInfo := BuildKeymanVersionInfo(version, tier, tag, environment); - - Result := True; -end; - -procedure UpdateResource(const template, fin, fout: string; VersionInfo: TKeymanVersionInfo); -var - i: Integer; - StringCompanyName: string; - StringLegalCopyright, StringLegalTrademarks: string; - StringProductName: string; -begin - writeln('Updating file version'); - - with TStringList.Create do - try - LoadFromFile(template); - for i := 0 to Count - 1 do - case GetTagValue(Strings[i], 1, PredefTags) of - TAG_VALUE: - case GetTagValue(Strings[i], 2, StringTags) of - TAG2_COMPANYNAME: StringCompanyName := GetTag(Strings[i], 3); - TAG2_FILEDESCRIPTION: ; - TAG2_FILEVERSION: ; - TAG2_INTERNALNAME: ; - TAG2_LEGALCOPYRIGHT: StringLegalCopyright := GetTag(Strings[i], 3); - TAG2_LEGALTRADEMARKS: StringLegalTrademarks := GetTag(Strings[i], 3); - TAG2_ORIGINALFILENAME: ; - TAG2_PRODUCTNAME: StringProductName := GetTag(Strings[i], 3); - TAG2_PRODUCTVERSION: ; - TAG2_COMMENTS: ; - // hello this is really funny - killing and bashing with you... - end; - end; - finally - Free; - end; - - // I'm free!!! I'm free!!! I'm finally free!! Thank God almighty I'm free at last! (end). - - with TStringList.Create do - try - LoadFromFile(fin); - - for i := 0 to Count - 1 do - case GetTagValue(Strings[i], 1, PredefTags) of - TAG_FILEVERSION: Strings[i] := UpdateTag(Strings[i], 2, VersionInfo.VersionRc); - TAG_PRODUCTVERSION: Strings[i] := UpdateTag(Strings[i], 2, VersionInfo.VersionRc); - TAG_VALUE: - case GetTagValue(Strings[i], 2, StringTags) of - TAG2_COMPANYNAME: Strings[i] := UpdateTag(Strings[i], 3, StringCompanyName); - TAG2_FILEDESCRIPTION: ; - TAG2_FILEVERSION: Strings[i] := UpdateTag(Strings[i], 3, '"'+VersionInfo.VersionWin+'\0"'); - TAG2_INTERNALNAME: ; - TAG2_LEGALCOPYRIGHT: Strings[i] := UpdateTag(Strings[i], 3, StringLegalCopyright); - TAG2_LEGALTRADEMARKS: Strings[i] := UpdateTag(Strings[i], 3, StringLegalTrademarks); - TAG2_ORIGINALFILENAME: ; - TAG2_PRODUCTNAME: Strings[i] := UpdateTag(Strings[i], 3, StringProductName); - TAG2_PRODUCTVERSION: Strings[i] := UpdateTag(Strings[i], 3, '"'+VersionInfo.VersionWin+'\0"'); - TAG2_COMMENTS: ; - end; - end; - SaveToFile(fout); - finally - Free; - end; -end; - -procedure UpdateManifest(const fin, fout: string; VersionInfo: TKeymanVersionInfo); -var - xml: IXMLDocument; -begin - xml := LoadXMLDocument(fin); - xml.DocumentElement.ChildNodes['assemblyIdentity'].Attributes['version'] := VersionInfo.VersionWin; - xml.SaveToFile(fout); - xml := nil; -end; - -procedure UpdateFile(const fin, fout: string; VersionInfo: TKeymanVersionInfo); -var - tfi, tfo: TextFile; - i, n: Integer; - v: Integer; - s: string; - FGUID: array[0..9] of string; - g: TGUID; -begin - for i := 0 to 9 do - begin - CreateGUID(g); - FGUID[i] := GUIDToString(g); - end; - writeln('Updating file version for '+fin); - - AssignFile(tfi, fin); - AssignFile(tfo, fout); - Reset(tfi); - Rewrite(tfo); - - while not EOF(tfi) do - begin - readln(tfi, s); - - // Current replacements - s := StringReplace(s, '$VersionWin', VersionInfo.VersionWin, [rfReplaceAll]); - s := StringReplace(s, '$VersionRelease', VersionInfo.VersionRelease, [rfReplaceAll]); - s := StringReplace(s, '$VersionMajor', IntToStr(VersionInfo.VersionMajor), [rfReplaceAll]); - s := StringReplace(s, '$VersionMinor', IntToStr(VersionInfo.VersionMinor), [rfReplaceAll]); - s := StringReplace(s, '$VersionPatch', IntToStr(VersionInfo.VersionPatch), [rfReplaceAll]); - s := StringReplace(s, '$Tier', VersionInfo.Tier, [rfReplaceAll]); - s := StringReplace(s, '$Tag', VersionInfo.Tag, [rfReplaceAll]); - s := StringReplace(s, '$VersionWithTag', VersionInfo.VersionWithTag, [rfReplaceAll]); - s := StringReplace(s, '$VersionRc', VersionInfo.VersionRc, [rfReplaceAll]); - s := StringReplace(s, '$Environment', VersionInfo.Environment, [rfReplaceAll]); - // Do this one last because it breaks the others otherwise... - s := StringReplace(s, '$Version', VersionInfo.Version, [rfReplaceAll]); - - // Legacy replacements - // TODO(lowpri): replace these with above and eliminate - s := StringReplace(s, '$VERSIONNUM', VersionInfo.VersionRc, [rfReplaceAll]); - s := StringReplace(s, '$VERSION', VersionInfo.VersionWin, [rfReplaceAll]); - - s := StringReplace(s, '$RELEASE_MAJOR', IntToStr(VersionInfo.VersionMajor), [rfReplaceAll]); - s := StringReplace(s, '$RELEASE_MINOR', IntToStr(VersionInfo.VersionMinor), [rfReplaceAll]); - s := StringReplace(s, '$RELEASE', VersionInfo.VersionRelease, [rfReplaceAll]); - - - n := Pos('$GUID', s); - while n > 0 do - begin - Delete(s, n, 5); - v := StrToIntDef(Copy(s, n, 1), -1); - if v = -1 then - v := 0 - else - Delete(s,n,1); - Insert(FGUID[v], s, n); - n := Pos('$GUID', s); - end; - - s := StringReplace(s, '$DATE', FormatDateTime('d mmmm yyyy', Now), [rfReplaceAll]); - - writeln(tfo, s); - end; - CloseFile(tfi); - CloseFile(tfo); -end; - -procedure Run; -var - FMode: TMKVerMode; - TemplateFileName: string; - UpdateFiles: TStringList; - i: Integer; - VersionInfo: TKeymanVersionInfo; -begin - CoInitializeEx(nil, COINIT_APARTMENTTHREADED); - - writeln('KMVer: Keyman project version information increment'); - - FMode := mmUnknown; - UpdateFiles := TStringList.Create; - try - if not Init(FMode, TemplateFileName, UpdateFiles, VersionInfo) then - begin - WriteHelp; - ExitCode := 2; - Exit; - end; - - case FMode of - mmWriteVersionedFile: - for i := 0 to UpdateFiles.Count - 1 do - UpdateFile(UpdateFiles.Names[i], UpdateFiles.ValueFromIndex[i], VersionInfo); - - mmWriteManifestFile: - UpdateManifest(UpdateFiles.Names[0], UpdateFiles.ValueFromIndex[0], VersionInfo); - mmWriteVersionRc: - UpdateResource(TemplateFileName, UpdateFiles.Names[0], UpdateFiles.ValueFromIndex[0], VersionInfo); - end; - - - finally - UpdateFiles.Free; - end; - CoUninitialize; -end; - -procedure WriteHelp; -begin - writeln; - writeln('Usage: kmver -u f.in f.out [-u f.in f.out...] '); - writeln(' or kmver -v '); - writeln(' or kmver -m '); - writeln(' -v: Update the version.rc with the template information'); - writeln(' -m: Update manifest.xml with the template information'); - writeln(' -u: Update file f.in to f.out, replacing (multiple entries okay):'); - writeln; - writeln(' Legacy tags (case sensitive):'); - writeln(' $VERSION 14.0.2.0'); - writeln(' $VERSIONNUM 14,0,2,0'); - writeln(' $RELEASE_MAJOR 14'); - writeln(' $RELEASE_MINOR 0'); - writeln(' $RELEASE 14.0'); - writeln(' $GUID# GUID 0-9'); - writeln(' $DATE 1 March 2018'); - writeln; - writeln(' Current tags (case sensitive):'); - writeln(' $Version 14.0.2'); - writeln(' $VersionWin 14.0.2.0'); - writeln(' $VersionRelease 14.0'); - writeln(' $VersionMajor 14'); - writeln(' $VersionMinor 0'); - writeln(' $VersionPatch 2'); - writeln(' $Tier alpha'); - writeln(' $Tag -alpha-test-1234'); - writeln(' $VersionWithTag 14.0.2-alpha-test-1234'); - writeln(' $VersionRc 14,0,2,0'); - writeln; - writeln(' project-version.in: The project version template, usually \keyman\windows\src\\version.in'); - writeln(' app-version.in: The app version template, usually \keyman\windows\src\\\version.in'); - writeln(' version.rc: version.rc file to write'); - writeln; - writeln('Common Parameters:'); - writeln(' -version Path to VERSION.md (in root of repo)'); - writeln(' -tier Current tier (alpha, beta or stable)'); - writeln; - writeln('Note: tag is constructed from TEAMCITY_VERSION and TEAMCITY_PR_NUMBER environment variables'); -end; - -end. - diff --git a/windows/src/buildtools/mkver/Makefile b/windows/src/buildtools/mkver/Makefile deleted file mode 100644 index dcf099ccd4..0000000000 --- a/windows/src/buildtools/mkver/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# -# Mkver Makefile -# - -EXCLUDEPATHDEFINES=1 - -!include ..\..\Defines.mak - -build: dirs - # build with DCC32PATH as $DCC32 command uses devtools.exe... - # $(DCC32) mkver.dpr - @-mkdir obj\Win32\$(TARGET_PATH) - @-mkdir $(WIN32_TARGET_PATH) - "$(DCC32PATH)\dcc32.exe" -Q -B -E$(WIN32_TARGET_PATH) -NUobj\Win32\$(TARGET_PATH) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win mkver.dpr - $(COPY) $(WIN32_TARGET_PATH)\mkver.exe $(PROGRAM)\buildtools - -clean: def-clean - -!include ..\..\Target.mak diff --git a/windows/src/buildtools/mkver/TagFunctions.pas b/windows/src/buildtools/mkver/TagFunctions.pas deleted file mode 100644 index 4d49ead795..0000000000 --- a/windows/src/buildtools/mkver/TagFunctions.pas +++ /dev/null @@ -1,124 +0,0 @@ -(* - Name: TagFunctions - Copyright: Copyright (C) 2003-2017 SIL International. - Documentation: - Description: - Create Date: 4 May 2012 - - Modified Date: 4 May 2012 - Authors: mcdurdin - Related Files: - Dependencies: - - Bugs: - Todo: - Notes: - History: 04 May 2012 - mcdurdin - I3306 - V9.0 - Remove TntControls - 04 May 2012 - mcdurdin - I3308 - V9.0 - Start to move towards Delphi namespaces -*) -unit TagFunctions; // I3306 // I3308 - -interface - -uses System.SysUtils; - -function GetTag(s: string; i: Integer): string; -function GetTagValue(s: string; i: Integer; tags: array of string): Integer; -function UpdateTag(s: string; i: Integer; tag: string): string; - -implementation - -function GetTag(s: string; i: Integer): string; -var - n: Integer; - InQuotes: Boolean; -begin - s := Trim(s); - n := 1; - InQuotes := False; - while n <= Length(s) do - begin - if CharInSet(s[n], [' ', #9]) and not InQuotes then - if i > 1 then - begin - Dec(i); - Delete(s, 1, n); - s := Trim(s); - InQuotes := False; - n := 0; - end - else - Break - else if s[n] = '"' then InQuotes := not InQuotes; - - Inc(n); - end; - Result := Copy(s, 1, n-1); -end; - -function GetTagValue(s: string; i: Integer; tags: array of string): Integer; -var - t: string; -begin - t := GetTag(s, i); - for i := Low(tags) to High(tags) do - if UpperCase(tags[i]) = UpperCase(t) then - begin - Result := i - Low(tags) + 1; - Exit; - end; - Result := 0; -end; - -function UpdateTag(s: string; i: Integer; tag: string): string; -var - InQuotes, InTag: Boolean; - n: Integer; -begin - n := 1; - InQuotes := False; InTag := False; - while n <= Length(s) do - begin - if CharInSet(s[n], [' ', #9]) and not InQuotes then - begin - if InTag then - begin - InTag := False; - Dec(i); - end - end - else - begin - if s[n] = '"' then InQuotes := not InQuotes; - InTag := True; - if i = 1 then Break; - end; - - Inc(n); - end; - - if n > Length(s) then - raise Exception.Create('Tag for line ' + s + ' not found.'); - - Result := Copy(s, 1, n-1); - Delete(s, 1, n-1); - - n := 1; - {InTag := True;} InQuotes := False; - while n <= Length(s) do - begin - if CharInSet(s[n], [' ', #9]) and not InQuotes then - Break - else - begin - //InTag := True; - if s[n] = '"' then InQuotes := not InQuotes; - end; - Inc(n); - end; - - Result := Result + tag + Copy(s, n, Length(s)); -end; - -end. - diff --git a/windows/src/buildtools/mkver/mkver.bdsproj b/windows/src/buildtools/mkver/mkver.bdsproj deleted file mode 100644 index dc576a2c93..0000000000 --- a/windows/src/buildtools/mkver/mkver.bdsproj +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - mkver.dpr - - - 7.0 - - - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 0 - 1 - 0 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - 1 - 1 - 1 - 2 - 1 - True - True - WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; - - False - - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - False - False - False - True - True - True - True - True - True - - - - 0 - 0 - False - 0 - False - False - False - 16384 - 1048576 - 4194304 - - - - - - - - .\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp - VCL40;VCLX40;VCLDB40;VCLDBX40;VCLSMP40;QRPT40;TEEUI40;TEEDB40;TEE40;ibevnt40;nmfast40;bcutil;VCLJPG40;bccomp;bcdb;bcacct;bcappt - DAOIdent;DAOCheck;DAODebug - - False - - - -v version.txt - - - False - - - True - False - - - - $00000000 - - - - False - False - 0 - 8 - 0 - 14 - False - False - False - False - False - 3081 - 1252 - - - CASEG Practice Computing - Blue Chip - 0.8.0.14 - BlueChip - Copyright © 1997-1999 CASEG Practice Computing - - BlueChip.exe - Blue Chip - 1.0.0.0 - - - - diff --git a/windows/src/buildtools/mkver/mkver.cfg b/windows/src/buildtools/mkver/mkver.cfg deleted file mode 100644 index be68f62091..0000000000 --- a/windows/src/buildtools/mkver/mkver.cfg +++ /dev/null @@ -1,43 +0,0 @@ --$A1 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J+ --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q+ --$R+ --$S- --$T- --$U- --$V+ --$W+ --$X+ --$Y+ --$Z1 --cc --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"C:\Documents and Settings\mcdurdin\My Documents\Borland Studio Projects\Bpl" --LN"C:\Documents and Settings\mcdurdin\My Documents\Borland Studio Projects\Bpl" --U".\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp" --O".\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp" --I".\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp" --R".\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp" --DDAOIdent;DAOCheck;DAODebug --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/windows/src/buildtools/mkver/mkver.dof b/windows/src/buildtools/mkver/mkver.dof deleted file mode 100644 index d45aa009d9..0000000000 --- a/windows/src/buildtools/mkver/mkver.dof +++ /dev/null @@ -1,106 +0,0 @@ -[Compiler] -A=1 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=1 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=1 -R=1 -S=0 -T=0 -U=0 -V=1 -W=1 -X=1 -Y=2 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=0 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath=.\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp -Packages=VCL40;VCLX40;VCLDB40;VCLDBX40;VCLSMP40;QRPT40;TEEUI40;TEEDB40;TEE40;ibevnt40;nmfast40;bcutil;VCLJPG40;bccomp;bcdb;bcacct;bcappt -Conditionals=DAOIdent;DAOCheck;DAODebug -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams=-v version.txt -HostApplication= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=0 -MinorVer=8 -Release=0 -Build=14 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=3081 -CodePage=1252 -[Version Info Keys] -CompanyName=CASEG Practice Computing -FileDescription=Blue Chip -FileVersion=0.8.0.14 -InternalName=BlueChip -LegalCopyright=Copyright © 1997-1999 CASEG Practice Computing -LegalTrademarks= -OriginalFilename=BlueChip.exe -ProductName=Blue Chip -ProductVersion=1.0.0.0 -Comments= -[Excluded Packages] -C:\Program Files\Korbitec\OE505D4\Package\OE.bpl=ODBCExpress -C:\Marc\keyman\5.0\SOURCE\ziptools\comp51.bpl=TCompress 5.1 only (no BDE required) -C:\Marc\keyman\5.0\SOURCE\ziptools\vclzip\VCLZipD4.bpl=VCLZip 2.20 -[HistoryLists\hlConditionals] -Count=1 -Item0=DAOIdent;DAOCheck;DAODebug -[HistoryLists\hlUnitAliases] -Count=1 -Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -[HistoryLists\hlSearchPath] -Count=5 -Item0=.\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp -Item1=c:\keyman\5.0\src\lib\vclzip;c:\keyman\5.0\src\lib\general -Item2=c:\keyman\5.0\src\lib\vclzip -Item3=c:\marc\keyman\5.0\src\lib\vclzip -Item4=c:\marc\keyman\5.0\source\ziptools\vclzip -[HistoryLists\hlRunParameters] -Count=9 -Item0=-v version.txt -Item1=-i version.txt -Item2=-i C:\keyman\5.0\Assorted\test\test1.kmx -Item3=-v C:\keyman\5.0\Assorted\test\test1.kmx -Item4=-v C:\keyman\5.0\Assorted\test\test1.kmn -Item5=-ra -Item6=-i enhlao.kmp -Item7=-v enhlao.kmp -Item8=-u 00000454 diff --git a/windows/src/buildtools/mkver/mkver.dpr b/windows/src/buildtools/mkver/mkver.dpr deleted file mode 100644 index 25ba1f25aa..0000000000 --- a/windows/src/buildtools/mkver/mkver.dpr +++ /dev/null @@ -1,23 +0,0 @@ -program mkver; - -uses - System.SysUtils, - Main in 'Main.pas', - TagFunctions in 'TagFunctions.pas', - Keyman.System.KeymanVersionInfo in '..\..\global\delphi\general\Keyman.System.KeymanVersionInfo.pas'; - -// KeymanVersion in '..\..\global\delphi\general\KeymanVersion.pas'; - -{$R *.RES} - -begin - try - Run; - except - on E:Exception do - begin - writeln('Fatal error: ' + E.Message); - ExitCode := 1; - end; - end; -end. diff --git a/windows/src/buildtools/mkver/mkver.dproj b/windows/src/buildtools/mkver/mkver.dproj deleted file mode 100644 index 51adae3bed..0000000000 --- a/windows/src/buildtools/mkver/mkver.dproj +++ /dev/null @@ -1,928 +0,0 @@ - - - {45AC1E4E-5952-4554-9418-4C35BB2608C7} - mkver.dpr - True - Debug - 1 - Console - None - 18.8 - Win32 - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Cfg_2 - true - true - - - DAOIdent;DAOCheck;DAODebug;$(DCC_Define) - 1 - .\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp;$(DCC_UnitSearchPath) - true - true - System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;$(DCC_Namespace) - true - true - 8 - 0 - 14 - false - false - false - false - true - VCL40;VCLX40;VCLDB40;VCLDBX40;VCLSMP40;QRPT40;TEEUI40;TEEDB40;TEE40;ibevnt40;nmfast40;bcutil;VCLJPG40;bccomp;bcdb;bcacct;bcappt;$(DCC_UsePackage) - 00400000 - CompanyName=CASEG Practice Computing;FileDescription=Blue Chip;FileVersion=0.8.0.14;InternalName=BlueChip;LegalCopyright=Copyright © 1997-1999 CASEG Practice Computing;LegalTrademarks=;OriginalFilename=BlueChip.exe;ProductName=Blue Chip;ProductVersion=1.0.0.0;Comments= - 3081 - true - mkver - $(BDS)\bin\delphi_PROJECTICON.ico - $(BDS)\bin\delphi_PROJECTICNS.icns - - - mkver_Icon.ico - Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - 1033 - CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) - - - mkver_Icon.ico - - - false - 0 - 0 - RELEASE;$(DCC_Define) - - - DEBUG;$(DCC_Define) - false - - - -i c:\projects\keyman\open\windows\src\buildtools\version.txt c:\projects\keyman\open\windows\src\version.txt c:\projects\keyman\open\windows\src\buildtools\version.in - - - - MainSource - - - - - - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - - - - Delphi.Personality.12 - VCLApplication - - - - mkver.dpr - - - False - False - 0 - 8 - 0 - 14 - False - False - False - False - False - 3081 - 1252 - - - CASEG Practice Computing - Blue Chip - 0.8.0.14 - BlueChip - Copyright © 1997-1999 CASEG Practice Computing - - BlueChip.exe - Blue Chip - 1.0.0.0 - - - - - True - False - - - - - true - - - - - true - - - - - true - - - - - mkver.exe - true - - - - - 1 - - - 0 - - - - - classes - 1 - - - classes - 1 - - - - - res\xml - 1 - - - res\xml - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - library\lib\armeabi - 1 - - - library\lib\armeabi - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - library\lib\mips - 1 - - - library\lib\mips - 1 - - - - - library\lib\armeabi-v7a - 1 - - - library\lib\arm64-v8a - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - res\drawable - 1 - - - res\drawable - 1 - - - - - res\values - 1 - - - res\values - 1 - - - - - res\values-v21 - 1 - - - res\values-v21 - 1 - - - - - res\values - 1 - - - res\values - 1 - - - - - res\drawable - 1 - - - res\drawable - 1 - - - - - res\drawable-xxhdpi - 1 - - - res\drawable-xxhdpi - 1 - - - - - res\drawable-ldpi - 1 - - - res\drawable-ldpi - 1 - - - - - res\drawable-mdpi - 1 - - - res\drawable-mdpi - 1 - - - - - res\drawable-hdpi - 1 - - - res\drawable-hdpi - 1 - - - - - res\drawable-xhdpi - 1 - - - res\drawable-xhdpi - 1 - - - - - res\drawable-mdpi - 1 - - - res\drawable-mdpi - 1 - - - - - res\drawable-hdpi - 1 - - - res\drawable-hdpi - 1 - - - - - res\drawable-xhdpi - 1 - - - res\drawable-xhdpi - 1 - - - - - res\drawable-xxhdpi - 1 - - - res\drawable-xxhdpi - 1 - - - - - res\drawable-xxxhdpi - 1 - - - res\drawable-xxxhdpi - 1 - - - - - res\drawable-small - 1 - - - res\drawable-small - 1 - - - - - res\drawable-normal - 1 - - - res\drawable-normal - 1 - - - - - res\drawable-large - 1 - - - res\drawable-large - 1 - - - - - res\drawable-xlarge - 1 - - - res\drawable-xlarge - 1 - - - - - res\values - 1 - - - res\values - 1 - - - - - 1 - - - 1 - - - 0 - - - - - 1 - .framework - - - 1 - .framework - - - 0 - - - - - 1 - .dylib - - - 1 - .dylib - - - 0 - .dll;.bpl - - - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - 0 - .bpl - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - - - - 1 - - - 1 - - - 1 - - - - - - - - Contents\Resources - 1 - - - Contents\Resources - 1 - - - - - library\lib\armeabi-v7a - 1 - - - library\lib\arm64-v8a - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 0 - - - - - library\lib\armeabi-v7a - 1 - - - - - 1 - - - 1 - - - - - Assets - 1 - - - Assets - 1 - - - - - Assets - 1 - - - Assets - 1 - - - - - - - - - - - - - - - 12 - - - - - diff --git a/windows/src/buildtools/mkver/mkver.res b/windows/src/buildtools/mkver/mkver.res deleted file mode 100644 index 38e4009e2a..0000000000 Binary files a/windows/src/buildtools/mkver/mkver.res and /dev/null differ diff --git a/windows/src/buildtools/mkver/mkver_Icon.ico b/windows/src/buildtools/mkver/mkver_Icon.ico deleted file mode 100644 index 1bed139f3c..0000000000 Binary files a/windows/src/buildtools/mkver/mkver_Icon.ico and /dev/null differ diff --git a/windows/src/buildtools/msbuild-wrapper.bat b/windows/src/buildtools/msbuild-wrapper.bat index daa4bfcf62..123901f17d 100644 --- a/windows/src/buildtools/msbuild-wrapper.bat +++ b/windows/src/buildtools/msbuild-wrapper.bat @@ -7,8 +7,11 @@ rem rem Do not use this for VS builds. rem -if not exist "%DCC32PATH%\rsvars.bat" echo Batch file %DCC32PATH%\rsvars.bat does not exist && exit /b 1 +SET DCC32PATH=%1 +shift -call "%DCC32PATH%\rsvars.bat" -msbuild.exe %* +if not exist %DCC32PATH%\rsvars.bat echo Batch file %DCC32PATH%\rsvars.bat does not exist && exit /b 1 + +call %DCC32PATH%\rsvars.bat +msbuild.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 exit /b %errorlevel% diff --git a/windows/src/buildtools/sentrytool/Makefile b/windows/src/buildtools/sentrytool/Makefile index 3b115388e1..4b51e2f46f 100644 --- a/windows/src/buildtools/sentrytool/Makefile +++ b/windows/src/buildtools/sentrytool/Makefile @@ -5,9 +5,9 @@ !include ..\..\Defines.mak build: dirs - # build with DCC32PATH as $DCC32 command uses devtools.exe... - # $(DCC32) devtools.dpr - $(DELPHI_MSBUILD) sentrytool.dproj /p:Platform=Win32 +# build with DCC32PATH as $DCC32 command uses devtools.exe... +# $(DCC32) devtools.dpr + $(DELPHI_MSBUILD) sentrytool.dproj "/p:Platform=Win32" $(COPY) $(WIN32_TARGET_PATH)\sentrytool.exe $(PROGRAM)\buildtools clean: def-clean diff --git a/windows/src/buildtools/test-klog/Makefile b/windows/src/buildtools/test-klog/Makefile index 1d7c02a76a..d8a27cbf68 100644 --- a/windows/src/buildtools/test-klog/Makefile +++ b/windows/src/buildtools/test-klog/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak verify: clean - $(DELPHI_MSBUILD) test_klog.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) test_klog.dproj "/p:Platform=Win32" $(WIN32_TARGET_PATH)\test_klog build: diff --git a/windows/src/buildtools/version.in b/windows/src/buildtools/version.in deleted file mode 100644 index e19e88117e..0000000000 --- a/windows/src/buildtools/version.in +++ /dev/null @@ -1,4 +0,0 @@ -VALUE "CompanyName", "SIL International\0" -VALUE "LegalCopyright", "© SIL International\0" -VALUE "LegalTrademarks", "Keyman is a registered trademark of SIL International\0" -VALUE "ProductName", "Keyman Build Environment\0" diff --git a/windows/src/desktop/Makefile b/windows/src/desktop/Makefile index 6e8fe2cad6..e3953f3d99 100644 --- a/windows/src/desktop/Makefile +++ b/windows/src/desktop/Makefile @@ -2,7 +2,12 @@ # Keyman for Windows Makefile # +!ifdef NODELPHI +TARGETS=.virtual +!else TARGETS=kmshell kmconfig kmbrowserhost setup insthelp +!endif + RELEASE_TARGETS=help CLEANS=inst clean-desktop MANIFESTS=kmshell setup insthelp @@ -11,31 +16,31 @@ MANIFESTS=kmshell setup insthelp # ---------------------------------------------------------------------- -kmshell: +kmshell: .virtual cd $(ROOT)\src\desktop\kmshell $(MAKE) $(TARGET) -kmconfig: +kmconfig: .virtual cd $(ROOT)\src\desktop\kmconfig $(MAKE) $(TARGET) -kmbrowserhost: +kmbrowserhost: .virtual cd $(ROOT)\src\desktop\kmbrowserhost $(MAKE) $(TARGET) -setup: +setup: .virtual cd $(ROOT)\src\desktop\setup $(MAKE) $(TARGET) -help: +help: .virtual cd $(ROOT)\src\desktop\help $(MAKE) $(TARGET) -insthelp: +insthelp: .virtual cd $(ROOT)\src\desktop\insthelp $(MAKE) $(TARGET) -inst: +inst: .virtual cd $(ROOT)\src\desktop\inst $(MAKE) $(TARGET) diff --git a/windows/src/desktop/help/start/download-and-install-keyboard.md b/windows/src/desktop/help/start/download-and-install-keyboard.md index 4d4a1e390d..cd1ddb18c0 100644 --- a/windows/src/desktop/help/start/download-and-install-keyboard.md +++ b/windows/src/desktop/help/start/download-and-install-keyboard.md @@ -71,6 +71,11 @@ Here's how to download and install a Keyman keyboard within Keyman: ![](../desktop_images/download-keyboard-step6.png) + **Note:** If you have a separate administrator account -- that is, you are + prompted to enter a username and password at this point -- you may need to + [add a language association](configure-computer) for your keyboard on your + user account after completing the keyboard installation. + 10. The keyboard will now be installed; you can close Keyman Configuration. ## Installing a Keyman Keyboard from a Folder on Your Computer diff --git a/windows/src/desktop/inst/.gitignore b/windows/src/desktop/inst/.gitignore index f92963534b..707050d155 100644 --- a/windows/src/desktop/inst/.gitignore +++ b/windows/src/desktop/inst/.gitignore @@ -3,3 +3,5 @@ desktop_resources.res desktopui.wxs cef.wxs locale.wxs +keymandesktop*.exe +desktop_resources.dll diff --git a/windows/src/desktop/inst/Makefile b/windows/src/desktop/inst/Makefile index b994b8211d..416e570e6b 100644 --- a/windows/src/desktop/inst/Makefile +++ b/windows/src/desktop/inst/Makefile @@ -13,17 +13,16 @@ manual-setup: check setup setup: desktop prereq: prereq-resources - # - # Prepare make file to copy versioned filenames to release folder - # - +# +# Prepare make file to copy versioned filenames to release folder +# cd $(ROOT)\src\desktop\inst $(MKVER_U) download.in download.mak prereq-resources: - # - # Create resource dll - # +# +# Create resource dll +# rc desktop_resources.rc $(LINKPATH) /DLL /OUT:desktop_resources.dll /RELEASE /NOENTRY /MACHINE:X86 desktop_resources.RES $(SIGNCODE) /d "Keyman Resources" desktop_resources.dll @@ -32,7 +31,7 @@ desktop: prereq $(MAKE) -fdownload.mak candle $(WIXLIGHT) -dWixUILicenseRtf=License.rtf -out keymandesktop.msi -ext WixUIExtension $(DESKTOP_FILES) $(SIGNCODE) /d "Keyman" keymandesktop.msi - # TODO: replace buildpkg with kmcomp and remove buildpkg from repository +# TODO: replace buildpkg with kmcomp and remove buildpkg from repository $(ROOT)\bin\buildtools\buildpkg -m keymandesktop.msi -s $(ROOT)\bin\desktop -l license.html $(SIGNCODE) /d "Keyman" keymandesktop.exe $(MAKE) -fdownload.mak copyredist-desktop diff --git a/windows/src/desktop/inst/download.in b/windows/src/desktop/inst/download.in index 04113063c7..bb5ecacbc3 100644 --- a/windows/src/desktop/inst/download.in +++ b/windows/src/desktop/inst/download.in @@ -38,12 +38,12 @@ candle-desktop: # heat-cef: - # We copy the files to a temp folder in order to exclude .git and README.md from harvesting +# We copy the files to a temp folder in order to exclude .git and README.md from harvesting -rmdir /s/q $(KEYMAN_WIX_TEMP_CEF) mkdir $(KEYMAN_WIX_TEMP_CEF) xcopy $(KEYMAN_CEF4DELPHI_ROOT)\* $(KEYMAN_WIX_TEMP_CEF)\ /s $(WIXHEAT) dir $(KEYMAN_WIX_TEMP_CEF) -o cef.wxs -ag -cg CEF -dr INSTALLDIR -var var.CefSourceDir -wx -nologo - # When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again +# When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again -rmdir /s/q $(KEYMAN_WIX_TEMP_CEF) candle-cef: heat-cef @@ -54,6 +54,6 @@ candle-cef: heat-cef # candle-locale: - # locale files are in desktop/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=$VersionWin -dRELEASE=$VersionRelease -dPRODUCTID=$GUID1 -dLOCALESOURCE=..\kmshell\locale locale.wxs diff --git a/windows/src/desktop/insthelp/Makefile b/windows/src/desktop/insthelp/Makefile index 1c5f77dcc3..b3d4dcdf07 100644 --- a/windows/src/desktop/insthelp/Makefile +++ b/windows/src/desktop/insthelp/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: version.res dirs - $(DELPHI_MSBUILD) insthelp.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) insthelp.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\insthelp.exe -dpr insthelp.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\insthelp.exe $(COPY) $(WIN32_TARGET_PATH)\insthelp.exe $(ROOT)\bin\desktop\insthelp.exe diff --git a/windows/src/desktop/insthelp/version.in b/windows/src/desktop/insthelp/version.rc similarity index 59% rename from windows/src/desktop/insthelp/version.in rename to windows/src/desktop/insthelp/version.rc index 7e68a75120..e79e4f5c2e 100644 --- a/windows/src/desktop/insthelp/version.in +++ b/windows/src/desktop/insthelp/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Installation Assistant\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "INSTHELP\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "INSTHELP.EXE\0" VALUE "ProductName", "Keyman\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/desktop/kmbrowserhost/Makefile b/windows/src/desktop/kmbrowserhost/Makefile index 32ba89e630..ca3233516f 100644 --- a/windows/src/desktop/kmbrowserhost/Makefile +++ b/windows/src/desktop/kmbrowserhost/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: version.res manifest.res dirs - $(DELPHI_MSBUILD) kmbrowserhost.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) kmbrowserhost.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmbrowserhost.exe -dpr kmbrowserhost.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\kmbrowserhost.exe diff --git a/windows/src/desktop/kmbrowserhost/version.in b/windows/src/desktop/kmbrowserhost/version.rc similarity index 59% rename from windows/src/desktop/kmbrowserhost/version.in rename to windows/src/desktop/kmbrowserhost/version.rc index f4b38a023d..f5f7b89560 100644 --- a/windows/src/desktop/kmbrowserhost/version.in +++ b/windows/src/desktop/kmbrowserhost/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Browser Host Process\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMBROWSERHOST\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMBROWSERHOST.EXE\0" VALUE "ProductName", "Keyman\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/desktop/kmconfig/Makefile b/windows/src/desktop/kmconfig/Makefile index d063237156..d7f308f9d6 100644 --- a/windows/src/desktop/kmconfig/Makefile +++ b/windows/src/desktop/kmconfig/Makefile @@ -4,16 +4,13 @@ !include ..\..\Defines.mak -build: version.res manifest.res #icons - $(DELPHI_MSBUILD) kmconfig.dproj /p:Platform=Win32 +build: version.res manifest.res + $(DELPHI_MSBUILD) kmconfig.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmconfig.exe -dpr kmconfig.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\kmconfig.exe $(COPY) $(WIN32_TARGET_PATH)\kmconfig.exe $(PROGRAM)\desktop if exist $(WIN32_TARGET_PATH)\kmconfig.dbg $(COPY) $(WIN32_TARGET_PATH)\kmconfig.dbg $(DEBUGPATH)\desktop -#icons: - #rc icons.rc - clean: def-clean signcode: diff --git a/windows/src/desktop/kmconfig/version.in b/windows/src/desktop/kmconfig/version.rc similarity index 59% rename from windows/src/desktop/kmconfig/version.in rename to windows/src/desktop/kmconfig/version.rc index acdc60a537..3c9c8c4176 100644 --- a/windows/src/desktop/kmconfig/version.in +++ b/windows/src/desktop/kmconfig/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman System Settings\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCONFIG\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMCONFIG.EXE\0" VALUE "ProductName", "Keyman\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/desktop/kmshell/Makefile b/windows/src/desktop/kmshell/Makefile index 65dd5b5297..4626a9626e 100644 --- a/windows/src/desktop/kmshell/Makefile +++ b/windows/src/desktop/kmshell/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: version.res manifest.res icons xml - $(DELPHI_MSBUILD) kmshell.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) kmshell.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmshell.exe -dpr kmshell.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\kmshell.exe $(COPY) $(WIN32_TARGET_PATH)\kmshell.exe $(PROGRAM)\desktop @@ -17,7 +17,7 @@ icons: xml: sentry-init.js cd $(ROOT)\src\desktop\kmshell\xml -del /q $(ROOT)\bin\desktop\xml\* - copy * $(ROOT)\bin\desktop\xml\ # + copy * $(ROOT)\bin\desktop\xml cd $(ROOT)\src\desktop\kmshell -rmdir /S /Q $(ROOT)\bin\desktop\locale mkdir $(ROOT)\bin\desktop\locale diff --git a/windows/src/desktop/kmshell/version.in b/windows/src/desktop/kmshell/version.rc similarity index 59% rename from windows/src/desktop/kmshell/version.in rename to windows/src/desktop/kmshell/version.rc index c9df1086be..3eac4e174d 100644 --- a/windows/src/desktop/kmshell/version.in +++ b/windows/src/desktop/kmshell/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Configuration\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMSHELL\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMSHELL.EXE\0" VALUE "ProductName", "Keyman\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/desktop/setup/Makefile b/windows/src/desktop/setup/Makefile index 499dc2e38e..ca2a308133 100644 --- a/windows/src/desktop/setup/Makefile +++ b/windows/src/desktop/setup/Makefile @@ -5,16 +5,16 @@ !include ..\..\Defines.mak build: version.res manifest.res icons locale - $(DELPHI_MSBUILD) setup.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) setup.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\setup.exe -dpr setup.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\setup.exe $(COPY) $(WIN32_TARGET_PATH)\setup.exe $(PROGRAM)\desktop - # This version of setup.exe is for redistribution as a - # bundled installer and is not signed +# This version of setup.exe is for redistribution as a +# bundled installer and is not signed $(COPY) $(WIN32_TARGET_PATH)\setup.exe $(PROGRAM)\desktop\setup-redist.exe -locale: +locale: .virtual $(ROOT)\bin\buildtools\devtools.exe -buildsetupstrings locale\ .\ setup_dialog.res: @@ -34,11 +34,11 @@ wrap-symbols: $(SYMSTORE) $(DEBUGPATH)\desktop\setup.dbg /t keyman-windows test-manifest: - # test that (a) linked manifest exists and correct, and (b) has uiAccess=true +# test that (a) linked manifest exists and correct, and (b) has uiAccess=true $(MT) -nologo -inputresource:$(PROGRAM)\desktop\setup.exe -validate_manifest debug-manifest: - # make a non-elevated manifest for testing purposes +# make a non-elevated manifest for testing purposes -del manifest.res copy manifest.in std-manifest.tmp copy debug-manifest.in manifest.in diff --git a/windows/src/desktop/setup/version.in b/windows/src/desktop/setup/version.rc similarity index 58% rename from windows/src/desktop/setup/version.in rename to windows/src/desktop/setup/version.rc index 4788272e5e..cc4da55f35 100644 --- a/windows/src/desktop/setup/version.in +++ b/windows/src/desktop/setup/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Setup\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "SETUP\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "SETUP.EXE\0" VALUE "ProductName", "Keyman\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/desktop/version.in b/windows/src/desktop/version.in deleted file mode 100644 index d88b6d2430..0000000000 --- a/windows/src/desktop/version.in +++ /dev/null @@ -1,4 +0,0 @@ -VALUE "CompanyName", "SIL International\0" -VALUE "LegalCopyright", "© SIL International\0" -VALUE "LegalTrademarks", "Keyman is a registered trademark of SIL International\0" -VALUE "ProductName", "Keyman\0" diff --git a/windows/src/developer/Makefile b/windows/src/developer/Makefile index 609b98a7a2..e51b4d9749 100644 --- a/windows/src/developer/Makefile +++ b/windows/src/developer/Makefile @@ -2,8 +2,12 @@ # Keyman dev Makefile # - +!ifdef NODELPHI +TARGETS=kmcmpdll kmanalyze kmdecomp +!else TARGETS=kmcmpdll kmcomp kmanalyze kmconvert tike samples setup inst kmdecomp +!endif + MANIFESTS=kmcomp tike setup CLEANS=clean-developer @@ -11,15 +15,15 @@ CLEANS=clean-developer # ---------------------------------------------------------------------- -imsample: +imsample: .virtual cd $(ROOT)\src\developer\imsample $(MAKE) $(TARGET) -kmcmpdll: +kmcmpdll: .virtual cd $(ROOT)\src\developer\kmcmpdll $(MAKE) $(TARGET) -kmdecomp: +kmdecomp: .virtual cd $(ROOT)\src\developer\kmdecomp $(MAKE) $(TARGET) @@ -27,11 +31,11 @@ kmcomp: kmcmpdll cd $(ROOT)\src\developer\kmcomp $(MAKE) $(TARGET) -kmanalyze: +kmanalyze: .virtual cd $(ROOT)\src\developer\kmanalyze $(MAKE) $(TARGET) -kmconvert: +kmconvert: .virtual cd $(ROOT)\src\developer\kmconvert $(MAKE) $(TARGET) @@ -39,11 +43,11 @@ tike: kmcmpdll redist cd $(ROOT)\src\developer\tike $(MAKE) $(TARGET) -samples: +samples: .virtual cd $(ROOT)\src\developer\samples $(MAKE) $(TARGET) -setup: +setup: .virtual cd $(ROOT)\src\developer\setup $(MAKE) $(TARGET) diff --git a/windows/src/developer/TIKE/Makefile b/windows/src/developer/TIKE/Makefile index 956cb62805..4199470467 100644 --- a/windows/src/developer/TIKE/Makefile +++ b/windows/src/developer/TIKE/Makefile @@ -6,7 +6,7 @@ build: version.res manifest.res icons dirs xml xsd pull-core cd $(ROOT)\src\developer\tike - $(DELPHI_MSBUILD) tike.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) tike.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\tike.exe -dpr tike.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\tike.exe $(COPY) $(WIN32_TARGET_PATH)\tike.exe $(PROGRAM)\developer @@ -44,28 +44,28 @@ pull-core: !endif pull-npm: - # - # Grab the version of Monaco and any other node modules - # that we want to use in Keyman Developer, and copy into - # lib folder for sane paths. If we use more npm modules in the - # future, we may consolidate the paths at that time. - # +# +# Grab the version of Monaco and any other node modules +# that we want to use in Keyman Developer, and copy into +# lib folder for sane paths. If we use more npm modules in the +# future, we may consolidate the paths at that time. +# cd $(ROOT)\src\developer\tike\xml\app npm install -rd /s/q $(ROOT)\src\developer\tike\xml\app\lib\monaco - xcopy /s /y $(ROOT)\src\developer\tike\xml\app\node_modules\monaco-editor\min $(ROOT)\src\developer\tike\xml\app\lib\monaco\min\ # - xcopy /s /y $(ROOT)\src\developer\tike\xml\app\node_modules\monaco-editor\min-maps $(ROOT)\src\developer\tike\xml\app\lib\monaco\min-maps\ # + xcopy /i /s /y $(ROOT)\src\developer\tike\xml\app\node_modules\monaco-editor\min $(ROOT)\src\developer\tike\xml\app\lib\monaco\min + xcopy /i /s /y $(ROOT)\src\developer\tike\xml\app\node_modules\monaco-editor\min-maps $(ROOT)\src\developer\tike\xml\app\lib\monaco\min-maps pull-keymanweb: - # - # Requires us to build KMW in order to get the output files - # If GIT_BASH_FOR_KEYMAN variable is not defined, then will just throw up - # a new window to do the build. This means we lose logging and - # potentially exit values as well. So GIT_BASH should be set for - # build agents, etc, to something like - # - # GIT_BASH_FOR_KEYMAN="C:\Program Files\Git\bin\bash.exe" --init-file "c:\Program Files\Git\etc\profile" -l - # +# +# Requires us to build KMW in order to get the output files +# If GIT_BASH_FOR_KEYMAN variable is not defined, then will just throw up +# a new window to do the build. This means we lose logging and +# potentially exit values as well. So GIT_BASH should be set for +# build agents, etc, to something like +# +# GIT_BASH_FOR_KEYMAN="C:\Program Files\Git\bin\bash.exe" --init-file "c:\Program Files\Git\etc\profile" -l +# cd $(ROOT)\..\web\source !ifdef GIT_BASH_FOR_KEYMAN @@ -76,12 +76,12 @@ pull-keymanweb: -rd /s/q $(ROOT)\src\developer\tike\xml\kmw\resource mkdir $(ROOT)\src\developer\tike\xml\kmw\resource - xcopy /y $(ROOT)\..\web\release\unminified\web\*.js $(ROOT)\src\developer\tike\xml\kmw\resource\ # - xcopy /y $(ROOT)\..\web\release\unminified\web\*.js.map $(ROOT)\src\developer\tike\xml\kmw\resource\ # - xcopy /y $(ROOT)\..\web\LICENSE $(ROOT)\src\developer\tike\xml\kmw\resource\ # - xcopy /y $(ROOT)\..\web\README.md $(ROOT)\src\developer\tike\xml\kmw\resource\ # - xcopy /s /y $(ROOT)\..\web\release\unminified\web\osk\* $(ROOT)\src\developer\tike\xml\kmw\resource\osk\ # - xcopy /s /y $(ROOT)\..\web\release\unminified\web\ui\* $(ROOT)\src\developer\tike\xml\kmw\resource\ui\ # + xcopy /i /y $(ROOT)\..\web\release\unminified\web\*.js $(ROOT)\src\developer\tike\xml\kmw\resource + xcopy /i /y $(ROOT)\..\web\release\unminified\web\*.js.map $(ROOT)\src\developer\tike\xml\kmw\resource + xcopy /i /y $(ROOT)\..\web\LICENSE $(ROOT)\src\developer\tike\xml\kmw\resource + xcopy /i /y $(ROOT)\..\web\README.md $(ROOT)\src\developer\tike\xml\kmw\resource + xcopy /i /s /y $(ROOT)\..\web\release\unminified\web\osk\* $(ROOT)\src\developer\tike\xml\kmw\resource\osk + xcopy /i /s /y $(ROOT)\..\web\release\unminified\web\ui\* $(ROOT)\src\developer\tike\xml\kmw\resource\ui icons: rc icons.rc @@ -102,7 +102,7 @@ install: $(COPY) $(PROGRAM)\developer\kmnkbp0-0.dll "$(INSTALLPATH_KEYMANDEVELOPER)\kmnkbp0-0.dll" test-manifest: - # test that linked manifest exists and correct +# test that linked manifest exists and correct $(MT) -nologo -inputresource:$(PROGRAM)\developer\tike.exe -validate_manifest generate-app-wxs: diff --git a/windows/src/developer/TIKE/project/Keyman.Developer.System.Project.WelcomeRenderer.pas b/windows/src/developer/TIKE/project/Keyman.Developer.System.Project.WelcomeRenderer.pas index 2e6e341ae6..0de6a14467 100644 --- a/windows/src/developer/TIKE/project/Keyman.Developer.System.Project.WelcomeRenderer.pas +++ b/windows/src/developer/TIKE/project/Keyman.Developer.System.Project.WelcomeRenderer.pas @@ -23,8 +23,26 @@ uses utilsystem; class function TWelcomeRenderer.ProjectMRUFilename: string; +var + path: string; +const + SMRUFilename = 'project_mru.xml'; begin - Result := GetFolderPath(CSIDL_APPDATA) + SFolderKeymanDeveloper + 'project_mru.xml'; + // Keyman Developer 14 omitted the backslash in the file path + // so it was saving this file in the wrong location. This small patch + // moves the file into the right location. + path := GetFolderPath(CSIDL_APPDATA) + SFolderKeymanDeveloper; + if FileExists(path + SMRUFilename) then + begin + if not DirectoryExists(path) then + CreateDir(path); + if FileExists(path + '\' + SMRuFilename) + then DeleteFile(path + SMRUFilename) + else RenameFile(path + SMRUFilename, path + '\' + SMRUFilename); + end; + // end patch + + Result := path + '\' + SMRUFilename; end; class function TWelcomeRenderer.Render: string; diff --git a/windows/src/developer/TIKE/project/Keyman.Developer.UI.Project.kpsProjectFileUI.pas b/windows/src/developer/TIKE/project/Keyman.Developer.UI.Project.kpsProjectFileUI.pas index 161bf4921d..26959fbdfe 100644 --- a/windows/src/developer/TIKE/project/Keyman.Developer.UI.Project.kpsProjectFileUI.pas +++ b/windows/src/developer/TIKE/project/Keyman.Developer.UI.Project.kpsProjectFileUI.pas @@ -137,7 +137,7 @@ begin if not FileExists(FCompiledName) then Exit(False); - modWebHttpServer.Debugger.RegisterPackage(FCompiledName, FCompiledName); // TODO: Show package 'name' in future + modWebHttpServer.Debugger.RegisterPackage(FCompiledName, ProjectFile.Header_Name); // TODO: Show package 'name' in future packageEditor.NotifyStartedWebDebug; // I4021 diff --git a/windows/src/developer/TIKE/version.in b/windows/src/developer/TIKE/version.rc similarity index 59% rename from windows/src/developer/TIKE/version.in rename to windows/src/developer/TIKE/version.rc index 17b4e66411..9f92e84144 100644 --- a/windows/src/developer/TIKE/version.in +++ b/windows/src/developer/TIKE/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Developer\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "Keyman Developer\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "TIKE.EXE\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/TIKE/xml/kmw/packages.html b/windows/src/developer/TIKE/xml/kmw/packages.html index 73562f981d..cc17dbff13 100644 --- a/windows/src/developer/TIKE/xml/kmw/packages.html +++ b/windows/src/developer/TIKE/xml/kmw/packages.html @@ -35,8 +35,13 @@

Clicking the package links below will download and install the package into the Keyman app on this device.

-
    -
+ + + + + + +
NameID

You can add more packages to this list by opening the package source in the Package Editor and clicking [Test Online].

diff --git a/windows/src/developer/TIKE/xml/kmw/packages.js b/windows/src/developer/TIKE/xml/kmw/packages.js index 4664b8846e..5a9152f0c2 100644 --- a/windows/src/developer/TIKE/xml/kmw/packages.js +++ b/windows/src/developer/TIKE/xml/kmw/packages.js @@ -15,22 +15,35 @@ function updatePackages(data) { return false; } - var ul = document.getElementById('packages'); - ul.innerHTML = ''; + var tbody = document.getElementById('packages'); + tbody.innerHTML = ''; if(data.packages.length == 0) { - var li = document.createElement('li'); - li.innerText = 'No packages available.'; - ul.appendChild(li); + var tr = document.createElement('tr'); + var td = document.createElement('td'); + td.colSpan = 2; + td.innerText = 'No packages available.'; + tr.appendChild(td); + tbody.appendChild(tr); return true; } for(var i = 0; i < data.packages.length; i++) { - var li = document.createElement('li'); + var tr = document.createElement('tr'); + var tdname = document.createElement('td'); + var tdid = document.createElement('td'); var a = document.createElement('a'); a.href = '/package/'+data.packages[i].id; + a.title = data.packages[i].filename; a.innerText = data.packages[i].name; - li.appendChild(a); - ul.appendChild(li); + tdname.appendChild(a); + var a = document.createElement('a'); + a.href = '/package/'+data.packages[i].id; + a.title = data.packages[i].filename; + a.innerText = data.packages[i].id; + tdid.appendChild(a); + tr.appendChild(tdname); + tr.appendChild(tdid); + tbody.appendChild(tr); } } } diff --git a/windows/src/developer/TIKE/xml/kmw/test.css b/windows/src/developer/TIKE/xml/kmw/test.css index 8e28739948..9b04434816 100644 --- a/windows/src/developer/TIKE/xml/kmw/test.css +++ b/windows/src/developer/TIKE/xml/kmw/test.css @@ -228,4 +228,22 @@ h2 { #input-area, #character-grid { width: 100%; +} + +/* Package install */ + +#package-install { + text-align: left; + width: 100%; + border-collapse: collapse; +} + +#package-install td, +#package-install th { + border: solid 1px #c0c0c0; + padding: 8px; +} + +#package-install th { + background: #cccccc; } \ No newline at end of file diff --git a/windows/src/developer/inst/.gitignore b/windows/src/developer/inst/.gitignore index ef75dc53ce..9afc70df8a 100644 --- a/windows/src/developer/inst/.gitignore +++ b/windows/src/developer/inst/.gitignore @@ -5,3 +5,4 @@ setup.inf setup.zip templates.wxs xml.wxs +keymandeveloper*.exe diff --git a/windows/src/developer/inst/Makefile b/windows/src/developer/inst/Makefile index cdf3ac8549..3dcafd0515 100644 --- a/windows/src/developer/inst/Makefile +++ b/windows/src/developer/inst/Makefile @@ -9,31 +9,29 @@ DEVELOPER_FILES=kmdev.wixobj xml.wixobj cef.wixobj templates.wixobj kmlmc.wixobj setup: - - # - # Prepare file version information - # - +# +# Prepare file version information +# cd $(ROOT)\src\developer\inst $(MKVER_U) download.in download.mak - # - # Build the installation archive - # +# +# Build the installation archive +# $(MAKE) -fdownload.mak candle $(WIXLIGHT) -sice:ICE91 -sice:ICE60 -dWixUILicenseRtf=License.rtf -out keymandeveloper.msi -ext WixUIExtension $(DEVELOPER_FILES) $(MAKE) -fdownload.mak clean-heat - # - # Sign the installation archive - # +# +# Sign the installation archive +# $(SIGNCODE) /d "Keyman Developer" keymandeveloper.msi - # - # Copy the installation archive - # +# +# Copy the installation archive +# cd $(ROOT)\src\developer\inst $(MAKE) -fdownload.mak diff --git a/windows/src/developer/inst/download.in b/windows/src/developer/inst/download.in index 5b99e09053..321700a9e5 100644 --- a/windows/src/developer/inst/download.in +++ b/windows/src/developer/inst/download.in @@ -39,7 +39,7 @@ candle: heat-cef heat-xml heat-templates heat-model-compiler clean-heat: clean-heat-model-compiler heat-xml: - # We copy the files to a temp folder in order to exclude thumbs.db, .vs, etc from harvesting +# We copy the files to a temp folder in order to exclude thumbs.db, .vs, etc from harvesting -rmdir /s/q $(KEYMAN_WIX_TEMP_XML) mkdir $(KEYMAN_WIX_TEMP_XML) xcopy $(ROOT)\src\developer\TIKE\xml\* $(KEYMAN_WIX_TEMP_XML)\ /s @@ -47,29 +47,29 @@ heat-xml: -rmdir /s/q $(KEYMAN_WIX_TEMP_XML)\app\node_modules -for /f %i in ('dir /a:d /s /b $(KEYMAN_WIX_TEMP_XML)\.vs') do rd /s /q %i $(WIXHEAT) dir $(KEYMAN_WIX_TEMP_XML) -o xml.wxs -ag -cg XML -dr INSTALLDIR -var var.XmlSourceDir -wx -nologo - # When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again +# When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again -rmdir /s/q $(KEYMAN_WIX_TEMP_XML) heat-templates: - # We copy the files to a temp folder in order to exclude .git and README.md from harvesting +# We copy the files to a temp folder in order to exclude .git and README.md from harvesting -rmdir /s/q $(KEYMAN_WIX_TEMP_TEMPLATES) mkdir $(KEYMAN_WIX_TEMP_TEMPLATES) xcopy $(KEYMAN_DEVELOPER_TEMPLATES_ROOT)\* $(KEYMAN_WIX_TEMP_TEMPLATES)\ /s $(WIXHEAT) dir $(KEYMAN_WIX_TEMP_TEMPLATES) -o templates.wxs -ag -cg Templates -dr dirProjects -var var.TemplatesSourceDir -wx -nologo - # When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again +# When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again -rmdir /s/q $(KEYMAN_WIX_TEMP_TEMPLATES) heat-cef: - # We copy the files to a temp folder in order to exclude .git and README.md from harvesting +# We copy the files to a temp folder in order to exclude .git and README.md from harvesting -rmdir /s/q $(KEYMAN_WIX_TEMP_CEF) mkdir $(KEYMAN_WIX_TEMP_CEF) xcopy $(KEYMAN_CEF4DELPHI_ROOT)\* $(KEYMAN_WIX_TEMP_CEF)\ /s $(WIXHEAT) dir $(KEYMAN_WIX_TEMP_CEF) -o cef.wxs -ag -cg CEF -dr INSTALLDIR -var var.CefSourceDir -wx -nologo - # When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again +# When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again -rmdir /s/q $(KEYMAN_WIX_TEMP_CEF) heat-model-compiler: - # Build kmlmc +# Build kmlmc cd $(KEYMAN_MODELCOMPILER_ROOT) !ifdef GIT_BASH_FOR_KEYMAN @@ -77,65 +77,65 @@ heat-model-compiler: !else 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 - # control of the set of files distributed with the Keyman Developer installer. - # - # For users on other operating systems, node.js is a dependency and the compiler can be installed with - # `npm install @keymanapp/lexical-model-compiler`. +# 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 +# control of the set of files distributed with the Keyman Developer installer. +# +# For users on other operating systems, node.js is a dependency and the compiler can be installed with +# `npm install @keymanapp/lexical-model-compiler`. - # We copy the files to a temp folder in order to exclude thumbs.db, .vs, etc from harvesting +# We copy the files to a temp folder in order to exclude thumbs.db, .vs, etc from harvesting -rmdir /s/q $(KEYMAN_WIX_TEMP_MODELCOMPILER) - # Step 1 - npm-pack the model compiler package, then unpack it in our bundling directory. - # This automatically strips the package to its barebones. +# Step 1 - npm-pack the model compiler package, then unpack it in our bundling directory. +# This automatically strips the package to its barebones. npm pack ren keymanapp-lexical-model-compiler*.tgz kmlmc.tgz move kmlmc.tgz $(KEYMAN_WIX_TEMP_BASE) - # We extract the npm-packed version of the model compiler in order to reproduce our needed bundle. +# We extract the npm-packed version of the model compiler in order to reproduce our needed bundle. cd $(KEYMAN_WIX_TEMP_BASE) - # Requires use of 7-zip, which we're already depending on elsewhere in the build process. +# Requires use of 7-zip, which we're already depending on elsewhere in the build process. $(WZZIPPATH) x kmlmc.tgz $(WZZIPPATH) x kmlmc.tar - # Creates the directory referenced by $(KEYMAN_WIX_TEMP_MODELCOMPILER). +# Creates the directory referenced by $(KEYMAN_WIX_TEMP_MODELCOMPILER). move package ModelCompiler - # Cleans up the npm pack artifacts, which are no longer needed. +# Cleans up the npm pack artifacts, which are no longer needed. del kmlmc.tgz del kmlmc.tar - # Step 2 - the model compiler has one in-repo dependency that will also need to be packed. - # Managing other in-repo dependencies will be simpler; they install into ModelCompiler's - # extracted bundle. +# Step 2 - the model compiler has one in-repo dependency that will also need to be packed. +# Managing other in-repo dependencies will be simpler; they install into ModelCompiler's +# extracted bundle. cd $(KEYMAN_MODELCOMPILER_ROOT)\node_modules\@keymanapp\models-types npm pack ren keymanapp-models-types*.tgz kmtypes.tgz move kmtypes.tgz $(KEYMAN_WIX_TEMP_MODELCOMPILER) - # Step 3 - install just the bare essentials by using our packed local dependency, followed by - # all external production dependencies. +# Step 3 - install just the bare essentials by using our packed local dependency, followed by +# all external production dependencies. cd $(KEYMAN_WIX_TEMP_MODELCOMPILER) - # package-lock.json wasn't bundled; this is needed to keep dependency versions consistent. +# package-lock.json wasn't bundled; this is needed to keep dependency versions consistent. copy $(KEYMAN_MODELCOMPILER_ROOT)\package-lock.json $(KEYMAN_WIX_TEMP_MODELCOMPILER) npm install kmtypes.tgz --production --no-optional npm install --production --no-optional - # Clean up the npm pack artifacts for the dependencies. +# Clean up the npm pack artifacts for the dependencies. del kmtypes.tgz - # We don't need the unit tests +# We don't need the unit tests -rmdir /s/q $(KEYMAN_WIX_TEMP_MODELCOMPILER)\tests - # Build the .wxs file +# Build the .wxs file cd $(ROOT)\src\developer\inst $(WIXHEAT) dir $(KEYMAN_WIX_TEMP_MODELCOMPILER) -o kmlmc.wxs -ag -cg ModelCompiler -dr INSTALLDIR -var var.ModelCompilerSourceDir -wx -nologo clean-heat-model-compiler: - # the production build generates files that are not in source, e.g. .ps1 scripts - # When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again +# the production build generates files that are not in source, e.g. .ps1 scripts +# When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again -rmdir /s/q $(KEYMAN_WIX_TEMP_MODELCOMPILER) makeinstaller: diff --git a/windows/src/developer/kmanalyze/version.in b/windows/src/developer/kmanalyze/version.rc similarity index 60% rename from windows/src/developer/kmanalyze/version.in rename to windows/src/developer/kmanalyze/version.rc index 05951e57fd..2e25c7b275 100644 --- a/windows/src/developer/kmanalyze/version.in +++ b/windows/src/developer/kmanalyze/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Developer Keyboard Analyzer\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMANALYZE\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMANALYZE.EXE\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/kmcmpdll/Makefile b/windows/src/developer/kmcmpdll/Makefile index dac9020154..cc91e84942 100644 --- a/windows/src/developer/kmcmpdll/Makefile +++ b/windows/src/developer/kmcmpdll/Makefile @@ -6,19 +6,19 @@ build: version.res dirs - $(MSBUILD) kmcmpdll.vcxproj $(MSBUILD_BUILD) /p:Platform=Win32 + $(MSBUILD) kmcmpdll.vcxproj $(MSBUILD_BUILD) "/p:Platform=Win32" $(COPY) $(WIN32_TARGET_PATH)\kmcmpdll.dll $(PROGRAM)\developer $(COPY) $(WIN32_TARGET_PATH)\kmcmpdll.lib $(OUTLIB) $(COPY) $(WIN32_TARGET_PATH)\kmcmpdll.pdb $(DEBUGPATH)\developer - # for debugging purposes, it's useful to have a copy - # of kmcmpdll.dll in the TIKE project folder; it is - # .gitignored +# for debugging purposes, it's useful to have a copy +# of kmcmpdll.dll in the TIKE project folder; it is +# .gitignored -mkdir ..\kmcomp\$(WIN32_TARGET_PATH) -mkdir ..\tike\$(WIN32_TARGET_PATH) $(COPY) $(WIN32_TARGET_PATH)\kmcmpdll.dll ..\tike\$(WIN32_TARGET_PATH)\kmcmpdll.dll $(COPY) $(WIN32_TARGET_PATH)\kmcmpdll.dll ..\kmcomp\$(WIN32_TARGET_PATH)\kmcmpdll.dll - $(MSBUILD) kmcmpdll.vcxproj $(MSBUILD_BUILD) /p:Platform=x64 + $(MSBUILD) kmcmpdll.vcxproj $(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 diff --git a/windows/src/developer/kmcmpdll/version.in b/windows/src/developer/kmcmpdll/version.rc similarity index 59% rename from windows/src/developer/kmcmpdll/version.in rename to windows/src/developer/kmcmpdll/version.rc index 53bfd786d7..d019f1e46e 100644 --- a/windows/src/developer/kmcmpdll/version.in +++ b/windows/src/developer/kmcmpdll/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman compiler library\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCOMP\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMCOMP.DLL\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/kmcomp/Makefile b/windows/src/developer/kmcomp/Makefile index c866336036..c18df3645f 100644 --- a/windows/src/developer/kmcomp/Makefile +++ b/windows/src/developer/kmcomp/Makefile @@ -9,23 +9,23 @@ TARGET_EXT=exe TARGET_GROUP=developer build: version.res manifest.res dirs icons - $(DELPHI_MSBUILD) kmcomp.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) kmcomp.dproj "/p:Platform=Win32" $(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 - $(DELPHI_MSBUILD) kmcomp.dproj /p:Platform=Win64 + $(DELPHI_MSBUILD) kmcomp.dproj "/p:Platform=Win64" if exist $(WIN64_TARGET_PATH)\kmcomp.x64.exe del $(WIN64_TARGET_PATH)\kmcomp.x64.exe - # Delphi does not allow us to build to a different target filename so we rename after build +# Delphi does not allow us to build to a different target filename so we rename after build ren $(WIN64_TARGET_PATH)\kmcomp.exe kmcomp.x64.exe 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 @@ -43,10 +43,10 @@ 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 +#TODO: $(SYMSTORE) $(DEBUGPATH)\developer\kmcomp.x64.dbg /t keyman-developer test-manifest: - # test that (a) linked manifest exists and correct +# test that (a) linked manifest exists and correct $(MT) -nologo -inputresource:$(PROGRAM)\developer\kmcomp.exe -validate_manifest $(MT) -nologo -inputresource:$(PROGRAM)\developer\kmcomp.x64.exe -validate_manifest diff --git a/windows/src/developer/kmcomp/version.in b/windows/src/developer/kmcomp/version.rc similarity index 59% rename from windows/src/developer/kmcomp/version.in rename to windows/src/developer/kmcomp/version.rc index 0ae6ccfb23..57dddc7784 100644 --- a/windows/src/developer/kmcomp/version.in +++ b/windows/src/developer/kmcomp/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman commandline compiler\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCOMP\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMCOMP.EXE\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/kmconvert/Makefile b/windows/src/developer/kmconvert/Makefile index 09eff7e0a8..5c8b4dff22 100644 --- a/windows/src/developer/kmconvert/Makefile +++ b/windows/src/developer/kmconvert/Makefile @@ -5,14 +5,14 @@ !include ..\..\Defines.mak build: version.res manifest.res dirs icons - $(DELPHI_MSBUILD) kmconvert.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) kmconvert.dproj "/p:Platform=Win32" $(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 - # Copy template files to project +# Copy template files to project -rd /s/q $(ROOT)\bin\developer\projects\templates -mkdir $(ROOT)\bin\developer\projects\templates xcopy /s /y data\* $(ROOT)\bin\developer\projects\templates @@ -31,7 +31,7 @@ wrap-symbols: $(SYMSTORE) $(DEBUGPATH)\developer\kmconvert.dbg /t keyman-developer test-manifest: - # test that (a) linked manifest exists and correct +# test that (a) linked manifest exists and correct $(MT) -nologo -inputresource:$(PROGRAM)\developer\kmconvert.exe -validate_manifest install: diff --git a/windows/src/developer/kmconvert/version.in b/windows/src/developer/kmconvert/version.rc similarity index 60% rename from windows/src/developer/kmconvert/version.in rename to windows/src/developer/kmconvert/version.rc index 828575e157..9e45f66f9a 100644 --- a/windows/src/developer/kmconvert/version.in +++ b/windows/src/developer/kmconvert/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Developer Conversion Utility\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCONVERT\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMCONVERT.EXE\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/kmdecomp/Makefile b/windows/src/developer/kmdecomp/Makefile index 1c221fed1a..1ba3e46be5 100644 --- a/windows/src/developer/kmdecomp/Makefile +++ b/windows/src/developer/kmdecomp/Makefile @@ -6,7 +6,7 @@ build: version.res dirs - $(MSBUILD) kmdecomp.sln $(MSBUILD_BUILD) /p:Platform=Win32 + $(MSBUILD) kmdecomp.sln $(MSBUILD_BUILD) "/p:Platform=Win32" $(COPY) $(WIN32_TARGET_PATH)\kmdecomp.exe $(PROGRAM)\developer $(COPY) $(WIN32_TARGET_PATH)\kmdecomp.pdb $(DEBUGPATH)\developer diff --git a/windows/src/developer/kmdecomp/version.in b/windows/src/developer/kmdecomp/version.rc similarity index 59% rename from windows/src/developer/kmdecomp/version.in rename to windows/src/developer/kmdecomp/version.rc index 800c26d0b6..2b15cdb3b4 100644 --- a/windows/src/developer/kmdecomp/version.in +++ b/windows/src/developer/kmdecomp/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman decompiler\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMDECOMP\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMDECOMP.EXE\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/kmndebug/version.rc b/windows/src/developer/kmndebug/version.rc new file mode 100644 index 0000000000..2f50719b74 --- /dev/null +++ b/windows/src/developer/kmndebug/version.rc @@ -0,0 +1,32 @@ +#include "../../global/inc/keymanversion.h" + +1 VERSIONINFO + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION + FILEFLAGSMASK 0x3fL + FILEFLAGS 0x0L + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0C0904E4" + BEGIN + VALUE "CompanyName", KV_COMPANY_NAME + VALUE "FileDescription", "Keyman KMN Debug Library\0" + VALUE "FileVersion", KV_VERSION_STRING + VALUE "InternalName", "KMNDEBUG\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS + VALUE "OriginalFilename", "KMNDEBUG.DLL\0" + VALUE "ProductName", "Keyman Developer\0" + VALUE "ProductVersion", KV_VERSION_STRING + VALUE "Comments", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0xc09, 1252 + END + END diff --git a/windows/src/developer/samples/Makefile b/windows/src/developer/samples/Makefile index 3c03675a0c..592f700f79 100644 --- a/windows/src/developer/samples/Makefile +++ b/windows/src/developer/samples/Makefile @@ -5,10 +5,12 @@ TARGETS=imsample !include ..\..\Header.mak -imsample: +imsample: .virtual cd $(ROOT)\src\developer\samples\imsample $(MAKE) $(TARGET) +!include ..\..\Target.mak + # ---------------------------------------------------------------------- # EOF # ---------------------------------------------------------------------- diff --git a/windows/src/developer/samples/imsample/version.in b/windows/src/developer/samples/imsample/version.rc similarity index 59% rename from windows/src/developer/samples/imsample/version.in rename to windows/src/developer/samples/imsample/version.rc index ce20f15995..b4ffaf6dc8 100644 --- a/windows/src/developer/samples/imsample/version.in +++ b/windows/src/developer/samples/imsample/version.rc @@ -1,6 +1,8 @@ +#include "../../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman IM Sample\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "IMSAMPLE\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "IMSAMPLE.DLL\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/setup/Makefile b/windows/src/developer/setup/Makefile index 3ec095b249..96e2ba88f8 100644 --- a/windows/src/developer/setup/Makefile +++ b/windows/src/developer/setup/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: version.res manifest.res icons - $(DELPHI_MSBUILD) setup.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) setup.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\setup.exe -dpr setup.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\setup.exe $(COPY) $(WIN32_TARGET_PATH)\setup.exe $(PROGRAM)\developer @@ -26,14 +26,14 @@ 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 +# 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 test-manifest: - # test that (a) linked manifest exists and correct, and (b) has uiAccess=true +# test that (a) linked manifest exists and correct, and (b) has uiAccess=true $(MT) -nologo -inputresource:$(PROGRAM)\developer\setup.exe -validate_manifest install: diff --git a/windows/src/developer/setup/version.in b/windows/src/developer/setup/version.rc similarity index 59% rename from windows/src/developer/setup/version.in rename to windows/src/developer/setup/version.rc index 1b0d28e055..ceb320e841 100644 --- a/windows/src/developer/setup/version.in +++ b/windows/src/developer/setup/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Developer Setup\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "SETUP\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMSHELL.EXE\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/version.in b/windows/src/developer/version.in deleted file mode 100644 index 3ef5bd20eb..0000000000 --- a/windows/src/developer/version.in +++ /dev/null @@ -1,4 +0,0 @@ -VALUE "CompanyName", "SIL International\0" -VALUE "LegalCopyright", "© SIL International\0" -VALUE "LegalTrademarks", "Keyman is a registered trademark of SIL International\0" -VALUE "ProductName", "Keyman Developer\0" diff --git a/windows/src/engine/Makefile b/windows/src/engine/Makefile index 9c45f59bb1..2b5c923330 100644 --- a/windows/src/engine/Makefile +++ b/windows/src/engine/Makefile @@ -4,7 +4,11 @@ # ---------------------------------------------------------------------- +!ifdef NODELPHI +TARGETS=keymanmc keyman32 keyman64 keymanx64 mcompile kmtip kmrefresh +!else TARGETS=keymanmc keyman32 kmcomapi keyman tsysinfox64 tsysinfo keyman64 keymanx64 mcompile inst kmtip kmrefresh +!endif MANIFESTS=keyman tsysinfo tsysinfox64 keymanx64 mcompile CLEANS=clean-engine @@ -16,19 +20,19 @@ keyman: redist cd $(ROOT)\src\engine\keyman $(MAKE) $(TARGET) -kmcomapi: +kmcomapi: .virtual cd $(ROOT)\src\engine\kmcomapi $(MAKE) $(TARGET) -keymanmc: +keymanmc: .virtual cd $(ROOT)\src\engine\keymanmc $(MAKE) $(TARGET) -keyman32: +keyman32: .virtual cd $(ROOT)\src\engine\keyman32 $(MAKE) $(TARGET) -tsysinfox64: +tsysinfox64: .virtual cd $(ROOT)\src\engine\tsysinfox64 $(MAKE) $(TARGET) @@ -36,23 +40,23 @@ tsysinfo: tsysinfox64 cd $(ROOT)\src\engine\tsysinfo $(MAKE) $(TARGET) -keymanx64: +keymanx64: .virtual cd $(ROOT)\src\engine\keymanx64 $(MAKE) $(TARGET) -keyman64: +keyman64: .virtual cd $(ROOT)\src\engine\keyman64 $(MAKE) $(TARGET) -kmrefresh: +kmrefresh: .virtual cd $(ROOT)\src\engine\kmrefresh $(MAKE) $(TARGET) -mcompile: +mcompile: .virtual cd $(ROOT)\src\engine\mcompile $(MAKE) $(TARGET) -kmtip: +kmtip: .virtual cd $(ROOT)\src\engine\kmtip $(MAKE) $(TARGET) diff --git a/windows/src/engine/inst/Makefile b/windows/src/engine/inst/Makefile index db08b76ead..d56b41f20a 100644 --- a/windows/src/engine/inst/Makefile +++ b/windows/src/engine/inst/Makefile @@ -23,34 +23,31 @@ wrap-symbols: $(MAKE) symbols msm: - # - # Copy files for installation - # - +# +# Copy files for installation +# $(MKVER_U) download.in download.mak - # - # Make the installation archive - # +# +# Make the installation archive +# $(MAKE) -fdownload.mak prepareredist $(MAKE) -fdownload.mak candle - # warning 1072 relates to Error table defined by WixUtilExtension. Doesn't really affect us. +# warning 1072 relates to Error table defined by WixUtilExtension. Doesn't really affect us. $(WIXLIGHT) -sw1072 -ext WixUtilExtension $(ENGINE_FILES) -o keymanengine.msm copy: - # - # Sign the installation archive - # - +# +# Sign the installation archive +# cd $(ROOT)\src\engine\inst $(SIGNCODE) /d "Keyman Engine" keymanengine.msm - # - # Copy the installation archive - # - +# +# Copy the installation archive +# cd $(ROOT)\src\engine\inst copy $(ROOT)\src\engine\inst\keymanengine.msm $(ROOT)\bin\developer\wix $(MAKE) -fdownload.mak copyredist diff --git a/windows/src/engine/inst/insthelper/Makefile b/windows/src/engine/inst/insthelper/Makefile index b71f45a804..248be0d404 100644 --- a/windows/src/engine/inst/insthelper/Makefile +++ b/windows/src/engine/inst/insthelper/Makefile @@ -7,7 +7,7 @@ VERSION_TXT_PATH=..\.. !include ..\..\..\Defines.mak build: dirs version.res - $(DELPHI_MSBUILD) insthelper.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) insthelper.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\insthelper.dll -dpr insthelper.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\insthelper.dll $(COPY) $(WIN32_TARGET_PATH)\insthelper.dll $(PROGRAM)\inst diff --git a/windows/src/engine/inst/insthelper/version.in b/windows/src/engine/inst/insthelper/version.rc similarity index 60% rename from windows/src/engine/inst/insthelper/version.in rename to windows/src/engine/inst/insthelper/version.rc index d37dc0ffe7..3375834ccf 100644 --- a/windows/src/engine/inst/insthelper/version.in +++ b/windows/src/engine/inst/insthelper/version.rc @@ -1,6 +1,8 @@ +#include "../../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Installation Assistant\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "INSTHELPER\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "INSTHELPER.DLL\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/keyman/Makefile b/windows/src/engine/keyman/Makefile index dcb68ff542..ed8e6d6095 100644 --- a/windows/src/engine/keyman/Makefile +++ b/windows/src/engine/keyman/Makefile @@ -6,7 +6,7 @@ build: version.res manifest.res keymanmenuitem.res icons.res osktoolbar.res dirs rc langswitch\langswitchmanager.rc - $(DELPHI_MSBUILD) keyman.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) keyman.dproj "/p:Platform=Win32" # $(DCC32) keyman.dpr $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\keyman.exe -dpr keyman.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\keyman.exe @@ -43,13 +43,13 @@ install: $(COPY) $(PROGRAM)\engine\keyman.exe "$(INSTALLPATH_KEYMANENGINE)" test-uiaccess: - grep -c "uiAccess=\"true\"" manifest.in + findstr "uiAccess=\"true\"" manifest.in >nul test-manifest: - # test that (a) linked manifest exists and correct, and (b) has uiAccess=true +# test that (a) linked manifest exists and correct, and (b) has uiAccess=true $(MT) -nologo -inputresource:$(PROGRAM)\engine\keyman.exe -validate_manifest $(MT) -nologo -inputresource:$(PROGRAM)\engine\keyman.exe -out:temp.manifest - grep -c "uiAccess=\"true\"" temp.manifest + findstr "uiAccess=\"true\"" temp.manifest >nul -del temp.manifest !include ..\..\Target.mak diff --git a/windows/src/engine/keyman/version.in b/windows/src/engine/keyman/version.rc similarity index 59% rename from windows/src/engine/keyman/version.in rename to windows/src/engine/keyman/version.rc index e332fc7b9c..76369a22cc 100644 --- a/windows/src/engine/keyman/version.in +++ b/windows/src/engine/keyman/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine x86\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KEYMAN.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/keyman32/Makefile b/windows/src/engine/keyman32/Makefile index 9b1372370e..8871012a01 100644 --- a/windows/src/engine/keyman32/Makefile +++ b/windows/src/engine/keyman32/Makefile @@ -8,7 +8,7 @@ build: version.res dirs pull-core $(MSBUILD) keyman32.vcxproj $(MSBUILD_BUILD) $(COPY) $(WIN32_TARGET_PATH)\keyman32.dll $(PROGRAM)\engine $(COPY) $(WIN32_TARGET_PATH)\keyman32.pdb $(DEBUGPATH)\engine - #$(COPY) $(WIN32_TARGET_PATH)\keyman32.lib $(OUTLIB) done by vcxproj +#$(COPY) $(WIN32_TARGET_PATH)\keyman32.lib $(OUTLIB) done by vcxproj clean: def-clean $(MSBUILD) $(MSBUILD_CLEAN) keyman32.vcxproj diff --git a/windows/src/engine/keyman32/version.in b/windows/src/engine/keyman32/version.rc similarity index 59% rename from windows/src/engine/keyman32/version.in rename to windows/src/engine/keyman32/version.rc index d007363176..a66ec59f4a 100644 --- a/windows/src/engine/keyman32/version.in +++ b/windows/src/engine/keyman32/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Processor x86\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN32\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KEYMAN32.DLL\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/keyman64/Makefile b/windows/src/engine/keyman64/Makefile index 401d72fb6d..dc12d80bfb 100644 --- a/windows/src/engine/keyman64/Makefile +++ b/windows/src/engine/keyman64/Makefile @@ -5,13 +5,13 @@ !include ..\..\Defines.mak build: version.res dirs - $(MSBUILD) keyman64.sln $(MSBUILD_BUILD) /p:Platform=x64 + $(MSBUILD) keyman64.sln $(MSBUILD_BUILD) "/p:Platform=x64" $(COPY) $(X64_TARGET_PATH)\keyman64.dll $(PROGRAM)\engine $(COPY) $(X64_TARGET_PATH)\keyman64.pdb $(DEBUGPATH)\engine - # $(COPY) keyman64.lib $(OUTLIB) - already done +# $(COPY) keyman64.lib $(OUTLIB) - already done clean: def-clean - $(MSBUILD) keyman64.sln $(MSBUILD_CLEAN) /p:Platform=x64 + $(MSBUILD) keyman64.sln $(MSBUILD_CLEAN) "/p:Platform=x64" signcode: $(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keyman64.dll diff --git a/windows/src/engine/keyman64/version.in b/windows/src/engine/keyman64/version.rc similarity index 59% rename from windows/src/engine/keyman64/version.in rename to windows/src/engine/keyman64/version.rc index 9a4a1a7777..6bfcf824ba 100644 --- a/windows/src/engine/keyman64/version.in +++ b/windows/src/engine/keyman64/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Processor x64\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN64\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KEYMAN64.DLL\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/keymanmc/Makefile b/windows/src/engine/keymanmc/Makefile index d9405f85cb..46e08bfb6d 100644 --- a/windows/src/engine/keymanmc/Makefile +++ b/windows/src/engine/keymanmc/Makefile @@ -5,29 +5,29 @@ !include ..\..\Defines.mak build: - mc -U keymanmc.mc - rc keymanmc.rc - link -dll -noentry keymanmc.res + mc -U keymanmc.mc + rc keymanmc.rc + link -dll -noentry keymanmc.res $(COPY) keymanmc.dll $(PROGRAM)\engine clean: def-clean -del keymanmc.rc -del keymanmc.h - -del keymanmc.dll - -del keymanmc.res - -del MSG00409.bin + -del keymanmc.dll + -del keymanmc.res + -del MSG00409.bin signcode: $(SIGNCODE) /d "Keyman Engine" $(PROGRAM)\engine\keymanmc.dll wrap-symbols: - rem no symbols + rem no symbols install: $(COPY) $(PROGRAM)\engine\keymanmc.dll "$(INSTALLPATH_KEYMANENGINE)\keymanmc.dll" - reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v CategoryCount /t REG_DWORD /d 1 /f - reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v CategoryMessageFile /t REG_SZ /d "$(INSTALLPATH_KEYMANENGINE)\keymanmc.dll" /f - reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v EventMessageFile /t REG_SZ /d "$(INSTALLPATH_KEYMANENGINE)\keymanmc.dll" /f - reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v TypesSupported /t REG_DWORD /d 7 /f + reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v CategoryCount /t REG_DWORD /d 1 /f + reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v CategoryMessageFile /t REG_SZ /d "$(INSTALLPATH_KEYMANENGINE)\keymanmc.dll" /f + reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v EventMessageFile /t REG_SZ /d "$(INSTALLPATH_KEYMANENGINE)\keymanmc.dll" /f + reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v TypesSupported /t REG_DWORD /d 7 /f !include ..\..\Target.mak diff --git a/windows/src/engine/keymanx64/Makefile b/windows/src/engine/keymanx64/Makefile index 148d040c4b..263ef839b0 100644 --- a/windows/src/engine/keymanx64/Makefile +++ b/windows/src/engine/keymanx64/Makefile @@ -7,7 +7,7 @@ PLATFORM=x64 build: manifest.res version.res dirs - $(MSBUILD) keymanx64.vcxproj $(MSBUILD_BUILD) /p:Platform=x64 + $(MSBUILD) keymanx64.vcxproj $(MSBUILD_BUILD) "/p:Platform=x64" $(COPY) $(X64_TARGET_PATH)\keymanx64.exe $(PROGRAM)\engine $(COPY) $(X64_TARGET_PATH)\keymanx64.pdb $(DEBUGPATH)\engine @@ -30,13 +30,13 @@ install: $(COPY) $(PROGRAM)\engine\keymanx64.exe "$(INSTALLPATH_KEYMANENGINE)" test-uiaccess: - grep -c "uiAccess=\"true\"" manifest.in + findstr "uiAccess=\"true\"" manifest.in >nul test-manifest: - # test that (a) linked manifest exists and correct, and (b) has uiAccess=true +# test that (a) linked manifest exists and correct, and (b) has uiAccess=true $(MT) -nologo -inputresource:$(PROGRAM)\engine\keymanx64.exe -validate_manifest $(MT) -nologo -inputresource:$(PROGRAM)\engine\keymanx64.exe -out:temp.manifest - grep -c "uiAccess=\"true\"" temp.manifest + findstr "uiAccess=\"true\"" temp.manifest >nul -del temp.manifest !include ..\..\Target.mak diff --git a/windows/src/engine/keymanx64/version.in b/windows/src/engine/keymanx64/version.rc similarity index 59% rename from windows/src/engine/keymanx64/version.in rename to windows/src/engine/keymanx64/version.rc index de3e156673..a62a75e18c 100644 --- a/windows/src/engine/keymanx64/version.in +++ b/windows/src/engine/keymanx64/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine x64\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMANX64\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KEYMANX64.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/kmcomapi/Makefile b/windows/src/engine/kmcomapi/Makefile index b41d3ee724..e8bd8e00fc 100644 --- a/windows/src/engine/kmcomapi/Makefile +++ b/windows/src/engine/kmcomapi/Makefile @@ -6,19 +6,19 @@ build: version.res manifest.res kbd_noicon.res dirs gentlb -Tkmcomapi.tlb kmcomapi.ridl - $(DELPHI_MSBUILD) kmcomapi.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) kmcomapi.dproj "/p:Platform=Win32" $(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 - $(DELPHI_MSBUILD) kmcomapi.dproj /p:Platform=Win64 + $(DELPHI_MSBUILD) kmcomapi.dproj "/p:Platform=Win64" if exist $(WIN64_TARGET_PATH)\kmcomapi.x64.dll del $(WIN64_TARGET_PATH)\kmcomapi.x64.dll - # Delphi does not allow us to build to a different target filename so we rename after build +# Delphi does not allow us to build to a different target filename so we rename after build ren $(WIN64_TARGET_PATH)\kmcomapi.dll kmcomapi.x64.dll - # Not yet supported: $(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\kmcomapi.x64.dll -dpr kmcomapi.dpr +# Not yet supported: $(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\kmcomapi.x64.dll -dpr kmcomapi.dpr $(COPY) $(WIN64_TARGET_PATH)\kmcomapi.x64.dll $(PROGRAM)\engine\kmcomapi.x64.dll if exist $(WIN64_TARGET_PATH)\kmcomapi.dbg $(COPY) $(WIN64_TARGET_PATH)\kmcomapi.dbg $(DEBUGPATH)\engine\kmcomapi.x64.dbg @@ -48,6 +48,6 @@ 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 +#TODO: $(SYMSTORE) $(PROGRAM)\engine\kmcomapi.x64.dbg /t keyman-engine-windows !include ..\..\Target.mak diff --git a/windows/src/engine/kmcomapi/version.in b/windows/src/engine/kmcomapi/version.rc similarity index 59% rename from windows/src/engine/kmcomapi/version.in rename to windows/src/engine/kmcomapi/version.rc index 172593df20..090312ce9b 100644 --- a/windows/src/engine/kmcomapi/version.in +++ b/windows/src/engine/kmcomapi/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine API\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCOMAPI\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMCOMAPI.DLL\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/kmrefresh/Makefile b/windows/src/engine/kmrefresh/Makefile index d0f23daec9..793d35695e 100644 --- a/windows/src/engine/kmrefresh/Makefile +++ b/windows/src/engine/kmrefresh/Makefile @@ -7,8 +7,8 @@ PLATFORM=x64 build: version.res dirs - $(MSBUILD) kmrefresh.vcxproj /p:Platform=Win32 $(MSBUILD_BUILD) - $(MSBUILD) kmrefresh.vcxproj /p:Platform=x64 $(MSBUILD_BUILD) + $(MSBUILD) kmrefresh.vcxproj "/p:Platform=Win32" $(MSBUILD_BUILD) + $(MSBUILD) kmrefresh.vcxproj "/p:Platform=x64" $(MSBUILD_BUILD) $(COPY) $(WIN32_TARGET_PATH)\kmrefresh.x86.exe $(PROGRAM)\engine $(COPY) $(WIN32_TARGET_PATH)\kmrefresh.x86.pdb $(DEBUGPATH)\engine $(COPY) $(X64_TARGET_PATH)\kmrefresh.x64.exe $(PROGRAM)\engine diff --git a/windows/src/engine/kmrefresh/version.in b/windows/src/engine/kmrefresh/version.rc similarity index 59% rename from windows/src/engine/kmrefresh/version.in rename to windows/src/engine/kmrefresh/version.rc index de3e156673..a62a75e18c 100644 --- a/windows/src/engine/kmrefresh/version.in +++ b/windows/src/engine/kmrefresh/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine x64\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMANX64\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KEYMANX64.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/kmtip/Makefile b/windows/src/engine/kmtip/Makefile index 2b3ad8467a..6ddd84074f 100644 --- a/windows/src/engine/kmtip/Makefile +++ b/windows/src/engine/kmtip/Makefile @@ -5,16 +5,16 @@ !include ..\..\Defines.mak build: version.res dirs - $(MSBUILD) kmtip.vcxproj $(MSBUILD_BUILD) /p:Platform=Win32 + $(MSBUILD) kmtip.vcxproj $(MSBUILD_BUILD) "/p:Platform=Win32" $(COPY) $(WIN32_TARGET_PATH)\kmtip.dll $(PROGRAM)\engine $(COPY) $(WIN32_TARGET_PATH)\kmtip.pdb $(DEBUGPATH)\engine - $(MSBUILD) kmtip.vcxproj $(MSBUILD_BUILD) /p:Platform=x64 + $(MSBUILD) kmtip.vcxproj $(MSBUILD_BUILD) "/p:Platform=x64" $(COPY) $(X64_TARGET_PATH)\kmtip64.dll $(PROGRAM)\engine\kmtip64.dll $(COPY) $(X64_TARGET_PATH)\kmtip64.pdb $(DEBUGPATH)\engine\kmtip64.pdb clean: def-clean - $(MSBUILD) kmtip.vcxproj $(MSBUILD_CLEAN) /p:Platform=Win32 - $(MSBUILD) kmtip.vcxproj $(MSBUILD_CLEAN) /p:Platform=x64 + $(MSBUILD) kmtip.vcxproj $(MSBUILD_CLEAN) "/p:Platform=Win32" + $(MSBUILD) kmtip.vcxproj $(MSBUILD_CLEAN) "/p:Platform=x64" signcode: $(SIGNCODE) /d "Keyman Engine Text Service" $(PROGRAM)\engine\kmtip.dll diff --git a/windows/src/engine/kmtip/version.in b/windows/src/engine/kmtip/version.rc similarity index 59% rename from windows/src/engine/kmtip/version.in rename to windows/src/engine/kmtip/version.rc index 15e420d3d7..f6768744e1 100644 --- a/windows/src/engine/kmtip/version.in +++ b/windows/src/engine/kmtip/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Text Service\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMTIP\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMTIP.DLL\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/mcompile/Makefile b/windows/src/engine/mcompile/Makefile index 447499576e..0aff8b92e5 100644 --- a/windows/src/engine/mcompile/Makefile +++ b/windows/src/engine/mcompile/Makefile @@ -26,7 +26,7 @@ install: $(COPY) $(PROGRAM)\engine\mcompile.exe "$(INSTALLPATH_KEYMANENGINE)" test-manifest: - # test that linked manifest exists and correct +# test that linked manifest exists and correct $(MT) -nologo -inputresource:$(PROGRAM)\engine\mcompile.exe -validate_manifest !include ..\..\Target.mak diff --git a/windows/src/engine/mcompile/version.in b/windows/src/engine/mcompile/version.rc similarity index 60% rename from windows/src/engine/mcompile/version.in rename to windows/src/engine/mcompile/version.rc index e8f4b4a37e..645106967f 100644 --- a/windows/src/engine/mcompile/version.in +++ b/windows/src/engine/mcompile/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Mnemonic Keyboard Recompiler\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "MCOMPILE\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "MCOMPILE.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/tsysinfo/Makefile b/windows/src/engine/tsysinfo/Makefile index ea899b5070..ed8951eea7 100644 --- a/windows/src/engine/tsysinfo/Makefile +++ b/windows/src/engine/tsysinfo/Makefile @@ -8,7 +8,8 @@ build: version.res manifest.res dirs cd ..\tsysinfox64 !ifdef SIGNCODE_BUILD - $(MAKE) signcode # have to sign x64 version here as otherwise signcode is done after build. + $(MAKE) signcode +# have to sign x64 version here as otherwise signcode is done after build. !endif cd ..\tsysinfo @@ -16,7 +17,7 @@ build: version.res manifest.res dirs rc tsysinfo_x64.rc del tsysinfox64.bin - $(DELPHI_MSBUILD) tsysinfo.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) tsysinfo.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\tsysinfo.exe -dpr tsysinfo.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\tsysinfo.exe $(COPY) $(WIN32_TARGET_PATH)\tsysinfo.exe $(PROGRAM)\engine @@ -38,7 +39,7 @@ install: $(COPY) $(ROOT)\src\engine\tsysinfo\*.xsl "$(INSTALLPATH_KEYMANENGINE)" test-manifest: - # test that linked manifest exists and correct +# test that linked manifest exists and correct $(MT) -nologo -inputresource:$(PROGRAM)\engine\tsysinfo.exe -validate_manifest !include ..\..\Target.mak diff --git a/windows/src/engine/tsysinfo/version.in b/windows/src/engine/tsysinfo/version.rc similarity index 59% rename from windows/src/engine/tsysinfo/version.in rename to windows/src/engine/tsysinfo/version.rc index 01e7fd677c..ff8fd06871 100644 --- a/windows/src/engine/tsysinfo/version.in +++ b/windows/src/engine/tsysinfo/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Diagnostics\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KEYMAN.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/tsysinfox64/Makefile b/windows/src/engine/tsysinfox64/Makefile index d5161d0ca1..e18cd65968 100644 --- a/windows/src/engine/tsysinfox64/Makefile +++ b/windows/src/engine/tsysinfox64/Makefile @@ -5,8 +5,8 @@ !include ..\..\Defines.mak build: version.res manifest.res dirs - $(DELPHI_MSBUILD) tsysinfox64.dproj /p:Platform=Win64 - #$(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\tsysinfox64.exe -dpr tsysinfox64.dpr + $(DELPHI_MSBUILD) tsysinfox64.dproj "/p:Platform=Win64" +#$(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\tsysinfox64.exe -dpr tsysinfox64.dpr $(COPY) $(WIN64_TARGET_PATH)\tsysinfox64.exe $(PROGRAM)\engine clean: def-clean @@ -16,13 +16,13 @@ signcode: wrap-symbols: $(SYMSTORE) $(PROGRAM)\engine\tsysinfox64.exe /t keyman-engine-windows - #$(SYMSTORE) $(DEBUGPATH)\engine\tsysinfox64.dbg /t keyman-engine-windows +#$(SYMSTORE) $(DEBUGPATH)\engine\tsysinfox64.dbg /t keyman-engine-windows install: echo Nothing to do. test-manifest: - # test that linked manifest exists and correct +# test that linked manifest exists and correct $(MT) -nologo -inputresource:$(PROGRAM)\engine\tsysinfox64.exe -validate_manifest !include ..\..\Target.mak diff --git a/windows/src/engine/tsysinfox64/version.in b/windows/src/engine/tsysinfox64/version.rc similarity index 60% rename from windows/src/engine/tsysinfox64/version.in rename to windows/src/engine/tsysinfox64/version.rc index 5fd7a1355f..a3d33d5195 100644 --- a/windows/src/engine/tsysinfox64/version.in +++ b/windows/src/engine/tsysinfox64/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine x64 diagnostics\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "TSYSINFOX64\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "TSYSINFOX64.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/version.in b/windows/src/engine/version.in deleted file mode 100644 index 15da354d9b..0000000000 --- a/windows/src/engine/version.in +++ /dev/null @@ -1,4 +0,0 @@ -VALUE "CompanyName", "SIL International\0" -VALUE "LegalCopyright", "© SIL International\0" -VALUE "LegalTrademarks", "Keyman is a registered trademark of SIL International\0" -VALUE "ProductName", "Keyman Engine\0" diff --git a/windows/src/ext/Makefile b/windows/src/ext/Makefile index 233a0378e3..3c70e46e1d 100644 --- a/windows/src/ext/Makefile +++ b/windows/src/ext/Makefile @@ -4,7 +4,11 @@ NOTARGET_SIGNCODE=yes +!ifdef NODELPHI +TARGETS=.virtual +!else TARGETS=dcpcrypt jedi mbcolor regexpr scfontcombobox cef4delphi +!endif # jedi, regexpr have no packages @@ -14,34 +18,34 @@ CLEANS= # ---------------------------------------------------------------------- -cef4delphi: +cef4delphi: .virtual cd $(ROOT)\src\ext\cef4delphi $(MAKE) $(TARGET) - -dcpcrypt: + +dcpcrypt: .virtual cd $(ROOT)\src\ext\dcpcrypt $(MAKE) $(TARGET) -jedi: +jedi: .virtual cd $(ROOT)\src\ext\jedi $(MAKE) $(TARGET) -mbcolor: +mbcolor: .virtual cd $(ROOT)\src\ext\mbcolor $(MAKE) $(TARGET) -regexpr: +regexpr: .virtual cd $(ROOT)\src\ext\regexpr $(MAKE) $(TARGET) -vclzip: +vclzip: .virtual cd $(ROOT)\src\ext\vclzip $(MAKE) $(TARGET) -scfontcombobox: +scfontcombobox: .virtual cd $(ROOT)\src\ext\scfontcombobox $(MAKE) $(TARGET) - + # # # diff --git a/windows/src/ext/browse4folder/Browse4Folder.pas b/windows/src/ext/browse4folder/Browse4Folder.pas index 18a70dd3cc..e72f9dfdd5 100644 --- a/windows/src/ext/browse4folder/Browse4Folder.pas +++ b/windows/src/ext/browse4folder/Browse4Folder.pas @@ -89,6 +89,8 @@ type property ShowTitle: Boolean read FShowTitle write FShowTitle default True; end; +procedure Register; + implementation uses @@ -283,6 +285,11 @@ begin FInitialDir := GetPath(FRoot); end; +procedure Register; +begin + RegisterComponents('Keyman', [TBrowse4Folder]); +end; + initialization OleInitialize(nil); diff --git a/windows/src/ext/jedi/Makefile b/windows/src/ext/jedi/Makefile index 173181bf11..307a3a876b 100644 --- a/windows/src/ext/jedi/Makefile +++ b/windows/src/ext/jedi/Makefile @@ -13,17 +13,17 @@ build: dirs $(MAKE) install-paths $(MAKE) build-jvcl-docking - #$(MAKE) build-jcldbg +#$(MAKE) build-jcldbg $(MAKE) install-packages build-jcldbg: rem - # This needs to be called separately so we get the updated include path jedi-includes - # It also needs to be called after make install +# This needs to be called separately so we get the updated include path jedi-includes +# It also needs to be called after make install # cd $(EXT)\jedi\jcl\jcl\examples\windows\debug\tools - # We use a direct build to ignore platform warnings - # as we don't control the source of this code +# We use a direct build to ignore platform warnings +# as we don't control the source of this code # $(MAKEDIR)\dcc32.exe $(DELPHIDPRPARAMS) makejcldbg.dpr # $(COPY) makejcldbg.exe $(PROGRAM)\buildtools diff --git a/windows/src/ext/sentry/test/Makefile b/windows/src/ext/sentry/test/Makefile index 11cd159a76..63fc664b01 100644 --- a/windows/src/ext/sentry/test/Makefile +++ b/windows/src/ext/sentry/test/Makefile @@ -5,8 +5,8 @@ !include ..\..\..\Defines.mak build: dirs # version.res manifest.res - $(DELPHI_MSBUILD) SentryClientTest.dproj /p:Platform=Win32 - $(DELPHI_MSBUILD) SentryClientVclTest.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) SentryClientTest.dproj "/p:Platform=Win32" + $(DELPHI_MSBUILD) SentryClientVclTest.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\SentryClientTest.exe -dpr SentryClientTest.dpr $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\SentryClientVclTest.exe -dpr SentryClientVclTest.dpr diff --git a/windows/src/ext/tds2dbg/Makefile b/windows/src/ext/tds2dbg/Makefile index f58f66e9f6..d7e76b1d29 100644 --- a/windows/src/ext/tds2dbg/Makefile +++ b/windows/src/ext/tds2dbg/Makefile @@ -2,8 +2,8 @@ !include ..\..\Defines.mak build: dirs - # tds2dbg.exe test.exe - @-mkdir $(WIN32_TARGET_PATH) +# tds2dbg.exe test.exe + -mkdir $(WIN32_TARGET_PATH) $(COPY) tds2dbg.bin $(WIN32_TARGET_PATH)\tds2dbg.exe $(MAKE) install @@ -18,20 +18,20 @@ install: BCC55DIR=c:\borland\bcc55 tds2dbg.exe: main.cpp tds2dbg.cpp fileutils.cpp log.cpp - # $(CL) /Fe$< /EHsc $** +# $(CL) /Fe$< /EHsc $** path $(BCC55DIR)\bin;$(PATH) $(BCC55DIR)\bin\bcc32 -y -v -L$(BCC55DIR)\Lib -I$(BCC55DIR)\Include -e$< $** test.exe: testa.cpp - # $(CL) /Fe$< /EHsc $** +# $(CL) /Fe$< /EHsc $** $(BCC55DIR)\bin\bcc32 -y -v -M -L$(BCC55DIR)\Lib -I$(BCC55DIR)\Include -e$< $** clean: - -@del /Q tds2dbg.obj fileutils.obj log.obj main.obj tds2dbg.tds - -@del /Q testa.obj test.exe test.tds test.dbg - -@rmdir /S /Q html + -del /Q tds2dbg.obj fileutils.obj log.obj main.obj tds2dbg.tds + -del /Q testa.obj test.exe test.tds test.dbg + -rmdir /S /Q html doc: - doxygen tds2dbg.dcf + doxygen tds2dbg.dcf !include ..\..\Target.mak diff --git a/windows/src/global/Makefile b/windows/src/global/Makefile index f783e31de1..6882f7dc34 100644 --- a/windows/src/global/Makefile +++ b/windows/src/global/Makefile @@ -2,6 +2,9 @@ !include ..\Defines.mak build: +!ifdef NODELPHI + echo Skipping global +!else cd $(ROOT)\src\global\delphi $(MAKE) $(TARGET) @@ -13,6 +16,7 @@ build: cd $(ROOT)\src\global\wix $(MAKE) $(TARGET) +!endif build-release: @rem diff --git a/windows/src/global/delphi/Makefile b/windows/src/global/delphi/Makefile index da7364e31e..3e3743afce 100644 --- a/windows/src/global/delphi/Makefile +++ b/windows/src/global/delphi/Makefile @@ -8,10 +8,12 @@ all: keyman-components +build: keyman-components + # ---------------------------------------------------------------------- keyman-components: dirs compile install - # $(COPY) keyman_components.bpl $(OUTLIB) +# $(COPY) keyman_components.bpl $(OUTLIB) compile: @-mkdir obj\Win32\$(TARGET_PATH) diff --git a/windows/src/global/delphi/comp/OnScreenKeyboard.pas b/windows/src/global/delphi/comp/OnScreenKeyboard.pas index 329ea0d6af..754ff2983a 100644 --- a/windows/src/global/delphi/comp/OnScreenKeyboard.pas +++ b/windows/src/global/delphi/comp/OnScreenKeyboard.pas @@ -391,7 +391,6 @@ var minsz: Integer; i: Integer; n: Integer; - Canvas: TCanvas; b: TBitmap; begin b := TBitmap.Create; diff --git a/windows/src/global/delphi/keyman_components.dpk b/windows/src/global/delphi/keyman_components.dpk index 7a3129185a..e8ff55bcb3 100644 --- a/windows/src/global/delphi/keyman_components.dpk +++ b/windows/src/global/delphi/keyman_components.dpk @@ -75,6 +75,7 @@ contains KeymanVersion in 'general\KeymanVersion.pas', CloseButtonPageControl in 'comp\CloseButtonPageControl.pas', KeymanDeveloperDebuggerMemo in 'comp\KeymanDeveloperDebuggerMemo.pas', - TextFileFormat in '..\..\developer\TIKE\main\TextFileFormat.pas'; + TextFileFormat in '..\..\developer\TIKE\main\TextFileFormat.pas', + Browse4Folder in '..\..\ext\browse4folder\Browse4Folder.pas'; end. diff --git a/windows/src/global/delphi/keyman_components.dproj b/windows/src/global/delphi/keyman_components.dproj index 63bb82dddd..dab5605791 100644 --- a/windows/src/global/delphi/keyman_components.dproj +++ b/windows/src/global/delphi/keyman_components.dproj @@ -7,7 +7,7 @@ 1 Package VCL - 18.4 + 18.8 Win32 @@ -144,6 +144,7 @@ + Cfg_2 Base @@ -228,7 +229,6 @@ 1 - Contents\MacOS 0 @@ -237,6 +237,20 @@ classes 1 + + classes + 1 + + + + + res\xml + 1 + + + res\xml + 1 + @@ -249,90 +263,242 @@ library\lib\armeabi 1 + + library\lib\armeabi + 1 + + + + + library\lib\armeabi-v7a + 1 + library\lib\mips 1 + + library\lib\mips + 1 + library\lib\armeabi-v7a 1 + + library\lib\arm64-v8a + 1 + + + + + library\lib\armeabi-v7a + 1 + res\drawable 1 + + res\drawable + 1 + res\values 1 + + res\values + 1 + + + + + res\values-v21 + 1 + + + res\values-v21 + 1 + + + + + res\values + 1 + + + res\values + 1 + res\drawable 1 + + res\drawable + 1 + res\drawable-xxhdpi 1 + + res\drawable-xxhdpi + 1 + res\drawable-ldpi 1 + + res\drawable-ldpi + 1 + res\drawable-mdpi 1 + + res\drawable-mdpi + 1 + res\drawable-hdpi 1 + + res\drawable-hdpi + 1 + res\drawable-xhdpi 1 + + res\drawable-xhdpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + res\drawable-small 1 + + res\drawable-small + 1 + res\drawable-normal 1 + + res\drawable-normal + 1 + res\drawable-large 1 + + res\drawable-large + 1 + res\drawable-xlarge 1 + + res\drawable-xlarge + 1 + + + + + res\values + 1 + + + res\values + 1 + @@ -350,6 +516,10 @@ 1 .framework + + 1 + .framework + 0 @@ -359,6 +529,10 @@ 1 .dylib + + 1 + .dylib + 0 .dll;.bpl @@ -381,6 +555,10 @@ 1 .dylib + + 1 + .dylib + 0 .bpl @@ -390,6 +568,9 @@ 0 + + 0 + 0 @@ -402,6 +583,9 @@ 0 + + 0 + 0 @@ -417,6 +601,17 @@ 1 + + + 1 + + + 1 + + + 1 + + 1 @@ -428,6 +623,39 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + 1 @@ -439,6 +667,61 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + 1 @@ -450,6 +733,116 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + 1 @@ -483,10 +876,35 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + 1 + + 1 + @@ -512,6 +930,7 @@ 1 + @@ -519,12 +938,20 @@ Contents\Resources 1 + + Contents\Resources + 1 + library\lib\armeabi-v7a 1 + + library\lib\arm64-v8a + 1 + 1 @@ -540,10 +967,19 @@ 1 + + 1 + 0 + + + library\lib\armeabi-v7a + 1 + + 1 @@ -579,7 +1015,9 @@ + + 12 diff --git a/windows/src/global/help/Makefile b/windows/src/global/help/Makefile index 4d7a2b1c4b..d0cdbf738d 100644 --- a/windows/src/global/help/Makefile +++ b/windows/src/global/help/Makefile @@ -3,9 +3,9 @@ # !include ..\..\defines.mak -build: mkver-app +build: cd $(ROOT)\src\global\help - $(MKVER_U) version.in version.out + $(MKVER_U) version.php.in version.out clean: -del version.out diff --git a/windows/src/global/help/version.in b/windows/src/global/help/version.php.in similarity index 100% rename from windows/src/global/help/version.in rename to windows/src/global/help/version.php.in diff --git a/windows/src/global/inc/keymanversion.h b/windows/src/global/inc/keymanversion.h index e9db07f705..ea9a95539a 100644 --- a/windows/src/global/inc/keymanversion.h +++ b/windows/src/global/inc/keymanversion.h @@ -20,4 +20,8 @@ #define KEYMANVERSION90W L"9.0" #define KEYMANVERSION80W L"8.0" +#define KV_COMPANY_NAME "SIL International\0" +#define KV_LEGAL_COPYRIGHT "\xA9 SIL International\0" +#define KV_LEGAL_TRADEMARKS "Keyman is a registered trademark in Australia\0" + #endif diff --git a/windows/src/global/inc/keymanversion_build.in b/windows/src/global/inc/keymanversion_build.in index e967a5afb6..6f531a50dd 100644 --- a/windows/src/global/inc/keymanversion_build.in +++ b/windows/src/global/inc/keymanversion_build.in @@ -34,3 +34,20 @@ #define KEYMAN_Environment "$Environment" #define KEYMAN_Environment_W L"$Environment" + +// +// Version macros for .rc files +/// + +#define kv_version_stringify(x) kv_version_to_string(x) +#define kv_version_to_string(x) #x + +// Product versioning + +#define KV_VERSION_MAJOR $VersionMajor +#define KV_VERSION_MINOR $VersionMinor +#define KV_VERSION_PATCH $VersionPatch +#define KV_VERSION_STRING kv_version_stringify($VersionMajor ## . ## $VersionMinor ## . ## $VersionPatch ## .0) "\0" + +#define KV_FILEVERSION KV_VERSION_MAJOR, KV_VERSION_MINOR, KV_VERSION_PATCH, 0 +#define KV_PRODUCTVERSION KV_VERSION_MAJOR, KV_VERSION_MINOR, KV_VERSION_PATCH, 0 diff --git a/windows/src/support/Makefile b/windows/src/support/Makefile index dbc9da1a37..7f624d29f4 100644 --- a/windows/src/support/Makefile +++ b/windows/src/support/Makefile @@ -2,18 +2,22 @@ # Support Makefile # +!ifdef NODELPHI +TARGETS=etl2log +!else TARGETS=oskbulkrenderer etl2log +!endif CLEANS=clean-support !include ..\Header.mak # ---------------------------------------------------------------------- -oskbulkrenderer: +oskbulkrenderer: .virtual cd $(ROOT)\src\support\oskbulkrenderer $(MAKE) $(TARGET) -etl2log: +etl2log: .virtual cd $(ROOT)\src\support\etl2log $(MAKE) $(TARGET) diff --git a/windows/src/support/charident/version.rc b/windows/src/support/charident/version.rc index 077f855f08..5cb182328c 100644 --- a/windows/src/support/charident/version.rc +++ b/windows/src/support/charident/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "CHARIDENT\0" VALUE "FileVersion", "8.0.329.0\0" VALUE "InternalName", "CHARIDENT\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "CHARIDENT.EXE\0" VALUE "ProductName", "SIL International Keyman Support Tools\0" VALUE "ProductVersion", "8.0.329.0\0" diff --git a/windows/src/support/etl2log/version.in b/windows/src/support/etl2log/version.rc similarity index 59% rename from windows/src/support/etl2log/version.in rename to windows/src/support/etl2log/version.rc index a7501d6d54..fe543b2fb3 100644 --- a/windows/src/support/etl2log/version.in +++ b/windows/src/support/etl2log/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman etl to log converter\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN32\0" - VALUE "LegalCopyright", "� SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "ETL2LOG.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/support/imtest/version.rc b/windows/src/support/imtest/version.rc index ca136698da..b57a7ba53b 100644 --- a/windows/src/support/imtest/version.rc +++ b/windows/src/support/imtest/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman IM Sample\0" VALUE "FileVersion", "5.0.108.0\0" VALUE "InternalName", "IMSAMPLE\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "IMSAMPLE.DLL\0" VALUE "ProductName", "SIL International Keyman Developer\0" VALUE "ProductVersion", "5.0.108.0\0" diff --git a/windows/src/support/kdebug/version.rc b/windows/src/support/kdebug/version.rc index 98c3a6aed5..a8ab0f8985 100644 --- a/windows/src/support/kdebug/version.rc +++ b/windows/src/support/kdebug/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman debug tool\0" VALUE "FileVersion", "7.0.200.0\0" VALUE "InternalName", "KDEBUG\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KDEBUG.DLL\0" VALUE "ProductName", "SIL International Keyman Developer\0" VALUE "ProductVersion", "7.0.200.0\0" diff --git a/windows/src/support/kmkb0045/version.rc b/windows/src/support/kmkb0045/version.rc index a9ed80fd50..ef3a57f248 100644 --- a/windows/src/support/kmkb0045/version.rc +++ b/windows/src/support/kmkb0045/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "SIL International KMKB0045\0" VALUE "FileVersion", "7.0.247.0\0" VALUE "InternalName", "KMKB0045\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMKB0045.EXE\0" VALUE "ProductName", "SIL International Keyman Support Tools\0" VALUE "ProductVersion", "7.0.247.0\0" diff --git a/windows/src/support/oskbulkrenderer/Makefile b/windows/src/support/oskbulkrenderer/Makefile index 12230ea01a..65b8e02ba6 100644 --- a/windows/src/support/oskbulkrenderer/Makefile +++ b/windows/src/support/oskbulkrenderer/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: version.res dirs - $(DELPHI_MSBUILD) oskbulkrenderer.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) oskbulkrenderer.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\oskbulkrenderer.exe -dpr oskbulkrenderer.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\oskbulkrenderer.exe diff --git a/windows/src/support/oskbulkrenderer/version.in b/windows/src/support/oskbulkrenderer/version.rc similarity index 60% rename from windows/src/support/oskbulkrenderer/version.in rename to windows/src/support/oskbulkrenderer/version.rc index ba64c5da9f..e750bc0a9d 100644 --- a/windows/src/support/oskbulkrenderer/version.in +++ b/windows/src/support/oskbulkrenderer/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -11,15 +13,15 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "OSK Bulk Renderer Support Tool\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "OSKBULKRENDERER\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "OSKBULKRENDERER.EXE\0" VALUE "ProductName", "Keyman Support Tools\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/support/richedit_examine/version.rc b/windows/src/support/richedit_examine/version.rc index ad89e1697a..9aa53dbb49 100644 --- a/windows/src/support/richedit_examine/version.rc +++ b/windows/src/support/richedit_examine/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Richedit Examine\0" VALUE "FileVersion", "7.0.200.0\0" VALUE "InternalName", "RICHEDIT_EXAMINE\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "RICHEDIT_EXAMINE.EXE\0" VALUE "ProductName", "SIL International Keyman\0" VALUE "ProductVersion", "7.0.200.0\0" diff --git a/windows/src/support/version.in b/windows/src/support/version.in deleted file mode 100644 index ac042cc677..0000000000 --- a/windows/src/support/version.in +++ /dev/null @@ -1,4 +0,0 @@ -VALUE "CompanyName", "SIL International\0" -VALUE "LegalCopyright", "© SIL International\0" -VALUE "LegalTrademarks", "Keyman is a registered trademark of SIL International\0" -VALUE "ProductName", "Keyman Support Tools\0" diff --git a/windows/src/support/windowinfo/version.rc b/windows/src/support/windowinfo/version.rc index 3ea33d610e..20599530da 100644 --- a/windows/src/support/windowinfo/version.rc +++ b/windows/src/support/windowinfo/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "windowinfo\0" VALUE "FileVersion", "7.0.200.0\0" VALUE "InternalName", "windowinfo\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "windowinfo.EXE\0" VALUE "ProductName", "SIL International Keyman\0" VALUE "ProductVersion", "7.0.200.0\0" diff --git a/windows/src/test/Makefile b/windows/src/test/Makefile index 6c7986ef93..5df2892dfa 100644 --- a/windows/src/test/Makefile +++ b/windows/src/test/Makefile @@ -4,11 +4,15 @@ # ---------------------------------------------------------------------- +!ifdef NODELPHI +TARGETS=.virtual +!else TARGETS=test_i3633 +!endif CLEAN=test_i3633 test: test-manifest-exec - $(MAKE) -DTARGET=test $(TARGETS) + $(MAKE) "TARGET=test" $(TARGETS) # We want `test` to be the default target !include ..\Header.mak diff --git a/windows/src/test/manual-tests/integration-tests/Makefile b/windows/src/test/manual-tests/integration-tests/Makefile index f1636c971c..093dc44140 100644 --- a/windows/src/test/manual-tests/integration-tests/Makefile +++ b/windows/src/test/manual-tests/integration-tests/Makefile @@ -6,9 +6,9 @@ TARGETS=keymanapi -test: - $(MAKE) -DTARGET=test $(TARGETS) - +test: + $(MAKE) "TARGET=test" $(TARGETS) + !include ..\..\Header.mak # ---------------------------------------------------------------------- @@ -20,7 +20,7 @@ keymanapi: # ---------------------------------------------------------------------- !include ..\..\Target.mak - + # ---------------------------------------------------------------------- # EOF # ---------------------------------------------------------------------- diff --git a/windows/src/test/manual-tests/integration-tests/keymanapi/Makefile b/windows/src/test/manual-tests/integration-tests/keymanapi/Makefile index 61f0946a95..7becbb044d 100644 --- a/windows/src/test/manual-tests/integration-tests/keymanapi/Makefile +++ b/windows/src/test/manual-tests/integration-tests/keymanapi/Makefile @@ -11,13 +11,13 @@ TEST_MODE=--exclude:Elevated test: build $(WIN32_TARGET_PATH)\keymanapi_test.exe -b -exit:continue $(TEST_MODE) $(WIN64_TARGET_PATH)\keymanapi_test.exe -b -exit:continue $(TEST_MODE) - -build: - $(DELPHI_MSBUILD) /p:Platform=Win32 keymanapi_test.dproj - $(DELPHI_MSBUILD) /p:Platform=Win64 keymanapi_test.dproj + +build: + $(DELPHI_MSBUILD) "/p:Platform=Win32" keymanapi_test.dproj + $(DELPHI_MSBUILD) "/p:Platform=Win64" keymanapi_test.dproj clean: def-clean -rd /s/q Win32 -rd /s/q Win64 - + !include ..\..\..\Target.mak diff --git a/windows/src/test/manual-tests/msghooklister/src/App/Version.rc b/windows/src/test/manual-tests/msghooklister/src/App/Version.rc new file mode 100644 index 0000000000..d8966e57dd --- /dev/null +++ b/windows/src/test/manual-tests/msghooklister/src/App/Version.rc @@ -0,0 +1,119 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include +#include "messages.rc" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 2,0,0,0 + PRODUCTVERSION 2,0,0,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "080904b0" + BEGIN + VALUE "CompanyName", "http://www.airesoft.co.uk" + VALUE "FileDescription", "MsgLister Application" + VALUE "FileVersion", "2, 0, 0, 0" + VALUE "InternalName", "App" + VALUE "LegalCopyright", "Copyright (C) Airesoft 2011" + VALUE "OriginalFilename", "MsgListerApp.exe" + VALUE "ProductName", "MsgHookLister" + VALUE "ProductVersion", "2, 0, 0, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x809, 1200 + END +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include \r\n" + "#include ""messages.rc""\r\0" +END + +3 TEXTINCLUDE +BEGIN + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + STR_UNKNOWN "Unknown" + STR_RETURNED "Value returned: " + STR_THREADFLAGS "Thread Flags:" + STR_EXITCODE "exit code = " + STR_THREADMESSAGE "Thread message" + STR_EXEORNONE "None/Executable" + STR_NONE "None" +END + +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc b/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc new file mode 100644 index 0000000000..fea4076091 --- /dev/null +++ b/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc @@ -0,0 +1,32 @@ +#include "../../../../../../global/inc/keymanversion.h" + +1 VERSIONINFO + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION + FILEFLAGSMASK 0x3fL + FILEFLAGS 0x0L + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0C0904E4" + BEGIN + VALUE "CompanyName", KV_COMPANY_NAME + VALUE "FileDescription", "Keyman TSF Input Processor\0" + VALUE "FileVersion", KV_VERSION_STRING + VALUE "InternalName", "KMTIP\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS + VALUE "OriginalFilename", "KMTIP.DLL\0" + VALUE "ProductName", "SIL International Keyman Engine Addins\0" + VALUE "ProductVersion", KV_VERSION_STRING + VALUE "Comments", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0xc09, 1252 + END + END diff --git a/windows/src/test/test_i3633/Makefile b/windows/src/test/test_i3633/Makefile index e0dbd4e7af..575d77e7e8 100644 --- a/windows/src/test/test_i3633/Makefile +++ b/windows/src/test/test_i3633/Makefile @@ -20,7 +20,7 @@ test-install: prereq prereq: - $(DELPHI_MSBUILD) verify.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) verify.dproj "/p:Platform=Win32" copy sigcheck.bin $(WIN32_TARGET_PATH)\sigcheck.exe diff --git a/windows/src/test/unit-tests/Makefile b/windows/src/test/unit-tests/Makefile index dbef0fd1ea..34a118fded 100644 --- a/windows/src/test/unit-tests/Makefile +++ b/windows/src/test/unit-tests/Makefile @@ -11,7 +11,7 @@ TARGETS=group-helper-rsp19902 kmcomp shared-data lexical-model-compiler kmcomp-x ui-language-manager standards-data compile-supplementary-support test: - $(MAKE) -DTARGET=test $(TARGETS) + $(MAKE) "TARGET=test" $(TARGETS) !include ..\..\Header.mak diff --git a/windows/src/test/unit-tests/compile-supplementary-support/Makefile b/windows/src/test/unit-tests/compile-supplementary-support/Makefile index ce4859f35e..8b3cfc93f5 100644 --- a/windows/src/test/unit-tests/compile-supplementary-support/Makefile +++ b/windows/src/test/unit-tests/compile-supplementary-support/Makefile @@ -9,31 +9,31 @@ test: test-nodebug test-debug test-nodebug: $(KMCOMP) i3317_nosupp.kmn i3317_nosupp-1.0.js - grep -vl "KS=1" i3317_nosupp-1.0.js + findstr /v /m "KS=1" i3317_nosupp-1.0.js $(KMCOMP) i3317_withsupp.kmn i3317_withsupp-1.0.js - grep -l "KS=1" i3317_withsupp-1.0.js + findstr /m "KS=1" i3317_withsupp-1.0.js $(KMCOMP) i3317_withsupp_incontext.kmn i3317_withsupp_incontext-1.0.js - grep -l "KS=1" i3317_withsupp_incontext-1.0.js + findstr /m "KS=1" i3317_withsupp_incontext-1.0.js $(KMCOMP) i3317_withsupp_inmatch.kmn i3317_withsupp_inmatch-1.0.js - grep -l "KS=1" i3317_withsupp_inmatch-1.0.js + findstr /m "KS=1" i3317_withsupp_inmatch-1.0.js $(KMCOMP) i3317_withsupp_innomatch.kmn i3317_withsupp_innomatch-1.0.js - grep -l "KS=1" i3317_withsupp_innomatch-1.0.js + findstr /m "KS=1" i3317_withsupp_innomatch-1.0.js $(KMCOMP) i3317_withsupp_instore.kmn i3317_withsupp_instore-1.0.js - grep -l "KS=1" i3317_withsupp_instore-1.0.js + findstr /m "KS=1" i3317_withsupp_instore-1.0.js test-debug: $(KMCOMPD) i3317_nosupp.kmn i3317_nosupp-1.0.js - grep -vl "KS=1" i3317_nosupp-1.0.js + findstr /v /m "KS=1" i3317_nosupp-1.0.js $(KMCOMPD) i3317_withsupp.kmn i3317_withsupp-1.0.js - grep "KS=1" i3317_withsupp-1.0.js + findstr /m "KS=1" i3317_withsupp-1.0.js $(KMCOMPD) i3317_withsupp_incontext.kmn i3317_withsupp_incontext-1.0.js - grep "KS=1" i3317_withsupp_incontext-1.0.js + findstr /m "KS=1" i3317_withsupp_incontext-1.0.js $(KMCOMPD) i3317_withsupp_inmatch.kmn i3317_withsupp_inmatch-1.0.js - grep "KS=1" i3317_withsupp_inmatch-1.0.js + findstr /m "KS=1" i3317_withsupp_inmatch-1.0.js $(KMCOMPD) i3317_withsupp_innomatch.kmn i3317_withsupp_innomatch-1.0.js - grep "KS=1" i3317_withsupp_innomatch-1.0.js + findstr /m "KS=1" i3317_withsupp_innomatch-1.0.js $(KMCOMPD) i3317_withsupp_instore.kmn i3317_withsupp_instore-1.0.js - grep "KS=1" i3317_withsupp_instore-1.0.js + findstr /m "KS=1" i3317_withsupp_instore-1.0.js clean: -del *.js diff --git a/windows/src/test/unit-tests/jsonutil/Makefile b/windows/src/test/unit-tests/jsonutil/Makefile index 8f9a155d75..5bbd587e5f 100644 --- a/windows/src/test/unit-tests/jsonutil/Makefile +++ b/windows/src/test/unit-tests/jsonutil/Makefile @@ -12,7 +12,7 @@ test: build -$(WIN32_TARGET_PATH)\jsonutiltests.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI jsonutiltests.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" jsonutiltests.dproj clean: def-clean diff --git a/windows/src/test/unit-tests/keyboard-js-info/Makefile b/windows/src/test/unit-tests/keyboard-js-info/Makefile index 15f17dadf0..db1cb055ff 100644 --- a/windows/src/test/unit-tests/keyboard-js-info/Makefile +++ b/windows/src/test/unit-tests/keyboard-js-info/Makefile @@ -12,7 +12,7 @@ test: build -$(WIN32_TARGET_PATH)\keyboardjsinfotestsuite.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI keyboardjsinfotestsuite.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" keyboardjsinfotestsuite.dproj clean: def-clean diff --git a/windows/src/test/unit-tests/keyboard-package-versions/Makefile b/windows/src/test/unit-tests/keyboard-package-versions/Makefile index d80aaafd12..96c8aa60bf 100644 --- a/windows/src/test/unit-tests/keyboard-package-versions/Makefile +++ b/windows/src/test/unit-tests/keyboard-package-versions/Makefile @@ -12,7 +12,7 @@ test: build -$(WIN32_TARGET_PATH)\keyboardpackageversionstestsuite.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI keyboardpackageversionstestsuite.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" keyboardpackageversionstestsuite.dproj clean: def-clean -del *.kmp diff --git a/windows/src/test/unit-tests/kmcomp-x64-structures/Makefile b/windows/src/test/unit-tests/kmcomp-x64-structures/Makefile index e2c9dc4795..ac79eaa274 100644 --- a/windows/src/test/unit-tests/kmcomp-x64-structures/Makefile +++ b/windows/src/test/unit-tests/kmcomp-x64-structures/Makefile @@ -15,12 +15,12 @@ test: build cppstructsize\$(X64_TARGET_PATH)\cppstructsize.exe > 64-cppstructsize.txt echo Comparing 64-bit sizes fc 64-passtructsize.txt 64-cppstructsize.txt - -build: - $(DELPHI_MSBUILD) passtructsize\passtructsize.dproj /p:Platform=Win32 - $(DELPHI_MSBUILD) passtructsize\passtructsize.dproj /p:Platform=Win64 - $(MSBUILD) $(MSBUILD_BUILD) cppstructsize\cppstructsize.sln /p:Platform=Win32 - $(MSBUILD) $(MSBUILD_BUILD) cppstructsize\cppstructsize.sln /p:Platform=x64 + +build: + $(DELPHI_MSBUILD) passtructsize\passtructsize.dproj "/p:Platform=Win32" + $(DELPHI_MSBUILD) passtructsize\passtructsize.dproj "/p:Platform=Win64" + $(MSBUILD) $(MSBUILD_BUILD) cppstructsize\cppstructsize.sln" /p:Platform=Win32" + $(MSBUILD) $(MSBUILD_BUILD) cppstructsize\cppstructsize.sln" /p:Platform=x64" clean: def-clean -rd /s/q Win32 diff --git a/windows/src/test/unit-tests/kmx-file-languages/Makefile b/windows/src/test/unit-tests/kmx-file-languages/Makefile index deab30af79..9e504a73b3 100644 --- a/windows/src/test/unit-tests/kmx-file-languages/Makefile +++ b/windows/src/test/unit-tests/kmx-file-languages/Makefile @@ -13,7 +13,7 @@ test: build -$(WIN32_TARGET_PATH)\kmxfilelanguagestestsuite.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI kmxfilelanguagestestsuite.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" kmxfilelanguagestestsuite.dproj clean: def-clean diff --git a/windows/src/test/unit-tests/package-info/Makefile b/windows/src/test/unit-tests/package-info/Makefile index 2a09e53a20..39335050ca 100644 --- a/windows/src/test/unit-tests/package-info/Makefile +++ b/windows/src/test/unit-tests/package-info/Makefile @@ -8,7 +8,7 @@ test: build -$(WIN32_TARGET_PATH)\packageinfotestsuite.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI packageinfotestsuite.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" packageinfotestsuite.dproj clean: def-clean -del test\*.out.* diff --git a/windows/src/test/unit-tests/shared-data/cpp/Makefile b/windows/src/test/unit-tests/shared-data/cpp/Makefile index b8d05d1bc1..c3b98d1d33 100644 --- a/windows/src/test/unit-tests/shared-data/cpp/Makefile +++ b/windows/src/test/unit-tests/shared-data/cpp/Makefile @@ -5,8 +5,8 @@ !include ..\..\..\..\Defines.mak build: - $(MSBUILD) $(MSBUILD_BUILD) /p:Platform=Win32 cppshareddata.vcxproj - $(MSBUILD) $(MSBUILD_BUILD) /p:Platform=x64 cppshareddata.vcxproj + $(MSBUILD) $(MSBUILD_BUILD) "/p:Platform=Win32" cppshareddata.vcxproj + $(MSBUILD) $(MSBUILD_BUILD) "/p:Platform=x64" cppshareddata.vcxproj clean: def-clean $(MSBUILD) $(MSBUILD_CLEAN) cppshareddata.vcxproj diff --git a/windows/src/test/unit-tests/shared-data/delphi/Makefile b/windows/src/test/unit-tests/shared-data/delphi/Makefile index 3bb104e361..02b79b94f4 100644 --- a/windows/src/test/unit-tests/shared-data/delphi/Makefile +++ b/windows/src/test/unit-tests/shared-data/delphi/Makefile @@ -5,8 +5,8 @@ !include ..\..\..\..\Defines.mak build: - $(DELPHI_MSBUILD) /p:Platform=Win32 delphishareddata.dproj - $(DELPHI_MSBUILD) /p:Platform=Win64 delphishareddata.dproj + $(DELPHI_MSBUILD) "/p:Platform=Win32" delphishareddata.dproj + $(DELPHI_MSBUILD) "/p:Platform=Win64" delphishareddata.dproj clean: def-clean -rd /s/q bin diff --git a/windows/src/test/unit-tests/standards-data/Makefile b/windows/src/test/unit-tests/standards-data/Makefile index a27eb28c59..ff2b62a34b 100644 --- a/windows/src/test/unit-tests/standards-data/Makefile +++ b/windows/src/test/unit-tests/standards-data/Makefile @@ -8,7 +8,7 @@ test: build -$(WIN32_TARGET_PATH)\standardsdata.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI standardsdata.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" standardsdata.dproj clean: def-clean diff --git a/windows/src/test/unit-tests/ui-language-manager/Makefile b/windows/src/test/unit-tests/ui-language-manager/Makefile index 47b6c83e31..ab0c956eb6 100644 --- a/windows/src/test/unit-tests/ui-language-manager/Makefile +++ b/windows/src/test/unit-tests/ui-language-manager/Makefile @@ -12,7 +12,7 @@ test: build -$(WIN32_TARGET_PATH)\UILanguageManagerTest.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI UILanguageManagerTest.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" UILanguageManagerTest.dproj clean: def-clean diff --git a/windows/src/test/unit-tests/windows-setup/Makefile b/windows/src/test/unit-tests/windows-setup/Makefile index 17373b7886..973dd102b9 100644 --- a/windows/src/test/unit-tests/windows-setup/Makefile +++ b/windows/src/test/unit-tests/windows-setup/Makefile @@ -12,7 +12,7 @@ test: build -$(WIN32_TARGET_PATH)\WindowsSetupTest.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI WindowsSetupTest.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" WindowsSetupTest.dproj clean: def-clean