-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
148 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Building Mac OS binaries | ||
======================== | ||
|
||
This guide explains how to build Electrum binaries for macOS systems. | ||
We build our binaries on El Capitan (10.11.6) as building it on High Sierra | ||
makes the binaries incompatible with older versions. | ||
|
||
This assumes that the Xcode command line tools (and thus git) are already installed. | ||
|
||
|
||
## 1. Run the script | ||
|
||
|
||
|
||
./make_osx | ||
|
||
## 2. Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/bash | ||
RED='\033[0;31m' | ||
BLUE='\033[0,34m' | ||
NC='\033[0m' # No Color | ||
function info { | ||
printf "\r$🧐 {BLUE}INFO:${NC} ${1}\n" | ||
} | ||
function fail { | ||
printf "\r$🗯 {RED}ERROR:${NC} ${1}\n" | ||
exit 1 | ||
} | ||
|
||
build_dir=$(dirname "$0") | ||
test -n "$build_dir" -a -d "$build_dir" || exit | ||
cd $build_dir/../.. | ||
|
||
export PYTHONHASHSEED=22 | ||
VERSION=`git describe --tags` | ||
PYTHON_VERSION=3.6.4 | ||
|
||
|
||
info "Installing Python $PYTHON_VERSION" | ||
export PATH="~/.pyenv/bin:~/.pyenv/shims:$PATH" | ||
if [ -d "~/.pyenv" ]; then | ||
pyenv update | ||
else | ||
curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash > /dev/null 2>&1 | ||
fi | ||
PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install -s $PYTHON_VERSION && \ | ||
pyenv global $PYTHON_VERSION || \ | ||
fail "Unable to use Python $PYTHON_VERSION" | ||
|
||
|
||
if ! which pyinstaller > /dev/null; then | ||
info "Installing pyinstaller" | ||
python3 -m pip install pyinstaller -I --user || fail "Could not install pyinstaller" | ||
fi | ||
|
||
info "Using these versions for building Electrum:" | ||
sw_vers | ||
python3 --version | ||
echo -n "Pyinstaller " | ||
pyinstaller --version | ||
|
||
rm -rf ./dist | ||
|
||
|
||
rm -rf /tmp/electrum-build > /dev/null 2>&1 | ||
mkdir /tmp/electrum-build | ||
|
||
info "Downloading icons and locale..." | ||
for repo in icons locale; do | ||
git clone https://github.com/spesmilo/electrum-$repo /tmp/electrum-build/electrum-$repo | ||
done | ||
|
||
cp -R /tmp/electrum-build/electrum-locale/locale/ ./lib/locale/ | ||
cp /tmp/electrum-build/electrum-icons/icons_rc.py ./gui/qt/ | ||
|
||
info "Installing requirements..." | ||
python3 -m pip install -Ir ./contrib/deterministic-build/requirements.txt --user && \ | ||
python3 -m pip install pyqt5 --user || \ | ||
fail "Could not install requirements" | ||
|
||
info "Installing hardware wallet requirements..." | ||
python3 -m pip install -Ir ./contrib/deterministic-build/requirements-hw.txt --user || \ | ||
fail "Could not install hardware wallet requirements" | ||
|
||
info "Building Electrum..." | ||
python3 setup.py install --user > /dev/null || fail "Could not build Electrum" | ||
|
||
info "Building binary" | ||
pyinstaller --noconfirm --ascii --name $VERSION contrib/build-osx/osx.spec || fail "Could not build binary" | ||
|
||
info "Creating .DMG" | ||
hdiutil create -fs HFS+ -volname "Electrum" -srcfolder dist/Electrum.app dist/electrum-$VERSION.dmg || fail "Could not create .DMG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
btchip-python==0.1.24 | ||
certifi==2017.11.5 | ||
chardet==3.0.4 | ||
Cython==0.27.3 | ||
ecdsa==0.13 | ||
hidapi==0.7.99.post21 | ||
idna==2.6 | ||
keepkey==4.0.2 | ||
mnemonic==0.18 | ||
pbkdf2==1.3 | ||
protobuf==3.5.1 | ||
requests==2.18.4 | ||
six==1.11.0 | ||
trezor==0.7.16 | ||
urllib3==1.22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Cython>=0.27 | ||
trezor | ||
keepkey | ||
btchip-python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters