Build on Appveyor #1
6
.gitignore
vendored
|
@ -2,4 +2,8 @@ app/dist
|
||||||
app/node_modules
|
app/node_modules
|
||||||
node_modules
|
node_modules
|
||||||
LBRY-darwin-x64
|
LBRY-darwin-x64
|
||||||
dist
|
dist
|
||||||
|
lbrynet/build
|
||||||
|
lbrynet/venv
|
||||||
|
.#*
|
||||||
|
build_venv
|
27
app/main.js
|
@ -1,6 +1,12 @@
|
||||||
const {app, BrowserWindow} = require('electron')
|
const {app, BrowserWindow} = require('electron');
|
||||||
|
var path = require('path');
|
||||||
|
|
||||||
var jayson = require('jayson');
|
var jayson = require('jayson');
|
||||||
var client = jayson.client.http('http://localhost:5279/lbryapi');
|
// tree-kill has better cross-platform handling of
|
||||||
|
// killing a process. child-process.kill was unreliable
|
||||||
|
var kill = require('tree-kill');
|
||||||
|
|
||||||
|
let client = jayson.client.http('http://localhost:5279/lbryapi');
|
||||||
|
|
||||||
|
|
||||||
// Keep a global reference of the window object, if you don't, the window will
|
// Keep a global reference of the window object, if you don't, the window will
|
||||||
|
@ -35,8 +41,14 @@ function lauchDaemon() {
|
||||||
if (subpy) {
|
if (subpy) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(`${__dirname}/dist/lbry`);
|
console.log(`${__dirname}`);
|
||||||
subpy = require('child_process').spawn(`${__dirname}/dist/lbry`, ['--verbose'], {stdio: ['ignore', process.stdout, process.stderr]})
|
executable = path.join(__dirname, 'dist', 'lbrynet-daemon');
|
||||||
|
subpy = require('child_process').spawn(executable, ['--verbose'])//, {stdio: ['ignore', process.stdout, process.stderr]});
|
||||||
|
// Need to handle the data event instead of attaching to
|
||||||
|
// process.stdout because the latter doesn't work. I believe on
|
||||||
|
// windows it buffers stdout and we don't get any meaningful output
|
||||||
|
subpy.stdout.on('data', (buf) => {console.log(String(buf).trim());});
|
||||||
|
subpy.stderr.on('data', (buf) => {console.log(String(buf).trim());});
|
||||||
subpy.on('exit', () => {
|
subpy.on('exit', () => {
|
||||||
console.log('The daemon has exited. Quitting the app');
|
console.log('The daemon has exited. Quitting the app');
|
||||||
subpy = null;
|
subpy = null;
|
||||||
|
@ -88,8 +100,11 @@ app.on('before-quit', (event) => {
|
||||||
if (win) {
|
if (win) {
|
||||||
win.loadURL(`file://${__dirname}/dist/quit.html`);
|
win.loadURL(`file://${__dirname}/dist/quit.html`);
|
||||||
}
|
}
|
||||||
quitting = true;
|
quitting = true;
|
||||||
subpy.kill('SIGINT');
|
console.log('Killing lbrynet-daemon process');
|
||||||
|
kill(subpy.pid, undefined, (err) => {
|
||||||
|
console.log('Killed lbrynet-daemon process');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
"name": "Job Evers-Meltzer"
|
"name": "Job Evers-Meltzer"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jayson": "^2.0.2"
|
"install": "^0.8.7",
|
||||||
|
"jayson": "^2.0.2",
|
||||||
|
"npm": "^4.2.0",
|
||||||
|
"tree-kill": "^1.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
44
appveyor.yml
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
# Test against the latest version of this Node.js version
|
||||||
|
environment:
|
||||||
|
nodejs_version: "6"
|
||||||
|
|
||||||
|
skip_branch_with_pr: true
|
||||||
|
|
||||||
|
clone_folder: C:\projects\lbry-electron
|
||||||
|
|
||||||
|
# Install scripts. (runs after repo cloning)
|
||||||
|
install:
|
||||||
|
# needed to deal with submodules
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
- python set-version.py
|
||||||
|
# Get the latest stable version of Node.js or io.js
|
||||||
|
- ps: Install-Product node $env:nodejs_version
|
||||||
|
# install modules
|
||||||
|
- npm install
|
||||||
|
- cd app
|
||||||
|
- npm install
|
||||||
|
- cd ..
|
||||||
|
# create lbrynet-daemon executable
|
||||||
|
- cd lbrynet
|
||||||
|
- ps: .\build.ps1
|
||||||
|
- cd ..
|
||||||
|
# build ui
|
||||||
|
- cd lbry-web-ui
|
||||||
|
- npm install
|
||||||
|
- node_modules\.bin\node-sass --output dist\css --sourcemap=none scss\
|
||||||
|
- node_modules\.bin\webpack
|
||||||
|
- ps: Copy-Item dist ..\app\ -recurse
|
||||||
|
- cd ..
|
||||||
|
- ps: Copy-Item lbrynet\dist\lbrynet-daemon.exe app\dist
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
# build electron app
|
||||||
|
- node_modules\.bin\build -p never
|
||||||
|
# for debugging, see what was built
|
||||||
|
- dir dist
|
||||||
|
|
||||||
|
test: off
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
- path: dist\*.zip
|
||||||
|
name: LBRY
|
14
build.sh
|
@ -10,8 +10,14 @@ else
|
||||||
ICON="$ROOT/build/icons/lbry48.png"
|
ICON="$ROOT/build/icons/lbry48.png"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
FULL_BUILD="${FULL_BUILD:-false}"
|
||||||
if [ -n "${TEAMCITY_VERSION:-}" ]; then
|
if [ -n "${TEAMCITY_VERSION:-}" ]; then
|
||||||
|
FULL_BUILD="true"
|
||||||
|
elif [ -n "${APPVEYOR:-}" ]; then
|
||||||
|
FULL_BUILD="true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$FULL_BUILD" == "true" ]; then
|
||||||
# install dependencies
|
# install dependencies
|
||||||
$ROOT/prebuild.sh
|
$ROOT/prebuild.sh
|
||||||
|
|
||||||
|
@ -56,10 +62,10 @@ popd
|
||||||
cp -r dist "$ROOT/app/dist"
|
cp -r dist "$ROOT/app/dist"
|
||||||
)
|
)
|
||||||
|
|
||||||
mv "$ROOT/lbrynet/dist/lbry" "$ROOT/app/dist"
|
mv "$ROOT/lbrynet/dist/lbrynet-daemon" "$ROOT/app/dist"
|
||||||
|
|
||||||
|
|
||||||
if [ -n "${TEAMCITY_VERSION:-}" ]; then
|
if [ "$FULL_BUILD" == "true" ]; then
|
||||||
if [ "$(uname)" == "Darwin" ]; then
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
security unlock-keychain -p ${KEYCHAIN_PASSWORD} osx-build.keychain
|
security unlock-keychain -p ${KEYCHAIN_PASSWORD} osx-build.keychain
|
||||||
fi
|
fi
|
||||||
|
@ -71,7 +77,7 @@ else
|
||||||
echo 'Build complete. Run `./node_modules/.bin/electron app` to launch the app'
|
echo 'Build complete. Run `./node_modules/.bin/electron app` to launch the app'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${TEAMCITY_VERSION:-}" ]; then
|
if [ "$FULL_BUILD" == "true" ]; then
|
||||||
# electron-build has a publish feature, but I had a hard time getting
|
# electron-build has a publish feature, but I had a hard time getting
|
||||||
# it to reliably work and it also seemed difficult to configure. Not proud of
|
# it to reliably work and it also seemed difficult to configure. Not proud of
|
||||||
# this, but it seemed better to write my own.
|
# this, but it seemed better to write my own.
|
||||||
|
|
BIN
build/icon.ico
Normal file
After Width: | Height: | Size: 361 KiB |
BIN
build/icons/lbry128.ico
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
build/icons/lbry16.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
build/icons/lbry256.ico
Normal file
After Width: | Height: | Size: 361 KiB |
BIN
build/icons/lbry32.ico
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
build/icons/lbry48.ico
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
build/icons/lbry96.ico
Normal file
After Width: | Height: | Size: 31 KiB |
2
lbry
|
@ -1 +1 @@
|
||||||
Subproject commit 07233a885225c76f826f2b6f44e852fc3cbfa9db
|
Subproject commit bd2520ad6c1c4288a0977646a9a995ac6322a900
|
|
@ -1 +1 @@
|
||||||
Subproject commit 06f226d57b839c2cbca8dacac4a418dd7bcfe192
|
Subproject commit 4068fb5fd8bfec035daff83b518e3a5d99344dda
|
24
lbrynet/build.ps1
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
$env:Path += ";C:\MinGW\bin\"
|
||||||
|
|
||||||
|
$env:Path += ";C:\Program Files (x86)\Windows Kits\10\bin\x86\"
|
||||||
|
gcc --version
|
||||||
|
mingw32-make --version
|
||||||
|
|
||||||
|
mkdir temp
|
||||||
|
Invoke-WebRequest "https://pypi.python.org/packages/55/90/e987e28ed29b571f315afea7d317b6bf4a551e37386b344190cffec60e72/miniupnpc-1.9.tar.gz" -OutFile "temp\miniupnpc-1.9.tar.gz"
|
||||||
|
cd temp
|
||||||
|
tar zxf miniupnpc-1.9.tar.gz
|
||||||
|
cd miniupnpc-1.9
|
||||||
|
mingw32-make.exe -f Makefile.mingw
|
||||||
|
python.exe setupmingw32.py build --compiler=mingw32
|
||||||
|
python.exe setupmingw32.py install
|
||||||
|
|
||||||
|
cd ..\..\
|
||||||
|
Remove-Item -Recurse -Force temp
|
||||||
|
|
||||||
|
pip.exe install -r windows-requirements.txt
|
||||||
|
pip.exe install ..\lbryum
|
||||||
|
pip.exe install ..\lbry
|
||||||
|
pip.exe install pyinstaller
|
||||||
|
|
||||||
|
pyinstaller -y lbry.onefile.spec
|
|
@ -4,34 +4,48 @@ import os
|
||||||
|
|
||||||
import lbryum
|
import lbryum
|
||||||
|
|
||||||
|
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
if os.path.basename(cwd) != 'lbrynet':
|
if os.path.basename(cwd) != 'lbrynet':
|
||||||
raise Exception('The build needs to be run from the same directory as the spec file')
|
raise Exception('The build needs to be run from the same directory as the spec file')
|
||||||
repo_base = os.path.abspath(os.path.join(cwd, '..'))
|
repo_base = os.path.abspath(os.path.join(cwd, '..'))
|
||||||
|
|
||||||
|
|||||||
|
|
||||||
system = platform.system()
|
system = platform.system()
|
||||||
if system == 'Darwin':
|
if system == 'Darwin':
|
||||||
icns = os.path.join(repo_base, 'build', 'icon.icns')
|
icns = os.path.join(repo_base, 'build', 'icon.icns')
|
||||||
|
elif system == 'Linux':
|
||||||
|
icns = os.path.join(repo_base, 'build', 'icons', '256x256.png')
|
||||||
|
elif system == 'Windows':
|
||||||
|
icns = os.path.join(repo_base, 'build', 'icons', 'lbry256.ico')
|
||||||
else:
|
else:
|
||||||
icns = os.path.join(repo_base, 'package', 'icons', '256x256.png')
|
print 'Warning: System {} has no icons'.format(system)
|
||||||
|
icns = None
|
||||||
|
|
||||||
|
|
||||||
block_cipher = None
|
block_cipher = None
|
||||||
|
|
||||||
|
|
||||||
languages = (
|
languages = (
|
||||||
'chinese_simplified.txt', 'japanese.txt', 'spanish.txt',
|
'chinese_simplified.txt', 'japanese.txt', 'spanish.txt',
|
||||||
'english.txt', 'portuguese.txt'
|
'english.txt', 'portuguese.txt'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
datas = [
|
||||||
|
(
|
||||||
|
os.path.join(os.path.dirname(lbryum.__file__), 'wordlist', language),
|
||||||
|
'lbryum/wordlist'
|
||||||
|
)
|
||||||
|
for language in languages
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
['lbry.py'],
|
['lbry.py'],
|
||||||
pathex=[cwd],
|
pathex=[cwd],
|
||||||
binaries=None,
|
binaries=None,
|
||||||
datas=[
|
datas=datas,
|
||||||
(
|
|
||||||
os.path.join(os.path.dirname(lbryum.__file__), 'wordlist', language),
|
|
||||||
'lbryum/wordlist'
|
|
||||||
)
|
|
||||||
for language in languages
|
|
||||||
],
|
|
||||||
hiddenimports=[],
|
hiddenimports=[],
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
runtime_hooks=[],
|
runtime_hooks=[],
|
||||||
|
@ -41,28 +55,23 @@ a = Analysis(
|
||||||
cipher=block_cipher
|
cipher=block_cipher
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
pyz = PYZ(
|
pyz = PYZ(
|
||||||
a.pure, a.zipped_data,
|
a.pure, a.zipped_data,
|
||||||
cipher=block_cipher
|
cipher=block_cipher
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
exe = EXE(
|
exe = EXE(
|
||||||
pyz,
|
pyz,
|
||||||
a.scripts,
|
a.scripts,
|
||||||
a.binaries,
|
a.binaries,
|
||||||
a.zipfiles,
|
a.zipfiles,
|
||||||
a.datas,
|
a.datas,
|
||||||
name='lbry',
|
name='lbrynet-daemon',
|
||||||
debug=False,
|
debug=False,
|
||||||
strip=False,
|
strip=False,
|
||||||
upx=True,
|
upx=True,
|
||||||
console=False,
|
console=True,
|
||||||
icon=icns
|
icon=icns
|
||||||
)
|
)
|
||||||
|
|
||||||
app = BUNDLE(
|
|
||||||
exe,
|
|
||||||
name='lbry.app',
|
|
||||||
icon=icns,
|
|
||||||
bundle_identifier=None
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
these lines should go these lines should go
these lines should go these lines should go
|
|||||||
from lbrynet.lbrynet_daemon import DaemonControl
|
from lbrynet.lbrynet_daemon import DaemonControl
|
||||||
|
|
||||||
|
|
||||||
these lines should go these lines should go
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
DaemonControl.start()
|
DaemonControl.start()
|
||||||
|
|
||||||
these lines should go these lines should go
these lines should go these lines should go
|
|
@ -1,61 +0,0 @@
|
||||||
this whole file can go this whole file can go
this whole file can go this whole file can go
|
|||||||
# -*- mode: python -*-
|
|
||||||
this whole file can go this whole file can go
|
|||||||
import lbryum
|
|
||||||
this whole file can go this whole file can go
|
|||||||
|
|
||||||
this whole file can go this whole file can go
|
|||||||
block_cipher = None
|
|
||||||
this whole file can go this whole file can go
|
|||||||
languages = (
|
|
||||||
this whole file can go this whole file can go
|
|||||||
'chinese_simplified.txt', 'japanese.txt', 'spanish.txt',
|
|
||||||
this whole file can go this whole file can go
|
|||||||
'english.txt', 'portuguese.txt'
|
|
||||||
this whole file can go this whole file can go
|
|||||||
)
|
|
||||||
this whole file can go this whole file can go
|
|||||||
|
|
||||||
this whole file can go this whole file can go
|
|||||||
|
|
||||||
this whole file can go this whole file can go
|
|||||||
a = Analysis(
|
|
||||||
this whole file can go this whole file can go
|
|||||||
['lbry.py'],
|
|
||||||
this whole file can go this whole file can go
|
|||||||
pathex=['/Users/jobevers/projects/lbryio/lbry-electron/lbrynet'],
|
|
||||||
this whole file can go this whole file can go
|
|||||||
binaries=None,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
# Not sure why these files are not already include as they are
|
|
||||||
this whole file can go this whole file can go
|
|||||||
# listed in package_data and the MANIFEST.in, but they don't seem
|
|
||||||
this whole file can go this whole file can go
|
|||||||
# to make it in unless we explicitly add them here
|
|
||||||
this whole file can go this whole file can go
|
|||||||
datas=[
|
|
||||||
this whole file can go this whole file can go
|
|||||||
(
|
|
||||||
this whole file can go this whole file can go
|
|||||||
os.path.join(os.path.dirname(lbryum.__file__), 'wordlist', language),
|
|
||||||
this whole file can go this whole file can go
|
|||||||
'lbryum/wordlist'
|
|
||||||
this whole file can go this whole file can go
|
|||||||
)
|
|
||||||
this whole file can go this whole file can go
|
|||||||
for language in languages
|
|
||||||
this whole file can go this whole file can go
|
|||||||
],
|
|
||||||
this whole file can go this whole file can go
|
|||||||
hiddenimports=[],
|
|
||||||
this whole file can go this whole file can go
|
|||||||
hookspath=[],
|
|
||||||
this whole file can go this whole file can go
|
|||||||
runtime_hooks=[],
|
|
||||||
this whole file can go this whole file can go
|
|||||||
excludes=['win32com'],
|
|
||||||
this whole file can go this whole file can go
|
|||||||
win_no_prefer_redirects=False,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
win_private_assemblies=False,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
cipher=block_cipher
|
|
||||||
this whole file can go this whole file can go
|
|||||||
)
|
|
||||||
this whole file can go this whole file can go
|
|||||||
pyz = PYZ(
|
|
||||||
this whole file can go this whole file can go
|
|||||||
a.pure, a.zipped_data,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
cipher=block_cipher
|
|
||||||
this whole file can go this whole file can go
|
|||||||
)
|
|
||||||
this whole file can go this whole file can go
|
|||||||
exe = EXE(
|
|
||||||
this whole file can go this whole file can go
|
|||||||
pyz,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
a.scripts,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
exclude_binaries=True,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
name='lbry',
|
|
||||||
this whole file can go this whole file can go
|
|||||||
debug=False,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
strip=False,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
upx=True,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
console=True,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
)
|
|
||||||
this whole file can go this whole file can go
|
|||||||
coll = COLLECT(
|
|
||||||
this whole file can go this whole file can go
|
|||||||
exe,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
a.binaries,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
a.zipfiles,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
a.datas,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
strip=False,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
upx=True,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
name='lbry'
|
|
||||||
this whole file can go this whole file can go
|
|||||||
)
|
|
||||||
this whole file can go this whole file can go
|
|||||||
app = BUNDLE(
|
|
||||||
this whole file can go this whole file can go
|
|||||||
coll,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
name='lbry.app',
|
|
||||||
this whole file can go this whole file can go
|
|||||||
icon=None,
|
|
||||||
this whole file can go this whole file can go
|
|||||||
bundle_identifier=None
|
|
||||||
this whole file can go this whole file can go
|
|||||||
)
|
|
||||||
this whole file can go this whole file can go
|
30
lbrynet/windows-requirements.txt
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
pypiwin32==219
|
||||||
|
six==1.10.0
|
||||||
|
requests[security]==2.13.0
|
||||||
|
zope.interface==4.3.3
|
||||||
|
Twisted==16.6.0
|
||||||
|
appdirs==1.4.0
|
||||||
|
argparse==1.2.1
|
||||||
|
colorama==0.3.7
|
||||||
|
dnspython==1.12.0
|
||||||
|
ecdsa==0.13
|
||||||
|
envparse==0.2.0
|
||||||
|
jsonrpc==1.2
|
||||||
|
jsonrpclib==0.1.7
|
||||||
|
loggly-python-handler==1.0.0
|
||||||
|
pbkdf2==1.3
|
||||||
|
protobuf==3.0.0
|
||||||
|
pycrypto==2.6.1
|
||||||
|
python-bitcoinrpc==0.1
|
||||||
|
pyyaml==3.12
|
||||||
|
qrcode==5.2.2
|
||||||
|
requests_futures==0.9.7
|
||||||
|
seccure==0.3.1.3
|
||||||
|
simplejson==3.8.2
|
||||||
|
slowaes==0.1a1
|
||||||
|
txJSON-RPC==0.5
|
||||||
|
wsgiref==0.1.2
|
||||||
|
base58==0.2.2
|
||||||
|
googlefinance==0.7
|
||||||
|
jsonschema==2.5.1
|
||||||
|
https://github.com/lbryio/lbry/raw/master/packaging/windows/libs/gmpy-1.17-cp27-none-win32.whl
|
2
lbryum
|
@ -1 +1 @@
|
||||||
Subproject commit bd370d353069ef02566c9082fe876e4924861e68
|
Subproject commit 49253b6614a9186b4f2ee53bddd60db7d3ab5f9b
|
|
@ -34,6 +34,9 @@
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"target": "deb"
|
"target": "deb"
|
||||||
|
},
|
||||||
|
"win": {
|
||||||
|
"target": "zip"
|
||||||
nsis was giving an error for me, unfortunately - should dig into that soonish, but zip works so lets get it out. nsis was giving an error for me, unfortunately - should dig into that soonish, but zip works so lets get it out.
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
can remote this too