缺少AppPackageUrl:带有electron-builder的NSIS-Web配置

dvtswwa3  于 8个月前  发布在  Electron
关注(0)|答案(1)|浏览(80)

我目前正在使用Electron构建一个VueJS应用程序。为此,我使用依赖项“electron-builder”。在“https://www.electron.build/“上有相对详细的文档,但有一个细节我遗漏了,即使在谷歌上搜索了几个小时后也无法弄清楚。
情况是这样的:
我想构建一个NSIS Web安装程序,而不是一个普通的NSIS安装程序。我可以让“普通”安装程序工作。对于Web安装程序,我在“electron-builder. json 5”中定义了以下配置:

/**
 * @see https://www.electron.build/configuration/configuration
 */
{
  "appId": "com.emhartglass.flexis",
  "productName": "FlexFire",
  "copyright": "Copyright © year ${author}",
  "asar": true,
  "icon": "build/bucher-logo-small-512x512.ico",
  "directories": {
    "output": "release/${version}"
  },
  "files": [
    "dist-electron",
    "dist"
  ],
  "win": {
    "target": [
      {
        "target": "nsis-web",
        // ...
        "arch": [
          "x64"
        ]
      }
    ],
    "artifactName": "${productName}_${version}.${ext}",
  },
  "nsis": {
    //
    "oneClick": false,
    //
    "perMachine": false,
    //
    "allowToChangeInstallationDirectory": true,
    //
    "deleteAppDataOnUninstall": true,
    //
    "unicode": true,
    //
    "menuCategory": true,
    //
    "createDesktopShortcut": true,
    //
    "displayLanguageSelector": true,
    //
    "shortcutName": "FlexFire",
    //
    "installerIcon": "build/bucher-logo-small-512x512.ico",
    //
    "uninstallerIcon": "build/bucher-logo-small-512x512.ico",
    //
    "installerHeader": "build/bucher-header.bmp",
    //
    "installerHeaderIcon": "build/bucher-logo-small-512x512.ico",
    //
    "installerSidebar": "build/bucher-sidebar-installer.bmp",
    //
    "uninstallerSidebar": "build/bucher-sidebar-uninstaller.bmp",
    //
    "uninstallDisplayName": "${productName} ${version}",
    //
    "license": "build/license/license_en.txt",
    // ...
    "multiLanguageInstaller": true,
    //
    "packElevateHelper": true
  }
}

字符串
现在我已经触发了构建过程,它被中止,并出现以下错误:
“无法计算应用程序包下载URL failedTask=build stackTrace=错误:无法计算应用程序包下载URL”。
我不知道我在哪里定义了这个链接,如果我还不知道的话,我还需要什么。这里的文档毕竟几乎不存在。这里有人知道这个吗?
非常感谢,丹尼斯
到目前为止,我已经在另一个页面上找到了标签“appPackageUrl”,并将其放在括号后的不同位置,但没有任何地方成功。
如果你在一个地方放了一个错误的标签并触发了构建过程,那么就会出现一个错误消息,说它不知道这个标签,也不知道什么标签是可能的。
我好像漏掉了什么。

9vw9lbht

9vw9lbht1#

我看到您正在使用“nsis”键自定义安装程序,而NSIS电子构建器页面告诉“要自定义Web安装程序,请使用顶级nsisWeb键(而不是nsis)。”这应该是它找不到appPackageUrl的原因:尝试将“nsis”更改为“nsisWeb”

相关问题