init
This commit is contained in:
13
mc_test/node_modules/dmg-builder/out/dmg.d.ts
generated
vendored
Executable file
13
mc_test/node_modules/dmg-builder/out/dmg.d.ts
generated
vendored
Executable 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(arch: Arch, custom?: string | null): string;
|
||||
computeDmgOptions(): Promise<DmgOptions>;
|
||||
}
|
||||
322
mc_test/node_modules/dmg-builder/out/dmg.js
generated
vendored
Executable file
322
mc_test/node_modules/dmg-builder/out/dmg.js
generated
vendored
Executable file
@ -0,0 +1,322 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.DmgTarget = void 0;
|
||||
const app_builder_lib_1 = require("app-builder-lib");
|
||||
const macCodeSign_1 = require("app-builder-lib/out/codeSign/macCodeSign");
|
||||
const differentialUpdateInfoBuilder_1 = require("app-builder-lib/out/targets/differentialUpdateInfoBuilder");
|
||||
const appBuilder_1 = require("app-builder-lib/out/util/appBuilder");
|
||||
const filename_1 = require("app-builder-lib/out/util/filename");
|
||||
const builder_util_1 = require("builder-util");
|
||||
const fs_1 = require("builder-util/out/fs");
|
||||
const fs_extra_1 = require("fs-extra");
|
||||
const path = require("path");
|
||||
const dmgLicense_1 = require("./dmgLicense");
|
||||
const dmgUtil_1 = require("./dmgUtil");
|
||||
const os_1 = require("os");
|
||||
class DmgTarget extends app_builder_lib_1.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(this.options, "dmg", arch, "${productName}-" + (packager.platformSpecificBuildOptions.bundleShortVersion || "${version}") + "-${arch}.${ext}", true, packager.platformSpecificBuildOptions.defaultArch);
|
||||
const artifactPath = path.join(this.outDir, artifactName);
|
||||
await packager.info.callArtifactBuildStarted({
|
||||
targetPresentableName: "DMG",
|
||||
file: artifactPath,
|
||||
arch,
|
||||
});
|
||||
const volumeName = (0, filename_1.sanitizeFileName)(this.computeVolumeName(arch, 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, builder_util_1.exec)("hdiutil", ["resize", "-size", expandingFinalSize.toString(), tempDmg]);
|
||||
const volumePath = path.join("/Volumes", volumeName);
|
||||
if (await (0, fs_1.exists)(volumePath)) {
|
||||
builder_util_1.log.debug({ volumePath }, "unmounting previous disk image");
|
||||
await (0, dmgUtil_1.detach)(volumePath);
|
||||
}
|
||||
if (!(await (0, dmgUtil_1.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, builder_util_1.spawn)("hdiutil", addLogLevel(args));
|
||||
if (this.options.internetEnabled && parseInt((0, os_1.release)().split(".")[0], 10) < 19) {
|
||||
await (0, builder_util_1.exec)("hdiutil", addLogLevel(["internet-enable"]).concat(artifactPath));
|
||||
}
|
||||
const licenseData = await (0, dmgLicense_1.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_1.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_1.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_1.findIdentity)(certificateType, qualifier, keychainFile);
|
||||
if (identity == null) {
|
||||
identity = await (0, macCodeSign_1.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, builder_util_1.exec)("codesign", args);
|
||||
}
|
||||
computeVolumeName(arch, custom) {
|
||||
const appInfo = this.packager.appInfo;
|
||||
const shortVersion = this.packager.platformSpecificBuildOptions.bundleShortVersion || appInfo.version;
|
||||
const archString = (0, builder_util_1.getArchSuffix)(arch, this.packager.platformSpecificBuildOptions.defaultArch);
|
||||
if (custom == null) {
|
||||
return `${appInfo.productFilename} ${shortVersion}${archString}`;
|
||||
}
|
||||
return custom
|
||||
.replace(/\${arch}/g, archString)
|
||||
.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, builder_util_1.isEmptyOrSpaces)(specification.icon)) {
|
||||
throw new builder_util_1.InvalidConfigurationError("dmg.icon cannot be specified as empty string");
|
||||
}
|
||||
const background = specification.background;
|
||||
if (specification.backgroundColor != null) {
|
||||
if (background != null) {
|
||||
throw new builder_util_1.InvalidConfigurationError("Both dmg.backgroundColor and dmg.background are specified — please set the only one");
|
||||
}
|
||||
}
|
||||
else if (background == null) {
|
||||
specification.background = await (0, dmgUtil_1.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"]);
|
||||
if (builder_util_1.log.isDebugEnabled) {
|
||||
imageArgs.push("-debug");
|
||||
}
|
||||
let filesystem = ["HFS+", "-fsargs", "-c c=64,a=16,e=16"];
|
||||
if (process.arch === "arm64") {
|
||||
// Apple Silicon `hdiutil` dropped support for HFS+, so we force the latest type
|
||||
// https://github.com/electron-userland/electron-builder/issues/4606
|
||||
filesystem = ["APFS"];
|
||||
builder_util_1.log.warn(null, "Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+");
|
||||
}
|
||||
imageArgs.push("-fs", ...filesystem);
|
||||
imageArgs.push(tempDmg);
|
||||
// The reason for retrying up to ten times is that hdiutil create in some cases fail to unmount due to "resource busy".
|
||||
// https://github.com/electron-userland/electron-builder/issues/5431
|
||||
await (0, builder_util_1.retry)(() => (0, builder_util_1.spawn)("hdiutil", imageArgs), 5, 1000);
|
||||
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 builder_util_1.AsyncTaskManager(cancellationToken);
|
||||
asyncTaskManager.addTask((0, fs_extra_1.stat)(dmgFile));
|
||||
if (specification.icon != null) {
|
||||
asyncTaskManager.addTask((0, fs_1.statOrNull)(specification.icon));
|
||||
}
|
||||
if (backgroundFile != null) {
|
||||
asyncTaskManager.addTask((0, fs_extra_1.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 isValidIconTextSize = !!specification.iconTextSize && specification.iconTextSize >= 10 && specification.iconTextSize <= 16;
|
||||
const iconTextSize = isValidIconTextSize ? specification.iconTextSize : 12;
|
||||
const env = {
|
||||
...process.env,
|
||||
volumePath,
|
||||
appFileName: `${packager.appInfo.productFilename}.app`,
|
||||
iconSize: specification.iconSize || 80,
|
||||
iconTextSize,
|
||||
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_1.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 builder_util_1.AsyncTaskManager(packager.info.cancellationToken);
|
||||
env.iconLocations = await computeDmgEntries(specification, volumePath, packager, asyncTaskManager);
|
||||
await asyncTaskManager.awaitTasks();
|
||||
const executePython = async (execName) => {
|
||||
let pythonPath = process.env.PYTHON_PATH;
|
||||
if (!pythonPath) {
|
||||
pythonPath = (await (0, builder_util_1.exec)("which", [execName])).trim();
|
||||
}
|
||||
await (0, builder_util_1.exec)(pythonPath, [path.join((0, dmgUtil_1.getDmgVendorPath)(), "dmgbuild/core.py")], {
|
||||
cwd: (0, dmgUtil_1.getDmgVendorPath)(),
|
||||
env,
|
||||
});
|
||||
};
|
||||
try {
|
||||
await executePython("python3");
|
||||
}
|
||||
catch (error) {
|
||||
await executePython("python");
|
||||
}
|
||||
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") {
|
||||
builder_util_1.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);
|
||||
const escapedEntryName = entryName.replace(/['\\]/g, match => `\\${match}`);
|
||||
if (result.length !== 0) {
|
||||
result += ",\n";
|
||||
}
|
||||
result += `'${escapedEntryName}': (${c.x}, ${c.y})`;
|
||||
if (c.type === "link") {
|
||||
asyncTaskManager.addTask((0, builder_util_1.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, builder_util_1.isEmptyOrSpaces)(c.path) && (c.type === "file" || c.type === "dir")) {
|
||||
const source = await packager.getResource(c.path);
|
||||
if (source == null) {
|
||||
builder_util_1.log.warn({ entryPath, reason: "doesn't exist" }, "skipped DMG item copying");
|
||||
continue;
|
||||
}
|
||||
const destination = `${volumePath}/${entryName}`;
|
||||
asyncTaskManager.addTask(c.type === "dir" || (await (0, fs_extra_1.stat)(source)).isDirectory() ? (0, fs_1.copyDir)(source, destination) : (0, fs_1.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_1.exists)(retinaFile)) {
|
||||
const tiffFile = await tmpDir.getTempFile({ suffix: ".tiff" });
|
||||
await (0, builder_util_1.exec)("tiffutil", ["-cathidpicheck", file, retinaFile, "-out", tiffFile]);
|
||||
return tiffFile;
|
||||
}
|
||||
return file;
|
||||
}
|
||||
//# sourceMappingURL=dmg.js.map
|
||||
1
mc_test/node_modules/dmg-builder/out/dmg.js.map
generated
vendored
Executable file
1
mc_test/node_modules/dmg-builder/out/dmg.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
8
mc_test/node_modules/dmg-builder/out/dmgLicense.d.ts
generated
vendored
Executable file
8
mc_test/node_modules/dmg-builder/out/dmgLicense.d.ts
generated
vendored
Executable file
@ -0,0 +1,8 @@
|
||||
import { PlatformPackager } from "app-builder-lib";
|
||||
type LicenseConfig = {
|
||||
$schema: string;
|
||||
body: any[];
|
||||
labels: any[];
|
||||
};
|
||||
export declare function addLicenseToDmg(packager: PlatformPackager<any>, dmgPath: string): Promise<LicenseConfig | null>;
|
||||
export {};
|
||||
48
mc_test/node_modules/dmg-builder/out/dmgLicense.js
generated
vendored
Executable file
48
mc_test/node_modules/dmg-builder/out/dmgLicense.js
generated
vendored
Executable file
@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.addLicenseToDmg = void 0;
|
||||
const builder_util_1 = require("builder-util");
|
||||
const js_yaml_1 = require("js-yaml");
|
||||
const license_1 = require("app-builder-lib/out/util/license");
|
||||
const fs_extra_1 = require("fs-extra");
|
||||
const licenseButtons_1 = require("./licenseButtons");
|
||||
const dmg_license_1 = require("dmg-license");
|
||||
async function addLicenseToDmg(packager, dmgPath) {
|
||||
const licenseFiles = await (0, license_1.getLicenseFiles)(packager);
|
||||
if (licenseFiles.length === 0) {
|
||||
return null;
|
||||
}
|
||||
const licenseButtonFiles = await (0, licenseButtons_1.getLicenseButtonsFile)(packager);
|
||||
packager.debugLogger.add("dmg.licenseFiles", licenseFiles);
|
||||
packager.debugLogger.add("dmg.licenseButtons", licenseButtonFiles);
|
||||
const jsonFile = {
|
||||
$schema: "https://github.com/argv-minus-one/dmg-license/raw/master/schema.json",
|
||||
// defaultLang: '',
|
||||
body: [],
|
||||
labels: [],
|
||||
};
|
||||
for (const file of licenseFiles) {
|
||||
jsonFile.body.push({
|
||||
file: file.file,
|
||||
lang: file.langWithRegion.replace("_", "-"),
|
||||
});
|
||||
}
|
||||
for (const button of licenseButtonFiles) {
|
||||
const filepath = button.file;
|
||||
const label = filepath.endsWith(".yml") ? (0, js_yaml_1.load)(await (0, fs_extra_1.readFile)(filepath, "utf-8")) : await (0, fs_extra_1.readJson)(filepath);
|
||||
if (label.description) {
|
||||
// to support original button file format
|
||||
label.message = label.description;
|
||||
delete label.description;
|
||||
}
|
||||
jsonFile.labels.push(Object.assign({
|
||||
lang: button.langWithRegion.replace("_", "-"),
|
||||
}, label));
|
||||
}
|
||||
await (0, dmg_license_1.dmgLicenseFromJSON)(dmgPath, jsonFile, {
|
||||
onNonFatalError: builder_util_1.log.warn.bind(builder_util_1.log),
|
||||
});
|
||||
return jsonFile;
|
||||
}
|
||||
exports.addLicenseToDmg = addLicenseToDmg;
|
||||
//# sourceMappingURL=dmgLicense.js.map
|
||||
1
mc_test/node_modules/dmg-builder/out/dmgLicense.js.map
generated
vendored
Executable file
1
mc_test/node_modules/dmg-builder/out/dmgLicense.js.map
generated
vendored
Executable file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"dmgLicense.js","sourceRoot":"","sources":["../src/dmgLicense.ts"],"names":[],"mappings":";;;AAAA,+CAAkC;AAClC,qCAA8B;AAE9B,8DAAkE;AAClE,uCAA6C;AAC7C,qDAAwD;AACxD,6CAAgD;AAUzC,KAAK,UAAU,eAAe,CAAC,QAA+B,EAAE,OAAe;IACpF,MAAM,YAAY,GAAG,MAAM,IAAA,yBAAe,EAAC,QAAQ,CAAC,CAAA;IACpD,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,kBAAkB,GAAG,MAAM,IAAA,sCAAqB,EAAC,QAAQ,CAAC,CAAA;IAChE,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAA;IAC1D,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAAA;IAElE,MAAM,QAAQ,GAAkB;QAC9B,OAAO,EAAE,sEAAsE;QAC/E,mBAAmB;QACnB,IAAI,EAAE,EAAE;QACR,MAAM,EAAE,EAAE;KACX,CAAA;IAED,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QAChC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;SAC5C,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,MAAM,MAAM,IAAI,kBAAkB,EAAE,CAAC;QACxC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAA;QAC5B,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAA,cAAI,EAAC,MAAM,IAAA,mBAAQ,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,IAAA,mBAAQ,EAAC,QAAQ,CAAC,CAAA;QAC5G,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACtB,yCAAyC;YACzC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,WAAW,CAAA;YACjC,OAAO,KAAK,CAAC,WAAW,CAAA;QAC1B,CAAC;QACD,QAAQ,CAAC,MAAM,CAAC,IAAI,CAClB,MAAM,CAAC,MAAM,CACX;YACE,IAAI,EAAE,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;SAC9C,EACD,KAAK,CACN,CACF,CAAA;IACH,CAAC;IAED,MAAM,IAAA,gCAAkB,EAAC,OAAO,EAAE,QAAQ,EAAE;QAC1C,eAAe,EAAE,kBAAG,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAG,CAAC;KACpC,CAAC,CAAA;IAEF,OAAO,QAAQ,CAAA;AACjB,CAAC;AA/CD,0CA+CC","sourcesContent":["import { log } from \"builder-util\"\nimport { load } from \"js-yaml\"\nimport { PlatformPackager } from \"app-builder-lib\"\nimport { getLicenseFiles } from \"app-builder-lib/out/util/license\"\nimport { readFile, readJson } from \"fs-extra\"\nimport { getLicenseButtonsFile } from \"./licenseButtons\"\nimport { dmgLicenseFromJSON } from \"dmg-license\"\n\n// License Specifications\n// https://github.com/argv-minus-one/dmg-license/blob/HEAD/docs/License%20Specifications.md\ntype LicenseConfig = {\n $schema: string\n body: any[]\n labels: any[]\n}\n\nexport async function addLicenseToDmg(packager: PlatformPackager<any>, dmgPath: string): Promise<LicenseConfig | null> {\n const licenseFiles = await getLicenseFiles(packager)\n if (licenseFiles.length === 0) {\n return null\n }\n\n const licenseButtonFiles = await getLicenseButtonsFile(packager)\n packager.debugLogger.add(\"dmg.licenseFiles\", licenseFiles)\n packager.debugLogger.add(\"dmg.licenseButtons\", licenseButtonFiles)\n\n const jsonFile: LicenseConfig = {\n $schema: \"https://github.com/argv-minus-one/dmg-license/raw/master/schema.json\",\n // defaultLang: '',\n body: [],\n labels: [],\n }\n\n for (const file of licenseFiles) {\n jsonFile.body.push({\n file: file.file,\n lang: file.langWithRegion.replace(\"_\", \"-\"),\n })\n }\n\n for (const button of licenseButtonFiles) {\n const filepath = button.file\n const label = filepath.endsWith(\".yml\") ? load(await readFile(filepath, \"utf-8\")) : await readJson(filepath)\n if (label.description) {\n // to support original button file format\n label.message = label.description\n delete label.description\n }\n jsonFile.labels.push(\n Object.assign(\n {\n lang: button.langWithRegion.replace(\"_\", \"-\"),\n },\n label\n )\n )\n }\n\n await dmgLicenseFromJSON(dmgPath, jsonFile, {\n onNonFatalError: log.warn.bind(log),\n })\n\n return jsonFile\n}\n"]}
|
||||
7
mc_test/node_modules/dmg-builder/out/dmgUtil.d.ts
generated
vendored
Executable file
7
mc_test/node_modules/dmg-builder/out/dmgUtil.d.ts
generated
vendored
Executable 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>;
|
||||
66
mc_test/node_modules/dmg-builder/out/dmgUtil.js
generated
vendored
Executable file
66
mc_test/node_modules/dmg-builder/out/dmgUtil.js
generated
vendored
Executable file
@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.serializeString = exports.computeBackground = exports.detach = exports.attachAndExecute = exports.getDmgVendorPath = exports.getDmgTemplatePath = exports.DmgTarget = void 0;
|
||||
const builder_util_1 = require("builder-util");
|
||||
const promise_1 = require("builder-util/out/promise");
|
||||
const path = require("path");
|
||||
var dmg_1 = require("./dmg");
|
||||
Object.defineProperty(exports, "DmgTarget", { enumerable: true, get: function () { return dmg_1.DmgTarget; } });
|
||||
const root = path.join(__dirname, "..");
|
||||
function getDmgTemplatePath() {
|
||||
return path.join(root, "templates");
|
||||
}
|
||||
exports.getDmgTemplatePath = getDmgTemplatePath;
|
||||
function getDmgVendorPath() {
|
||||
return path.join(root, "vendor");
|
||||
}
|
||||
exports.getDmgVendorPath = getDmgVendorPath;
|
||||
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, builder_util_1.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_1.executeFinally)(task(), () => detach(device));
|
||||
}
|
||||
exports.attachAndExecute = attachAndExecute;
|
||||
async function detach(name) {
|
||||
try {
|
||||
await (0, builder_util_1.exec)("hdiutil", ["detach", "-quiet", name]);
|
||||
}
|
||||
catch (e) {
|
||||
await (0, builder_util_1.retry)(() => (0, builder_util_1.exec)("hdiutil", ["detach", "-force", "-debug", name]), 5, 1000, 500);
|
||||
}
|
||||
}
|
||||
exports.detach = detach;
|
||||
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");
|
||||
}
|
||||
}
|
||||
exports.computeBackground = computeBackground;
|
||||
/** @internal */
|
||||
function serializeString(data) {
|
||||
return (' $"' +
|
||||
data
|
||||
.match(/.{1,32}/g)
|
||||
.map(it => it.match(/.{1,4}/g).join(" "))
|
||||
.join('"\n $"') +
|
||||
'"');
|
||||
}
|
||||
exports.serializeString = serializeString;
|
||||
//# sourceMappingURL=dmgUtil.js.map
|
||||
1
mc_test/node_modules/dmg-builder/out/dmgUtil.js.map
generated
vendored
Executable file
1
mc_test/node_modules/dmg-builder/out/dmgUtil.js.map
generated
vendored
Executable file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"dmgUtil.js","sourceRoot":"","sources":["../src/dmgUtil.ts"],"names":[],"mappings":"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","sourcesContent":["import { exec, retry } 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 } catch (e: any) {\n await retry(() => exec(\"hdiutil\", [\"detach\", \"-force\", \"-debug\", name]), 5, 1000, 500)\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 } else if (resourceList.includes(\"background.png\")) {\n return path.join(packager.buildResourcesDir, \"background.png\")\n } else {\n return path.join(getDmgTemplatePath(), \"background.tiff\")\n }\n}\n\n/** @internal */\nexport function serializeString(data: string) {\n return (\n ' $\"' +\n data\n .match(/.{1,32}/g)!\n .map(it => it.match(/.{1,4}/g)!.join(\" \"))\n .join('\"\\n $\"') +\n '\"'\n )\n}\n"]}
|
||||
9
mc_test/node_modules/dmg-builder/out/licenseButtons.d.ts
generated
vendored
Executable file
9
mc_test/node_modules/dmg-builder/out/licenseButtons.d.ts
generated
vendored
Executable 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>;
|
||||
144
mc_test/node_modules/dmg-builder/out/licenseButtons.js
generated
vendored
Executable file
144
mc_test/node_modules/dmg-builder/out/licenseButtons.js
generated
vendored
Executable file
@ -0,0 +1,144 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getLicenseButtons = exports.getLicenseButtonsFile = void 0;
|
||||
const builder_util_1 = require("builder-util");
|
||||
const license_1 = require("app-builder-lib/out/util/license");
|
||||
const fs_extra_1 = require("fs-extra");
|
||||
const iconv = require("iconv-lite");
|
||||
const js_yaml_1 = require("js-yaml");
|
||||
const dmgUtil_1 = require("./dmgUtil");
|
||||
const licenseDefaultButtons_1 = require("./licenseDefaultButtons");
|
||||
async function getLicenseButtonsFile(packager) {
|
||||
return (0, license_1.getLicenseAssets)((await packager.resourceList).filter(it => {
|
||||
const name = it.toLowerCase();
|
||||
// noinspection SpellCheckingInspection
|
||||
return name.startsWith("licensebuttons_") && (name.endsWith(".json") || name.endsWith(".yml"));
|
||||
}), packager);
|
||||
}
|
||||
exports.getLicenseButtonsFile = getLicenseButtonsFile;
|
||||
async function getLicenseButtons(licenseButtonFiles, langWithRegion, id, name) {
|
||||
let data = (0, licenseDefaultButtons_1.getDefaultButtons)(langWithRegion, id, name);
|
||||
for (const item of licenseButtonFiles) {
|
||||
if (item.langWithRegion !== langWithRegion) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
const fileData = (0, js_yaml_1.load)(await (0, fs_extra_1.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_1.serializeString)("0006" + buttonsStr);
|
||||
data += `\n};`;
|
||||
if (builder_util_1.log.isDebugEnabled) {
|
||||
builder_util_1.log.debug({ lang: item.langName, data }, `overwriting license buttons`);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
catch (e) {
|
||||
builder_util_1.log.debug({ error: e }, "cannot overwrite license buttons");
|
||||
return data;
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}
|
||||
exports.getLicenseButtons = getLicenseButtons;
|
||||
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) {
|
||||
builder_util_1.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;
|
||||
}
|
||||
//# sourceMappingURL=licenseButtons.js.map
|
||||
1
mc_test/node_modules/dmg-builder/out/licenseButtons.js.map
generated
vendored
Executable file
1
mc_test/node_modules/dmg-builder/out/licenseButtons.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1
mc_test/node_modules/dmg-builder/out/licenseDefaultButtons.d.ts
generated
vendored
Executable file
1
mc_test/node_modules/dmg-builder/out/licenseDefaultButtons.d.ts
generated
vendored
Executable file
@ -0,0 +1 @@
|
||||
export declare function getDefaultButtons(langWithRegion: string, id: number, name: string): string;
|
||||
261
mc_test/node_modules/dmg-builder/out/licenseDefaultButtons.js
generated
vendored
Executable file
261
mc_test/node_modules/dmg-builder/out/licenseDefaultButtons.js
generated
vendored
Executable file
@ -0,0 +1,261 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getDefaultButtons = void 0;
|
||||
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"
|
||||
};`;
|
||||
}
|
||||
}
|
||||
exports.getDefaultButtons = getDefaultButtons;
|
||||
//# sourceMappingURL=licenseDefaultButtons.js.map
|
||||
1
mc_test/node_modules/dmg-builder/out/licenseDefaultButtons.js.map
generated
vendored
Executable file
1
mc_test/node_modules/dmg-builder/out/licenseDefaultButtons.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user