electron 电子锻造-为电子更新器创建最新的.yml

dzjeubhm  于 11个月前  发布在  Electron
关注(0)|答案(1)|浏览(144)

我已经使用webpack将我们的ReactJS应用程序迁移到Electron Forge。现在我已经创建了.exe文件,但由于缺少latest.yml文件,我正在与electron-updater斗争。我如何使用electron-forge make创建此文件,以便electron-updater可以更新应用程序?
package.json

{
    "name": "app-electron",
         "version": "1.5.3",
         "description": "My app description",
    "config": {
        "forge": {
          "plugins": [
            {
              "name": "@electron-forge/plugin-webpack",
              "config": {
                "devContentSecurityPolicy": "default-src * self blob: data: gap:; style-src * self 'unsafe-inline' blob: data: gap:; script-src * 'self' 'unsafe-eval' 'unsafe-inline' blob: data: gap:; object-src * 'self' blob: data: gap:; img-src * self 'unsafe-inline' blob: data: gap:; connect-src self * 'unsafe-inline' blob: data: gap:; frame-src * self blob: data: gap:;",
                "mainConfig": "./webpack.main.config.js",
                "renderer": {
                  "config": "./webpack.renderer.config.js",
                  "entryPoints": [
                    {
                      "name": "main_window",
                      "html": "./src/index.html",
                      "js": "./src/index.js",
                      "preload": {
                        "js": "./src/preload.js"
                      }
                    }
                  ]
                }
              }
            }
          ],
          "makers": [
            {
              "name": "@electron-forge/maker-squirrel",
              "config": {
                "name": "app-electron",
                "loadingGif": "loading.gif",
                "icon": "icon.ico"
              }
            }
          ]
        }
      },
    ...
}

字符串

c9qzyr3d

c9qzyr3d1#

electron-forge不会自动创建latest.yml文件,在最后有一个我的文件的例子,所以你可以手动创建它,但强烈建议使用electron-builder,而不是正确创建丢失的文件,并反过来正确拾取电子更新程序,即。

version: 0.0.18
files:
  - url: App.exe
    sha512: NQOV/xxxxxxxxxx==
    size: 100527708
path: App.exe
sha512: NQOV/yyyyyyyyyy==
releaseNotes: "[this is the content of the app.release-notes.md file referenced at\r\npackage.json/build/releaseInfo/releaseNotesFile]"
releaseDate: '2023-12-14T14:42:57.334Z'

字符串

相关问题