This commit is contained in:
2022-09-30 05:39:11 +00:00
parent 41ee9463ae
commit 4687fa49bc
11418 changed files with 1312504 additions and 0 deletions

13
buildfiles/node_modules/dmg-builder/out/dmg.d.ts generated vendored Normal file
View File

@ -0,0 +1,13 @@
import { DmgOptions, Target } from "app-builder-lib";
import MacPackager from "app-builder-lib/out/macPackager";
import { Arch } from "builder-util";
export declare class DmgTarget extends Target {
private readonly packager;
readonly outDir: string;
readonly options: DmgOptions;
constructor(packager: MacPackager, outDir: string);
build(appPath: string, arch: Arch): Promise<void>;
private signDmg;
computeVolumeName(custom?: string | null): string;
computeDmgOptions(): Promise<DmgOptions>;
}

464
buildfiles/node_modules/dmg-builder/out/dmg.js generated vendored Normal file
View File

@ -0,0 +1,464 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DmgTarget = void 0;
function _appBuilderLib() {
const data = require("app-builder-lib");
_appBuilderLib = function () {
return data;
};
return data;
}
function _macCodeSign() {
const data = require("app-builder-lib/out/codeSign/macCodeSign");
_macCodeSign = function () {
return data;
};
return data;
}
function _differentialUpdateInfoBuilder() {
const data = require("app-builder-lib/out/targets/differentialUpdateInfoBuilder");
_differentialUpdateInfoBuilder = function () {
return data;
};
return data;
}
function _appBuilder() {
const data = require("app-builder-lib/out/util/appBuilder");
_appBuilder = function () {
return data;
};
return data;
}
function _builderUtil() {
const data = require("builder-util");
_builderUtil = function () {
return data;
};
return data;
}
function _fs() {
const data = require("builder-util/out/fs");
_fs = function () {
return data;
};
return data;
}
function _fsExtra() {
const data = require("fs-extra");
_fsExtra = function () {
return data;
};
return data;
}
var path = _interopRequireWildcard(require("path"));
function _sanitizeFilename() {
const data = _interopRequireDefault(require("sanitize-filename"));
_sanitizeFilename = function () {
return data;
};
return data;
}
function _dmgLicense() {
const data = require("./dmgLicense");
_dmgLicense = function () {
return data;
};
return data;
}
function _dmgUtil() {
const data = require("./dmgUtil");
_dmgUtil = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
class DmgTarget extends _appBuilderLib().Target {
constructor(packager, outDir) {
super("dmg");
this.packager = packager;
this.outDir = outDir;
this.options = this.packager.config.dmg || Object.create(null);
}
async build(appPath, arch) {
const packager = this.packager; // tslint:disable-next-line:no-invalid-template-strings
const artifactName = packager.expandArtifactNamePattern(packager.config.dmg, "dmg", null, "${productName}-" + (packager.platformSpecificBuildOptions.bundleShortVersion || "${version}") + ".${ext}");
const artifactPath = path.join(this.outDir, artifactName);
await packager.info.callArtifactBuildStarted({
targetPresentableName: "DMG",
file: artifactPath,
arch
});
const volumeName = (0, _sanitizeFilename().default)(this.computeVolumeName(this.options.title));
const tempDmg = await createStageDmg(await packager.getTempFile(".dmg"), appPath, volumeName);
const specification = await this.computeDmgOptions(); // https://github.com/electron-userland/electron-builder/issues/2115
const backgroundFile = specification.background == null ? null : await transformBackgroundFileIfNeed(specification.background, packager.info.tempDirManager);
const finalSize = await computeAssetSize(packager.info.cancellationToken, tempDmg, specification, backgroundFile);
const expandingFinalSize = finalSize * 0.1 + finalSize;
await (0, _builderUtil().exec)("hdiutil", ["resize", "-size", expandingFinalSize.toString(), tempDmg]);
const volumePath = path.join("/Volumes", volumeName);
if (await (0, _fs().exists)(volumePath)) {
_builderUtil().log.debug({
volumePath
}, "unmounting previous disk image");
await (0, _dmgUtil().detach)(volumePath);
}
if (!(await (0, _dmgUtil().attachAndExecute)(tempDmg, true, () => customizeDmg(volumePath, specification, packager, backgroundFile)))) {
return;
} // dmg file must not exist otherwise hdiutil failed (https://github.com/electron-userland/electron-builder/issues/1308#issuecomment-282847594), so, -ov must be specified
const args = ["convert", tempDmg, "-ov", "-format", specification.format, "-o", artifactPath];
if (specification.format === "UDZO") {
args.push("-imagekey", `zlib-level=${process.env.ELECTRON_BUILDER_COMPRESSION_LEVEL || "9"}`);
}
await (0, _builderUtil().spawn)("hdiutil", addLogLevel(args));
if (this.options.internetEnabled && parseInt(require("os").release().split(".")[0], 10) < 19) {
await (0, _builderUtil().exec)("hdiutil", addLogLevel(["internet-enable"]).concat(artifactPath));
}
const licenseData = await (0, _dmgLicense().addLicenseToDmg)(packager, artifactPath);
if (packager.packagerOptions.effectiveOptionComputed != null) {
await packager.packagerOptions.effectiveOptionComputed({
licenseData
});
}
if (this.options.sign === true) {
await this.signDmg(artifactPath);
}
const safeArtifactName = packager.computeSafeArtifactName(artifactName, "dmg");
const updateInfo = this.options.writeUpdateInfo === false ? null : await (0, _differentialUpdateInfoBuilder().createBlockmap)(artifactPath, this, packager, safeArtifactName);
await packager.info.callArtifactBuildCompleted({
file: artifactPath,
safeArtifactName,
target: this,
arch,
packager,
isWriteUpdateInfo: updateInfo != null,
updateInfo
});
}
async signDmg(artifactPath) {
if (!(0, _macCodeSign().isSignAllowed)(false)) {
return;
}
const packager = this.packager;
const qualifier = packager.platformSpecificBuildOptions.identity; // explicitly disabled if set to null
if (qualifier === null) {
// macPackager already somehow handle this situation, so, here just return
return;
}
const keychainFile = (await packager.codeSigningInfo.value).keychainFile;
const certificateType = "Developer ID Application";
let identity = await (0, _macCodeSign().findIdentity)(certificateType, qualifier, keychainFile);
if (identity == null) {
identity = await (0, _macCodeSign().findIdentity)("Mac Developer", qualifier, keychainFile);
if (identity == null) {
return;
}
}
const args = ["--sign", identity.hash];
if (keychainFile != null) {
args.push("--keychain", keychainFile);
}
args.push(artifactPath);
await (0, _builderUtil().exec)("codesign", args);
}
computeVolumeName(custom) {
const appInfo = this.packager.appInfo;
const shortVersion = this.packager.platformSpecificBuildOptions.bundleShortVersion || appInfo.version;
if (custom == null) {
return `${appInfo.productFilename} ${shortVersion}`;
}
return custom.replace(/\${shortVersion}/g, shortVersion).replace(/\${version}/g, appInfo.version).replace(/\${name}/g, appInfo.name).replace(/\${productName}/g, appInfo.productName);
} // public to test
async computeDmgOptions() {
const packager = this.packager;
const specification = { ...this.options
};
if (specification.icon == null && specification.icon !== null) {
specification.icon = await packager.getIconPath();
}
if (specification.icon != null && (0, _builderUtil().isEmptyOrSpaces)(specification.icon)) {
throw new (_builderUtil().InvalidConfigurationError)("dmg.icon cannot be specified as empty string");
}
const background = specification.background;
if (specification.backgroundColor != null) {
if (background != null) {
throw new (_builderUtil().InvalidConfigurationError)("Both dmg.backgroundColor and dmg.background are specified — please set the only one");
}
} else if (background == null) {
specification.background = await (0, _dmgUtil().computeBackground)(packager);
} else {
specification.background = path.resolve(packager.info.projectDir, background);
}
if (specification.format == null) {
if (process.env.ELECTRON_BUILDER_COMPRESSION_LEVEL != null) {
specification.format = "UDZO";
} else if (packager.compression === "store") {
specification.format = "UDRO";
} else {
specification.format = packager.compression === "maximum" ? "UDBZ" : "UDZO";
}
}
if (specification.contents == null) {
specification.contents = [{
x: 130,
y: 220
}, {
x: 410,
y: 220,
type: "link",
path: "/Applications"
}];
}
return specification;
}
}
exports.DmgTarget = DmgTarget;
async function createStageDmg(tempDmg, appPath, volumeName) {
//noinspection SpellCheckingInspection
const imageArgs = addLogLevel(["create", "-srcfolder", appPath, "-volname", volumeName, "-anyowners", "-nospotlight", "-format", "UDRW"]);
imageArgs.push("-fs", "HFS+", "-fsargs", "-c c=64,a=16,e=16");
imageArgs.push(tempDmg);
await (0, _builderUtil().spawn)("hdiutil", imageArgs);
return tempDmg;
}
function addLogLevel(args) {
args.push(process.env.DEBUG_DMG === "true" ? "-verbose" : "-quiet");
return args;
}
async function computeAssetSize(cancellationToken, dmgFile, specification, backgroundFile) {
const asyncTaskManager = new (_builderUtil().AsyncTaskManager)(cancellationToken);
asyncTaskManager.addTask((0, _fsExtra().stat)(dmgFile));
if (specification.icon != null) {
asyncTaskManager.addTask((0, _fs().statOrNull)(specification.icon));
}
if (backgroundFile != null) {
asyncTaskManager.addTask((0, _fsExtra().stat)(backgroundFile));
}
let result = 32 * 1024;
for (const stat of await asyncTaskManager.awaitTasks()) {
if (stat != null) {
result += stat.size;
}
}
return result;
}
async function customizeDmg(volumePath, specification, packager, backgroundFile) {
const window = specification.window;
const env = { ...process.env,
volumePath,
appFileName: `${packager.appInfo.productFilename}.app`,
iconSize: specification.iconSize || 80,
iconTextSize: specification.iconTextSize || 12,
PYTHONIOENCODING: "utf8"
};
if (specification.backgroundColor != null || specification.background == null) {
env.backgroundColor = specification.backgroundColor || "#ffffff";
if (window != null) {
env.windowX = (window.x == null ? 100 : window.x).toString();
env.windowY = (window.y == null ? 400 : window.y).toString();
env.windowWidth = (window.width || 540).toString();
env.windowHeight = (window.height || 380).toString();
}
} else {
delete env.backgroundColor;
}
const args = ["dmg", "--volume", volumePath];
if (specification.icon != null) {
args.push("--icon", await packager.getResource(specification.icon));
}
if (backgroundFile != null) {
args.push("--background", backgroundFile);
}
const data = await (0, _appBuilder().executeAppBuilderAsJson)(args);
if (data.backgroundWidth != null) {
env.windowWidth = window == null ? null : window.width;
env.windowHeight = window == null ? null : window.height;
if (env.windowWidth == null) {
env.windowWidth = data.backgroundWidth.toString();
}
if (env.windowHeight == null) {
env.windowHeight = data.backgroundHeight.toString();
}
if (env.windowX == null) {
env.windowX = 400;
}
if (env.windowY == null) {
env.windowY = Math.round((1440 - env.windowHeight) / 2).toString();
}
}
Object.assign(env, data);
const asyncTaskManager = new (_builderUtil().AsyncTaskManager)(packager.info.cancellationToken);
env.iconLocations = await computeDmgEntries(specification, volumePath, packager, asyncTaskManager);
await asyncTaskManager.awaitTasks();
await (0, _builderUtil().exec)("/usr/bin/python", [path.join((0, _dmgUtil().getDmgVendorPath)(), "dmgbuild/core.py")], {
cwd: (0, _dmgUtil().getDmgVendorPath)(),
env
});
return packager.packagerOptions.effectiveOptionComputed == null || !(await packager.packagerOptions.effectiveOptionComputed({
volumePath,
specification,
packager
}));
}
async function computeDmgEntries(specification, volumePath, packager, asyncTaskManager) {
let result = "";
for (const c of specification.contents) {
if (c.path != null && c.path.endsWith(".app") && c.type !== "link") {
_builderUtil().log.warn({
path: c.path,
reason: "actual path to app will be used instead"
}, "do not specify path for application");
}
const entryPath = c.path || `${packager.appInfo.productFilename}.app`;
const entryName = c.name || path.basename(entryPath);
if (result.length !== 0) {
result += ",\n";
}
result += `'${entryName}': (${c.x}, ${c.y})`;
if (c.type === "link") {
asyncTaskManager.addTask((0, _builderUtil().exec)("ln", ["-s", `/${entryPath.startsWith("/") ? entryPath.substring(1) : entryPath}`, `${volumePath}/${entryName}`]));
} // use c.path instead of entryPath (to be sure that this logic is not applied to .app bundle) https://github.com/electron-userland/electron-builder/issues/2147
else if (!(0, _builderUtil().isEmptyOrSpaces)(c.path) && (c.type === "file" || c.type === "dir")) {
const source = await packager.getResource(c.path);
if (source == null) {
_builderUtil().log.warn({
entryPath,
reason: "doesn't exist"
}, "skipped DMG item copying");
continue;
}
const destination = `${volumePath}/${entryName}`;
asyncTaskManager.addTask(c.type === "dir" || (await (0, _fsExtra().stat)(source)).isDirectory() ? (0, _fs().copyDir)(source, destination) : (0, _fs().copyFile)(source, destination));
}
}
return result;
}
async function transformBackgroundFileIfNeed(file, tmpDir) {
if (file.endsWith(".tiff") || file.endsWith(".TIFF")) {
return file;
}
const retinaFile = file.replace(/\.([a-z]+)$/, "@2x.$1");
if (await (0, _fs().exists)(retinaFile)) {
const tiffFile = await tmpDir.getTempFile({
suffix: ".tiff"
});
await (0, _builderUtil().exec)("tiffutil", ["-cathidpicheck", file, retinaFile, "-out", tiffFile]);
return tiffFile;
}
return file;
}
// __ts-babel@6.0.4
//# sourceMappingURL=dmg.js.map

1
buildfiles/node_modules/dmg-builder/out/dmg.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
import { PlatformPackager } from "app-builder-lib";
export declare function addLicenseToDmg(packager: PlatformPackager<any>, dmgPath: string): Promise<string | null>;

268
buildfiles/node_modules/dmg-builder/out/dmgLicense.js generated vendored Normal file
View File

@ -0,0 +1,268 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.addLicenseToDmg = addLicenseToDmg;
function _builderUtil() {
const data = require("builder-util");
_builderUtil = function () {
return data;
};
return data;
}
function _license() {
const data = require("app-builder-lib/out/util/license");
_license = function () {
return data;
};
return data;
}
function _fsExtra() {
const data = require("fs-extra");
_fsExtra = function () {
return data;
};
return data;
}
function _dmgUtil() {
const data = require("./dmgUtil");
_dmgUtil = function () {
return data;
};
return data;
}
function _licenseButtons() {
const data = require("./licenseButtons");
_licenseButtons = function () {
return data;
};
return data;
}
// 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;
async function addLicenseToDmg(packager, dmgPath) {
// http://www.owsiak.org/?p=700
const licenseFiles = await (0, _license().getLicenseFiles)(packager);
if (licenseFiles.length === 0) {
return null;
}
const licenseButtonFiles = await (0, _licenseButtons().getLicenseButtonsFile)(packager);
packager.debugLogger.add("dmg.licenseFiles", licenseFiles);
packager.debugLogger.add("dmg.licenseButtons", licenseButtonFiles);
const style = [];
const rtfs = [];
const defaultButtons = [];
let counter = 5000;
const addedRegionCodes = [];
for (const item of licenseFiles) {
_builderUtil().log.info({
lang: item.langName
}, "adding license"); // 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 (0, _fsExtra().readFile)(item.file, "utf-8");
const isRtf = item.file.endsWith(".rtf") || item.file.endsWith(".RTF");
data += isRtf ? (0, _dmgUtil().serializeString)(Buffer.from(fileData).toString("hex")) : wrapInRtf(await (0, _fsExtra().readFile)(item.file, "utf-8"));
data += "\n};";
rtfs.push(data);
defaultButtons.push(await (0, _licenseButtons().getLicenseButtons)(licenseButtonFiles, item.langWithRegion, counter, item.langName));
addedRegionCodes.push(getRegionCode(item.langWithRegion));
counter++;
}
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;
}
const lPic = `data 'LPic' (5000) {\n${(0, _dmgUtil().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 (0, _fsExtra().outputFile)(tempFile, data);
await (0, _builderUtil().exec)("hdiutil", ["unflatten", dmgPath]);
await (0, _builderUtil().exec)("Rez", ["-a", tempFile, "-o", dmgPath]);
await (0, _builderUtil().exec)("hdiutil", ["flatten", dmgPath]);
return data;
}
function getRtfUnicodeEscapedString(text) {
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;
}
function wrapInRtf(text) {
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"
${(0, _dmgUtil().serializeString)("63663020" + Buffer.from(getRtfUnicodeEscapedString(text)).toString("hex").toUpperCase() + "7D")}`; // ^ to produce correctly splitted output, this two leading chunks from default wrapper appended here
}
function getRegionCode(langWithRegion) {
const result = regionCodes[langWithRegion];
if (result == null) {
throw new Error(`Cannot determine region code for ${langWithRegion}`);
}
return result;
} // noinspection SpellCheckingInspection
const regionCodes = {
en_US: 0,
fr_FR: 1,
en_GB: 2,
de_DE: 3,
it_IT: 4,
nl_NL: 5,
nl_BE: 6,
sv_SE: 7,
es_ES: 8,
da_DK: 9,
pt_PT: 10,
fr_CA: 11,
nb_NO: 12,
he_IL: 13,
ja_JP: 14,
en_AU: 15,
ar: 16,
fi_FI: 17,
fr_CH: 18,
de_CH: 19,
el_GR: 20,
is_IS: 21,
mt_MT: 22,
el_CY: 23,
tr_TR: 24,
hi_IN: 33,
ur_PK: 34,
it_CH: 36,
ro_RO: 39,
grc: 40,
lt_LT: 41,
pl_PL: 42,
hu_HU: 43,
et_EE: 44,
lv_LV: 45,
se: 46,
fo_FO: 47,
fa_IR: 48,
ru_RU: 49,
ga_IE: 50,
ko_KR: 51,
zh_CN: 52,
zh_TW: 53,
th_TH: 54,
cs_CZ: 56,
sk_SK: 57,
bn: 60,
be_BY: 61,
uk_UA: 62,
sr_RS: 65,
sl_SI: 66,
mk_MK: 67,
hr_HR: 68,
pt_BR: 71,
bg_BG: 72,
ca_ES: 73,
gd: 75,
gv: 76,
br: 77,
iu_CA: 78,
cy: 79,
"ga-Latg_IE": 81,
en_CA: 82,
dz_BT: 83,
hy_AM: 84,
ka_GE: 85,
es_419: 86,
to_TO: 88,
fr_001: 91,
de_AT: 92,
gu_IN: 94,
pa: 95,
ur_IN: 96,
vi_VN: 97,
fr_BE: 98,
uz_UZ: 99,
en_SG: 100,
nn_NO: 101,
af_ZA: 102,
eo: 103,
mr_IN: 104,
bo: 105,
ne_NP: 106,
kl: 107,
en_IE: 108
};
// __ts-babel@6.0.4
//# sourceMappingURL=dmgLicense.js.map

