Vydané zdroje
Stáhnout zdroje ZIP
CH-J Server Manager
Procházejte adresáře a soubory konkrétního vydání aplikace.
Zdroje jsou zveřejněny pod CH-J Proprietary Software License 1.14. Jejich dostupnost nemění licenční podmínky ani neposkytuje další oprávnění.
1
"use strict";2
const fs = require("node:fs");3
const path = require("node:path");4
const { LicenseAcceptance } = require("../src/main/legal/licenseAcceptance");5
const { GUIDANCE_FILES } = require("../src/main/legal/guidanceDocuments");6
const root = path.join(__dirname, "..");7
const repositoryLicense = path.join(root, "..", "LICENSE");8
if (fs.existsSync(repositoryLicense)) fs.copyFileSync(repositoryLicense, path.join(root, "LICENSE"));9
for (const name of Object.values(GUIDANCE_FILES)) {10
const source = path.join(root, "..", "docs", name);11
if (fs.existsSync(source)) fs.copyFileSync(source, path.join(root, "docs", name));12
if (!fs.statSync(path.join(root, "docs", name), { throwIfNoEntry: false })?.isFile()) throw new Error(`Missing documentation: ${name}`);13
}14
const legal = new LicenseAcceptance({ storageRoot: root, licensePath: path.join(root, "LICENSE"), appVersion: "validation", buildId: "validation" });15
fs.mkdirSync(path.join(root, "build"), { recursive: true });16
fs.copyFileSync(path.join(root, "LICENSE"), path.join(root, "build", "license.txt"));17
// NSIS and macOS SLA support RTF Unicode escapes. DMG plain-text licenses use18
// legacy Mac Roman encoding, which cannot represent the licensor's name.19
const licenseText = fs.readFileSync(path.join(root, "LICENSE"), "utf8");20
function toRtf(text) {21
const rtfText = text.split("").map(character => {22
if (character === "\n") return "\\par\n";23
if (character === "\r") return "";24
if ("\\{}".includes(character)) return `\\${character}`;25
const code = character.charCodeAt(0);26
return code > 127 ? `\\u${code > 32767 ? code - 65536 : code}?` : character;27
}).join("");28
return `{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0 Arial;}}\\uc1\\f0\\fs20\n${rtfText}}\n`;29
}30
fs.writeFileSync(path.join(root, "build", "license.rtf"), toRtf(licenseText), "ascii");31
const installationText = "CH-J Server Manager — Before installation / Před instalací / Vor der Installation\n\n" +32
"The following guidance is informational, non-binding and separate from the Software License. The agreement control applies only to the license in the final section.\n" +33
"Následující pokyny jsou informativní, nezávazné a oddělené od licence. Souhlas se vztahuje pouze na licenci v závěrečné části.\n" +34
"Die folgenden Hinweise sind informativ, unverbindlich und von der Lizenz getrennt. Die Zustimmung gilt nur für die Lizenz im letzten Abschnitt.\n\n" +35
Object.values(legal.guidance).join("\n\n---\n\n") + "\n\n---\n\nAPPLICATION LICENSE — AGREEMENT APPLIES ONLY TO THIS SECTION\n\n" + licenseText;36
fs.writeFileSync(path.join(root, "build", "installation.rtf"), toRtf(installationText), "ascii");37
for (const [language, text] of Object.entries(legal.guidance)) {38
fs.writeFileSync(path.join(root, "build", `guidance-${language}.txt`), "\ufeff" + text.replace(/\r?\n/g, "\r\n"), "utf16le");39
}40
console.log("Prepared CH-J Proprietary Software License 1.14 and operational guidance.");SHA-256: 4249f883ca7e8cfc1fef78e346a11a251fd13f3a4b86b23b48d65ba7a0c924d2
SHA-256 archivu: 5ac91caf4fa32a6fdb114f2430deed486fbe7489d5eea343d1f034169fafb5e0