From 9c4098bb155e034f79dd59917b00533e90173213 Mon Sep 17 00:00:00 2001 From: Gal Buki Date: Sat, 25 May 2019 11:33:59 +0300 Subject: [PATCH 1/4] initial changes to enable electrun-builder to create a snap --- package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2b41b63..af50402 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "", "main": "index.js", "scripts": { - "start": "electron ." + "start": "electron .", + "dist": "build --linux snap" }, "author": "", "license": "ISC", @@ -17,5 +18,8 @@ "route-parser": "0.0.5", "timeago.js": "^4.0.0-beta.2" }, - "devDependencies": {} + "devDependencies": { + "electron": "^2.0.0", + "electron-builder": "^20.27.1" + } } From af810a29b01ce870f2c0dc231596de768cd1384a Mon Sep 17 00:00:00 2001 From: Gal Buki Date: Sat, 25 May 2019 12:30:13 +0300 Subject: [PATCH 2/4] update build settings and add appImage support --- package.json | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index af50402..2271fb1 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "Bottle", - "version": "1.0.0", + "version": "0.0.4", "description": "", "main": "index.js", "scripts": { "start": "electron .", - "dist": "build --linux snap" + "dist": "build" }, "author": "", "license": "ISC", @@ -21,5 +21,20 @@ "devDependencies": { "electron": "^2.0.0", "electron-builder": "^20.27.1" + }, + "build": { + "appId": "network.bitdb.bottle.torusJKL", + "linux": { + "target": ["snap","appImage"], + "description": "Bottle is a browser that lets you surf the Bitcoin network for these things, and brings them all together through Bitcoin native URI schemes such as B:// or C:// (or any other protocols we add in the future)." + } + }, + "snap": { + "grade": "stable", + "confinement": "strict", + "summary": "A Bitcoin Browser" + }, + "appImage": { + "systemIntegration": "ask" } } From 2ed187a75ccbfd5e48bdadfe7452429d6751f4a5 Mon Sep 17 00:00:00 2001 From: Gal Buki Date: Sat, 25 May 2019 13:06:49 +0300 Subject: [PATCH 3/4] small enhancements for the build and updated README file --- .gitignore | 1 + README.md | 37 +++++++++++++++++++++++++++++++++++++ package.json | 7 ++++--- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a63f278..a5c2a51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules releases +dist diff --git a/README.md b/README.md index 70395b2..900bdc6 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,40 @@ npm install ``` npm start ``` + +# How to Build Snap and AppImage on Linux + +## 1. Download Electron-Builder + +To build the packages we need to install electon-builder. + +``` +yarn add electron-builder --dev +``` + +## 2. Build + +Download the repository and build. First, clone it. + +``` +git clone https://github.com/interplanaria/bottle.git +``` + +Then build the packages + +``` +cd bottle +npm run dist +``` + +## 3. Run + +To execute the appImage. +``` +./dist/Bottle_0.0.4.AppImage +``` + +To install the Snap. +``` +sudo snap install ./dist/Bottle_0.0.4_amd64.snap --dangerous +``` \ No newline at end of file diff --git a/package.json b/package.json index 2271fb1..ecca718 100644 --- a/package.json +++ b/package.json @@ -26,13 +26,14 @@ "appId": "network.bitdb.bottle.torusJKL", "linux": { "target": ["snap","appImage"], - "description": "Bottle is a browser that lets you surf the Bitcoin network for these things, and brings them all together through Bitcoin native URI schemes such as B:// or C:// (or any other protocols we add in the future)." + "description": "Bottle is a browser that lets you surf the Bitcoin network for these things, and brings them all together through Bitcoin native URI schemes such as B:// or C:// (or any other protocols we add in the future).", + "category": "Network", + "artifactName": "${productName}_${version}.${ext}" } }, "snap": { "grade": "stable", - "confinement": "strict", - "summary": "A Bitcoin Browser" + "confinement": "strict" }, "appImage": { "systemIntegration": "ask" From 12ae37d4411e0f3b3c92173bb609f07a7d1c5f37 Mon Sep 17 00:00:00 2001 From: Gal Buki Date: Sat, 25 May 2019 13:30:01 +0300 Subject: [PATCH 4/4] fixed Snap file name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 900bdc6..84516cc 100644 --- a/README.md +++ b/README.md @@ -95,5 +95,5 @@ To execute the appImage. To install the Snap. ``` -sudo snap install ./dist/Bottle_0.0.4_amd64.snap --dangerous +sudo snap install ./dist/Bottle_0.0.4.snap --dangerous ``` \ No newline at end of file