build: 内网环境下跳过 Windows node-pty 补丁构建并关闭 GitHub 发布
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
Star History / update (push) Has been cancelled

调整 electron-builder 配置,Windows 平台仅打包 zip 格式,注释掉 NSIS 和 portable 目标;
注释掉 Windows Hello helper 资源配置以避免路径不存在导致的打包失败;
将发布配置设为 null 以关闭 GitHub 发布请求;
修改 afterPack 脚本,跳过 Windows 下 node-pty ConPTY 补丁的重建和复制,因内网无 MSVC 工具链无法完成该操作。
This commit is contained in:
2026-10-15 15:30:31 +08:00
parent 2561001dca
commit 336c3afd47
7 changed files with 152 additions and 139 deletions

View File

@@ -241,18 +241,11 @@ module.exports = {
},
win: {
icon: 'build/icon.ico',
target: ['nsis', 'portable', 'zip'],
// 先只打 zip(无需 NSIS / portable 联网构建),后续再按需恢复 NSIS installer
target: ['zip'],
extraResources: [
...moshExtraResources('win32'),
...etExtraResources('win32'),
// Windows Hello helper 是可选的 —— 如果系统没装 VS C++ 工具链就跳过
// 构建(见 scripts/beforePackCursorSdk.cjs),这里也不要硬引用一个可能
// 不存在的二进制,否则 electron-builder 打包时会因为路径不存在直接失败。
// {
// from: 'electron/bridges/windowsHelloHelper/build/${arch}/NetcattyWindowsHello.exe',
// to: 'windowsHello/NetcattyWindowsHello.exe',
// filter: ['**/*']
// }
]
},
portable: {
@@ -310,12 +303,14 @@ module.exports = {
afterInstall: 'scripts/linux/after-install.tpl',
afterRemove: 'scripts/linux/after-remove.tpl',
},
publish: [
{
provider: 'github',
owner: 'binaricat',
repo: 'Netcatty',
releaseType: 'release'
}
]
// publish: [
// {
// provider: 'github',
// owner: 'binaricat',
// repo: 'Netcatty',
// releaseType: 'release'
// }
// ],
// 内网环境 —— 关闭 GitHub publish,electron-builder 不会再尝试连 github.com
publish: null
};