KMComp Command Line Compiler
KMComp is the command line compiler included in Keyman Developer. It is located in
The following parameters are available:
Usage: kmcomp [-s[s]] [-nologo] [-c] [-d] [-w] [-v[s|d]] [-source-path path] [-schema-path path] [-m] infile [-m infile] [-t target] [outfile.kmx|outfile.js [error.log]] [-add-help-link path] [-extract-keyboard-info field[,field...]]
General compiler parameters
- A .kmn file (Keyboard Source), .kps file (Package Source), or .kpj (project). Required in compiler mode. If
a .kpj is specified, the .kpj will determine output paths and all files referenced in the project will be
-t). For validation mode, can be a .keyboard_info file.
- Generate an output file for Windows/macOS; can only be specified for a .kmn
infile. Optional; if omitted, generates an output file with the same base name as the input file.
- Generate an output file for KeymanWeb/touch devices; can only be specified for a .kmn
- Write output to a text file specified by error.log instead of stdout.
- Mostly silent; don't print information-level messages
- Fully silent; don't print anything except fatal internal errors
- Don't print the compiler description
- Clean target(s) instead of building (only for .kpj)
- Include debug information
- Treat warnings as errors
- Build only the
targetfile from the project (only for .kpj)
- path to help file on https://help.keyman.com/keyboards
JSON .keyboard_info compile targets
- Validate infile against source schema
- Validate infile against distribution schema
- Merge information from infile (can be .kmp and .js) into .keyboard_info output file
- Validate the id against the .js, .kmx and .kmp filenames when merging
- Print json data .keyboard_info for build script integration.
- Specify path to add to the sourcePath field in the .keyboard_info output file
- Specify path to the keyboard_info json schema definitions. If not specified, then defaults to same folder as kmcomp.exe