Skip to content

Commit 57f93e2

Browse files
author
James
authored
Merge pull request #4 from ZclassicCommunity/dev
update to 3.2.0
2 parents fe4e569 + 2faea7b commit 57f93e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+683
-71
lines changed

RELEASE-NOTES

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ issue #3374. Users should upgrade to 3.0.5.
149149
# Release 2.9 - Independence (July 27th, 2017)
150150
* Multiple Chain Validation: Electrum will download and validate
151151
block headers sent by servers that may follow different branches
152-
of a fork in the Bitcoin blockchain. Instead of a linear sequence,
152+
of a fork in the ZClassic blockchain. Instead of a linear sequence,
153153
block headers are organized in a tree structure. Branching points
154154
are located efficiently using binary search. The purpose of MCV is
155155
to detect and handle blockchain forks that are invisible to the
@@ -311,7 +311,7 @@ issue #3374. Users should upgrade to 3.0.5.
311311
wallet that has several accounts. Make sure that you have saved
312312
your seed phrase before you upgrade Electrum.
313313
* This version introduces a separation between wallets types and
314-
keystores types. 'Wallet type' defines the type of Bitcoin contract
314+
keystores types. 'Wallet type' defines the type of ZClassic contract
315315
used in the wallet, while 'keystore type' refers to the method used
316316
to store private keys. Therefore, so-called 'hardware wallets' will
317317
be referred to as 'hardware keystores'.
@@ -444,13 +444,13 @@ issue #3374. Users should upgrade to 3.0.5.
444444
* Various GUI improvements
445445

446446
# Release 2.4
447-
* Payment to DNS names storing a Bitcoin addresses (OpenAlias) is
447+
* Payment to DNS names storing a ZClassic addresses (OpenAlias) is
448448
supported directly, without activating a plugin. The verification
449449
uses DNSSEC.
450450
* The DNSSEC verification code was rewritten. The previous code,
451451
which was part of the OpenAlias plugin, is vulnerable and should
452452
not be trusted (Electrum 2.0 to 2.3).
453-
* Payment requests can be signed using Bitcoin addresses stored
453+
* Payment requests can be signed using ZClassic addresses stored
454454
in DNS (OpenAlias). The identity of the requestor is verified using
455455
DNSSEC.
456456
* Payment requests signed with OpenAlias keys can be shared as

