我没有使用过太多Linux,但是我正在尝试运行一个使用电子打包程序打包的应用程序。
I haven't used Linux much but I'm trying to run an application which I've packaged using electron-packager.
因此在Linux上,我可以运行 npm start ,我的应用程序可以正常运行。但是,当我打包时,似乎没有安装程序或任何东西。打包并在Windows上运行正常。
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.
我使用以下方式打包:
npm run package-linux按要求编辑:
我正在使用Linux mint-19.1-cinnamon-64bit。
I'm using Linux mint-19.1-cinnamon-64bit.
我使用的打包脚本是
"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"运行 npm run package-linux 成功完成,并生成一个名为 electron-tutorial-app-linux-x64
Running the npm run package-linux completes successfully and produces a folder called electron-tutorial-app-linux-x64 in a release-builds folder.
推荐答案显然,Electron的最新版本以共享库格式输出打包的应用程序在Linux上,文件管理器无法将其识别为可执行文件。我发现此答案充分说明了为什么会发生此问题以及解决该问题的不同方法: stackoverflow/a/55064060/ 4774167
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: stackoverflow/a/55064060/4774167
更多推荐
如何在Linux上运行打包的电子应用程序?
发布评论