fix: 修复托盘菜单语法错误与激活页缺失,完善 Windows 打包流程
- electron/main.cjs: 修复托盘菜单损坏的合并代码(SyntaxError),托盘 3D 意识空间与 ipc 路由改用正确的 backendPort 变量 - 新增 activation.html 激活页(对接 /activate 接口,支持自动识别/8 个服务商) - scripts/package-win.ps1: 打包前切换 better-sqlite3 到 Electron ABI、打包后还原 Node ABI,避免 dev 后端崩溃;内置 npmmirror 工具链镜像 - scripts/gen-icons.ps1 + build/icon.ico: 生成安装包图标(electron-builder 必需) - package.json: build 脚本改用 package-win.ps1(不再依赖 VS 工具链) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -246,19 +246,19 @@ function setupTray() {
|
||||
},
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{
|
||||
|
||||
{
|
||||
label: '3D 意识空间',
|
||||
click: () => {
|
||||
if (mainWindow) {
|
||||
mainWindow.loadURL(`http://127.0.0.1:`+port+`/consciousness-3d`)
|
||||
mainWindow.loadURL(`http://127.0.0.1:${backendPort}/consciousness-3d`)
|
||||
mainWindow.show()
|
||||
mainWindow.focus()
|
||||
}
|
||||
},
|
||||
},
|
||||
{ type: 'separator' }, label: '退出',
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: '退出',
|
||||
click: () => {
|
||||
app.isQuiting = true
|
||||
app.quit()
|
||||
@@ -474,7 +474,7 @@ app.whenReady().then(async () => {
|
||||
|
||||
ipcMain.on('open-consciousness-3d', () => {
|
||||
if (mainWindow) {
|
||||
mainWindow.loadURL(`http://127.0.0.1:`+port+`/consciousness-3d`)
|
||||
mainWindow.loadURL(`http://127.0.0.1:${backendPort}/consciousness-3d`)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user