contrib/build-wine/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Windows Binary Builds
2+
=====================
3+
4+
These scripts can be used for cross-compilation of Windows Electrum executables from Linux/Wine.
5+
Produced binaries are deterministic, so you should be able to generate binaries that match the official releases.
6+
7+
8+
Usage:
9+
10+
11+
1. Install the following dependencies:
12+
13+
- dirmngr
14+
- gpg
15+
- 7Zip
16+
- Wine (>= v2)
17+
18+
19+
For example:
20+
21+
22+
```
23+
$ sudo apt-get install wine-development dirmngr gnupg2 p7zip-full
24+
$ wine --version
25+
wine-2.0 (Debian 2.0-3+b2)
26+
```
27+
28+
or
29+
30+
```
31+
$ pacman -S wine gnupg
32+
$ wine --version
33+
wine-2.21
34+
```
35+
36+
2. Make sure `/opt` is writable by the current user.
37+
3. Run `build.sh`.
38+
4. The generated binaries are in `./dist`.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!/bin/bash
2+
3+
NAME_ROOT=electrum-zclassic
4+
PYTHON_VERSION=3.5.4
5+
6+
# These settings probably don't need any change
7+
export WINEPREFIX=/opt/wine64
8+
export PYTHONDONTWRITEBYTECODE=1
9+
export PYTHONHASHSEED=22
10+
11+
PYHOME=c:/python$PYTHON_VERSION
12+
PYTHON="wine $PYHOME/python.exe -OO -B"
13+
14+
15+
# Let's begin!
16+
cd `dirname $0`
17+
set -e
18+
19+
mkdir -p tmp
20+
cd tmp
21+
22+
for repo in electrum-zclassic electrum-locale electrum-icons; do
23+
if [ -d $repo ]; then
24+
cd $repo
25+
git pull
26+
git checkout master
27+
cd ..
28+
else
29+
URL=https://github.com/ZClassicCommunity/$repo.git
30+
git clone -b master $URL $repo
31+
fi
32+
done
33+
34+
pushd electrum-locale
35+
for i in ./locale/*; do
36+
dir=$i/LC_MESSAGES
37+
mkdir -p $dir
38+
msgfmt --output-file=$dir/electrum.mo $i/electrum.po || true
39+
done
40+
popd
41+
42+
pushd electrum-zclassic
43+
if [ ! -z "$1" ]; then
44+
git checkout $1
45+
fi
46+
47+
#VERSION=`git describe --tags`
48+
VERSION=3.2.0
49+
echo "Last commit: $VERSION"
50+
find -exec touch -d '2000-11-11T11:11:11+00:00' {} +
51+
popd
52+
53+
rm -rf $WINEPREFIX/drive_c/electrum_zclassic
54+
cp -r electrum-zclassic $WINEPREFIX/drive_c/electrum_zclassic
55+
cp electrum-zclassic/LICENCE .
56+
cp -r electrum-locale/locale $WINEPREFIX/drive_c/electrum_zclassic/lib/
57+
cp electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum_zclassic/gui/qt/
58+
59+
# Install frozen dependencies
60+
$PYTHON -m pip install -r ../../deterministic-build/requirements.txt
61+
62+
$PYTHON -m pip install -r ../../deterministic-build/requirements-hw.txt
63+
64+
pushd $WINEPREFIX/drive_c/electrum_zclassic
65+
$PYTHON setup.py install
66+
popd
67+
68+
cd ..
69+
70+
rm -rf dist/
71+
72+
# build standalone and portable versions
73+
wine "C:/python$PYTHON_VERSION/scripts/pyinstaller.exe" --noconfirm --ascii --name $NAME_ROOT-$VERSION -w deterministic.spec
74+
75+
# set timestamps in dist, in order to make the installer reproducible
76+
pushd dist
77+
find -exec touch -d '2000-11-11T11:11:11+00:00' {} +
78+
popd
79+
80+
# build NSIS installer
81+
# $VERSION could be passed to the electrum.nsi script, but this would require some rewriting in the script iself.
82+
wine "$WINEPREFIX/drive_c/Program Files (x86)/NSIS/makensis.exe" /DPRODUCT_VERSION=$VERSION electrum.nsi
83+
84+
cd dist
85+
mv electrum-setup.exe $NAME_ROOT-$VERSION-setup.exe
86+
cd ..
87+
88+
echo "Done."
89+
md5sum dist/electrum*exe

contrib/build-wine/build.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
# Lucky number
3+
export PYTHONHASHSEED=22
4+
5+
if [ ! -z "$1" ]; then
6+
to_build="$1"
7+
fi
8+
9+
here=$(dirname "$0")
10+
test -n "$here" -a -d "$here" || exit
11+
12+
echo "Clearing $here/build and $here/dist..."
13+
rm "$here"/build/* -rf
14+
rm "$here"/dist/* -rf
15+
16+
$here/prepare-wine.sh || exit 1
17+
18+
echo "Resetting modification time in C:\Python..."
19+
# (Because of some bugs in pyinstaller)
20+
pushd /opt/wine64/drive_c/python*
21+
find -exec touch -d '2000-11-11T11:11:11+00:00' {} +
22+
popd
23+
ls -l /opt/wine64/drive_c/python*
24+
25+
$here/build-electrum-git.sh $to_build && \
26+
echo "Done."
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# -*- mode: python -*-
2+
3+
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, collect_dynamic_libs
4+
5+
import sys
6+
for i, x in enumerate(sys.argv):
7+
if x == '--name':
8+
cmdline_name = sys.argv[i+1]
9+
break
10+
else:
11+
raise BaseException('no name')
12+
13+
14+
home = 'C:\\electrum_zclassic\\'
15+
16+
# see https://github.com/pyinstaller/pyinstaller/issues/2005
17+
hiddenimports = []
18+
hiddenimports += collect_submodules('trezorlib')
19+
hiddenimports += collect_submodules('btchip')
20+
hiddenimports += collect_submodules('keepkeylib')
21+
hiddenimports += collect_submodules('websocket')
22+
23+
# Add libusb binary
24+
binaries = [("c:/python3.5.4/libusb-1.0.dll", ".")]
25+
26+
# Workaround for "Retro Look":
27+
binaries += [b for b in collect_dynamic_libs('PyQt5') if 'qwindowsvista' in b[0]]
28+
29+
datas = [
30+
(home+'lib/currencies.json', 'electrum_zclassic'),
31+
(home+'lib/servers.json', 'electrum_zclassic'),
32+
# (home+'lib/checkpoints.json', 'electrum_zclassic'),
33+
(home+'lib/servers_testnet.json', 'electrum_zclassic'),
34+
# (home+'lib/checkpoints_testnet.json', 'electrum_zclassic'),
35+
(home+'lib/wordlist/english.txt', 'electrum_zclassic/wordlist'),
36+
(home+'lib/locale', 'electrum_zclassic/locale'),
37+
(home+'plugins', 'electrum_plugins'),
38+
('C:\\Program Files (x86)\\ZBar\\bin\\', '.')
39+
]
40+
datas += collect_data_files('trezorlib')
41+
datas += collect_data_files('btchip')
42+
datas += collect_data_files('keepkeylib')
43+
44+
# We don't put these files in to actually include them in the script but to make the Analysis method scan them for imports
45+
a = Analysis([home+'electrum-zclassic',
46+
home+'gui/qt/main_window.py',
47+
home+'gui/text.py',
48+
home+'lib/util.py',
49+
home+'lib/wallet.py',
50+
home+'lib/simple_config.py',
51+
home+'lib/bitcoin.py',
52+
home+'lib/dnssec.py',
53+
home+'lib/commands.py',
54+
home+'plugins/cosigner_pool/qt.py',
55+
home+'plugins/email_requests/qt.py',
56+
home+'plugins/trezor/client.py',
57+
home+'plugins/trezor/qt.py',
58+
home+'plugins/keepkey/qt.py',
59+
home+'plugins/ledger/qt.py',
60+
#home+'packages/requests/utils.py'
61+
],
62+
binaries=binaries,
63+
datas=datas,
64+
#pathex=[home+'lib', home+'gui', home+'plugins'],
65+
hiddenimports=hiddenimports,
66+
hookspath=[])
67+
68+
69+
# http://stackoverflow.com/questions/19055089/pyinstaller-onefile-warning-pyconfig-h-when-importing-scipy-or-scipy-signal
70+
for d in a.datas:
71+
if 'pyconfig' in d[0]:
72+
a.datas.remove(d)
73+
break
74+
75+
# hotfix for #3171 (pre-Win10 binaries)
76+
a.binaries = [x for x in a.binaries if not x[1].lower().startswith(r'c:\windows')]
77+
78+
pyz = PYZ(a.pure)
79+
80+
81+
#####
82+
# "standalone" exe with all dependencies packed into it
83+
84+
exe_standalone = EXE(
85+
pyz,
86+
a.scripts,
87+
a.binaries,
88+
a.datas,
89+
name=os.path.join('build\\pyi.win32\\electrum_zclassic', cmdline_name + ".exe"),
90+
debug=False,
91+
strip=None,
92+
upx=False,
93+
icon=home+'icons/electrum-zclassic.ico',
94+
console=False)
95+
# console=True makes an annoying black box pop up, but it does make Electrum output command line commands, with this turned off no output will be given but commands can still be used
96+
97+
exe_portable = EXE(
98+
pyz,
99+
a.scripts,
100+
a.binaries,
101+
a.datas + [ ('is_portable', 'README.md', 'DATA' ) ],
102+
name=os.path.join('build\\pyi.win32\\electrum_zclassic', cmdline_name + "-portable.exe"),
103+
debug=False,
104+
strip=None,
105+
upx=False,
106+
icon=home+'icons/electrum-zclassic.ico',
107+
console=False)
108+
109+
#####
110+
# exe and separate files that NSIS uses to build installer "setup" exe
111+
112+
exe_dependent = EXE(
113+
pyz,
114+
a.scripts,
115+
exclude_binaries=True,
116+
name=os.path.join('build\\pyi.win32\\electrum_zclassic', cmdline_name),
117+
debug=False,
118+
strip=None,
119+
upx=False,
120+
icon=home+'icons/electrum-zclassic.ico',
121+
console=False)
122+
123+
coll = COLLECT(
124+
exe_dependent,
125+
a.binaries,
126+
a.zipfiles,
127+
a.datas,
128+
strip=None,
129+
upx=True,
130+
debug=False,
131+
icon=home+'icons/electrum-zclassic.ico',
132+
console=False,
133+
name=os.path.join('dist', 'electrum-zclassic'))

0 commit comments

Comments
 (0)