@keymanapp/kmc-package 17.0.300-beta → 17.0.301-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/build/src/compiler/cp1252.js +289 -288
  2. package/build/src/compiler/cp1252.js.map +1 -1
  3. package/build/src/compiler/kmp-compiler.js +494 -493
  4. package/build/src/compiler/kmp-compiler.js.map +1 -1
  5. package/build/src/compiler/kmp-inf-writer.js +145 -144
  6. package/build/src/compiler/kmp-inf-writer.js.map +1 -1
  7. package/build/src/compiler/kmx-keyboard-metadata.js +19 -18
  8. package/build/src/compiler/kmx-keyboard-metadata.js.map +1 -1
  9. package/build/src/compiler/markdown.js +49 -48
  10. package/build/src/compiler/markdown.js.map +1 -1
  11. package/build/src/compiler/package-compiler-messages.js +79 -78
  12. package/build/src/compiler/package-compiler-messages.js.map +1 -1
  13. package/build/src/compiler/package-keyboard-target-validator.js +45 -44
  14. package/build/src/compiler/package-keyboard-target-validator.js.map +1 -1
  15. package/build/src/compiler/package-metadata-collector.js +78 -77
  16. package/build/src/compiler/package-metadata-collector.js.map +1 -1
  17. package/build/src/compiler/package-metadata-updater.js +13 -12
  18. package/build/src/compiler/package-metadata-updater.js.map +1 -1
  19. package/build/src/compiler/package-validation.js +180 -179
  20. package/build/src/compiler/package-validation.js.map +1 -1
  21. package/build/src/compiler/package-version-validator.js +92 -91
  22. package/build/src/compiler/package-version-validator.js.map +1 -1
  23. package/build/src/compiler/redist-files.js +59 -58
  24. package/build/src/compiler/redist-files.js.map +1 -1
  25. package/build/src/compiler/web-keyboard-metadata.js +37 -36
  26. package/build/src/compiler/web-keyboard-metadata.js.map +1 -1
  27. package/build/src/compiler/windows-package-installer-compiler.js +180 -179
  28. package/build/src/compiler/windows-package-installer-compiler.js.map +1 -1
  29. package/build/src/main.js +7 -6
  30. package/build/src/main.js.map +1 -1
  31. package/package.json +3 -3
