Electron .AppImage 分发app无法打开,从网站下载时
Electron .AppImage distribution app cannot be opened, when downloaded from the web site
我有一个 Electron app
,我必须发布它,但 Linux
分发版本有问题。对于 Linux,我决定构建一个 .AppImage
分发文件,问题是构建的 AppImage 在构建应用程序的主机上以及其他机器上成功启动。但是,当我尝试在必须从中下载应用程序的网站上传应用程序并启动下载的应用程序时,会出现这样的屏幕。
这是我的 package.json
文件的内容:
{
"name": "electron-app",
"productName": "electronApp",
"main": "public/electron.js",
"version": "0.1.0",
"private": true,
"homepage": "./",
"author": {
"name": "John Doe",
"email": "test@test.com"
},
"build": {
"appId": "app.com.electron",
"productName": "electronApp",
"linux": {
"target": [
{
"target": "AppImage",
"arch": [
"x64",
"ia32",
"armv7l",
"arm64”"
],
}
]
},
"files": [
"build/**/*",
"node_modules/**/*"
],
"directories": {
"buildResources": "assets"
}
},
"eslintConfig": {
"extends": "react-app"
},
"dependencies": {
"apexcharts": "^3.10.1",
"apisauce": "^1.0.3",
"cross-env": "^6.0.3",
"electron-is-dev": "^1.1.0",
"electron-root-path": "^1.0.16",
"moment": "^2.24.0",
"node-sass": "^4.12.0",
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-code-input": "^3.8.1",
"react-dom": "^16.8.6",
"react-loading-overlay": "^1.0.1",
"react-notification-system": "^0.3.0",
"react-redux": "^7.1.0",
"react-router-dom": "^5.1.2",
"react-scripts": "3.0.1",
"react-tradingview-widget": "^1.3.2",
"react-web-tabs": "^1.0.1",
"redux": "^4.0.1",
"redux-persist": "^5.10.0",
"reduxsauce": "^1.1.0",
"seamless-immutable": "^7.1.4"
},
"scripts": {
"lint": "eslint",
"build": "yarn react-build && yarn electron-build",
"react-start": "react-scripts start",
"react-build": "react-scripts build",
"react-test": "react-scripts test --env=jsdom",
"react-eject": "react-scripts eject",
"electron-postinstall": "electron-builder install-app-deps",
"electron-start": "concurrently \"cross-env BROWSER=none yarn react-start\" \"wait-on http://localhost:3000 && electron .\"",
"electron-build": "electron-builder"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/jest": "^24.0.15",
"@types/react": "^16.8.22",
"@types/react-redux": "^7.1.1",
"babel-eslint": "10.0.1",
"concurrently": "^5.0.0",
"electron": "^7.1.1",
"electron-builder": "^21.2.0",
"eslint": "5.16.0",
"eslint-plugin-react": "^7.14.2",
"wait-on": "^3.3.0"
}
}
我不知道,也许我需要一些额外的依赖项,比如 .deb
版本,但我真的不知道问题出在哪里...
这是桌面 Environment/File 管理器问题。他们正确识别了文件类型,但没有执行(他们应该执行)。
导致此问题的可能原因是 AppImage 文件没有执行权限(下载文件时不保留执行权限)。直接的解决方案是要求您的用户使其可执行。您可以通过检查文件管理器的文件属性选项卡中的 "allow execution" 权限或使用命令行指令来实现此目的:
chmod +x ./MyApp.AppImage
.
这里也有说明https://docs.appimage.org/introduction/quickstart.html#ref-how-to-run-appimage
.AppImage 需要在 ext3/ext4 分区上。如果你的分区是 NTFS
我有一个 Electron app
,我必须发布它,但 Linux
分发版本有问题。对于 Linux,我决定构建一个 .AppImage
分发文件,问题是构建的 AppImage 在构建应用程序的主机上以及其他机器上成功启动。但是,当我尝试在必须从中下载应用程序的网站上传应用程序并启动下载的应用程序时,会出现这样的屏幕。
这是我的 package.json
文件的内容:
{
"name": "electron-app",
"productName": "electronApp",
"main": "public/electron.js",
"version": "0.1.0",
"private": true,
"homepage": "./",
"author": {
"name": "John Doe",
"email": "test@test.com"
},
"build": {
"appId": "app.com.electron",
"productName": "electronApp",
"linux": {
"target": [
{
"target": "AppImage",
"arch": [
"x64",
"ia32",
"armv7l",
"arm64”"
],
}
]
},
"files": [
"build/**/*",
"node_modules/**/*"
],
"directories": {
"buildResources": "assets"
}
},
"eslintConfig": {
"extends": "react-app"
},
"dependencies": {
"apexcharts": "^3.10.1",
"apisauce": "^1.0.3",
"cross-env": "^6.0.3",
"electron-is-dev": "^1.1.0",
"electron-root-path": "^1.0.16",
"moment": "^2.24.0",
"node-sass": "^4.12.0",
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-code-input": "^3.8.1",
"react-dom": "^16.8.6",
"react-loading-overlay": "^1.0.1",
"react-notification-system": "^0.3.0",
"react-redux": "^7.1.0",
"react-router-dom": "^5.1.2",
"react-scripts": "3.0.1",
"react-tradingview-widget": "^1.3.2",
"react-web-tabs": "^1.0.1",
"redux": "^4.0.1",
"redux-persist": "^5.10.0",
"reduxsauce": "^1.1.0",
"seamless-immutable": "^7.1.4"
},
"scripts": {
"lint": "eslint",
"build": "yarn react-build && yarn electron-build",
"react-start": "react-scripts start",
"react-build": "react-scripts build",
"react-test": "react-scripts test --env=jsdom",
"react-eject": "react-scripts eject",
"electron-postinstall": "electron-builder install-app-deps",
"electron-start": "concurrently \"cross-env BROWSER=none yarn react-start\" \"wait-on http://localhost:3000 && electron .\"",
"electron-build": "electron-builder"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/jest": "^24.0.15",
"@types/react": "^16.8.22",
"@types/react-redux": "^7.1.1",
"babel-eslint": "10.0.1",
"concurrently": "^5.0.0",
"electron": "^7.1.1",
"electron-builder": "^21.2.0",
"eslint": "5.16.0",
"eslint-plugin-react": "^7.14.2",
"wait-on": "^3.3.0"
}
}
我不知道,也许我需要一些额外的依赖项,比如 .deb
版本,但我真的不知道问题出在哪里...
这是桌面 Environment/File 管理器问题。他们正确识别了文件类型,但没有执行(他们应该执行)。
导致此问题的可能原因是 AppImage 文件没有执行权限(下载文件时不保留执行权限)。直接的解决方案是要求您的用户使其可执行。您可以通过检查文件管理器的文件属性选项卡中的 "allow execution" 权限或使用命令行指令来实现此目的:
chmod +x ./MyApp.AppImage
.
这里也有说明https://docs.appimage.org/introduction/quickstart.html#ref-how-to-run-appimage
.AppImage 需要在 ext3/ext4 分区上。如果你的分区是 NTFS