How to run packaged electron app on linux?

[亡魂溺海] 提交于 2020-05-30 06:46:25

问题


I haven't used Linux much but I'm trying to run an application which I've packaged using electron-packager.

So while on Linux, I can run npm start and my app works fine. But when I package it, there doesn't seem to be an installer or anything. Packaging and running on Windows work fine.

I packaged using:

npm run package-linux

Edit as requested:

I'm using Linux mint-19.1-cinnamon-64bit.

The package script I used is;

"package-linux": "electron-packager . electron-tutorial-app --overwrite --asar=true --platform=linux --arch=x64 --icon=assets/icons/png/icon.png --prune=true --out=release-builds"

Running the npm run package-linux completes successfully and produces a folder called electron-tutorial-app-linux-x64 in a release-builds folder.


回答1:


Apparently, recent versions of Electron output the packaged app in a "shared library" format on Linux, which the file managers don't recognize as an executable. I found this answer sufficiently explained why this issue occurs and different ways to work around it: https://stackoverflow.com/a/55064060/4774167




回答2:


Okay I found the answer here:

https://www.christianengvall.se/electron-installer-debian-package/



来源:https://stackoverflow.com/questions/54249925/how-to-run-packaged-electron-app-on-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!