小编Lil*_*eau的帖子

电子更新程序通知新版本,但不在 Windows 中更新或下载新版本

Electron updater 4.2.0 软件包无法下载新版本,但可以检测到它

这是 github 上的私人存储库

新版本已成功发送到github

发布github

在package.json中:

"build": {
"appId": "com.myApp.ID",
"npmRebuild": false,
"win": {
  "icon": "./resources/electron/icons/256x256.png",
  "publish": [
    {
      "provider": "github",
      "owner": "me",
      "repo": "POS",
      "private": true,
      "releaseType": "release",
      "token": "<private token>"
    }
  ],
  "target": [
    {
      "target": "nsis",
      "arch": [
        "x64"
      ]
    }
  ]
}
},
Run Code Online (Sandbox Code Playgroud)

我的 electro.js 文件或 main.js 我有:

  win.webContents.on('did-finish-load', () => {
    if(!serve) {
      appUpdater(win);
    }
  });
Run Code Online (Sandbox Code Playgroud)

appUpdater函数是:

function appUpdater(win) {
  autoUpdater.autoInstallOnAppQuit = true;
  autoUpdater.autoDownload = true;
  autoUpdater.logger = logger;
  /* …
Run Code Online (Sandbox Code Playgroud)

nsis electron electron-updater

5
推荐指数
1
解决办法
5170
查看次数

标签 统计

electron ×1

electron-updater ×1

nsis ×1