bundle wallet headers in app
This commit is contained in:
parent
4556681e6c
commit
e8c8b20b58
4 changed files with 32 additions and 9 deletions
|
@ -24,13 +24,14 @@ before_install:
|
|||
else
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get install -y libsecret-1-dev
|
||||
sudo apt-get install --no-install-recommends -y gcc-multilib g++-multilib
|
||||
sudo apt-get install --no-install-recommends -y gcc-multilib g++-multilib wget
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.6.0
|
||||
export PATH="$HOME/.yarn/bin:$PATH"
|
||||
fi
|
||||
before_script:
|
||||
- git lfs pull
|
||||
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then unset WIN_CSC_LINK; unset CSC_LINK; fi
|
||||
- wget https://headers.lbry.io/blockchain_headers_latest -O $TRAVIS_BUILD_DIR/static/daemon/headers
|
||||
script:
|
||||
- |
|
||||
if [ "$TARGET" == "windows" ]; then
|
||||
|
@ -74,4 +75,4 @@ env:
|
|||
#CSC_KEY_PASSWORD
|
||||
- secure: TDKeF7/WGwR+di+JhNp29x7NPzVMO/q+72n58zB5goI1NUKaeKgjeWbfVYx9f+4G9a9/pdDVUfORt8i6OW8ZhhqYS4E8G5F56q+oX3nrjNqM8NqoK09ehZS/wdYGbenG9oTfXYenDdwusZV4Fq0BRRLjqAIXPQCKg3//MKseh/1fHDGVGXpYUimHRSCkwspbbfB/9Qw9KEBjweeXiAwB+5F+E7fPlVtqsIvtkkED1hKe0Z8HdECC6JTZ0ZHPDDFGV3aondXQDgUlfchnZ6HDdNDO5y/hPEj0laiZQ7BssenJ8Z7qjHc5O9AKXfG+6WFICHvtgjQ0+x6rk6gpvJcyI1x2+Kck/s0EcSkFY+Yz81BxdehIeKPn9U8LpGaFbtxsp01661yeaIpAqT/PqFsdj/kFXFT6gwZlGGPMBm2WgQR4A61qkOO1jokqz/z6CnY+MNeE8E1Fh4bFoZ0JwUJFJugoyDahHpVlLw5lZaSipJO6RZ1xjoZ3XGmxvtkM4dQ16xQ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p0FYr6HY5KLFgpbGBMXloODsvsrGzcLWQyhszdRlaiHEDGmIklDjEVRW+Y5KVxdxpKu3t6R/enFpsBFF3mhrXx8yxSscjxbf4QsatMrD6ZMLU0J5xcEFroTU4JINHnz3kPEdFvs7jfCOZD6dDu5SKDBchvvfS1wllY65r8o3PySu/opCaZb7XS2j5IK9ZJSqjoW+d0519Awb/oyhmYW8GGl0XQZfCkdRrSoOR1Ww+/wZ8K8b+QHUSm99acex/ypCjJio7C7YrUfRGbCplhGHIFnhn4pJZFSQ8YVEovdSLDk3/NnriA5zJffMM+881rrXe5AjD9fya6Gm1Ha/g0HRcCtA+ocdBENkfy6wXugkE+IDyoO9NhnT+VfuqlToEt0JHD5eLgEp/YTIUD1N1CUMQD2Z/mOSdVDnMENPy+S9i8Sz4MK7wH0iTeyWJDLYbqRJBHkd66m77Tl7RnMIzL0so7JVm4AwA/VIQn2qxgPESJKktgRjI0vKZTo=
|
||||
|
|
|
@ -7,13 +7,18 @@
|
|||
"files": [
|
||||
{
|
||||
"from": "dist/electron/webpack",
|
||||
"to": "./",
|
||||
"filter": ["!dist/!electron/!webpack/*.js", "!dist/!electron/!webpack/!static/**/*"]
|
||||
"to": "./"
|
||||
},
|
||||
{
|
||||
"from": "dist/electron/static",
|
||||
"to": "./",
|
||||
"filter": ["!dist/!electron/!static/index-electron.html"]
|
||||
"to": "./"
|
||||
}
|
||||
],
|
||||
"extraResources": [
|
||||
{
|
||||
"from": "./static/daemon/",
|
||||
"to": "static/daemon/",
|
||||
"filter": ["**/*"]
|
||||
}
|
||||
],
|
||||
"publish": [
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { spawn, execSync } from 'child_process';
|
||||
import { Lbry } from 'lbry-redux';
|
||||
|
||||
export default class Daemon {
|
||||
static path =
|
||||
static lbrynetPath =
|
||||
process.env.LBRY_DAEMON ||
|
||||
(process.env.NODE_ENV === 'production'
|
||||
? path.join(process.resourcesPath, 'static/daemon', 'lbrynet')
|
||||
: path.join(__static, 'daemon/lbrynet'));
|
||||
|
||||
static headersPath =
|
||||
process.env.LBRY_DAEMON ||
|
||||
(process.env.NODE_ENV === 'production'
|
||||
? path.join(process.resourcesPath, 'static/daemon', 'headers')
|
||||
: path.join(__static, 'daemon/headers'));
|
||||
|
||||
subprocess;
|
||||
handlers;
|
||||
|
||||
|
@ -16,8 +24,13 @@ export default class Daemon {
|
|||
}
|
||||
|
||||
launch() {
|
||||
this.subprocess = spawn(Daemon.path, ['start']);
|
||||
let flags = ['start'];
|
||||
|
||||
if (fs.existsSync(Daemon.headersPath)) {
|
||||
flags.push(`--initial-headers=${Daemon.headersPath}`);
|
||||
}
|
||||
|
||||
this.subprocess = spawn(Daemon.lbrynetPath, flags);
|
||||
this.subprocess.stdout.on('data', data => console.log(`Daemon: ${data}`));
|
||||
this.subprocess.stderr.on('data', data => console.error(`Daemon: ${data}`));
|
||||
this.subprocess.on('exit', () => this.fire('exit'));
|
||||
|
|
|
@ -46,12 +46,16 @@ let mainConfig = {
|
|||
{
|
||||
from: `${STATIC_ROOT}/`,
|
||||
to: `${DIST_ROOT}/electron/static/`,
|
||||
ignore: ['index-web.html', 'index-electron.html'],
|
||||
ignore: ['index-web.html', 'index-electron.html', 'daemon/**/*'],
|
||||
},
|
||||
{
|
||||
from: `${STATIC_ROOT}/index-electron.html`,
|
||||
to: `${DIST_ROOT}/electron/static/index.html`,
|
||||
},
|
||||
{
|
||||
from: `${STATIC_ROOT}/daemon`,
|
||||
to: `${DIST_ROOT}/electron/daemon`,
|
||||
},
|
||||
]),
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue