diff --git a/.idea/dictionaries/develar.xml b/.idea/dictionaries/develar.xml index 2dc4be9e693..f7cadb4eb93 100644 --- a/.idea/dictionaries/develar.xml +++ b/.idea/dictionaries/develar.xml @@ -244,6 +244,7 @@ <w>rollout</w> <w>rollouts</w> <w>rpmbuild</w> + <w>rtfs</w> <w>scripthost</w> <w>semver</w> <w>setfinderinfo</w> @@ -254,6 +255,7 @@ <w>simp</w> <w>smprograms</w> <w>snapcraft</w> + <w>splitted</w> <w>srcfolder</w> <w>subcommand</w> <w>targetsize</w> diff --git a/MAINTAINING.md b/MAINTAINING.md index a90efd2eac0..cebbffb6b06 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -13,4 +13,10 @@ To sync: `yarn update-wiki` # Typings -All typings are added into root `package.json` to avoid duplication errors in the IDE compiler (several `node.d.ts` files). \ No newline at end of file +All typings are added into root `package.json` to avoid duplication errors in the IDE compiler (several `node.d.ts` files). + +# ^ or ~ for package depdencies? + +For `electron-builder-http` `~` is used because if something fixed in this module, all clients should be updated as well (to ensure, that client will get update versions). + +For `builder-util` `^` is used, because often new methods are added to this module, and if `~` will be used, we will be forced to release dependent packages very often and it can create unnecessary noise. \ No newline at end of file diff --git a/package.json b/package.json index 87c5df0e8f9..4265dbfcc62 100644 --- a/package.json +++ b/package.json @@ -33,12 +33,12 @@ "ajv-keywords": "^2.1.0", "archiver": "^2.0.0", "async-exit-hook": "^2.0.1", - "aws-sdk": "^2.102.0", + "aws-sdk": "^2.103.0", "bluebird-lst": "^1.0.3", "chalk": "^2.1.0", "chromium-pickle-js": "^0.2.0", "cuint": "^0.2.2", - "debug": "^3.0.0", + "debug": "^3.0.1", "dotenv": "^4.0.0", "dotenv-expand": "^4.0.1", "ejs": "^2.5.7", @@ -48,7 +48,6 @@ "fcopy-pre-bundled": "0.3.4", "fs-extra-p": "^4.4.0", "hosted-git-info": "^2.5.0", - "iconv-lite": "^0.4.18", "ini": "^1.3.4", "is-ci": "^1.0.10", "isbinaryfile": "^3.0.2", diff --git a/packages/builder-util/package.json b/packages/builder-util/package.json index 0ae5fccd41c..f3bbb713eee 100644 --- a/packages/builder-util/package.json +++ b/packages/builder-util/package.json @@ -18,7 +18,7 @@ "stat-mode": "^0.2.2", "bluebird-lst": "^1.0.3", "chalk": "^2.1.0", - "debug": "^3.0.0", + "debug": "^3.0.1", "node-emoji": "^1.8.1", "electron-builder-http": "~0.0.0-semantic-release", "source-map-support": "^0.4.16", @@ -26,7 +26,8 @@ "ini": "^1.3.4", "tunnel-agent": "^0.6.0", "semver": "^5.4.1", - "lazy-val": "^1.0.2" + "lazy-val": "^1.0.2", + "js-yaml": "^3.9.1" }, "typings": "./out/util.d.ts" } diff --git a/packages/electron-builder/src/DebugLogger.ts b/packages/builder-util/src/DebugLogger.ts similarity index 83% rename from packages/electron-builder/src/DebugLogger.ts rename to packages/builder-util/src/DebugLogger.ts index 18ad48d84ed..b1239a73d70 100644 --- a/packages/electron-builder/src/DebugLogger.ts +++ b/packages/builder-util/src/DebugLogger.ts @@ -9,6 +9,10 @@ export class DebugLogger { } add(key: string, value: any) { + if (!this.enabled) { + return + } + const dataPath = key.split(".") let o = this.data let lastName: string | null = null @@ -37,7 +41,8 @@ export class DebugLogger { } save(file: string) { - if (Object.keys(this.data).length > 0) { + // toml and json doesn't correctly output multiline string as multiline + if (this.enabled && Object.keys(this.data).length > 0) { return outputFile(file, safeDump(this.data)) } else { diff --git a/packages/builder-util/src/api.ts b/packages/builder-util/src/api.ts index ad6aea4e5bc..6a0dc432172 100644 --- a/packages/builder-util/src/api.ts +++ b/packages/builder-util/src/api.ts @@ -1,6 +1,10 @@ +import { DebugLogger } from "./DebugLogger" + export interface PackageBuilder { readonly buildResourcesDir: string + readonly debugLogger: DebugLogger + readonly resourceList: Promise<Array<string>> getTempFile(suffix: string): Promise<string> diff --git a/packages/builder-util/src/util.ts b/packages/builder-util/src/util.ts index bd5875419f8..2f1076c09f3 100644 --- a/packages/builder-util/src/util.ts +++ b/packages/builder-util/src/util.ts @@ -13,6 +13,7 @@ export { isMacOsSierra } from "./macosVersion" export { execWine, prepareWindowsExecutableArgs } from "./wine" export { Arch, toLinuxArchString, getArchSuffix, ArchType, archFromString } from "./arch" export { AsyncTaskManager } from "./asyncTaskManager" +export { DebugLogger } from "./DebugLogger" export const debug = _debug("electron-builder") export const debug7z = _debug("electron-builder:7z") diff --git a/packages/dmg-builder/package.json b/packages/dmg-builder/package.json index baf74d6d30a..d00094e3ec4 100644 --- a/packages/dmg-builder/package.json +++ b/packages/dmg-builder/package.json @@ -13,7 +13,6 @@ "dependencies": { "fs-extra-p": "^4.4.0", "bluebird-lst": "^1.0.3", - "iconv-lite": "^0.4.18", "parse-color": "^1.0.0", "builder-util": "^0.0.0-semantic-release" }, diff --git a/packages/dmg-builder/src/dmgLicense.ts b/packages/dmg-builder/src/dmgLicense.ts index 0d69653799a..82043eb090b 100644 --- a/packages/dmg-builder/src/dmgLicense.ts +++ b/packages/dmg-builder/src/dmgLicense.ts @@ -1,89 +1,135 @@ -import { debug, exec } from "builder-util" +import { exec } from "builder-util" import { PackageBuilder } from "builder-util/out/api" import { getLicenseFiles } from "builder-util/out/license" import { outputFile, readFile } from "fs-extra-p" -import { getDmgVendorPath } from "./dmgUtil" +import { getDefaultButtons } from "./licenseDefaultButtons" + +// DropDMG/dmgbuild a in any case (even if no english, but only ru/de) set to 0 (en_US), well, without docs, just believe that's correct +const DEFAULT_REGION_CODE = 0 export async function addLicenseToDmg(packager: PackageBuilder, dmgPath: string) { + // http://www.owsiak.org/?p=700 const licenseFiles = await getLicenseFiles(packager) if (licenseFiles.length === 0) { return } - if (debug.enabled) { - debug(`License files: ${licenseFiles.join(" ")}`) + if (packager.debugLogger.enabled) { + packager.debugLogger.add("dmg.licenseFiles", licenseFiles) } - let licenses = "" - const iconv = require("iconv-lite") - const indent = " " - for (const item of licenseFiles) { - const encoding = getEncoderName(item.langWithRegion) - if (!iconv.encodingExists(encoding)) { - throw new Error(`${encoding} is not supported by iconv-lite`) - } + const style: Array<string> = [] + const rtfs: Array<string> = [] + const defaultButtons: Array<string> = [] + let counter = 5000 + const addedRegionCodes: Array<number> = [] + for (const item of licenseFiles) { + // value from DropDMG, data the same for any language + // noinspection SpellCheckingInspection + style.push(`data 'styl' (${counter}, "${item.langName}") { + $"0001 0000 0000 000E 0011 0015 0000 000C" + $"0000 0000 0000" +};`) + + let data = `data 'RTF ' (${counter}, "${item.langName}") {\n` const fileData = await readFile(item.file, "utf-8") - const data = iconv.encode(fileData, encoding) const isRtf = item.file.endsWith(".rtf") || item.file.endsWith(".RTF") - licenses += [ - `${indent}'${item.langWithRegion}': {`, - `${indent} 'data': bytearray.fromhex('${data.toString("hex")}'),`, - `${indent} 'isRtf': ${isRtf ? "True" : "False"}`, - `${indent}}`, - ].join("\n") + ",\n" - } + data += isRtf ? serializeString(fileData) : wrapInRtf(fileData) + data += "\n};" + rtfs.push(data) - const script = [ - "# -*- coding: utf-8 -*-", - "from __future__ import unicode_literals", - "import dmgbuild.licensing", - "license = {", - " 'default-language': 'en_US',", - " 'licenses': {", - licenses, - " }", - "}", - `dmgbuild.licensing.add_license('${dmgPath}', license)` - ] + defaultButtons.push(getDefaultButtons(item.langWithRegion, counter, item.langName)) - const tempFile = await packager.getTempFile(".py") - await outputFile(tempFile, script.join("\n")) + addedRegionCodes.push(getRegionCode(item.langWithRegion)) - if (debug.enabled) { - debug(`License: ${script.join("\n")}`) + counter++ } - await exec("hdiutil", ["unflatten", "-quiet", dmgPath]) + const buffer = Buffer.allocUnsafe((2 + (3 * addedRegionCodes.length)) * 2) + let offset = 0 + buffer.writeUInt16BE(DEFAULT_REGION_CODE, offset) + offset += 2 + buffer.writeUInt16BE(addedRegionCodes.length, offset) + offset += 2 + + for (let i = 0; i < addedRegionCodes.length; i++) { + const regionCode = addedRegionCodes[i] + buffer.writeUInt16BE(regionCode, offset) + offset += 2 + buffer.writeUInt16BE(i, offset) + offset += 2 + buffer.writeUInt16BE(/* is two byte */ [14, 51, 52, 53].includes(regionCode) ? 1 : 0, offset) + offset += 2 + } - await exec("/usr/bin/python", [tempFile], { - env: { - ...process.env, - PYTHONPATH: getDmgVendorPath(), - LC_CTYPE: "en_US.UTF-8", - LANG: "en_US.UTF-8", - } - }) + const lPic = `data 'LPic' (5000) {\n${serializeString(buffer.toString("hex"))}\n};` + const data = style + .concat(rtfs) + .concat(lPic) + .concat(defaultButtons) + .join("\n\n") + + packager.debugLogger.add("dmg.licenseResource", data) + const tempFile = await packager.getTempFile(".r") + await outputFile(tempFile, data) + await exec("hdiutil", ["unflatten", dmgPath]) + await exec("Rez", ["-a", tempFile, "-o", dmgPath]) + await exec("hdiutil", ["flatten", dmgPath]) +} - await exec("hdiutil", ["flatten", "-quiet", dmgPath]) +function serializeString(data: string) { + return ' $"' + data.match(/.{1,32}/g)!!.map(it => it.match(/.{1,4}/g)!!.join(" ")).join('"\n $"') + '"' } -function getEncoderName(langWithRegion: string): string { - const regionCode = regionCodes[langWithRegion] - if (regionCode == null) { - throw new Error(`Cannot determine region code for ${langWithRegion}`) +function getRtfUnicodeEscapedString(text: string) { + let result = "" + for (let i = 0; i < text.length; i++) { + if (text[i] === "\\" || text[i] === "{" || text[i] === "}" || text[i] === "\n") { + result += `\\${text[i]}` + } + else if (text[i] === "\r") { + // ignore + } + else if (text.charCodeAt(i) <= 0x7f) { + result += text[i] + } + else { + result += `\\u${text.codePointAt(i)}` + } } + return result +} - const scriptCode = scriptCodes[regionCode] - if (regionCode == null) { - throw new Error(`Cannot determine script code for ${langWithRegion}`) - } +function wrapInRtf(text: string) { + return ` $"7B5C 7274 6631 5C61 6E73 695C 616E 7369" + $"6370 6731 3235 325C 636F 636F 6172 7466" + $"3135 3034 5C63 6F63 6F61 7375 6272 7466" + $"3833 300A 7B5C 666F 6E74 7462 6C5C 6630" + $"5C66 7377 6973 735C 6663 6861 7273 6574" + $"3020 4865 6C76 6574 6963 613B 7D0A 7B5C" + $"636F 6C6F 7274 626C 3B5C 7265 6432 3535" + $"5C67 7265 656E 3235 355C 626C 7565 3235" + $"353B 7D0A 7B5C 2A5C 6578 7061 6E64 6564" + $"636F 6C6F 7274 626C 3B3B 7D0A 5C70 6172" + $"645C 7478 3536 305C 7478 3131 3230 5C74" + $"7831 3638 305C 7478 3232 3430 5C74 7832" + $"3830 305C 7478 3333 3630 5C74 7833 3932" + $"305C 7478 3434 3830 5C74 7835 3034 305C" + $"7478 3536 3030 5C74 7836 3136 305C 7478" + $"3637 3230 5C70 6172 6469 726E 6174 7572" + $"616C 5C70 6172 7469 6768 7465 6E66 6163" + $"746F 7230 0A0A 5C66 305C 6673 3234 205C" +${serializeString("63663020" + Buffer.from(getRtfUnicodeEscapedString(text)).toString("hex").toUpperCase() + "7D")}` + // ^ to produce correctly splitted output, this two leading chunks from default wrapper appended here +} - const encodingName = encodingsMap[scriptCode] - if (regionCode == null) { - throw new Error(`Cannot mac determine encoding for ${langWithRegion}`) +function getRegionCode(langWithRegion: string) { + const result = regionCodes[langWithRegion] + if (result == null) { + throw new Error(`Cannot determine region code for ${langWithRegion}`) } - return encodingName + return result } // noinspection SpellCheckingInspection @@ -173,123 +219,4 @@ const regionCodes: any = { ne_NP: 106, kl: 107, en_IE: 108 -} - -const scriptCodes: any = { - 0: 0, - 1: 0, - 2: 0, - 3: 0, - 4: 0, - 5: 0, - 6: 0, - 7: 0, - 8: 0, - 9: 0, - 10: 0, - 11: 0, - 12: 0, - 13: 5, - 14: 1, - 15: 0, - 16: 4, - 17: 0, - 18: 0, - 19: 0, - 20: 6, - 21: 37, - 22: 0, - 23: 6, - 24: 35, - 25: 36, - 26: 0, - 27: 0, - 30: 0, - 31: 0, - 32: 0, - 33: 9, - 34: 4, - 35: 35, - 36: 0, - 37: 0, - 39: 38, - 40: 6, - 41: 29, - 42: 29, - 43: 29, - 44: 29, - 45: 29, - 46: 0, - 47: 37, - 48: 140, - 49: 7, - 50: 39, - 51: 3, - 52: 25, - 53: 2, - 54: 21, - 56: 29, - 57: 29, - 59: 29, - 60: 13, - 61: 7, - 62: 7, - 64: 6, - 65: 7, - 66: 36, - 67: 7, - 68: 36, - 70: 0, - 71: 0, - 72: 7, - 73: 0, - 75: 39, - 76: 39, - 77: 39, - 78: 236, - 79: 39, - 81: 40, - 82: 0, - 83: 26, - 84: 24, - 85: 23, - 86: 0, - 88: 0, - 91: 0, - 92: 0, - 94: 11, - 95: 10, - 96: 4, - 97: 30, - 98: 0, - 99: 7, - 100: 0, - 101: 0, - 102: 0, - 103: 0, - 104: 9, - 105: 26, - 106: 9, - 107: 0, - 108: 0 -} - -// https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings -// noinspection SpellCheckingInspection -const encodingsMap: any = { - 0: "macroman", - 1: "Shift_JIS", - 2: "Big5", - 3: "EUC-KR", - 4: "mac_arabic", - 6: "macgreek", - 7: "maccyrillic", - 21: "ISO-8859-1", - 25: "EUC-CN", - 29: "maccenteuro", - 35: "macturkish", - 36: "maccroatian", - 37: "maciceland", - 38: "macromania", - 140: "macfarsi" } \ No newline at end of file diff --git a/packages/dmg-builder/src/licenseDefaultButtons.ts b/packages/dmg-builder/src/licenseDefaultButtons.ts new file mode 100644 index 00000000000..185aec0602e --- /dev/null +++ b/packages/dmg-builder/src/licenseDefaultButtons.ts @@ -0,0 +1,271 @@ +export function getDefaultButtons(langWithRegion: string, id: number, name: string) { + switch (langWithRegion) { + case "de_DE": + return `data 'STR#' (${id}, "${name}") { + $"0006 0744 6575 7473 6368 0B41 6B7A 6570" + $"7469 6572 656E 0841 626C 6568 6E65 6E07" + $"4472 7563 6B65 6E0A 5369 6368 6572 6E2E" + $"2E2E E74B 6C69 636B 656E 2053 6965 2069" + $"6E20 D241 6B7A 6570 7469 6572 656E D32C" + $"2077 656E 6E20 5369 6520 6D69 7420 6465" + $"6E20 4265 7374 696D 6D75 6E67 656E 2064" + $"6573 2053 6F66 7477 6172 652D 4C69 7A65" + $"6E7A 7665 7274 7261 6773 2065 696E 7665" + $"7273 7461 6E64 656E 2073 696E 642E 2046" + $"616C 6C73 206E 6963 6874 2C20 6269 7474" + $"6520 D241 626C 6568 6E65 6ED3 2061 6E6B" + $"6C69 636B 656E 2E20 5369 6520 6B9A 6E6E" + $"656E 2064 6965 2053 6F66 7477 6172 6520" + $"6E75 7220 696E 7374 616C 6C69 6572 656E" + $"2C20 7765 6E6E 2053 6965 20D2 416B 7A65" + $"7074 6965 7265 6ED3 2061 6E67 656B 6C69" + $"636B 7420 6861 6265 6E2E" +};` + + case "fr_FR": + return `data 'STR#' (${id}, "${name}") { + $"0006 0846 7261 6E8D 6169 7308 4163 6365" + $"7074 6572 0752 6566 7573 6572 0849 6D70" + $"7269 6D65 720E 456E 7265 6769 7374 7265" + $"722E 2E2E BA53 6920 766F 7573 2061 6363" + $"6570 7465 7A20 6C65 7320 7465 726D 6573" + $"2064 6520 6C61 2070 728E 7365 6E74 6520" + $"6C69 6365 6E63 652C 2063 6C69 7175 657A" + $"2073 7572 2022 4163 6365 7074 6572 2220" + $"6166 696E 2064 2769 6E73 7461 6C6C 6572" + $"206C 6520 6C6F 6769 6369 656C 2E20 5369" + $"2076 6F75 7320 6E27 9074 6573 2070 6173" + $"2064 2761 6363 6F72 6420 6176 6563 206C" + $"6573 2074 6572 6D65 7320 6465 206C 6120" + $"6C69 6365 6E63 652C 2063 6C69 7175 657A" + $"2073 7572 2022 5265 6675 7365 7222 2E" +};` + + case "fr_CA": + return `data 'STR#' (${id}, "${name}") { + $"0006 1146 7261 6E8D 6169 7320 6361 6E61" + $"6469 656E 0841 6363 6570 7465 7207 5265" + $"6675 7365 7208 496D 7072 696D 6572 0E45" + $"6E72 6567 6973 7472 6572 2E2E 2EBA 5369" + $"2076 6F75 7320 6163 6365 7074 657A 206C" + $"6573 2074 6572 6D65 7320 6465 206C 6120" + $"7072 8E73 656E 7465 206C 6963 656E 6365" + $"2C20 636C 6971 7565 7A20 7375 7220 2241" + $"6363 6570 7465 7222 2061 6669 6E20 6427" + $"696E 7374 616C 6C65 7220 6C65 206C 6F67" + $"6963 6965 6C2E 2053 6920 766F 7573 206E" + $"2790 7465 7320 7061 7320 6427 6163 636F" + $"7264 2061 7665 6320 6C65 7320 7465 726D" + $"6573 2064 6520 6C61 206C 6963 656E 6365" + $"2C20 636C 6971 7565 7A20 7375 7220 2252" + $"6566 7573 6572 222E" +};` + + case "es_ES": + return `data 'STR#' (${id}, "${name}") { + $"0006 0745 7370 6196 6F6C 0741 6365 7074" + $"6172 0A4E 6F20 6163 6570 7461 7208 496D" + $"7072 696D 6972 0A47 7561 7264 6172 2E2E" + $"2EC0 5369 2065 7374 8720 6465 2061 6375" + $"6572 646F 2063 6F6E 206C 6F73 2074 8E72" + $"6D69 6E6F 7320 6465 2065 7374 6120 6C69" + $"6365 6E63 6961 2C20 7075 6C73 6520 2241" + $"6365 7074 6172 2220 7061 7261 2069 6E73" + $"7461 6C61 7220 656C 2073 6F66 7477 6172" + $"652E 2045 6E20 656C 2073 7570 7565 7374" + $"6F20 6465 2071 7565 206E 6F20 6573 748E" + $"2064 6520 6163 7565 7264 6F20 636F 6E20" + $"6C6F 7320 748E 726D 696E 6F73 2064 6520" + $"6573 7461 206C 6963 656E 6369 612C 2070" + $"756C 7365 2022 4E6F 2061 6365 7074 6172" + $"2E22" +};` + + case "it_IT": + return `data 'STR#' (${id}, "${name}") { + $"0006 0849 7461 6C69 616E 6F07 4163 6365" + $"7474 6F07 5269 6669 7574 6F06 5374 616D" + $"7061 0B52 6567 6973 7472 612E 2E2E 7F53" + $"6520 6163 6365 7474 6920 6C65 2063 6F6E" + $"6469 7A69 6F6E 6920 6469 2071 7565 7374" + $"6120 6C69 6365 6E7A 612C 2066 6169 2063" + $"6C69 6320 7375 2022 4163 6365 7474 6F22" + $"2070 6572 2069 6E73 7461 6C6C 6172 6520" + $"696C 2073 6F66 7477 6172 652E 2041 6C74" + $"7269 6D65 6E74 6920 6661 6920 636C 6963" + $"2073 7520 2252 6966 6975 746F 222E" +};` + + case "ja_JP": + return `data 'STR#' (${id}, "${name}") { + $"0006 084A 6170 616E 6573 650A 93AF 88D3" + $"82B5 82DC 82B7 0C93 AF88 D382 B582 DC82" + $"B982 F108 88F3 8DFC 82B7 82E9 0795 DB91" + $"B62E 2E2E B496 7B83 5C83 7483 6783 4583" + $"4783 418E 6797 708B 9691 F88C 5F96 F182" + $"CC8F F08C 8F82 C993 AF88 D382 B382 EA82" + $"E98F EA8D 8782 C982 CD81 4183 5C83 7483" + $"6783 4583 4783 4182 F083 4383 9383 5883" + $"6781 5B83 8B82 B782 E982 BD82 DF82 C981" + $"7593 AF88 D382 B582 DC82 B781 7682 F089" + $"9F82 B582 C482 AD82 BE82 B382 A281 4281" + $"4093 AF88 D382 B382 EA82 C882 A28F EA8D" + $"8782 C982 CD81 4181 7593 AF88 D382 B582" + $"DC82 B982 F181 7682 F089 9F82 B582 C482" + $"AD82 BE82 B382 A281 42" +};` + + case "nl_NL": + return `data 'STR#' (${id}, "${name}") { + $"0006 0A4E 6564 6572 6C61 6E64 7302 4A61" + $"034E 6565 0550 7269 6E74 0942 6577 6161" + $"722E 2E2E A449 6E64 6965 6E20 7520 616B" + $"6B6F 6F72 6420 6761 6174 206D 6574 2064" + $"6520 766F 6F72 7761 6172 6465 6E20 7661" + $"6E20 6465 7A65 206C 6963 656E 7469 652C" + $"206B 756E 7420 7520 6F70 2027 4A61 2720" + $"6B6C 696B 6B65 6E20 6F6D 2064 6520 7072" + $"6F67 7261 6D6D 6174 7575 7220 7465 2069" + $"6E73 7461 6C6C 6572 656E 2E20 496E 6469" + $"656E 2075 206E 6965 7420 616B 6B6F 6F72" + $"6420 6761 6174 2C20 6B6C 696B 7420 7520" + $"6F70 2027 4E65 6527 2E" +};` + + case "sv_SE": + return `data 'STR#' (${id}, "${name}") { + $"0006 0653 7665 6E73 6B08 476F 646B 8A6E" + $"6E73 0641 7662 9A6A 7308 536B 7269 7620" + $"7574 0853 7061 7261 2E2E 2E93 4F6D 2044" + $"7520 676F 646B 8A6E 6E65 7220 6C69 6365" + $"6E73 7669 6C6C 6B6F 7265 6E20 6B6C 6963" + $"6B61 2070 8C20 2247 6F64 6B8A 6E6E 7322" + $"2066 9A72 2061 7474 2069 6E73 7461 6C6C" + $"6572 6120 7072 6F67 7261 6D70 726F 6475" + $"6B74 656E 2E20 4F6D 2044 7520 696E 7465" + $"2067 6F64 6B8A 6E6E 6572 206C 6963 656E" + $"7376 696C 6C6B 6F72 656E 2C20 6B6C 6963" + $"6B61 2070 8C20 2241 7662 9A6A 7322 2E" +};` + + case "br_FR": + return `data 'STR#' (${id}, "${name}") { + $"0006 1150 6F72 7475 6775 9073 2C20 4272" + $"6173 696C 0943 6F6E 636F 7264 6172 0944" + $"6973 636F 7264 6172 0849 6D70 7269 6D69" + $"7209 5361 6C76 6172 2E2E 2E8C 5365 2065" + $"7374 8720 6465 2061 636F 7264 6F20 636F" + $"6D20 6F73 2074 6572 6D6F 7320 6465 7374" + $"6120 6C69 6365 6E8D 612C 2070 7265 7373" + $"696F 6E65 2022 436F 6E63 6F72 6461 7222" + $"2070 6172 6120 696E 7374 616C 6172 206F" + $"2073 6F66 7477 6172 652E 2053 6520 6E8B" + $"6F20 6573 7487 2064 6520 6163 6F72 646F" + $"2C20 7072 6573 7369 6F6E 6520 2244 6973" + $"636F 7264 6172 222E" +};` + + case "zh_TW": + return `data 'STR#' (${id}, "${name}") { + $"0006 1354 7261 6469 7469 6F6E 616C 2043" + $"6869 6E65 7365 04A6 50B7 4E06 A4A3 A650" + $"B74E 04A6 43A6 4C06 C078 A673 A14B 50A6" + $"70AA 47B1 7AA6 50B7 4EA5 BBB3 5CA5 69C3" + $"D2B8 CCAA BAB1 F8B4 DAA1 41BD D0AB F6A1" + $"A7A6 50B7 4EA1 A8A5 48A6 77B8 CBB3 6EC5" + $"E9A1 43A6 70AA 47A4 A3A6 50B7 4EA1 41BD" + $"D0AB F6A1 A7A4 A3A6 50B7 4EA1 A8A1 43" +};` + + case "zh_CN": + return `data 'STR#' (${id}, "${name}") { + $"0006 1253 696D 706C 6966 6965 6420 4368" + $"696E 6573 6504 CDAC D2E2 06B2 BBCD ACD2" + $"E204 B4F2 D3A1 06B4 E6B4 A2A1 AD54 C8E7" + $"B9FB C4FA CDAC D2E2 B1BE D0ED BFC9 D0AD" + $"D2E9 B5C4 CCF5 BFEE A3AC C7EB B0B4 A1B0" + $"CDAC D2E2 A1B1 C0B4 B0B2 D7B0 B4CB C8ED" + $"BCFE A1A3 C8E7 B9FB C4FA B2BB CDAC D2E2" + $"A3AC C7EB B0B4 A1B0 B2BB CDAC D2E2 A1B1" + $"A1A3" +};` + + case "da_DK": + return `data 'STR#' (${id}, "${name}") { + $"0006 0544 616E 736B 0445 6E69 6705 5565" + $"6E69 6707 5564 736B 7269 760A 4172 6B69" + $"7665 722E 2E2E 9848 7669 7320 6475 2061" + $"6363 6570 7465 7265 7220 6265 7469 6E67" + $"656C 7365 726E 6520 6920 6C69 6365 6E73" + $"6166 7461 6C65 6E2C 2073 6B61 6C20 6475" + $"206B 6C69 6B6B 6520 708C 20D2 456E 6967" + $"D320 666F 7220 6174 2069 6E73 7461 6C6C" + $"6572 6520 736F 6674 7761 7265 6E2E 204B" + $"6C69 6B20 708C 20D2 5565 6E69 67D3 2066" + $"6F72 2061 7420 616E 6E75 6C6C 6572 6520" + $"696E 7374 616C 6C65 7269 6E67 656E 2E" +};` + + case "fi_FI": + return `data 'STR#' (${id}, "${name}") { + $"0006 0553 756F 6D69 0848 7976 8A6B 7379" + $"6E0A 456E 2068 7976 8A6B 7379 0754 756C" + $"6F73 7461 0954 616C 6C65 6E6E 61C9 6F48" + $"7976 8A6B 7379 206C 6973 656E 7373 6973" + $"6F70 696D 756B 7365 6E20 6568 646F 7420" + $"6F73 6F69 7474 616D 616C 6C61 20D5 4879" + $"768A 6B73 79D5 2E20 4A6F 7320 6574 2068" + $"7976 8A6B 7379 2073 6F70 696D 756B 7365" + $"6E20 6568 746F 6A61 2C20 6F73 6F69 7461" + $"20D5 456E 2068 7976 8A6B 7379 D52E" +};` + + case "ko_KR": + return `data 'STR#' (${id}, "${name}") { + $"0006 064B 6F72 6561 6E04 B5BF C0C7 09B5" + $"BFC0 C720 BEC8 C7D4 06C7 C1B8 B0C6 AE07" + $"C0FA C0E5 2E2E 2E7E BBE7 BFEB 20B0 E8BE" + $"E0BC ADC0 C720 B3BB BFEB BFA1 20B5 BFC0" + $"C7C7 CFB8 E92C 2022 B5BF C0C7 2220 B4DC" + $"C3DF B8A6 20B4 ADB7 AF20 BCD2 C7C1 C6AE" + $"BFFE BEEE B8A6 20BC B3C4 A1C7 CFBD CABD" + $"C3BF C02E 20B5 BFC0 C7C7 CFC1 F620 BECA" + $"B4C2 B4D9 B8E9 2C20 22B5 BFC0 C720 BEC8" + $"C7D4 2220 B4DC C3DF B8A6 20B4 A9B8 A3BD" + $"CABD C3BF C02E" +};` + + case "nb_NO": + return `data 'STR#' (${id}, "${name}") { + $"0006 054E 6F72 736B 0445 6E69 6709 496B" + $"6B65 2065 6E69 6708 536B 7269 7620 7574" + $"0A41 726B 6976 6572 2E2E 2EA3 4876 6973" + $"2044 6520 6572 2065 6E69 6720 6920 6265" + $"7374 656D 6D65 6C73 656E 6520 6920 6465" + $"6E6E 6520 6C69 7365 6E73 6176 7461 6C65" + $"6E2C 206B 6C69 6B6B 6572 2044 6520 708C" + $"2022 456E 6967 222D 6B6E 6170 7065 6E20" + $"666F 7220 8C20 696E 7374 616C 6C65 7265" + $"2070 726F 6772 616D 7661 7265 6E2E 2048" + $"7669 7320 4465 2069 6B6B 6520 6572 2065" + $"6E69 672C 206B 6C69 6B6B 6572 2044 6520" + $"708C 2022 496B 6B65 2065 6E69 6722 2E" +};` + + default: + // en_US + return `data 'STR#' (${id}, "${name}") { + $"0006 0745 6E67 6C69 7368 0541 6772 6565" + $"0844 6973 6167 7265 6505 5072 696E 7407" + $"5361 7665 2E2E 2E7A 4966 2079 6F75 2061" + $"6772 6565 2077 6974 6820 7468 6520 7465" + $"726D 7320 6F66 2074 6869 7320 6C69 6365" + $"6E73 652C 2070 7265 7373 20D2 4167 7265" + $"65D3 2074 6F20 696E 7374 616C 6C20 7468" + $"6520 736F 6674 7761 7265 2E20 4966 2079" + $"6F75 2064 6F20 6E6F 7420 6167 7265 652C" + $"2070 7265 7373 20D2 4469 7361 6772 6565" + $"D32E" +};` + } +} \ No newline at end of file diff --git a/packages/dmg-builder/templates/license.txt b/packages/dmg-builder/templates/license.txt deleted file mode 100644 index 7c958c67bdd..00000000000 --- a/packages/dmg-builder/templates/license.txt +++ /dev/null @@ -1,280 +0,0 @@ -data 'TMPL' (128, "LPic") { - $"1344 6566 6175 6C74 204C 616E 6775 6167" - $"6520 4944 4457 5244 0543 6F75 6E74 4F43" - $"4E54 042A 2A2A 2A4C 5354 430B 7379 7320" - $"6C61 6E67 2049 4444 5752 441E 6C6F 6361" - $"6C20 7265 7320 4944 2028 6F66 6673 6574" - $"2066 726F 6D20 3530 3030 4457 5244 1032" - $"2D62 7974 6520 6C61 6E67 7561 6765 3F44" - $"5752 4404 2A2A 2A2A 4C53 5445" -}; - -data 'LPic' (5000) { - $"0000 0002 0000 0000 0000 0000 0004 0000" -}; - -data 'STR#' (5000, "English buttons") { - $"0006 0D45 6E67 6C69 7368 2074 6573 7431" - $"0541 6772 6565 0844 6973 6167 7265 6505" - $"5072 696E 7407 5361 7665 2E2E 2E7A 4966" - $"2079 6F75 2061 6772 6565 2077 6974 6820" - $"7468 6520 7465 726D 7320 6F66 2074 6869" - $"7320 6C69 6365 6E73 652C 2063 6C69 636B" - $"2022 4167 7265 6522 2074 6F20 6163 6365" - $"7373 2074 6865 2073 6F66 7477 6172 652E" - $"2020 4966 2079 6F75 2064 6F20 6E6F 7420" - $"6167 7265 652C 2070 7265 7373 2022 4469" - $"7361 6772 6565 2E22" -}; - -data 'STR#' (5001, "German") { - $"0006 0744 6575 7473 6368 0B41 6B7A 6570" - $"7469 6572 656E 0841 626C 6568 6E65 6E07" - $"4472 7563 6B65 6E0A 5369 6368 6572 6E2E" - $"2E2E E74B 6C69 636B 656E 2053 6965 2069" - $"6E20 D241 6B7A 6570 7469 6572 656E D32C" - $"2077 656E 6E20 5369 6520 6D69 7420 6465" - $"6E20 4265 7374 696D 6D75 6E67 656E 2064" - $"6573 2053 6F66 7477 6172 652D 4C69 7A65" - $"6E7A 7665 7274 7261 6773 2065 696E 7665" - $"7273 7461 6E64 656E 2073 696E 642E 2046" - $"616C 6C73 206E 6963 6874 2C20 6269 7474" - $"6520 D241 626C 6568 6E65 6ED3 2061 6E6B" - $"6C69 636B 656E 2E20 5369 6520 6B9A 6E6E" - $"656E 2064 6965 2053 6F66 7477 6172 6520" - $"6E75 7220 696E 7374 616C 6C69 6572 656E" - $"2C20 7765 6E6E 2053 6965 20D2 416B 7A65" - $"7074 6965 7265 6ED3 2061 6E67 656B 6C69" - $"636B 7420 6861 6265 6E2E" -}; - -data 'STR#' (5002, "English") { - $"0006 0745 6E67 6C69 7368 0541 6772 6565" - $"0844 6973 6167 7265 6505 5072 696E 7407" - $"5361 7665 2E2E 2E7B 4966 2079 6F75 2061" - $"6772 6565 2077 6974 6820 7468 6520 7465" - $"726D 7320 6F66 2074 6869 7320 6C69 6365" - $"6E73 652C 2070 7265 7373 2022 4167 7265" - $"6522 2074 6F20 696E 7374 616C 6C20 7468" - $"6520 736F 6674 7761 7265 2E20 2049 6620" - $"796F 7520 646F 206E 6F74 2061 6772 6565" - $"2C20 7072 6573 7320 2244 6973 6167 7265" - $"6522 2E" -}; - -data 'STR#' (5003, "Spanish") { - $"0006 0745 7370 6196 6F6C 0741 6365 7074" - $"6172 0A4E 6F20 6163 6570 7461 7208 496D" - $"7072 696D 6972 0A47 7561 7264 6172 2E2E" - $"2EC0 5369 2065 7374 8720 6465 2061 6375" - $"6572 646F 2063 6F6E 206C 6F73 2074 8E72" - $"6D69 6E6F 7320 6465 2065 7374 6120 6C69" - $"6365 6E63 6961 2C20 7075 6C73 6520 2241" - $"6365 7074 6172 2220 7061 7261 2069 6E73" - $"7461 6C61 7220 656C 2073 6F66 7477 6172" - $"652E 2045 6E20 656C 2073 7570 7565 7374" - $"6F20 6465 2071 7565 206E 6F20 6573 748E" - $"2064 6520 6163 7565 7264 6F20 636F 6E20" - $"6C6F 7320 748E 726D 696E 6F73 2064 6520" - $"6573 7461 206C 6963 656E 6369 612C 2070" - $"756C 7365 2022 4E6F 2061 6365 7074 6172" - $"2E22" -}; - -data 'STR#' (5004, "French") { - $"0006 0846 7261 6E8D 6169 7308 4163 6365" - $"7074 6572 0752 6566 7573 6572 0849 6D70" - $"7269 6D65 720E 456E 7265 6769 7374 7265" - $"722E 2E2E BA53 6920 766F 7573 2061 6363" - $"6570 7465 7A20 6C65 7320 7465 726D 6573" - $"2064 6520 6C61 2070 728E 7365 6E74 6520" - $"6C69 6365 6E63 652C 2063 6C69 7175 657A" - $"2073 7572 2022 4163 6365 7074 6572 2220" - $"6166 696E 2064 2769 6E73 7461 6C6C 6572" - $"206C 6520 6C6F 6769 6369 656C 2E20 5369" - $"2076 6F75 7320 6E27 9074 6573 2070 6173" - $"2064 2761 6363 6F72 6420 6176 6563 206C" - $"6573 2074 6572 6D65 7320 6465 206C 6120" - $"6C69 6365 6E63 652C 2063 6C69 7175 657A" - $"2073 7572 2022 5265 6675 7365 7222 2E" -}; - -data 'STR#' (5005, "Italian") { - $"0006 0849 7461 6C69 616E 6F07 4163 6365" - $"7474 6F07 5269 6669 7574 6F06 5374 616D" - $"7061 0B52 6567 6973 7472 612E 2E2E 7F53" - $"6520 6163 6365 7474 6920 6C65 2063 6F6E" - $"6469 7A69 6F6E 6920 6469 2071 7565 7374" - $"6120 6C69 6365 6E7A 612C 2066 6169 2063" - $"6C69 6320 7375 2022 4163 6365 7474 6F22" - $"2070 6572 2069 6E73 7461 6C6C 6172 6520" - $"696C 2073 6F66 7477 6172 652E 2041 6C74" - $"7269 6D65 6E74 6920 6661 6920 636C 6963" - $"2073 7520 2252 6966 6975 746F 222E" -}; - -data 'STR#' (5006, "Japanese") { - $"0006 084A 6170 616E 6573 650A 93AF 88D3" - $"82B5 82DC 82B7 0C93 AF88 D382 B582 DC82" - $"B982 F108 88F3 8DFC 82B7 82E9 0795 DB91" - $"B62E 2E2E B496 7B83 5C83 7483 6783 4583" - $"4783 418E 6797 708B 9691 F88C 5F96 F182" - $"CC8F F08C 8F82 C993 AF88 D382 B382 EA82" - $"E98F EA8D 8782 C982 CD81 4183 5C83 7483" - $"6783 4583 4783 4182 F083 4383 9383 5883" - $"6781 5B83 8B82 B782 E982 BD82 DF82 C981" - $"7593 AF88 D382 B582 DC82 B781 7682 F089" - $"9F82 B582 C482 AD82 BE82 B382 A281 4281" - $"4093 AF88 D382 B382 EA82 C882 A28F EA8D" - $"8782 C982 CD81 4181 7593 AF88 D382 B582" - $"DC82 B982 F181 7682 F089 9F82 B582 C482" - $"AD82 BE82 B382 A281 42" -}; - -data 'STR#' (5007, "Dutch") { - $"0006 0A4E 6564 6572 6C61 6E64 7302 4A61" - $"034E 6565 0550 7269 6E74 0942 6577 6161" - $"722E 2E2E A449 6E64 6965 6E20 7520 616B" - $"6B6F 6F72 6420 6761 6174 206D 6574 2064" - $"6520 766F 6F72 7761 6172 6465 6E20 7661" - $"6E20 6465 7A65 206C 6963 656E 7469 652C" - $"206B 756E 7420 7520 6F70 2027 4A61 2720" - $"6B6C 696B 6B65 6E20 6F6D 2064 6520 7072" - $"6F67 7261 6D6D 6174 7575 7220 7465 2069" - $"6E73 7461 6C6C 6572 656E 2E20 496E 6469" - $"656E 2075 206E 6965 7420 616B 6B6F 6F72" - $"6420 6761 6174 2C20 6B6C 696B 7420 7520" - $"6F70 2027 4E65 6527 2E" -}; - -data 'STR#' (5008, "Swedish") { - $"0006 0653 7665 6E73 6B08 476F 646B 8A6E" - $"6E73 0641 7662 9A6A 7308 536B 7269 7620" - $"7574 0853 7061 7261 2E2E 2E93 4F6D 2044" - $"7520 676F 646B 8A6E 6E65 7220 6C69 6365" - $"6E73 7669 6C6C 6B6F 7265 6E20 6B6C 6963" - $"6B61 2070 8C20 2247 6F64 6B8A 6E6E 7322" - $"2066 9A72 2061 7474 2069 6E73 7461 6C6C" - $"6572 6120 7072 6F67 7261 6D70 726F 6475" - $"6B74 656E 2E20 4F6D 2044 7520 696E 7465" - $"2067 6F64 6B8A 6E6E 6572 206C 6963 656E" - $"7376 696C 6C6B 6F72 656E 2C20 6B6C 6963" - $"6B61 2070 8C20 2241 7662 9A6A 7322 2E" -}; - -data 'STR#' (5009, "Brazilian Portuguese") { - $"0006 1150 6F72 7475 6775 9073 2C20 4272" - $"6173 696C 0943 6F6E 636F 7264 6172 0944" - $"6973 636F 7264 6172 0849 6D70 7269 6D69" - $"7209 5361 6C76 6172 2E2E 2E8C 5365 2065" - $"7374 8720 6465 2061 636F 7264 6F20 636F" - $"6D20 6F73 2074 6572 6D6F 7320 6465 7374" - $"6120 6C69 6365 6E8D 612C 2070 7265 7373" - $"696F 6E65 2022 436F 6E63 6F72 6461 7222" - $"2070 6172 6120 696E 7374 616C 6172 206F" - $"2073 6F66 7477 6172 652E 2053 6520 6E8B" - $"6F20 6573 7487 2064 6520 6163 6F72 646F" - $"2C20 7072 6573 7369 6F6E 6520 2244 6973" - $"636F 7264 6172 222E" -}; - -data 'STR#' (5010, "Simplified Chinese") { - $"0006 1253 696D 706C 6966 6965 6420 4368" - $"696E 6573 6504 CDAC D2E2 06B2 BBCD ACD2" - $"E204 B4F2 D3A1 06B4 E6B4 A2A1 AD54 C8E7" - $"B9FB C4FA CDAC D2E2 B1BE D0ED BFC9 D0AD" - $"D2E9 B5C4 CCF5 BFEE A3AC C7EB B0B4 A1B0" - $"CDAC D2E2 A1B1 C0B4 B0B2 D7B0 B4CB C8ED" - $"BCFE A1A3 C8E7 B9FB C4FA B2BB CDAC D2E2" - $"A3AC C7EB B0B4 A1B0 B2BB CDAC D2E2 A1B1" - $"A1A3" -}; - -data 'STR#' (5011, "Traditional Chinese") { - $"0006 1354 7261 6469 7469 6F6E 616C 2043" - $"6869 6E65 7365 04A6 50B7 4E06 A4A3 A650" - $"B74E 04A6 43A6 4C06 C078 A673 A14B 50A6" - $"70AA 47B1 7AA6 50B7 4EA5 BBB3 5CA5 69C3" - $"D2B8 CCAA BAB1 F8B4 DAA1 41BD D0AB F6A1" - $"A7A6 50B7 4EA1 A8A5 48A6 77B8 CBB3 6EC5" - $"E9A1 43A6 70AA 47A4 A3A6 50B7 4EA1 41BD" - $"D0AB F6A1 A7A4 A3A6 50B7 4EA1 A8A1 43" -}; - -data 'STR#' (5012, "Danish") { - $"0006 0544 616E 736B 0445 6E69 6705 5565" - $"6E69 6707 5564 736B 7269 760A 4172 6B69" - $"7665 722E 2E2E 9848 7669 7320 6475 2061" - $"6363 6570 7465 7265 7220 6265 7469 6E67" - $"656C 7365 726E 6520 6920 6C69 6365 6E73" - $"6166 7461 6C65 6E2C 2073 6B61 6C20 6475" - $"206B 6C69 6B6B 6520 708C 20D2 456E 6967" - $"D320 666F 7220 6174 2069 6E73 7461 6C6C" - $"6572 6520 736F 6674 7761 7265 6E2E 204B" - $"6C69 6B20 708C 20D2 5565 6E69 67D3 2066" - $"6F72 2061 7420 616E 6E75 6C6C 6572 6520" - $"696E 7374 616C 6C65 7269 6E67 656E 2E" -}; - -data 'STR#' (5013, "Finnish") { - $"0006 0553 756F 6D69 0848 7976 8A6B 7379" - $"6E0A 456E 2068 7976 8A6B 7379 0754 756C" - $"6F73 7461 0954 616C 6C65 6E6E 61C9 6F48" - $"7976 8A6B 7379 206C 6973 656E 7373 6973" - $"6F70 696D 756B 7365 6E20 6568 646F 7420" - $"6F73 6F69 7474 616D 616C 6C61 20D5 4879" - $"768A 6B73 79D5 2E20 4A6F 7320 6574 2068" - $"7976 8A6B 7379 2073 6F70 696D 756B 7365" - $"6E20 6568 746F 6A61 2C20 6F73 6F69 7461" - $"20D5 456E 2068 7976 8A6B 7379 D52E" -}; - -data 'STR#' (5014, "French Canadian") { - $"0006 1146 7261 6E8D 6169 7320 6361 6E61" - $"6469 656E 0841 6363 6570 7465 7207 5265" - $"6675 7365 7208 496D 7072 696D 6572 0E45" - $"6E72 6567 6973 7472 6572 2E2E 2EBA 5369" - $"2076 6F75 7320 6163 6365 7074 657A 206C" - $"6573 2074 6572 6D65 7320 6465 206C 6120" - $"7072 8E73 656E 7465 206C 6963 656E 6365" - $"2C20 636C 6971 7565 7A20 7375 7220 2241" - $"6363 6570 7465 7222 2061 6669 6E20 6427" - $"696E 7374 616C 6C65 7220 6C65 206C 6F67" - $"6963 6965 6C2E 2053 6920 766F 7573 206E" - $"2790 7465 7320 7061 7320 6427 6163 636F" - $"7264 2061 7665 6320 6C65 7320 7465 726D" - $"6573 2064 6520 6C61 206C 6963 656E 6365" - $"2C20 636C 6971 7565 7A20 7375 7220 2252" - $"6566 7573 6572 222E" -}; - -data 'STR#' (5015, "Korean") { - $"0006 064B 6F72 6561 6E04 B5BF C0C7 09B5" - $"BFC0 C720 BEC8 C7D4 06C7 C1B8 B0C6 AE07" - $"C0FA C0E5 2E2E 2E7E BBE7 BFEB 20B0 E8BE" - $"E0BC ADC0 C720 B3BB BFEB BFA1 20B5 BFC0" - $"C7C7 CFB8 E92C 2022 B5BF C0C7 2220 B4DC" - $"C3DF B8A6 20B4 ADB7 AF20 BCD2 C7C1 C6AE" - $"BFFE BEEE B8A6 20BC B3C4 A1C7 CFBD CABD" - $"C3BF C02E 20B5 BFC0 C7C7 CFC1 F620 BECA" - $"B4C2 B4D9 B8E9 2C20 22B5 BFC0 C720 BEC8" - $"C7D4 2220 B4DC C3DF B8A6 20B4 A9B8 A3BD" - $"CABD C3BF C02E" -}; - -data 'STR#' (5016, "Norwegian") { - $"0006 054E 6F72 736B 0445 6E69 6709 496B" - $"6B65 2065 6E69 6708 536B 7269 7620 7574" - $"0A41 726B 6976 6572 2E2E 2EA3 4876 6973" - $"2044 6520 6572 2065 6E69 6720 6920 6265" - $"7374 656D 6D65 6C73 656E 6520 6920 6465" - $"6E6E 6520 6C69 7365 6E73 6176 7461 6C65" - $"6E2C 206B 6C69 6B6B 6572 2044 6520 708C" - $"2022 456E 6967 222D 6B6E 6170 7065 6E20" - $"666F 7220 8C20 696E 7374 616C 6C65 7265" - $"2070 726F 6772 616D 7661 7265 6E2E 2048" - $"7669 7320 4465 2069 6B6B 6520 6572 2065" - $"6E69 672C 206B 6C69 6B6B 6572 2044 6520" - $"708C 2022 496B 6B65 2065 6E69 6722 2E" -}; - diff --git a/packages/dmg-builder/vendor/dmgbuild/licensing.py b/packages/dmg-builder/vendor/dmgbuild/licensing.py index 850ecf84a28..5f1b75e3a1f 100644 --- a/packages/dmg-builder/vendor/dmgbuild/licensing.py +++ b/packages/dmg-builder/vendor/dmgbuild/licensing.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -import os import struct from .resources import * @@ -220,25 +219,6 @@ 140: 'mac_farsi' # kTextEncodingMacFarsi } -# Standard fonts -fonts = { - 'New York': 2, - 'Geneva': 3, - 'Monaco': 4, - 'Venice': 5, - 'London': 6, - 'Athens': 7, - 'San Francisco': 8, - 'Toronto': 9, - 'Cairo': 11, - 'Los Angeles': 12, - 'Times': 20, - 'Helvetica': 21, - 'Courier': 22, - 'Symbol': 23, - 'Mobile': 24 -} - # Buttons (these come from the SLAResources file which you can find in the SLA # SDK on developer.apple.com) default_buttons = { @@ -420,8 +400,7 @@ def add_license(filename, license_info): ndx = 1 for language,license_info in license_info['licenses'].items(): if language not in region_codes: - raise Exception("Unknown language '" + language + "'. Valid languages are: " + - ", ".join(sorted(region_codes.keys()))) + raise Exception("Unknown language '" + language + "'. Valid languages are: " + ", ".join(sorted(region_codes.keys()))) encoding_name = get_encoder_name(language) lang_id = region_codes[language] @@ -429,14 +408,11 @@ def add_license(filename, license_info): license_data = license_info.get('data') - if license_info.get('isRtf'): - fork.add(Resource(b'RTF ', 5000 + ndx, language + ' SLA', - str(license_data))) - else: - fork.add(TextResource(5000 + ndx, language + ' SLA', license_data)) - fork.add(StyleResource(5000 + ndx, language + ' SLA', - [Style(0, 12, 9, Style.Helvetica, - 0, 0, (0, 0, 0))])) + # if license_info.get('isRtf'): + fork.add(Resource(b'RTF ', 5000 + ndx, language + ' SLA', license_data)) + # else: + # fork.add(TextResource(5000 + ndx, language + ' SLA', license_data)) + # fork.add(StyleResource(5000 + ndx, language + ' SLA', [Style(0, 12, 9, Style.Helvetica, 0, 0, (0, 0, 0))])) buttons = license_info.get('buttons', {}).get(language, None) if buttons is None: diff --git a/packages/electron-builder-http/package.json b/packages/electron-builder-http/package.json index 65260b65763..0b9692256cb 100644 --- a/packages/electron-builder-http/package.json +++ b/packages/electron-builder-http/package.json @@ -11,7 +11,7 @@ "out" ], "dependencies": { - "debug": "^3.0.0", + "debug": "^3.0.1", "fs-extra-p": "^4.4.0", "bluebird-lst": "^1.0.3" }, diff --git a/packages/electron-builder/package.json b/packages/electron-builder/package.json index e4f266bb425..874d1463be9 100644 --- a/packages/electron-builder/package.json +++ b/packages/electron-builder/package.json @@ -77,7 +77,7 @@ "update-notifier": "^2.2.0", "uuid-1345": "^0.99.6", "yargs": "^8.0.2", - "debug": "^3.0.0", + "debug": "^3.0.1", "asar-integrity": "0.0.0-semantic-release", "lazy-val": "^1.0.2", "dotenv": "^4.0.0", diff --git a/packages/electron-builder/src/packager.ts b/packages/electron-builder/src/packager.ts index 397d9168e80..e629b8dcfd5 100644 --- a/packages/electron-builder/src/packager.ts +++ b/packages/electron-builder/src/packager.ts @@ -1,5 +1,5 @@ import BluebirdPromise from "bluebird-lst" -import { Arch, AsyncTaskManager, debug, exec, log, safeStringifyJson, TmpDir, use } from "builder-util" +import { Arch, AsyncTaskManager, debug, DebugLogger, exec, log, safeStringifyJson, TmpDir, use } from "builder-util" import { executeFinally, orNullIfFileNotExist } from "builder-util/out/promise" import { CancellationToken } from "electron-builder-http" import { EventEmitter } from "events" @@ -11,7 +11,6 @@ import { deepAssign } from "read-config-file/out/deepAssign" import { AppInfo } from "./appInfo" import { readAsarJson } from "./asar" import { Platform, SourceRepositoryInfo, Target } from "./core" -import { DebugLogger } from "./DebugLogger" import MacPackager from "./macPackager" import { AfterPackContext, Config, Metadata } from "./metadata" import { ArtifactCreated, PackagerOptions } from "./packagerApi" diff --git a/packages/electron-builder/src/platformPackager.ts b/packages/electron-builder/src/platformPackager.ts index faa815713a1..43580b67550 100644 --- a/packages/electron-builder/src/platformPackager.ts +++ b/packages/electron-builder/src/platformPackager.ts @@ -1,6 +1,6 @@ import { computeData } from "asar-integrity" import BluebirdPromise from "bluebird-lst" -import { Arch, asArray, AsyncTaskManager, getArchSuffix, isEmptyOrSpaces, log, use, warn } from "builder-util" +import { Arch, asArray, AsyncTaskManager, DebugLogger, getArchSuffix, isEmptyOrSpaces, log, use, warn } from "builder-util" import { PackageBuilder } from "builder-util/out/api" import { statOrNull, unlinkIfExists } from "builder-util/out/fs" import { orIfFileNotExist } from "builder-util/out/promise" @@ -52,6 +52,10 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions> this.buildResourcesDir = path.resolve(this.projectDir, this.relativeBuildResourcesDirname) } + get debugLogger(): DebugLogger { + return this.info.debugLogger + } + abstract get defaultTarget(): Array<string> protected prepareAppInfo(appInfo: AppInfo) { diff --git a/packages/electron-builder/src/targets/nsis/nsis.ts b/packages/electron-builder/src/targets/nsis/nsis.ts index dc2969462f0..15cabda2862 100644 --- a/packages/electron-builder/src/targets/nsis/nsis.ts +++ b/packages/electron-builder/src/targets/nsis/nsis.ts @@ -413,9 +413,8 @@ export class NsisTarget extends Target { args.push("-") - const debugLogger = this.packager.info.debugLogger - if (debugLogger.enabled) { - debugLogger.add("nsis.script", script) + if (this.packager.debugLogger.enabled) { + this.packager.debugLogger.add("nsis.script", script) } const nsisPath = await NSIS_PATH.value diff --git a/packages/electron-publisher-s3/package.json b/packages/electron-publisher-s3/package.json index 751cc1dd9e2..823145db81f 100644 --- a/packages/electron-publisher-s3/package.json +++ b/packages/electron-publisher-s3/package.json @@ -12,7 +12,7 @@ ], "dependencies": { "fs-extra-p": "^4.4.0", - "aws-sdk": "^2.101.0", + "aws-sdk": "^2.103.0", "mime": "^1.3.6", "electron-publish": "~0.0.0-semantic-release", "builder-util": "^0.0.0-semantic-release", diff --git a/packages/electron-updater/package.json b/packages/electron-updater/package.json index 3ea39fe1498..a0731bb7035 100644 --- a/packages/electron-updater/package.json +++ b/packages/electron-updater/package.json @@ -21,7 +21,7 @@ "electron-builder-http": "~0.0.0-semantic-release", "electron-is-dev": "^0.3.0", "xelement": "^1.0.16", - "debug": "^3.0.0", + "debug": "^3.0.1", "uuid-1345": "^0.99.6", "lodash.isequal": "^4.5.0" }, diff --git a/scripts/update-deps.js b/scripts/update-deps.js index b0f28a6f4d9..4acf74bf1b4 100644 --- a/scripts/update-deps.js +++ b/scripts/update-deps.js @@ -18,7 +18,7 @@ async function main() { let changed = false for (const name of Object.keys(deps)) { - if (name.startsWith("electron-builder-") || name === "electron-publish" || name === "asar-integrity") { + if (name.startsWith("electron-builder-") || name === "electron-publish" || name === "asar-integrity" || name.endsWith("-builder") || name.startsWith("builder-")) { continue } diff --git a/test/src/mac/dmgTest.ts b/test/src/mac/dmgTest.ts index 7df001e441c..4aa2e48713d 100644 --- a/test/src/mac/dmgTest.ts +++ b/test/src/mac/dmgTest.ts @@ -156,9 +156,9 @@ test.ifAll.ifMac("multi language license", app({ }, { projectDirCreated: projectDir => { return BluebirdPromise.all([ - writeFile(path.join(projectDir, "build", "license_en.txt"), "Hi"), + // writeFile(path.join(projectDir, "build", "license_en.txt"), "Hi"), + writeFile(path.join(projectDir, "build", "license_de.txt"), "Hallo"), writeFile(path.join(projectDir, "build", "license_ru.txt"), "Привет"), - writeFile(path.join(projectDir, "build", "license_de.txt"), "Hallo, Grünwald"), ]) }, })) diff --git a/yarn.lock b/yarn.lock index 325484a7b1b..7120aba2d0f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -299,9 +299,9 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" -aws-sdk@^2.102.0: - version "2.102.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.102.0.tgz#70e52a8eff63de4c68e1d08c5c37db5561324340" +aws-sdk@^2.103.0: + version "2.103.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.103.0.tgz#809b731beb6583f3a6c0b65878c32ca3a6a5a111" dependencies: buffer "4.9.1" crypto-browserify "1.0.9" @@ -983,7 +983,7 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -debug@^2.1.3, debug@^2.2.0, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8: +debug@^2.1.3, debug@^2.2.0, debug@^2.6.3, debug@^2.6.8: version "2.6.8" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: @@ -995,6 +995,12 @@ debug@^3.0.0: dependencies: ms "2.0.0" +debug@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.0.1.tgz#0564c612b521dc92d9f2988f0549e34f9c98db64" + dependencies: + ms "2.0.0" + decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -1143,18 +1149,18 @@ electron-builder-tslint-config@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/electron-builder-tslint-config/-/electron-builder-tslint-config-1.0.3.tgz#3fde180068f34314ab547476fe97144c6f6499a6" -electron-download-tf@4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/electron-download-tf/-/electron-download-tf-4.3.1.tgz#7930f24a08e3669eaad38a5f7f288a10461caf72" +electron-download-tf@4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/electron-download-tf/-/electron-download-tf-4.3.4.tgz#b03740b2885aa2ad3f8784fae74df427f66d5165" dependencies: - debug "^2.6.6" + debug "^3.0.0" env-paths "^1.0.0" - fs-extra "^3.0.1" + fs-extra "^4.0.1" minimist "^1.2.0" nugget "^2.0.1" path-exists "^3.0.0" rc "^1.2.1" - semver "^5.3.0" + semver "^5.4.1" sumchecker "^2.0.2" electron-is-dev@^0.3.0: @@ -1381,15 +1387,7 @@ fs-extra-p@^4.4.0: bluebird-lst "^1.0.2" fs-extra "^4.0.0" -fs-extra@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^3.0.0" - universalify "^0.1.0" - -fs-extra@^4.0.0: +fs-extra@^4.0.0, fs-extra@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.1.tgz#7fc0c6c8957f983f57f306a24e5b9ddd8d0dd880" dependencies: @@ -1575,10 +1573,6 @@ iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" -iconv-lite@^0.4.18: - version "0.4.18" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" - ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4"