* all binaries are now in the app folder

This commit is contained in:
Taegus
2018-12-22 10:58:59 +01:00
parent 0d98b8a03d
commit 3af97f81ba
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
const child_process = require('child_process');
const {app, dialog} = require('electron');
const appRoot = require('app-root-path');
const path = require('path');
const fs = require('fs');
@@ -16,7 +17,7 @@ class Geth {
startGeth() {
// get the path of get and execute the child process
try {
const gethPath = path.join(app.getPath('userData'), 'geth');
const gethPath = path.join(path.join(appRoot.path, 'bin'), 'geth');
this.gethProcess = child_process.spawn(gethPath, ['--ws', '--wsorigins', '*', '--wsaddr', '127.0.0.1', '--wsport', '8546', '--wsapi', 'admin,db,eth,net,miner,personal,web3']);
this.gethProcess.on('error', function(err) {
dialog.showErrorBox("Error starting application", "Geth failed to start!");
@@ -35,7 +36,7 @@ class Geth {
}
stopGeth() {
const gethWrapePath = path.join(app.getPath('userData'), 'WrapGeth.exe');
const gethWrapePath = path.join(path.join(appRoot.path, 'bin'), 'WrapGeth.exe');
child_process.spawnSync(gethWrapePath, [this.gethProcess.pid]);
}
}

View File

@@ -26,10 +26,10 @@
"license": "CC0-1.0",
"dependencies": {
"adm-zip": "^0.4.13",
"app-root-path": "^2.1.0",
"electron-storage": "^1.0.7",
"handlebars": "^4.0.12",
"nedb": "^1.8.0",
"typescript": "^3.2.2"
},
"devDependencies": {
"electron": "^3.0.12",