feat: 实现 Windows 可选字体包安装链
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { resolve } from "node:path";
|
||||
import { buildFontPack, verifyFontPack } from "./builder.js";
|
||||
import { buildWindowsFontPackInstaller } from "./windows-installer.js";
|
||||
|
||||
function argumentsMap(values: string[]) {
|
||||
const result = new Map<string, string>();
|
||||
@@ -61,7 +62,31 @@ async function main() {
|
||||
packVersion: option(values, "pack-version", "1.0.0")
|
||||
});
|
||||
}
|
||||
throw new Error("命令必须是 build 或 verify");
|
||||
if (command === "windows-installer") {
|
||||
return buildWindowsFontPackInstaller({
|
||||
packRoot: resolve(option(values, "root", "output/font-packs/root")),
|
||||
appVersion: option(values, "app-version", "0.6.0"),
|
||||
packId: option(values, "pack-id", "mdtp-serif-sc"),
|
||||
packVersion: option(values, "pack-version", "1.0.0"),
|
||||
scriptPath: resolve(
|
||||
option(values, "script", "font-packs/windows/font-pack-installer.nsi")
|
||||
),
|
||||
outputDirectory: resolve(
|
||||
option(values, "output", "output/font-packs/windows")
|
||||
),
|
||||
iconPath: resolve(
|
||||
option(values, "icon", "logos/desktop/windows/app.ico")
|
||||
),
|
||||
reportPath: resolve(
|
||||
option(
|
||||
values,
|
||||
"report",
|
||||
"output/font-packs/windows-installer-report.json"
|
||||
)
|
||||
)
|
||||
});
|
||||
}
|
||||
throw new Error("命令必须是 build、verify 或 windows-installer");
|
||||
}
|
||||
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user