【问题标题】:electron-installer-debian compiled app .deb won't runelectron-installer-debian 编译的应用程序 .deb 不会运行
【发布时间】:2020-08-17 04:59:34
【问题描述】:

我编译的应用程序无法运行,我不知道为什么...

  • electron-installer-debian -> 3.0.0
  • 节点-> 8.16.0
  • npm -> 6.4.1
  • 操作系统->ubuntu 16.04.6 amd64

  • 我可以成功编译示例应用程序。

  • 我可以成功编译我的应用程序。

我做了什么

package.json content

{
"name": "electron-quick-start",
"version": "1.0.0",
"description": "A minimal Electron application",
"main": "main.js",
"scripts": {
  "start": "electron .",
  "build": "electron-packager . electron-quick-start --platform linux --arch x64 --out dist/",
  "deb64": "electron-installer-debian --src dist/electron-quick-start-linux-x64/ --dest dist/installers/ --arch amd64"
},
"repository": "https://github.com/electron/electron-quick-start",
"keywords": [
    "Electron",
    "quick",
    "start",
    "tutorial",
    "demo"
  ],
  "author": "GitHub",
  "license": "CC0-1.0",
  "devDependencies": {
  "electron": "^8.2.5",
  "electron-installer-debian": "^3.0.0",
  "electron-packager": "^14.2.1"
  }
}

我通过执行npm run build 成功编译我的应用程序以使用电子打包器构建我的应用程序,然后我执行npm run deb64 来编译我的代码。 它返回一个成功的句子。

然后我在dist/installers 文件夹中找到我的electron-quick-start_1.0.0_amd64.deb 并成功安装(没有任何错误)。

您预计会发生什么?

我希望通过在 ubuntu 搜索栏中搜索来运行我的应用程序。

究竟发生了什么?

该应用程序只是不运行。没有错误弹出。没有 ... :'( 即使我尝试从终端运行它

see the image

【问题讨论】:

  • 您能否尝试从终端按名称运行您的应用程序,可能会有一些错误输出
  • 它不返回任何东西...

标签: electron


【解决方案1】:

electron-installer-debian 创建 dab 文件,该文件默认将您的应用程序安装在 usr/lib 文件夹中。如果您导航到 usr/lib//resources/ 授予对应用程序文件夹的权限,您的应用程序应该可以运行,但出于安全原因,不建议这样做。

【讨论】:

    猜你喜欢
    • 2020-05-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    • 2015-06-01
    • 2019-12-28
    相关资源
    最近更新 更多