“electron-forge make”输出.deb和.rpm但不输出.exe

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

我正在使用WSL 2并成功运行

npm run make

字符串

...
"scripts": {
    ...,
    "make": "electron-forge make"
  },
...


但在创建可分发文件时,

✔ Making distributables
  ✔ Making a deb distributable for linux/x64 [12s]
  ✔ Making a rpm distributable for linux/x64 [25s]


有没有什么方法可以让electron-forge也输出一个windows版的exe?

yqhsw0fo

yqhsw0fo1#

下面是forge配置文件设置示例,它允许我的GitHub操作生成多个供应商可执行文件

module.exports = {
  packagerConfig: {},
  rebuildConfig: {},
  makers: [
    {
      name: "@electron-forge/maker-squirrel",
      config: {},
    },
    {
      name: "@electron-forge/maker-zip",
      platforms: ["darwin"],
    },
    {
      name: "@electron-forge/maker-dmg",
      platforms: ["darwin"],
    },
    {
      name: "@electron-forge/maker-deb",
      config: {},
    },
    {
      name: "@electron-forge/maker-rpm",
      config: {},
    },
  ],
  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: [
            {
              html: "./src/index.html",
              js: "./src/renderer.js",
              name: "main_window",
              preload: {
                js: "./src/preload.js",
              },
            },
          ],
        },
      },
    },
  ],
  publishers: [
    {
      name: "@electron-forge/publisher-github",
      config: {
        repository: {
          owner: "rsathishtechit",
          name: "udeler-pro",
        },
        prerelease: true,
      },
    },
  ],
};

字符串
以上配置的输出
x1c 0d1x的数据
项目链接-https://github.com/rsathishtechit/udeler-pro

相关问题