electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 8ba70ee0e4b7a237949482d8cb4fefdc580b36e1
parent 8bb59fcc3c235d971df9669afc1d7ac5a226e6ba
Author: ThomasV <thomasv@electrum.org>
Date:   Sun, 15 Jul 2018 11:21:32 +0200

Merge pull request #4524 from toxeus/docker

build-wine: allow local testing
Diffstat:
M.travis.yml | 5++---
Mcontrib/build-wine/build-electrum-git.sh | 26++++----------------------
Mcontrib/build-wine/build.sh | 6+-----
Mcontrib/build-wine/docker/README.md | 8++++----
Mcontrib/build-wine/electrum.nsi | 4++--
Mcontrib/build-wine/prepare-wine.sh | 5-----
6 files changed, 13 insertions(+), 41 deletions(-)

diff --git a/.travis.yml b/.travis.yml @@ -33,7 +33,7 @@ jobs: install: - sudo docker build --no-cache -t electrum-wine-builder-img ./contrib/build-wine/docker/ script: - - sudo docker run --name electrum-wine-builder-cont -v $PWD:/opt/electrum --rm --workdir /opt/electrum/contrib/build-wine electrum-wine-builder-img ./build.sh $TRAVIS_COMMIT + - sudo docker run --name electrum-wine-builder-cont -v $PWD:/opt/wine64/drive_c/electrum --rm --workdir /opt/wine64/drive_c/electrum/contrib/build-wine electrum-wine-builder-img ./build.sh after_success: true - os: osx language: c @@ -53,4 +53,4 @@ jobs: script: - ./contrib/deterministic-build/check_submodules.sh after_success: true - if: tag IS present- \ No newline at end of file + if: tag IS present diff --git a/contrib/build-wine/build-electrum-git.sh b/contrib/build-wine/build-electrum-git.sh @@ -19,23 +19,7 @@ set -e mkdir -p tmp cd tmp -if [ -d ./electrum ]; then - rm ./electrum -rf -fi - -git clone https://github.com/spesmilo/electrum -b master - -pushd electrum -if [ ! -z "$1" ]; then - # a commit/tag/branch was specified - if ! git cat-file -e "$1" 2> /dev/null - then # can't find target - # try pull requests - git config --local --add remote.origin.fetch '+refs/pull/*/merge:refs/remotes/origin/pr/*' - git fetch --all - fi - git checkout $1 -fi +pushd $WINEPREFIX/drive_c/electrum # Load electrum-icons and electrum-locale for this release git submodule init @@ -59,11 +43,9 @@ popd find -exec touch -d '2000-11-11T11:11:11+00:00' {} + popd -rm -rf $WINEPREFIX/drive_c/electrum -cp -r electrum $WINEPREFIX/drive_c/electrum -cp electrum/LICENCE . -cp -r ./electrum/contrib/deterministic-build/electrum-locale/locale $WINEPREFIX/drive_c/electrum/electrum/ -cp ./electrum/contrib/deterministic-build/electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/electrum/gui/qt/ +cp $WINEPREFIX/drive_c/electrum/LICENCE . +cp -r $WINEPREFIX/drive_c/electrum/contrib/deterministic-build/electrum-locale/locale $WINEPREFIX/drive_c/electrum/electrum/ +cp $WINEPREFIX/drive_c/electrum/contrib/deterministic-build/electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/electrum/gui/qt/ # Install frozen dependencies $PYTHON -m pip install -r ../../deterministic-build/requirements.txt diff --git a/contrib/build-wine/build.sh b/contrib/build-wine/build.sh @@ -2,10 +2,6 @@ # Lucky number export PYTHONHASHSEED=22 -if [ ! -z "$1" ]; then - to_build="$1" -fi - here=$(dirname "$0") test -n "$here" -a -d "$here" || exit @@ -28,5 +24,5 @@ find -exec touch -d '2000-11-11T11:11:11+00:00' {} + popd ls -l /opt/wine64/drive_c/python* -$here/build-electrum-git.sh $to_build && \ +$here/build-electrum-git.sh && \ echo "Done." diff --git a/contrib/build-wine/docker/README.md b/contrib/build-wine/docker/README.md @@ -25,14 +25,14 @@ folder. 3. Build Windows binaries ``` - $ TARGET=master + $ git checkout $REV $ sudo docker run \ --name electrum-wine-builder-cont \ - -v .:/opt/electrum \ + -v $PWD:/opt/wine64/drive_c/electrum \ --rm \ - --workdir /opt/electrum/contrib/build-wine \ + --workdir /opt/wine64/drive_c/electrum/contrib/build-wine \ electrum-wine-builder-img \ - ./build.sh $TARGET + ./build.sh ``` 4. The generated binaries are in `./contrib/build-wine/dist`. diff --git a/contrib/build-wine/electrum.nsi b/contrib/build-wine/electrum.nsi @@ -72,7 +72,7 @@ !define MUI_ABORTWARNING !define MUI_ABORTWARNING_TEXT "Are you sure you wish to abort the installation of ${PRODUCT_NAME}?" - !define MUI_ICON "tmp\electrum\icons\electrum.ico" + !define MUI_ICON "c:\electrum\icons\electrum.ico" ;-------------------------------- ;Pages @@ -111,7 +111,7 @@ Section ;Files to pack into the installer File /r "dist\electrum\*.*" - File "..\..\icons\electrum.ico" + File "c:\electrum\icons\electrum.ico" ;Store installation folder WriteRegStr HKCU "Software\${PRODUCT_NAME}" "" $INSTDIR diff --git a/contrib/build-wine/prepare-wine.sh b/contrib/build-wine/prepare-wine.sh @@ -79,11 +79,6 @@ retry() { here=$(dirname $(readlink -e $0)) set -e -# Clean up Wine environment -echo "Cleaning $WINEPREFIX" -rm -rf $WINEPREFIX -echo "done" - wine 'wineboot' # HACK to work around https://bugs.winehq.org/show_bug.cgi?id=42474#c22