@@ -1,59 +1,60 @@
1
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1ee5d315-697f-5b0d-b69c-234149379e12")}catch(e){}}();
2
- /**
3
- * This is a set of known redistributable files for Keyman for Windows that
4
- * should not be included in packages. It is not critical that this list matches
5
- * the current deployment; it is just for warning against accidental inclusion
6
- * of these files by package authors. Some redistributable files have been
7
- * intentionally excluded because they could legitimately be a different file
8
- * with the same name.
9
- *
10
- * This matches behaviour from the legacy package compiler; we may want to
11
- * reconsider how this is done in the future.
12
- *
13
- * These lists have been constructed from 17.0.109 alpha build. Filenames
14
- * intentionally in lower case.
15
- */
16
- export const keymanForWindowsInstallerFiles = [
17
- 'keymandesktop.msi',
18
- 'keymanengine.msm'
19
- ];
20
- export const keymanEngineForWindowsFiles = [
21
- 'base.xslt',
22
- 'crashpad_handler.exe',
23
- 'keyman-debug-etw.man',
24
- 'keyman.exe',
25
- 'keyman32.dll',
26
- 'keyman64.dll',
27
- 'keymanmc.dll',
28
- 'keymanx64.exe',
29
- 'kmcomapi.dll',
30
- 'kmcomapi.x64.dll',
31
- 'kmrefresh.x64.exe',
32
- 'kmrefresh.x86.exe',
33
- 'kmtip.dll',
34
- 'kmtip64.dll',
35
- 'mcompile.exe',
36
- 'sentry.dll',
37
- 'sentry.x64.dll',
38
- 'si_browsers.xslt',
39
- 'si_fonts.xslt',
40
- 'si_hookdlls.xslt',
41
- 'si_keyman.xslt',
42
- 'si_language.xslt',
43
- 'si_office.xslt',
44
- 'si_overview.xslt',
45
- 'si_processes.xslt',
46
- 'si_processes_x64.xslt',
47
- 'si_startup.xslt',
48
- 'tsysinfo.exe',
49
- ];
50
- export const keymanForWindowsRedistFiles = [
51
- 'desktop_resources.dll',
52
- 'keymandesktop.chm',
53
- 'kmbrowserhost.exe',
54
- 'kmconfig.exe',
55
- 'kmshell.exe',
56
- 'unicodedata.mdb',
57
- ];
58
- //# debugId=1ee5d315-697f-5b0d-b69c-234149379e12
1
+ /**
2
+ * This is a set of known redistributable files for Keyman for Windows that
3
+ * should not be included in packages. It is not critical that this list matches
4
+ * the current deployment; it is just for warning against accidental inclusion
5
+ * of these files by package authors. Some redistributable files have been
6
+ * intentionally excluded because they could legitimately be a different file
7
+ * with the same name.
8
+ *
9
+ * This matches behaviour from the legacy package compiler; we may want to
10
+ * reconsider how this is done in the future.
11
+ *
12
+ * These lists have been constructed from 17.0.109 alpha build. Filenames
13
+ * intentionally in lower case.
14
+ */
15
+
16
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d8ba5b90-e7ad-5e6f-9e25-0eaeaae6f000")}catch(e){}}();
17
+ export const keymanForWindowsInstallerFiles = [
18
+ 'keymandesktop.msi',
19
+ 'keymanengine.msm'
20
+ ];
21
+ export const keymanEngineForWindowsFiles = [
22
+ 'base.xslt',
23
+ 'crashpad_handler.exe',
24
+ 'keyman-debug-etw.man',
25
+ 'keyman.exe',
26
+ 'keyman32.dll',
27
+ 'keyman64.dll',
28
+ 'keymanmc.dll',
29
+ 'keymanx64.exe',
30
+ 'kmcomapi.dll',
31
+ 'kmcomapi.x64.dll',
32
+ 'kmrefresh.x64.exe',
33
+ 'kmrefresh.x86.exe',
34
+ 'kmtip.dll',
35
+ 'kmtip64.dll',
36
+ 'mcompile.exe',
37
+ 'sentry.dll',
38
+ 'sentry.x64.dll',
39
+ 'si_browsers.xslt',
40
+ 'si_fonts.xslt',
41
+ 'si_hookdlls.xslt',
42
+ 'si_keyman.xslt',
43
+ 'si_language.xslt',
44
+ 'si_office.xslt',
45
+ 'si_overview.xslt',
46
+ 'si_processes.xslt',
47
+ 'si_processes_x64.xslt',
48
+ 'si_startup.xslt',
49
+ 'tsysinfo.exe',
50
+ ];
51
+ export const keymanForWindowsRedistFiles = [
52
+ 'desktop_resources.dll',
53
+ 'keymandesktop.chm',
54
+ 'kmbrowserhost.exe',
55
+ 'kmconfig.exe',
56
+ 'kmshell.exe',
57
+ 'unicodedata.mdb',
58
+ ];
59
59
  //# sourceMappingURL=redist-files.js.map