File diff suppressed because one or more lines are too long

7
buildfiles/node_modules/dmg-builder/out/dmgUtil.d.ts generated vendored Normal file
View File

@ -0,0 +1,7 @@
import { PlatformPackager } from "app-builder-lib";
export { DmgTarget } from "./dmg";
export declare function getDmgTemplatePath(): string;
export declare function getDmgVendorPath(): string;
export declare function attachAndExecute(dmgPath: string, readWrite: boolean, task: () => Promise<any>): Promise<any>;
export declare function detach(name: string): Promise<void>;
export declare function computeBackground(packager: PlatformPackager<any>): Promise<string>;

115
buildfiles/node_modules/dmg-builder/out/dmgUtil.js generated vendored Normal file
View File

@ -0,0 +1,115 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getDmgTemplatePath = getDmgTemplatePath;
exports.getDmgVendorPath = getDmgVendorPath;
exports.attachAndExecute = attachAndExecute;
exports.detach = detach;
exports.computeBackground = computeBackground;
exports.serializeString = serializeString;
Object.defineProperty(exports, "DmgTarget", {
enumerable: true,
get: function () {
return _dmg().DmgTarget;
}
});
function _builderUtil() {
const data = require("builder-util");
_builderUtil = function () {
return data;
};
return data;
}
function _promise() {
const data = require("builder-util/out/promise");
_promise = function () {
return data;
};
return data;
}
var path = _interopRequireWildcard(require("path"));
function _dmg() {
const data = require("./dmg");
_dmg = function () {
return data;
};
return data;
}
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
const root = path.join(__dirname, "..");
function getDmgTemplatePath() {
return path.join(root, "templates");
}
function getDmgVendorPath() {
return path.join(root, "vendor");
}
async function attachAndExecute(dmgPath, readWrite, task) {
//noinspection SpellCheckingInspection
const args = ["attach", "-noverify", "-noautoopen"];
if (readWrite) {
args.push("-readwrite");
}
args.push(dmgPath);
const attachResult = await (0, _builderUtil().exec)("hdiutil", args);
const deviceResult = attachResult == null ? null : /^(\/dev\/\w+)/.exec(attachResult);
const device = deviceResult == null || deviceResult.length !== 2 ? null : deviceResult[1];
if (device == null) {
throw new Error(`Cannot mount: ${attachResult}`);
}
return await (0, _promise().executeFinally)(task(), () => detach(device));
}
async function detach(name) {
try {
await (0, _builderUtil().exec)("hdiutil", ["detach", "-quiet", name]);
} catch (e) {
await new Promise((resolve, reject) => {
setTimeout(() => {
(0, _builderUtil().exec)("hdiutil", ["detach", "-force", name]).then(resolve).catch(reject);
}, 1000);
});
}
}
async function computeBackground(packager) {
const resourceList = await packager.resourceList;
if (resourceList.includes("background.tiff")) {
return path.join(packager.buildResourcesDir, "background.tiff");
} else if (resourceList.includes("background.png")) {
return path.join(packager.buildResourcesDir, "background.png");
} else {
return path.join(getDmgTemplatePath(), "background.tiff");
}
}
/** @internal */
function serializeString(data) {
return ' $"' + data.match(/.{1,32}/g).map(it => it.match(/.{1,4}/g).join(" ")).join('"\n $"') + '"';
}
// __ts-babel@6.0.4
//# sourceMappingURL=dmgUtil.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../src/dmgUtil.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;AAEA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAL,CAAU,SAAV,EAAqB,IAArB,CAAb;;AAEM,SAAU,kBAAV,GAA4B;AAChC,SAAO,IAAI,CAAC,IAAL,CAAU,IAAV,EAAgB,WAAhB,CAAP;AACD;;AAEK,SAAU,gBAAV,GAA0B;AAC9B,SAAO,IAAI,CAAC,IAAL,CAAU,IAAV,EAAgB,QAAhB,CAAP;AACD;;AAEM,eAAe,gBAAf,CAAgC,OAAhC,EAAiD,SAAjD,EAAqE,IAArE,EAA6F;AAClG;AACA,QAAM,IAAI,GAAG,CAAC,QAAD,EAAW,WAAX,EAAwB,aAAxB,CAAb;;AACA,MAAI,SAAJ,EAAe;AACb,IAAA,IAAI,CAAC,IAAL,CAAU,YAAV;AACD;;AAED,EAAA,IAAI,CAAC,IAAL,CAAU,OAAV;AACA,QAAM,YAAY,GAAG,MAAM,yBAAK,SAAL,EAAgB,IAAhB,CAA3B;AACA,QAAM,YAAY,GAAG,YAAY,IAAI,IAAhB,GAAuB,IAAvB,GAA8B,gBAAgB,IAAhB,CAAqB,YAArB,CAAnD;AACA,QAAM,MAAM,GAAG,YAAY,IAAI,IAAhB,IAAwB,YAAY,CAAC,MAAb,KAAwB,CAAhD,GAAoD,IAApD,GAA2D,YAAY,CAAC,CAAD,CAAtF;;AACA,MAAI,MAAM,IAAI,IAAd,EAAoB;AAClB,UAAM,IAAI,KAAJ,CAAU,iBAAiB,YAAY,EAAvC,CAAN;AACD;;AAED,SAAO,MAAM,+BAAe,IAAI,EAAnB,EAAuB,MAAM,MAAM,CAAC,MAAD,CAAnC,CAAb;AACD;;AAEM,eAAe,MAAf,CAAsB,IAAtB,EAAkC;AACvC,MAAI;AACF,UAAM,yBAAK,SAAL,EAAgB,CAAC,QAAD,EAAW,QAAX,EAAqB,IAArB,CAAhB,CAAN;AACD,GAFD,CAGA,OAAO,CAAP,EAAU;AACR,UAAM,IAAI,OAAJ,CAAY,CAAC,OAAD,EAAU,MAAV,KAAoB;AACpC,MAAA,UAAU,CAAC,MAAK;AACd,iCAAK,SAAL,EAAgB,CAAC,QAAD,EAAW,QAAX,EAAqB,IAArB,CAAhB,EACG,IADH,CACQ,OADR,EAEG,KAFH,CAES,MAFT;AAGD,OAJS,EAIP,IAJO,CAAV;AAKD,KANK,CAAN;AAOD;AACF;;AAEM,eAAe,iBAAf,CAAiC,QAAjC,EAAgE;AACrE,QAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,YAApC;;AACA,MAAI,YAAY,CAAC,QAAb,CAAsB,iBAAtB,CAAJ,EAA8C;AAC5C,WAAO,IAAI,CAAC,IAAL,CAAU,QAAQ,CAAC,iBAAnB,EAAsC,iBAAtC,CAAP;AACD,GAFD,MAGK,IAAI,YAAY,CAAC,QAAb,CAAsB,gBAAtB,CAAJ,EAA6C;AAChD,WAAO,IAAI,CAAC,IAAL,CAAU,QAAQ,CAAC,iBAAnB,EAAsC,gBAAtC,CAAP;AACD,GAFI,MAGA;AACH,WAAO,IAAI,CAAC,IAAL,CAAU,kBAAkB,EAA5B,EAAgC,iBAAhC,CAAP;AACD;AACF;AAED;;;AACM,SAAU,eAAV,CAA0B,IAA1B,EAAsC;AAC1C,SAAO,SAAS,IAAI,CAAC,KAAL,CAAW,UAAX,EAAyB,GAAzB,CAA6B,EAAE,IAAI,EAAE,CAAC,KAAH,CAAS,SAAT,EAAsB,IAAtB,CAA2B,GAA3B,CAAnC,EAAoE,IAApE,CAAyE,SAAzE,CAAT,GAA+F,GAAtG;AACD,C","sourcesContent":["import { exec } from \"builder-util\"\nimport { PlatformPackager } from \"app-builder-lib\"\nimport { executeFinally } from \"builder-util/out/promise\"\nimport * as path from \"path\"\n\nexport { DmgTarget } from \"./dmg\"\n\nconst root = path.join(__dirname, \"..\")\n\nexport function getDmgTemplatePath() {\n return path.join(root, \"templates\")\n}\n\nexport function getDmgVendorPath() {\n return path.join(root, \"vendor\")\n}\n\nexport async function attachAndExecute(dmgPath: string, readWrite: boolean, task: () => Promise<any>) {\n //noinspection SpellCheckingInspection\n const args = [\"attach\", \"-noverify\", \"-noautoopen\"]\n if (readWrite) {\n args.push(\"-readwrite\")\n }\n\n args.push(dmgPath)\n const attachResult = await exec(\"hdiutil\", args)\n const deviceResult = attachResult == null ? null : /^(\\/dev\\/\\w+)/.exec(attachResult)\n const device = deviceResult == null || deviceResult.length !== 2 ? null : deviceResult[1]\n if (device == null) {\n throw new Error(`Cannot mount: ${attachResult}`)\n }\n\n return await executeFinally(task(), () => detach(device))\n}\n\nexport async function detach(name: string) {\n try {\n await exec(\"hdiutil\", [\"detach\", \"-quiet\", name])\n }\n catch (e) {\n await new Promise((resolve, reject) => {\n setTimeout(() => {\n exec(\"hdiutil\", [\"detach\", \"-force\", name])\n .then(resolve)\n .catch(reject)\n }, 1000)\n })\n }\n}\n\nexport async function computeBackground(packager: PlatformPackager<any>): Promise<string> {\n const resourceList = await packager.resourceList\n if (resourceList.includes(\"background.tiff\")) {\n return path.join(packager.buildResourcesDir, \"background.tiff\")\n }\n else if (resourceList.includes(\"background.png\")) {\n return path.join(packager.buildResourcesDir, \"background.png\")\n }\n else {\n return path.join(getDmgTemplatePath(), \"background.tiff\")\n }\n}\n\n/** @internal */\nexport function serializeString(data: string) {\n return ' $\"' + data.match(/.{1,32}/g)!!.map(it => it.match(/.{1,4}/g)!!.join(\" \")).join('\"\\n $\"') + '\"'\n}"],"sourceRoot":""}

