updated icon and deps
This commit is contained in:
parent
c5400863d8
commit
16c23b5eb4
47
README.rst
47
README.rst
|
@ -56,34 +56,21 @@ For Mac:
|
|||
|
||||
Using Homebrew::
|
||||
|
||||
# Install Homebrew
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
# Setup Homebrew
|
||||
sh ./setup-mac.sh
|
||||
|
||||
# (Optionally)
|
||||
sudo chown -R "$USER":admin /usr/local
|
||||
sudo chown -R "$USER":admin /Library/Caches/Homebrew
|
||||
|
||||
# Install python3
|
||||
brew install python3
|
||||
brew link python3
|
||||
brew postinstall python3
|
||||
|
||||
# Python setuptools
|
||||
curl https://bootstrap.pypa.io/ez_setup.py -o - | python3
|
||||
|
||||
# Install pyqt5
|
||||
pip3 install pyqt5
|
||||
|
||||
# Install Protobuf
|
||||
brew install protobuf
|
||||
|
||||
# Setup
|
||||
python3 setup.py install
|
||||
# Install Homebrew dependencies
|
||||
brew bundle
|
||||
|
||||
# Install Python dependencies
|
||||
pip3 install -r requirements.txt
|
||||
|
||||
# Build icons
|
||||
pyrcc5 icons.qrc -o gui/qt/icons_rc.py
|
||||
|
||||
# Compile the protobuf description file
|
||||
protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto
|
||||
|
||||
# Run
|
||||
./electrum
|
||||
|
||||
|
@ -98,20 +85,12 @@ For Linux:
|
|||
|
||||
Install Dependencies::
|
||||
|
||||
sudo apt-get install python3-pip python3-setuptools python3-dev python3-pyqt5
|
||||
sudo pip2 install pyblake2
|
||||
pip3 install pyqt5
|
||||
python3 setup.py install
|
||||
sudo apt-get install $(grep -vE "^\s*#" packages.txt | tr "\n" " ")
|
||||
|
||||
# OPTIONAL: Install without sudo -
|
||||
# If you do not have a dir located at /usr/local/lib/python3.6/site-packages/
|
||||
# you will need to create this before running the install.
|
||||
|
||||
mkdir /usr/local/lib/python3.6/site-packages/
|
||||
pip install -r requirement.txt
|
||||
|
||||
Compile the icons file for Qt::
|
||||
|
||||
sudo apt-get install pyqt5-dev-tools
|
||||
pyrcc5 icons.qrc -o gui/qt/icons_rc.py
|
||||
|
||||
For the Linux app launcher (start menu) icon::
|
||||
|
@ -120,12 +99,9 @@ For the Linux app launcher (start menu) icon::
|
|||
|
||||
Compile the protobuf description file::
|
||||
|
||||
sudo apt-get install protobuf-compiler
|
||||
protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto
|
||||
|
||||
Create translations (optional)::
|
||||
|
||||
sudo apt-get install python-requests gettext
|
||||
./contrib/make_locale
|
||||
|
||||
Run::
|
||||
|
@ -194,4 +170,3 @@ Also be sure to check out:::
|
|||
---
|
||||
|
||||
The Zclassic Team
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
tap "caskroom/cask"
|
||||
brew "python3"
|
||||
brew "protobuf"
|
||||
# brew "zbar" -
|
||||
brew "gmp"
|
||||
# required by gmpy
|
||||
brew "gettext"
|
||||
tap "brewsci/science"
|
||||
brew "matplotlib"
|
||||
# required for matplotlib used in Plot History
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
rm -rf dist
|
||||
export PYTHONHASHSEED=22
|
||||
VERSION=`git describe --tags`
|
||||
pyinstaller --noconfirm --ascii --name $VERSION contrib/osx.spec
|
||||
hdiutil create -fs HFS+ -volname "Electrum" -srcfolder dist/Electrum.app dist/electrum-$VERSION.dmg
|
|
@ -1,84 +0,0 @@
|
|||
# -*- mode: python -*-
|
||||
|
||||
from PyInstaller.utils.hooks import collect_data_files, collect_submodules
|
||||
|
||||
import sys
|
||||
for i, x in enumerate(sys.argv):
|
||||
if x == '--name':
|
||||
VERSION = sys.argv[i+1]
|
||||
break
|
||||
else:
|
||||
raise BaseException('no version')
|
||||
import os
|
||||
home = os.getcwd() + '/'
|
||||
block_cipher=None
|
||||
|
||||
# see https://github.com/pyinstaller/pyinstaller/issues/2005
|
||||
hiddenimports = []
|
||||
hiddenimports += collect_submodules('trezorlib')
|
||||
hiddenimports += collect_submodules('btchip')
|
||||
hiddenimports += collect_submodules('keepkeylib')
|
||||
|
||||
datas = [
|
||||
(home+'lib/currencies.json', 'electrum'),
|
||||
(home+'lib/servers.json', 'electrum'),
|
||||
(home+'lib/checkpoints.json', 'electrum'),
|
||||
(home+'lib/servers_testnet.json', 'electrum'),
|
||||
(home+'lib/checkpoints_testnet.json', 'electrum'),
|
||||
(home+'lib/wordlist/english.txt', 'electrum/wordlist'),
|
||||
(home+'lib/locale', 'electrum/locale'),
|
||||
(home+'plugins', 'electrum_plugins'),
|
||||
]
|
||||
datas += collect_data_files('trezorlib')
|
||||
datas += collect_data_files('btchip')
|
||||
datas += collect_data_files('keepkeylib')
|
||||
|
||||
# We don't put these files in to actually include them in the script but to make the Analysis method scan them for imports
|
||||
a = Analysis([home+'electrum',
|
||||
home+'gui/qt/main_window.py',
|
||||
home+'gui/text.py',
|
||||
home+'lib/util.py',
|
||||
home+'lib/wallet.py',
|
||||
home+'lib/simple_config.py',
|
||||
home+'lib/bitcoin.py',
|
||||
home+'lib/dnssec.py',
|
||||
home+'lib/commands.py',
|
||||
home+'plugins/cosigner_pool/qt.py',
|
||||
home+'plugins/email_requests/qt.py',
|
||||
home+'plugins/trezor/client.py',
|
||||
home+'plugins/trezor/qt.py',
|
||||
home+'plugins/keepkey/qt.py',
|
||||
home+'plugins/ledger/qt.py',
|
||||
],
|
||||
datas=datas,
|
||||
hiddenimports=hiddenimports,
|
||||
hookspath=[])
|
||||
|
||||
# http://stackoverflow.com/questions/19055089/pyinstaller-onefile-warning-pyconfig-h-when-importing-scipy-or-scipy-signal
|
||||
for d in a.datas:
|
||||
if 'pyconfig' in d[0]:
|
||||
a.datas.remove(d)
|
||||
break
|
||||
|
||||
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
||||
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
name='Electrum',
|
||||
debug=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
icon=home+'electrum.icns',
|
||||
console=False)
|
||||
|
||||
app = BUNDLE(exe,
|
||||
version = VERSION,
|
||||
name='Electrum.app',
|
||||
icon=home+'electrum.icns',
|
||||
bundle_identifier=None,
|
||||
info_plist = {
|
||||
'NSHighResolutionCapable':'True'
|
||||
}
|
||||
)
|
|
@ -7,9 +7,28 @@ VERSION=$(cat lib/version.py \
|
|||
VERSION=${VERSION//ELECTRUM_VERSION=/}
|
||||
echo "Creating package $VERSION"
|
||||
|
||||
echo "brew install"
|
||||
brew bundle
|
||||
|
||||
echo "pip install"
|
||||
pip3 install -r requirements.txt
|
||||
|
||||
echo "building icons"
|
||||
pyrcc5 icons.qrc -o gui/qt/icons_rc.py
|
||||
|
||||
echo "Compile the protobuf description file"
|
||||
protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto
|
||||
|
||||
echo "compiling translations"
|
||||
./config/make_locale
|
||||
|
||||
echo "Creating package $VERSION"
|
||||
sudo python3 setup.py sdist
|
||||
|
||||
echo "Creating python app using py2app"
|
||||
sudo ARCHFLAGS="-arch i386 -arch x86_64" sudo python3 setup-release.py py2app --includes sip
|
||||
|
||||
echo "Creating python Electrum.app and .dmg"
|
||||
sudo hdiutil create -fs HFS+ -volname "Electrum" -srcfolder dist/Electrum.app dist/electrum-$VERSION-macosx.dmg
|
||||
|
||||
echo "Done!"
|
BIN
electrum.icns
BIN
electrum.icns
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,10 @@
|
|||
python3-pip
|
||||
python3-setuptools
|
||||
python3-dev
|
||||
python3-pyqt5
|
||||
protobuf-compiler
|
||||
python-requests
|
||||
gettext
|
||||
wine-development
|
||||
dirmngr
|
||||
gnupg2
|
|
@ -0,0 +1,21 @@
|
|||
certifi
|
||||
chardet==3.0.4
|
||||
dnspython==1.15.0
|
||||
ecdsa==0.13
|
||||
idna==2.6
|
||||
jsonrpclib-pelix==0.3.1
|
||||
pbkdf2==1.3
|
||||
protobuf==3.5.0.post1
|
||||
pyaes==1.6.1
|
||||
PySocks==1.6.7
|
||||
qrcode==5.3
|
||||
requests==2.18.4
|
||||
six==1.11.0
|
||||
urllib3==1.22
|
||||
cython
|
||||
pyqt5
|
||||
trezor
|
||||
keepkey
|
||||
configparser
|
||||
btchip-python==0.1.23
|
||||
pillow
|
10
setup-mac.sh
10
setup-mac.sh
|
@ -4,22 +4,12 @@
|
|||
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
|
||||
|
||||
# Optionally (this is bad practice but works if you're stuck)
|
||||
sudo chown -R "$USER":admin /usr/local
|
||||
sudo chown -R "$USER":admin /Library/Caches/Homebrew
|
||||
|
||||
brew install python3
|
||||
brew link python3
|
||||
brew postinstall python3
|
||||
brew install protobuf
|
||||
|
||||
# Python setuptools
|
||||
curl https://bootstrap.pypa.io/ez_setup.py -o - | python3
|
||||
|
||||
pip3 install pyqt5
|
||||
|
||||
# Setup
|
||||
python3 setup.py install
|
||||
pyrcc5 icons.qrc -o gui/qt/icons_rc.py icons.qrc -o gui/qt/icons_rc.py
|
||||
protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto
|
||||
|
|
|
@ -19,7 +19,7 @@ name = "Electrum"
|
|||
mainscript = 'electrum'
|
||||
|
||||
plist = Plist.fromFile('Info.plist')
|
||||
plist.update(dict(CFBundleIconFile='electrum.icns'))
|
||||
plist.update(dict(CFBundleIconFile='icons/electrum.icns'))
|
||||
|
||||
|
||||
os.environ["REQUESTS_CA_BUNDLE"] = "cacert.pem"
|
||||
|
@ -56,7 +56,7 @@ extra_options = dict(
|
|||
options=dict(py2app=dict(argv_emulation=False,
|
||||
includes=['sip'],
|
||||
packages=['lib', 'gui', 'plugins'],
|
||||
iconfile='electrum.icns',
|
||||
iconfile='icons/electrum.icns',
|
||||
plist=plist,
|
||||
resources=["icons"])),
|
||||
)
|
||||
|
|
31
setup.py
31
setup.py
|
@ -11,6 +11,22 @@ import argparse
|
|||
|
||||
version = imp.load_source('version', 'lib/version.py')
|
||||
|
||||
|
||||
def readhere(path):
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
with open(os.path.join(here, path), 'r') as fd:
|
||||
return fd.read()
|
||||
|
||||
|
||||
def readreqs(path):
|
||||
return [req for req in
|
||||
[line.strip() for line in readhere(path).split('\n')]
|
||||
if req and not req.startswith(('#', '-r'))]
|
||||
|
||||
|
||||
install_requires = readreqs('requirements.txt')
|
||||
tests_requires = install_requires + readreqs('requirements_travis.txt')
|
||||
|
||||
if sys.version_info[:3] < (3, 4, 0):
|
||||
sys.exit("Error: Electrum requires Python version >= 3.4.0...")
|
||||
|
||||
|
@ -35,19 +51,8 @@ if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']:
|
|||
setup(
|
||||
name="Electrum-ZCL",
|
||||
version=version.ELECTRUM_VERSION,
|
||||
install_requires=[
|
||||
'pyaes>=0.1a1',
|
||||
'ecdsa>=0.9',
|
||||
'pbkdf2',
|
||||
'requests',
|
||||
'qrcode',
|
||||
'protobuf',
|
||||
'dnspython',
|
||||
'jsonrpclib-pelix',
|
||||
'pyblake2',
|
||||
'PySocks>=1.6.6',
|
||||
'PyQt5',
|
||||
],
|
||||
install_requires=install_requires,
|
||||
tests_require=tests_requires,
|
||||
packages=[
|
||||
'electrum',
|
||||
'electrum_gui',
|
||||
|
|
Loading…
Reference in New Issue