Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.

Commit

Permalink
Linux packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
xmonader committed Jun 9, 2019
1 parent fb66988 commit 10980d7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@ To package apps with options:
$ yarn package --[option]
```

## Linux packaging

```bash
$ yarn package-linux
```
Will generate [AppImage](https://appimage.org), snap, deb, rpm packages. We recommend using `AppImage`

### Running AppImage
Just Download the application, make it executable, and run! No need to install. No system libraries or system preferences are altered.
- Make sure to have libfuse installed
- `chmod +x file.AppImage`
- `./file.AppImage`


To run End-to-End Test

```bash
Expand Down
8 changes: 7 additions & 1 deletion app/main.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,21 @@ app.on('ready', async () => {
) {
await installExtensions()
}
let path = require("path")
let resourcesDir = path.join(path.resolve(__dirname, ".."), "resources")
let icoPath = path.join(resourcesDir, "icon.png")

mainWindow = new BrowserWindow({
show: false,
width: 1250,
height: 800,
titleBarStyle: 'hidden',
resizable: false
resizable: false,
})

if (process.platform == "linux") {
mainWindow.setIcon(icoPath)
}
mainWindow.loadURL(`file://${__dirname}/app.html`)

// @TODO: Use 'ready-to-show' event
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
"app/app.html",
"app/main.prod.js",
"app/main.prod.js.map",
"package.json"
"app/icon.png",
"package.json",
"resources/**/*"
],
"dmg": {
"contents": [
Expand All @@ -92,10 +94,10 @@
},
"linux": {
"target": [
"deb",
"rpm",
"snap",
"AppImage"
"AppImage",
"rpm",
"deb"
],
"category": "Development"
},
Expand Down

0 comments on commit 10980d7

Please sign in to comment.