60
+ //# debugId=d8ba5b90-e7ad-5e6f-9e25-0eaeaae6f000
@@ -1 +1 @@
1
- {"debug_id":"1ee5d315-697f-5b0d-b69c-234149379e12","file":"redist-files.js","mappings":";AACA;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MACL,8BAA8B,GAAa;IACzC,mBAAmB;IACnB,kBAAkB;CACnB,CAAC;AAGJ,MAAM,CAAC,MACL,2BAA2B,GAAa;IACtC,WAAW;IACX,sBAAsB;IACtB,sBAAsB;IACtB,YAAY;IACZ,cAAc;IACd,cAAc;IACd,cAAc;IACd,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,WAAW;IACX,aAAa;IACb,cAAc;IACd,YAAY;IACZ,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;IACnB,uBAAuB;IACvB,iBAAiB;IACjB,cAAc;CACf,CAAC;AAEJ,MAAM,CAAC,MACL,2BAA2B,GAAa;IACtC,uBAAuB;IACvB,mBAAmB;IACnB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,iBAAiB;CAClB,CAAC","names":[],"sourceRoot":"","sources":["../../../src/compiler/redist-files.ts"],"version":3}
1
+ {"version":3,"file":"redist-files.js","sources":["../../../src/compiler/redist-files.ts"],"sourceRoot":"","names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;;;AAEH,MAAM,CAAC,MACL,8BAA8B,GAAa;IACzC,mBAAmB;IACnB,kBAAkB;CACnB,CAAC;AAGJ,MAAM,CAAC,MACL,2BAA2B,GAAa;IACtC,WAAW;IACX,sBAAsB;IACtB,sBAAsB;IACtB,YAAY;IACZ,cAAc;IACd,cAAc;IACd,cAAc;IACd,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,WAAW;IACX,aAAa;IACb,cAAc;IACd,YAAY;IACZ,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;IACnB,uBAAuB;IACvB,iBAAiB;IACjB,cAAc;CACf,CAAC;AAEJ,MAAM,CAAC,MACL,2BAA2B,GAAa;IACtC,uBAAuB;IACvB,mBAAmB;IACnB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,iBAAiB;CAClB,CAAC","debug_id":"d8ba5b90-e7ad-5e6f-9e25-0eaeaae6f000"}
@@ -1,37 +1,38 @@
1
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f2bb0670-8359-571f-9929-b9c5f70a427a")}catch(e){}}();
2
- ;
3
- /**
4
- * This function parses the JavaScript to do a best-effort retrieval of
5
- * keyboard data. It assumes a format similar to what the compiler produces.
6
- * It may be possible for it to miss something if the code is hand written and
7
- * diverges enough from the compiler code (e.g. if there is a comment between
8
- * a member variable and its value or something crazy like that).
9
- *
10
- * Long-term, we will require package to include .kmx so this kind of parsing
11
- * won't be necessary.
12
- */
13
- export function getCompiledWebKeyboardMetadata(js) {
14
- const nameRegex = /this.KN\s*=\s*(['"])(.*?)\1/;
15
- const kbverRegex = /this.KBVER\s*=\s*(['"])(.*?)\1/;
16
- const minverRegex = /this.KMINVER\s*=\s*([''"])(.*?)\1/;
17
- const rtlRegex = /this.KRTL\s*=\s*(.*?)\s*;/;
18
- const mnemonicRegex = /this.KM\s*=\s*(.*?)\s*;/;
19
- const touchLayoutRegex = /this.KVKL\s*=\s*{/;
20
- const name = nameRegex.exec(js);
21
- const kbver = kbverRegex.exec(js);
22
- const minver = minverRegex.exec(js);
23
- const rtl = rtlRegex.exec(js);
24
- const mnemonic = mnemonicRegex.exec(js);
25
- const touchLayout = touchLayoutRegex.exec(js);
26
- const SKeymanVersion70 = '7.0';
27
- return {
28
- keyboardName: name ? name[2] : null,
29
- keyboardVersion: kbver ? kbver[2] : null,
30
- minKeymanVersion: minver ? minver[2] : SKeymanVersion70,
31
- isRtl: !!(rtl && rtl[1].match(/^(1|true)$/)),
32
- isMnemonic: !!(mnemonic && mnemonic[1].match(/^(1|true)$/)),
33
- hasTouchLayout: !!touchLayout
34
- };
35
- }
36
- //# debugId=f2bb0670-8359-571f-9929-b9c5f70a427a
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7be13b44-2b7e-5674-8439-331800382138")}catch(e){}}();
3
+ ;
4
+ /**
5
+ * This function parses the JavaScript to do a best-effort retrieval of
6
+ * keyboard data. It assumes a format similar to what the compiler produces.
7
+ * It may be possible for it to miss something if the code is hand written and
8
+ * diverges enough from the compiler code (e.g. if there is a comment between
9
+ * a member variable and its value or something crazy like that).
10
+ *
11
+ * Long-term, we will require package to include .kmx so this kind of parsing
12
+ * won't be necessary.
13
+ */
14
+ export function getCompiledWebKeyboardMetadata(js) {
15
+ const nameRegex = /this.KN\s*=\s*(['"])(.*?)\1/;
16
+ const kbverRegex = /this.KBVER\s*=\s*(['"])(.*?)\1/;
17
+ const minverRegex = /this.KMINVER\s*=\s*([''"])(.*?)\1/;
18
+ const rtlRegex = /this.KRTL\s*=\s*(.*?)\s*;/;
19
+ const mnemonicRegex = /this.KM\s*=\s*(.*?)\s*;/;
20
+ const touchLayoutRegex = /this.KVKL\s*=\s*{/;
21
+ const name = nameRegex.exec(js);
22
+ const kbver = kbverRegex.exec(js);
23
+ const minver = minverRegex.exec(js);
24
+ const rtl = rtlRegex.exec(js);
25
+ const mnemonic = mnemonicRegex.exec(js);
26
+ const touchLayout = touchLayoutRegex.exec(js);
27
+ const SKeymanVersion70 = '7.0';
28
+ return {
29
+ keyboardName: name ? name[2] : null,
30
+ keyboardVersion: kbver ? kbver[2] : null,
31
+ minKeymanVersion: minver ? minver[2] : SKeymanVersion70,
32
+ isRtl: !!(rtl && rtl[1].match(/^(1|true)$/)),
33
+ isMnemonic: !!(mnemonic && mnemonic[1].match(/^(1|true)$/)),
34
+ hasTouchLayout: !!touchLayout
35
+ };
36
+ }
37
37
  //# sourceMappingURL=web-keyboard-metadata.js.map
38
+ //# debugId=7be13b44-2b7e-5674-8439-331800382138
@@ -1 +1 @@
1
- {"debug_id":"f2bb0670-8359-571f-9929-b9c5f70a427a","file":"web-keyboard-metadata.js","mappings":";AASC,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,UAAU,8BAA8B,CAAC,EAAU;IACrD,MAAM,SAAS,GAAK,6BAA6B,CAAC;IAClD,MAAM,UAAU,GAAI,gCAAgC,CAAC;IACrD,MAAM,WAAW,GAAG,mCAAmC,CAAC;IACxD,MAAM,QAAQ,GAAM,2BAA2B,CAAC;IAChD,MAAM,aAAa,GAAG,yBAAyB,CAAC;IAChD,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;IAE7C,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChC,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClC,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAE9C,MAAM,gBAAgB,GAAG,KAAK,CAAC;IAE/B,OAAO;QACL,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;QACnC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;QACxC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB;QACvD,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC5C,UAAU,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC3D,cAAc,EAAE,CAAC,CAAC,WAAW;KAC9B,CAAC;AACJ,CAAC","names":[],"sourceRoot":"","sources":["../../../src/compiler/web-keyboard-metadata.ts"],"version":3}
1
+ {"version":3,"file":"web-keyboard-metadata.js","sources":["../../../src/compiler/web-keyboard-metadata.ts"],"sourceRoot":"","names":[],"mappings":";;AASC,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,UAAU,8BAA8B,CAAC,EAAU;IACrD,MAAM,SAAS,GAAK,6BAA6B,CAAC;IAClD,MAAM,UAAU,GAAI,gCAAgC,CAAC;IACrD,MAAM,WAAW,GAAG,mCAAmC,CAAC;IACxD,MAAM,QAAQ,GAAM,2BAA2B,CAAC;IAChD,MAAM,aAAa,GAAG,yBAAyB,CAAC;IAChD,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;IAE7C,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChC,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClC,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAE9C,MAAM,gBAAgB,GAAG,KAAK,CAAC;IAE/B,OAAO;QACL,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;QACnC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;QACxC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB;QACvD,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC5C,UAAU,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC3D,cAAc,EAAE,CAAC,CAAC,WAAW;KAC9B,CAAC;AACJ,CAAC","debug_id":"7be13b44-2b7e-5674-8439-331800382138"}
@@ -1,180 +1,181 @@
1
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="85e76d98-436f-5b7c-9af9-c500c195d491")}catch(e){}}();
2
- /**
3
- * Create a .exe installer that bundles one or more .kmp files, together with
4
- * setup.exe, keymandesktop.msi, and generates and includes a setup.inf also.
5
- *
6
- * This module is effectively deprecated, but is present to keep parity with the
7
- * legacy kmcomp compiler. Thus, it is included as part of the package compiler,
8
- * and will be removed in a future version.
9
- *
10
- * This tool assumes that the installer .msi is the same version as the
11
- * compiler, unlike the legacy compiler which read this metadata from the .msi.
12
- */
13
- import JSZip from 'jszip';
14
- import KEYMAN_VERSION from "@keymanapp/keyman-version";
15
- import { KmpCompiler } from "./kmp-compiler.js";
16
- import { CompilerMessages } from "./package-compiler-messages.js";
17
- const SETUP_INF_FILENAME = 'setup.inf';
18
- const PRODUCT_NAME = 'Keyman';
19
- ;
20
- ;
21
- ;
22
- /**
23
- * @public
24
- * Compiles a .kps file to a .exe installer. The compiler does not read or write
25
- * from filesystem or network directly, but relies on callbacks for all external
26
- * IO.
27
- */
28
- export class WindowsPackageInstallerCompiler {
29
- kmpCompiler;
30
- callbacks;
31
- options;
32
- /**
33
- * Initialize the compiler.
34
- * Copies options.
35
- * @param callbacks - Callbacks for external interfaces, including message
36
- * reporting and file io
37
- * @param options - Compiler options
38
- * @returns false if initialization fails
39
- */
40
- async init(callbacks, options) {
41
- this.callbacks = callbacks;
42
- this.options = { ...options };
43
- this.kmpCompiler = new KmpCompiler();
44
- return await this.kmpCompiler.init(callbacks, options);
45
- }
46
- /**
47
- * Compiles a .kps file to .exe Windows package installer file. Returns an
48
- * object containing binary artifacts on success. The files are passed in by
49
- * name, and the compiler will use callbacks as passed to the
50
- * {@link WindowsPackageInstallerCompiler.init} function to read any input
51
- * files by disk.
52
- * @param infile - Path to source file. Path will be parsed to find relative
53
- * references in the .kmn file, such as icon or On Screen
54
- * Keyboard file
55
- * @param outfile - Path to output file. The file will not be written to, but
56
- * will be included in the result for use by
57
- * {@link WindowsPackageInstallerCompiler.write}.
58
- * @returns Binary artifacts on success, null on failure.
59
- */
60
- async run(inputFilename, outputFilename) {
61
- const sources = this.options.sources;
62
- const kps = this.kmpCompiler.loadKpsFile(inputFilename);
63
- if (!kps) {
64
- // errors will already have been reported by loadKpsFile
65
- return null;
66
- }
67
- // Check existence of required files
68
- for (const filename of [sources.licenseFilename, sources.msiFilename, sources.setupExeFilename]) {
69
- if (!this.callbacks.fs.existsSync(filename)) {
70
- this.callbacks.reportMessage(CompilerMessages.Error_FileDoesNotExist({ filename }));
71
- return null;
72
- }
73
- }
74
- // Check existence of optional files
75
- for (const filename of [sources.titleImageFilename]) {
76
- if (filename && !this.callbacks.fs.existsSync(filename)) {
77
- this.callbacks.reportMessage(CompilerMessages.Error_FileDoesNotExist({ filename }));
78
- return null;
79
- }
80
- }
81
- // Note: we never use the MSIFileName field from the .kps any more
82
- // Nor do we use the MSIOptions field.
83
- // Build the zip
84
- const zipBuffer = await this.buildZip(kps, inputFilename, sources);
85
- if (!zipBuffer) {
86
- // Error messages already reported by buildZip
87
- return null;
88
- }
89
- // Build the sfx
90
- const sfxBuffer = this.buildSfx(zipBuffer, sources);
91
- const result = {
92
- artifacts: {
93
- exe: {
94
- data: sfxBuffer,
95
- filename: outputFilename ?? inputFilename.replace(/\.kps$/, '.exe')
96
- }
97
- }
98
- };
99
- return result;
100
- }
101
- /**
102
- * Write artifacts from a successful compile to disk, via callbacks methods.
103
- * The artifacts written may include:
104
- *
105
- * - .exe file - binary Windows package installer executable file
106
- *
107
- * @param artifacts - object containing artifact binary data to write out
108
- * @returns true on success
109
- */
110
- async write(artifacts) {
111
- this.callbacks.fs.writeFileSync(artifacts.exe.filename, artifacts.exe.data);
112
- return true;
113
- }
114
- async buildZip(kps, kpsFilename, sources) {
115
- const kmpJson = this.kmpCompiler.transformKpsFileToKmpObject(kpsFilename, kps);
116
- if (!kmpJson.info?.name?.description) {
117
- this.callbacks.reportMessage(CompilerMessages.Error_PackageNameCannotBeBlank());
118
- return null;
119
- }
120
- const kmpFilename = this.callbacks.path.basename(kpsFilename, ".kps" /* KeymanFileTypes.Source.Package */) + ".kmp" /* KeymanFileTypes.Binary.Package */;
121
- const setupInfBuffer = this.buildSetupInf(sources, kmpJson, kmpFilename, kps);
122
- const kmpBuffer = await this.kmpCompiler.buildKmpFile(kpsFilename, kmpJson);
123
- // Note that this does not technically generate a "valid" sfx according to
124
- // the zip spec, because the offsets in the .zip are relative to the start
125
- // of the zip, rather than to the start of the sfx. However, as Keyman's
126
- // installer chops out the zip from the sfx and loads it in a new stream, it
127
- // works as expected.
128
- const zip = JSZip();
129
- zip.file(SETUP_INF_FILENAME, setupInfBuffer);
130
- zip.file(kmpFilename, kmpBuffer);
131
- zip.file(this.callbacks.path.basename(sources.msiFilename), this.callbacks.loadFile(sources.msiFilename));
132
- zip.file(this.callbacks.path.basename(sources.licenseFilename), this.callbacks.loadFile(sources.licenseFilename));
133
- if (sources.titleImageFilename) {
134
- zip.file(this.callbacks.path.basename(sources.titleImageFilename), this.callbacks.loadFile(sources.titleImageFilename));
135
- }
136
- return zip.generateAsync({ type: 'uint8array', compression: 'DEFLATE' });
137
- }
138
- buildSetupInf(sources, kmpJson, kmpFilename, kps) {
139
- let setupInf = `[Setup]
140
- Version=${KEYMAN_VERSION.VERSION}
141
- MSIFileName=${this.callbacks.path.basename(sources.msiFilename)}
142
- MSIOptions=
143
- AppName=${sources.appName ?? PRODUCT_NAME}
144
- License=${this.callbacks.path.basename(sources.licenseFilename)}
145
- `;
146
- if (sources.titleImageFilename) {
147
- setupInf += `TitleImage=${this.callbacks.path.basename(sources.titleImageFilename)}\n`;
148
- }
149
- if (kmpJson.options.graphicFile) {
150
- setupInf += `BitmapFileName=${this.callbacks.path.basename(kmpJson.options.graphicFile)}\n`;
151
- }
152
- if (sources.startDisabled) {
153
- setupInf += `StartDisabled=True\n`;
154
- }
155
- if (sources.startWithConfiguration) {
156
- setupInf += `StartWithConfiguration=True\n`;
157
- }
158
- setupInf += `\n[Packages]\n`;
159
- setupInf += kmpFilename + '\n';
160
- // TODO: multiple packages?
161
- const strings = !kps.Strings?.String ? [] : (Array.isArray(kps.Strings.String) ? kps.Strings.String : [kps.Strings.String]);
162
- if (strings.length) {
163
- setupInf += `\n[Strings]\n`;
164
- for (const str of strings) {
165
- setupInf += `${str.$?.Name}=${str.$?.Value}\n`;
166
- }
167
- }
168
- const setupInfBuffer = new TextEncoder().encode(setupInf);
169
- return setupInfBuffer;
170
- }
171
- buildSfx(zipBuffer, sources) {
172
- const setupRedistBuffer = this.callbacks.loadFile(sources.setupExeFilename);
173
- const buffer = new Uint8Array(setupRedistBuffer.length + zipBuffer.length);
174
- buffer.set(setupRedistBuffer, 0);
175
- buffer.set(zipBuffer, setupRedistBuffer.length);
176
- return buffer;
177
- }
178
- }
179
- //# debugId=85e76d98-436f-5b7c-9af9-c500c195d491
1
+ /**
2
+ * Create a .exe installer that bundles one or more .kmp files, together with
3
+ * setup.exe, keymandesktop.msi, and generates and includes a setup.inf also.
4
+ *
5
+ * This module is effectively deprecated, but is present to keep parity with the
6
+ * legacy kmcomp compiler. Thus, it is included as part of the package compiler,
7
+ * and will be removed in a future version.
8
+ *
9
+ * This tool assumes that the installer .msi is the same version as the
10
+ * compiler, unlike the legacy compiler which read this metadata from the .msi.
11
+ */
12
+
13
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="416a1ac8-98e1-51e8-b77b-4b2a264f7ee6")}catch(e){}}();
14
+ import JSZip from 'jszip';
15
+ import KEYMAN_VERSION from "@keymanapp/keyman-version";
16
+ import { KmpCompiler } from "./kmp-compiler.js";
17
+ import { CompilerMessages } from "./package-compiler-messages.js";
18
+ const SETUP_INF_FILENAME = 'setup.inf';
19
+ const PRODUCT_NAME = 'Keyman';
20
+ ;
21
+ ;
22
+ ;
23
+ /**
24
+ * @public
25
+ * Compiles a .kps file to a .exe installer. The compiler does not read or write
26
+ * from filesystem or network directly, but relies on callbacks for all external
27
+ * IO.
28
+ */
29
+ export class WindowsPackageInstallerCompiler {
30
+ kmpCompiler;
31
+ callbacks;
32
+ options;
33
+ /**
34
+ * Initialize the compiler.
35
+ * Copies options.
36
+ * @param callbacks - Callbacks for external interfaces, including message
37
+ * reporting and file io
38
+ * @param options - Compiler options
39
+ * @returns false if initialization fails
40
+ */
41
+ async init(callbacks, options) {
42
+ this.callbacks = callbacks;
43
+ this.options = { ...options };
44
+ this.kmpCompiler = new KmpCompiler();
45
+ return await this.kmpCompiler.init(callbacks, options);
46
+ }
47
+ /**
48
+ * Compiles a .kps file to .exe Windows package installer file. Returns an
49
+ * object containing binary artifacts on success. The files are passed in by
50
+ * name, and the compiler will use callbacks as passed to the
51
+ * {@link WindowsPackageInstallerCompiler.init} function to read any input
52
+ * files by disk.
53
+ * @param infile - Path to source file. Path will be parsed to find relative
54
+ * references in the .kmn file, such as icon or On Screen
55
+ * Keyboard file
56
+ * @param outfile - Path to output file. The file will not be written to, but
57
+ * will be included in the result for use by
58
+ * {@link WindowsPackageInstallerCompiler.write}.
59
+ * @returns Binary artifacts on success, null on failure.
60
+ */
61
+ async run(inputFilename, outputFilename) {
62
+ const sources = this.options.sources;
63
+ const kps = this.kmpCompiler.loadKpsFile(inputFilename);
64
+ if (!kps) {
65
+ // errors will already have been reported by loadKpsFile
66
+ return null;
67
+ }
68
+ // Check existence of required files
69
+ for (const filename of [sources.licenseFilename, sources.msiFilename, sources.setupExeFilename]) {
70
+ if (!this.callbacks.fs.existsSync(filename)) {
71
+ this.callbacks.reportMessage(CompilerMessages.Error_FileDoesNotExist({ filename }));
72
+ return null;
73
+ }
74
+ }
75
+ // Check existence of optional files
76
+ for (const filename of [sources.titleImageFilename]) {
77
+ if (filename && !this.callbacks.fs.existsSync(filename)) {
78
+ this.callbacks.reportMessage(CompilerMessages.Error_FileDoesNotExist({ filename }));
79
+ return null;
80
+ }
81
+ }
82
+ // Note: we never use the MSIFileName field from the .kps any more
83
+ // Nor do we use the MSIOptions field.
84
+ // Build the zip
85
+ const zipBuffer = await this.buildZip(kps, inputFilename, sources);
86
+ if (!zipBuffer) {
87
+ // Error messages already reported by buildZip
88
+ return null;
89
+ }
90
+ // Build the sfx
91
+ const sfxBuffer = this.buildSfx(zipBuffer, sources);
92
+ const result = {
93
+ artifacts: {
94
+ exe: {
95
+ data: sfxBuffer,
96
+ filename: outputFilename ?? inputFilename.replace(/\.kps$/, '.exe')
97
+ }
98
+ }
99
+ };
100
+ return result;
101
+ }
102
+ /**
103
+ * Write artifacts from a successful compile to disk, via callbacks methods.
104
+ * The artifacts written may include:
105
+ *
106
+ * - .exe file - binary Windows package installer executable file
107
+ *
108
+ * @param artifacts - object containing artifact binary data to write out
109
+ * @returns true on success
110
+ */
111
+ async write(artifacts) {
112
+ this.callbacks.fs.writeFileSync(artifacts.exe.filename, artifacts.exe.data);
113
+ return true;
114
+ }
115
+ async buildZip(kps, kpsFilename, sources) {
116
+ const kmpJson = this.kmpCompiler.transformKpsFileToKmpObject(kpsFilename, kps);
117
+ if (!kmpJson.info?.name?.description) {
118
+ this.callbacks.reportMessage(CompilerMessages.Error_PackageNameCannotBeBlank());
119
+ return null;
120
+ }
121
+ const kmpFilename = this.callbacks.path.basename(kpsFilename, ".kps" /* KeymanFileTypes.Source.Package */) + ".kmp" /* KeymanFileTypes.Binary.Package */;
122
+ const setupInfBuffer = this.buildSetupInf(sources, kmpJson, kmpFilename, kps);
123
+ const kmpBuffer = await this.kmpCompiler.buildKmpFile(kpsFilename, kmpJson);
124
+ // Note that this does not technically generate a "valid" sfx according to
125
+ // the zip spec, because the offsets in the .zip are relative to the start
126
+ // of the zip, rather than to the start of the sfx. However, as Keyman's
127
+ // installer chops out the zip from the sfx and loads it in a new stream, it
128
+ // works as expected.
129
+ const zip = JSZip();
130
+ zip.file(SETUP_INF_FILENAME, setupInfBuffer);
131
+ zip.file(kmpFilename, kmpBuffer);
132
+ zip.file(this.callbacks.path.basename(sources.msiFilename), this.callbacks.loadFile(sources.msiFilename));
133
+ zip.file(this.callbacks.path.basename(sources.licenseFilename), this.callbacks.loadFile(sources.licenseFilename));
134
+ if (sources.titleImageFilename) {
135
+ zip.file(this.callbacks.path.basename(sources.titleImageFilename), this.callbacks.loadFile(sources.titleImageFilename));
136
+ }
137
+ return zip.generateAsync({ type: 'uint8array', compression: 'DEFLATE' });
138
+ }
139
+ buildSetupInf(sources, kmpJson, kmpFilename, kps) {
140
+ let setupInf = `[Setup]
141
+ Version=${KEYMAN_VERSION.VERSION}
142
+ MSIFileName=${this.callbacks.path.basename(sources.msiFilename)}
143
+ MSIOptions=
144
+ AppName=${sources.appName ?? PRODUCT_NAME}
145
+ License=${this.callbacks.path.basename(sources.licenseFilename)}
146
+ `;
147
+ if (sources.titleImageFilename) {
148
+ setupInf += `TitleImage=${this.callbacks.path.basename(sources.titleImageFilename)}\n`;
149
+ }
150
+ if (kmpJson.options.graphicFile) {
151
+ setupInf += `BitmapFileName=${this.callbacks.path.basename(kmpJson.options.graphicFile)}\n`;
152
+ }
153
+ if (sources.startDisabled) {
154
+ setupInf += `StartDisabled=True\n`;
155
+ }
156
+ if (sources.startWithConfiguration) {
157
+ setupInf += `StartWithConfiguration=True\n`;
158
+ }
159
+ setupInf += `\n[Packages]\n`;
160
+ setupInf += kmpFilename + '\n';
161
+ // TODO: multiple packages?
162
+ const strings = !kps.Strings?.String ? [] : (Array.isArray(kps.Strings.String) ? kps.Strings.String : [kps.Strings.String]);
163
+ if (strings.length) {
164
+ setupInf += `\n[Strings]\n`;
165
+ for (const str of strings) {
166
+ setupInf += `${str.$?.Name}=${str.$?.Value}\n`;
167
+ }
168
+ }
169
+ const setupInfBuffer = new TextEncoder().encode(setupInf);
170
+ return setupInfBuffer;
171
+ }
172
+ buildSfx(zipBuffer, sources) {
173
+ const setupRedistBuffer = this.callbacks.loadFile(sources.setupExeFilename);
174
+ const buffer = new Uint8Array(setupRedistBuffer.length + zipBuffer.length);
175
+ buffer.set(setupRedistBuffer, 0);
176
+ buffer.set(zipBuffer, setupRedistBuffer.length);
177
+ return buffer;
178
+ }
179
+ }
180
180
  //# sourceMappingURL=windows-package-installer-compiler.js.map
181
+ //# debugId=416a1ac8-98e1-51e8-b77b-4b2a264f7ee6
@@ -1 +1 @@
1
- {"debug_id":"85e76d98-436f-5b7c-9af9-c500c195d491","file":"windows-package-installer-compi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QAC7B,QAAQ,IAAI,WAAW,GAAG,IAAI,CAAC;QAC/B,2BAA2B;QAC3B,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QAC5H,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,QAAQ,IAAI,eAAe,CAAC;YAC5B,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;gBACzB,QAAQ,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,IAAI,IAAI,GAAG,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC;aAChD;SACF;QAED,MAAM,cAAc,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC1D,OAAO,cAAc,CAAC;IACxB,CAAC;IAEO,QAAQ,CAAC,SAAqB,EAAE,OAAuC;QAC7E,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,iBAAiB,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;QAC3E,MAAM,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC;QACjC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAChD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","names":[],"sourceRoot":"","sources":["../../../src/compiler/windows-package-installer-compiler.ts"],"version":3}
1
+ {"version":3,"file":"windows-package-installer-compiler.js","sources":["../../../src/compiler/windows-package-installer-compiler.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