单击应用程序exe文件后如何显示接受条款和条件窗口

问题描述 投票:0回答:1

我正在使用Electron Builder为我的应用创建版本。我希望接受条款和条件窗口显示为复选框,如果用户选择复选框并单击“仅继续”,则将安装应用程序,否则退出安装。如何在lectornjs中进行安装。

electron electron-builder
1个回答
0
投票

正如所提到的文件:

license String-EULA许可证文件的路径。默认为license.txt或eula.txt(或大写变体)。除了txt之外,还支持rtfandhtml(不要忘记使用target =“ _ blank”`进行链接)。

https://www.electron.build/configuration/nsis

因此,在您的package.json构建部件中,尝试像这样使用它:

{
    "appId": "yourappid",
    "productName": "your-product",
    "copyright": "Copyright © 2020 your company",
    "directories": {
      "app": "www"
    },
    "nsis": {
      "oneClick": false,
      "perMachine": false,
      "allowToChangeInstallationDirectory": true,
      "license": "LICENSE.txt", // <- Put your license name here.
    },
    "win": {
      "target": [
        {
          "target": "nsis"
        }
      ]
    }
  }

并将LICENSE.txt文件放在package.json文件的旁边:

LICENSE

Here is my example license.

构建后:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.