Skip to content

Commit

Permalink
Some fixes for osx version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sirak Ghazaryan committed Mar 1, 2020
1 parent 6c3d5e1 commit 8da30ff
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 32 deletions.
4 changes: 2 additions & 2 deletions contrib/osx/make_osx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Parameterize
PYTHON_VERSION=3.6.4
BUILDDIR=/tmp/electrum-build
PACKAGE=Electrum
GIT_REPO=https://github.com/spesmilo/electrum
PACKAGE="Electrum Crown"
GIT_REPO=https://github.com/Crowndev/electrum-crown
LIBSECP_VERSION="b408c6a8b287003d1ade5709e6f7bc3c7f1d5be7"

. $(dirname "$0")/base.sh
Expand Down
52 changes: 27 additions & 25 deletions contrib/osx/osx.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ from PyInstaller.utils.hooks import collect_data_files, collect_submodules, coll

import sys, os

PACKAGE='Electrum'
PYPKG='electrum'
MAIN_SCRIPT='run_electrum'
ICONS_FILE=PYPKG + '/gui/icons/electrum.icns'
PACKAGE='Electrum Crown'
PYPKG='electrumcrown'
MAIN_SCRIPT='electrum-crown'
ICONS_FILE='electrum-crown.icns'
APP_SIGN = os.environ.get('APP_SIGN', '')

def fail(*msg):
Expand Down Expand Up @@ -73,11 +73,14 @@ hiddenimports.remove('safetlib.qt.pinmatrix')


datas = [
(electrum + PYPKG + '/*.json', PYPKG),
(electrum + PYPKG + '/wordlist/english.txt', PYPKG + '/wordlist'),
(electrum + PYPKG + '/locale', PYPKG + '/locale'),
(electrum + PYPKG + '/plugins', PYPKG + '/plugins'),
(electrum + PYPKG + '/gui/icons', PYPKG + '/gui/icons'),
(electrum+'lib/currencies.json', PYPKG),
(electrum+'lib/servers.json', PYPKG),
(electrum+'lib/checkpoints.json', PYPKG),
(electrum+'lib/servers_testnet.json', PYPKG),
(electrum+'lib/checkpoints_testnet.json', PYPKG),
(electrum+'lib/wordlist/english.txt', PYPKG + '/wordlist'),
(electrum+'lib/locale', PYPKG + '/locale'),
(electrum+'plugins', PYPKG + '_plugins'),
]
datas += collect_data_files('trezorlib')
datas += collect_data_files('safetlib')
Expand All @@ -99,22 +102,21 @@ binaries += [b for b in collect_dynamic_libs('PyQt5') if 'macstyle' in b[0]]

# 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([electrum+ MAIN_SCRIPT,
electrum+'electrum/gui/qt/main_window.py',
electrum+'electrum/gui/text.py',
electrum+'electrum/util.py',
electrum+'electrum/wallet.py',
electrum+'electrum/simple_config.py',
electrum+'electrum/bitcoin.py',
electrum+'electrum/dnssec.py',
electrum+'electrum/commands.py',
electrum+'electrum/plugins/cosigner_pool/qt.py',
electrum+'electrum/plugins/email_requests/qt.py',
electrum+'electrum/plugins/trezor/qt.py',
electrum+'electrum/plugins/safe_t/client.py',
electrum+'electrum/plugins/safe_t/qt.py',
electrum+'electrum/plugins/keepkey/qt.py',
electrum+'electrum/plugins/ledger/qt.py',
electrum+'electrum/plugins/coldcard/qt.py',
electrum+'gui/qt/main_window.py',
electrum+'gui/text.py',
electrum+'lib/util.py',
electrum+'lib/wallet.py',
electrum+'lib/simple_config.py',
electrum+'lib/bitcoin.py',
electrum+'lib/dnssec.py',
electrum+'lib/commands.py',
#electrum+'plugins/cosigner_pool/qt.py',
#electrum+'plugins/email_requests/qt.py',
#electrum+'plugins/trezor/client.py',
electrum+'plugins/trezor/qt.py',
#electrum+'plugins/keepkey/qt.py',
#electrum+'plugins/ledger/qt.py',
#electrum+'plugins/coldcard/qt.py',
],
binaries=binaries,
datas=datas,
Expand Down
10 changes: 5 additions & 5 deletions contrib/osx/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export PATH=$PATH:~/bin
. $(dirname "$0")/base.sh

if [ -z "$1" ]; then
echo "Usage: $0 Electrum.app"
echo "Usage: $0 Electrum Crown.app"
exit -127
fi

Expand Down Expand Up @@ -73,16 +73,16 @@ ${genisoimage} \
-D \
-l \
-probe \
-V "Electrum" \
-V "Electrum Crown" \
-no-pad \
-r \
-dir-mode 0755 \
-apple \
-o Electrum_uncompressed.dmg \
-o ElectrumCrown_uncompressed.dmg \
/tmp/electrum-macos/image || fail "Unable to create uncompressed dmg"

dmg dmg Electrum_uncompressed.dmg electrum-$VERSION.dmg || fail "Unable to create compressed dmg"
rm Electrum_uncompressed.dmg
dmg dmg ElectrumCrown_uncompressed.dmg electrum-crown-$VERSION.dmg || fail "Unable to create compressed dmg"
rm ElectrumCrown_uncompressed.dmg

echo "Done."
sha256sum electrum-$VERSION.dmg

0 comments on commit 8da30ff

Please sign in to comment.