View File

@ -0,0 +1,9 @@
import { PlatformPackager } from "app-builder-lib";
export declare function getLicenseButtonsFile(packager: PlatformPackager<any>): Promise<Array<LicenseButtonsFile>>;
export interface LicenseButtonsFile {
file: string;
lang: string;
langWithRegion: string;
langName: string;
}
export declare function getLicenseButtons(licenseButtonFiles: Array<LicenseButtonsFile>, langWithRegion: string, id: number, name: string): Promise<string>;

View File

@ -0,0 +1,292 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getLicenseButtonsFile = getLicenseButtonsFile;
exports.getLicenseButtons = getLicenseButtons;
function _builderUtil() {
const data = require("builder-util");
_builderUtil = function () {
return data;
};
return data;
}
function _license() {
const data = require("app-builder-lib/out/util/license");
_license = function () {
return data;
};
return data;
}
function _fsExtra() {
const data = require("fs-extra");
_fsExtra = function () {
return data;
};
return data;
}
function iconv() {
const data = _interopRequireWildcard(require("iconv-lite"));
iconv = function () {
return data;
};
return data;
}
function _jsYaml() {
const data = require("js-yaml");
_jsYaml = function () {
return data;
};
return data;
}
function _dmgUtil() {
const data = require("./dmgUtil");
_dmgUtil = function () {
return data;
};
return data;
}
function _licenseDefaultButtons() {
const data = require("./licenseDefaultButtons");
_licenseDefaultButtons = function () {
return data;
};
return data;
}
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
async function getLicenseButtonsFile(packager) {
return (0, _license().getLicenseAssets)((await packager.resourceList).filter(it => {
const name = it.toLowerCase(); // noinspection SpellCheckingInspection
return name.startsWith("licensebuttons_") && (name.endsWith(".json") || name.endsWith(".yml"));
}), packager);
}
async function getLicenseButtons(licenseButtonFiles, langWithRegion, id, name) {
let data = (0, _licenseDefaultButtons().getDefaultButtons)(langWithRegion, id, name);
for (const item of licenseButtonFiles) {
if (item.langWithRegion !== langWithRegion) {
continue;
}
try {
const fileData = (0, _jsYaml().safeLoad)(await (0, _fsExtra().readFile)(item.file, "utf-8"));
const buttonsStr = labelToHex(fileData.lang, item.lang, item.langWithRegion) + labelToHex(fileData.agree, item.lang, item.langWithRegion) + labelToHex(fileData.disagree, item.lang, item.langWithRegion) + labelToHex(fileData.print, item.lang, item.langWithRegion) + labelToHex(fileData.save, item.lang, item.langWithRegion) + labelToHex(fileData.description, item.lang, item.langWithRegion);
data = `data 'STR#' (${id}, "${name}") {\n`;
data += (0, _dmgUtil().serializeString)("0006" + buttonsStr);
data += `\n};`;
if (_builderUtil().log.isDebugEnabled) {
_builderUtil().log.debug({
lang: item.langName,
data
}, `overwriting license buttons`);
}
return data;
} catch (e) {
_builderUtil().log.debug({
error: e
}, "cannot overwrite license buttons");
return data;
}
}
return data;
}
function labelToHex(label, lang, langWithRegion) {
const lbl = hexEncode(label, lang, langWithRegion).toString().toUpperCase();
const len = numberToHex(lbl.length / 2);
return len + lbl;
}
function numberToHex(nb) {
return ("0" + nb.toString(16)).slice(-2);
}
function hexEncode(str, lang, langWithRegion) {
const macCodePages = getMacCodePage(lang, langWithRegion);
let result = "";
for (let i = 0; i < str.length; i++) {
try {
let hex = getMacHexCode(str, i, macCodePages);
if (hex === undefined) {
hex = "3F"; //?
}
result += hex;
} catch (e) {
_builderUtil().log.debug({
error: e,
char: str[i]
}, "cannot convert");
result += "3F"; //?
}
}
return result;
}
function getMacCodePage(lang, langWithRegion) {
switch (lang) {
case "ja":
//japanese
return ["euc-jp"];
//Apple Japanese
case "zh":
//chinese
if (langWithRegion === "zh_CN") {
return ["gb2312"]; //Apple Simplified Chinese (GB 2312)
}
return ["big5"];
//Apple Traditional Chinese (Big5)
case "ko":
//korean
return ["euc-kr"];
//Apple Korean
case "ar": //arabic
case "ur":
//urdu
return ["macarabic"];
//Apple Arabic
case "he":
//hebrew
return ["machebrew"];
//Apple Hebrew
case "el": //greek
case "elc":
//greek
return ["macgreek"];
//Apple Greek
case "ru": //russian
case "be": //belarussian
case "sr": //serbian
case "bg": //bulgarian
case "uz":
//uzbek
return ["maccyrillic"];
//Apple Macintosh Cyrillic
case "ro":
//romanian
return ["macromania"];
//Apple Romanian
case "uk":
//ukrainian
return ["macukraine"];
//Apple Ukrainian
case "th":
//thai
return ["macthai"];
//Apple Thai
case "et": //estonian
case "lt": //lithuanian
case "lv": //latvian
case "pl": //polish
case "hu": //hungarian
case "cs": //czech
case "sk":
//slovak
return ["maccenteuro"];
//Apple Macintosh Central Europe
case "is": //icelandic
case "fo":
//faroese
return ["maciceland"];
//Apple Icelandic
case "tr":
//turkish
return ["macturkish"];
//Apple Turkish
case "hr": //croatian
case "sl":
//slovenian
return ["maccroatian"];
//Apple Croatian
default:
return ["macroman"];
//Apple Macintosh Roman
}
}
function getMacHexCode(str, i, macCodePages) {
const code = str.charCodeAt(i);
if (code < 128) {
return code.toString(16);
} else if (code < 256) {
return iconv().encode(str[i], "macroman").toString("hex");
} else {
for (let i = 0; i < macCodePages.length; i++) {
const result = iconv().encode(str[i], macCodePages[i]).toString("hex");
if (result !== undefined) {
return result;
}
}
}
return code;
}
// __ts-babel@6.0.4
//# sourceMappingURL=licenseButtons.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
export declare function getDefaultButtons(langWithRegion: string, id: number, name: string): string;

View File

@ -0,0 +1,280 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getDefaultButtons = getDefaultButtons;
function getDefaultButtons(langWithRegion, id, name) {
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"
};`;
}
}
// __ts-babel@6.0.4
//# sourceMappingURL=licenseDefaultButtons.js.map

File diff suppressed because one or more lines are too long