Browse Source

rename contrib/build-osx as contrib/osx. Move QRReader submodule there.

3.3.3.1
ThomasV 6 years ago
parent
commit
d7bf8826fc
  1. 4
      .gitmodules
  2. 2
      README.rst
  3. 4
      contrib/osx/README.md
  4. 0
      contrib/osx/base.sh
  5. 0
      contrib/osx/cdrkit-deterministic.patch
  6. 12
      contrib/osx/make_osx
  7. 6
      contrib/osx/osx.spec
  8. 0
      contrib/osx/package.sh
  9. 4
      electrum/qrscanner.py

4
.gitmodules

@ -4,6 +4,6 @@
[submodule "contrib/deterministic-build/electrum-locale"]
path = contrib/deterministic-build/electrum-locale
url = https://github.com/spesmilo/electrum-locale
[submodule "contrib/CalinsQRReader"]
path = contrib/CalinsQRReader
[submodule "contrib/osx/CalinsQRReader"]
path = contrib/osx/CalinsQRReader
url = https://github.com/spesmilo/CalinsQRReader

2
README.rst

@ -101,7 +101,7 @@ This directory contains the python dependencies used by Electrum.
Mac OS X / macOS
--------
See `contrib/build-osx/`.
See `contrib/osx/`.
Windows
-------

4
contrib/build-osx/README.md → contrib/osx/README.md

@ -14,7 +14,7 @@ Before starting, make sure that the Xcode command line tools are installed (e.g.
cd electrum
./contrib/build-osx/make_osx
./contrib/osx/make_osx
This creates a folder named Electrum.app.
@ -33,4 +33,4 @@ Copy the Electrum.app directory over and install the dependencies, e.g.:
Then you can just invoke `package.sh` with the path to the app:
cd electrum
./contrib/build-osx/package.sh ~/Electrum.app/
./contrib/osx/package.sh ~/Electrum.app/

0
contrib/build-osx/base.sh → contrib/osx/base.sh

0
contrib/build-osx/cdrkit-deterministic.patch → contrib/osx/cdrkit-deterministic.patch

12
contrib/build-osx/make_osx → contrib/osx/make_osx

@ -72,8 +72,8 @@ cp ./contrib/deterministic-build/electrum-icons/icons_rc.py ./electrum/gui/qt
info "Downloading libusb..."
curl https://homebrew.bintray.com/bottles/libusb-1.0.22.el_capitan.bottle.tar.gz | \
tar xz --directory $BUILDDIR
cp $BUILDDIR/libusb/1.0.22/lib/libusb-1.0.dylib contrib/build-osx
DoCodeSignMaybe "libusb" "contrib/build-osx/libusb-1.0.dylib" "$APP_SIGN" # If APP_SIGN is empty will be a noop
cp $BUILDDIR/libusb/1.0.22/lib/libusb-1.0.dylib contrib/osx
DoCodeSignMaybe "libusb" "contrib/osx/libusb-1.0.dylib" "$APP_SIGN" # If APP_SIGN is empty will be a noop
info "Building libsecp256k1"
brew install autoconf automake libtool
@ -85,11 +85,11 @@ git clean -f -x -q
./configure --enable-module-recovery --enable-experimental --enable-module-ecdh --disable-jni
make
popd
cp $BUILDDIR/secp256k1/.libs/libsecp256k1.0.dylib contrib/build-osx
DoCodeSignMaybe "libsecp256k1" "contrib/build-osx/libsecp256k1.0.dylib" "$APP_SIGN" # If APP_SIGN is empty will be a noop
cp $BUILDDIR/secp256k1/.libs/libsecp256k1.0.dylib contrib/osx
DoCodeSignMaybe "libsecp256k1" "contrib/osx/libsecp256k1.0.dylib" "$APP_SIGN" # If APP_SIGN is empty will be a noop
info "Building CalinsQRReader..."
d=contrib/CalinsQRReader
d=contrib/osx/CalinsQRReader
pushd $d
rm -fr build
xcodebuild || fail "Could not build CalinsQRReader"
@ -117,7 +117,7 @@ for d in ~/Library/Python/ ~/.pyenv .; do
done
info "Building binary"
pyinstaller --noconfirm --ascii --clean --name $VERSION contrib/build-osx/osx.spec || fail "Could not build binary"
pyinstaller --noconfirm --ascii --clean --name $VERSION contrib/osx/osx.spec || fail "Could not build binary"
info "Adding bitcoin URI types to Info.plist"
plutil -insert 'CFBundleURLTypes' \

6
contrib/build-osx/osx.spec → contrib/osx/osx.spec

@ -42,11 +42,11 @@ datas += collect_data_files('keepkeylib')
datas += collect_data_files('ckcc')
# Add the QR Scanner helper app
datas += [(electrum + "contrib/CalinsQRReader/build/Release/CalinsQRReader.app", "./contrib/CalinsQRReader/build/Release/CalinsQRReader.app")]
datas += [(electrum + "contrib/osx/CalinsQRReader/build/Release/CalinsQRReader.app", "./contrib/osx/CalinsQRReader/build/Release/CalinsQRReader.app")]
# Add libusb so Trezor and Safe-T mini will work
binaries = [(electrum + "contrib/build-osx/libusb-1.0.dylib", ".")]
binaries += [(electrum + "contrib/build-osx/libsecp256k1.0.dylib", ".")]
binaries = [(electrum + "contrib/osx/libusb-1.0.dylib", ".")]
binaries += [(electrum + "contrib/osx/libsecp256k1.0.dylib", ".")]
# Workaround for "Retro Look":
binaries += [b for b in collect_dynamic_libs('PyQt5') if 'macstyle' in b[0]]

0
contrib/build-osx/package.sh → contrib/osx/package.sh

4
electrum/qrscanner.py

@ -73,9 +73,9 @@ def scan_barcode_osx(*args_ignored, **kwargs_ignored):
import subprocess
# NOTE: This code needs to be modified if the positions of this file changes with respect to the helper app!
# This assumes the built macOS .app bundle which ends up putting the helper app in
# .app/contrib/CalinsQRReader/build/Release/CalinsQRReader.app.
# .app/contrib/osx/CalinsQRReader/build/Release/CalinsQRReader.app.
root_ec_dir = os.path.abspath(os.path.dirname(__file__) + "/../")
prog = root_ec_dir + "/" + "contrib/CalinsQRReader/build/Release/CalinsQRReader.app/Contents/MacOS/CalinsQRReader"
prog = root_ec_dir + "/" + "contrib/osx/CalinsQRReader/build/Release/CalinsQRReader.app/Contents/MacOS/CalinsQRReader"
if not os.path.exists(prog):
raise RuntimeError("Cannot start QR scanner; helper app not found.")
data = ''

Loading…
Cancel
Save