我如何创建 cordova 电子建立与'nsis-web'包?

8mmmxcuj  于 2022-11-15  发布在  其他
关注(0)|答案(1)|浏览(153)

我正在尝试使用包类型nsis-web创建cordova electron构建,但无法将其他选项传递给构建类型
根据此图表,nsis-web由 cordova 电子公司提供支持https://cordova.apache.org/docs/en/latest/guide/platforms/electron/index.html#adding-a-package
我的build.json

{
    "electron": {
        "windows": {
            "package": [
                "nsis-web",
                {
                    "nsis-web": {
                        "appPackageUrl": "https://someurl.tld/apps/win/web"
                    }
                }
            ],
            "arch": [
                "x64"
            ]
        }
    }
}

这将导致以下错误

• electron-builder  version=22.7.0 os=19.5.0
  • writing effective config  file=platforms/electron/build/builder-effective-config.yaml
  • installing production dependencies  platform=win32 arch=x64 appDir=/platforms/electron/www
Unknown target: nsisweb

如果我没有传递额外的参数appPackageUrl,则会出现以下错误

• electron-builder  version=22.7.0 os=19.5.0
  • writing effective config  file=platforms/electron/build/builder-effective-config.yaml
  • installing production dependencies  platform=win32 arch=x64 appDir=platforms/electron/www
  • packaging       platform=win32 arch=x64 electron=9.0.0 appOutDir=platforms/electron/build/win-unpacked
  • building        target=nsis-web file=platforms/electron/build/nsis-web/setup.exe archs=x64 oneClick=true perMachine=false
  • building embedded block map  file=platforms/electron/build/nsis-web/<package-name>-3.3.5-x64.nsis.7z
Cannot compute app package download URL

我如何创建一个nsis-web包与cordova电子?
我正在使用cordova-electron包的夜间构建

t40tm48m

t40tm48m1#

经确认,这是cordova-electron软件包中的一个缺失项,我能够与开发人员联系,并正在进行修复,将在cordova-electron@2.0.0版本中提供
PR link

相关问题