Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Commit

Permalink
Updated the build procedures
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey committed Aug 27, 2019
1 parent e8a9351 commit 68c616e
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 24 deletions.
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include contrib/requirements/requirements-hw.txt
recursive-include packages *.py
recursive-include packages cacert.pem

graft electrum
prune electrum/tests
graft electrum_xzc
prune electrum_xzc/tests

global-exclude __pycache__
global-exclude *.py[co~]
Expand Down
2 changes: 1 addition & 1 deletion contrib/build-linux/appimage/apprun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export LD_LIBRARY_PATH="${APPDIR}/usr/lib/:${APPDIR}/usr/lib/x86_64-linux-gnu${L
export PATH="${APPDIR}/usr/bin:${PATH}"
export LDFLAGS="-L${APPDIR}/usr/lib/x86_64-linux-gnu -L${APPDIR}/usr/lib"

exec "${APPDIR}/usr/bin/python3.6" -s "${APPDIR}/usr/bin/electrum" "$@"
exec "${APPDIR}/usr/bin/python3.6" -s "${APPDIR}/usr/bin/electrum-xzc" "$@"
6 changes: 3 additions & 3 deletions contrib/build-linux/appimage/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONTRIB="$PROJECT_ROOT/contrib"
CONTRIB_APPIMAGE="$CONTRIB/build-linux/appimage"
DISTDIR="$PROJECT_ROOT/dist"
BUILDDIR="$CONTRIB_APPIMAGE/build/appimage"
APPDIR="$BUILDDIR/electrum.AppDir"
APPDIR="$BUILDDIR/electrum_xzc.AppDir"
CACHEDIR="$CONTRIB_APPIMAGE/.cache/appimage"

# pinned versions
Expand All @@ -18,7 +18,7 @@ SQUASHFSKIT_COMMIT="ae0d656efa2d0df2fcac795b6823b44462f19386"


VERSION=`git describe --tags --dirty --always`
APPIMAGE="$DISTDIR/electrum-$VERSION-x86_64.AppImage"
APPIMAGE="$DISTDIR/electrum_xzc-$VERSION-x86_64.AppImage"

rm -rf "$BUILDDIR"
mkdir -p "$APPDIR" "$CACHEDIR" "$DISTDIR"
Expand Down Expand Up @@ -122,7 +122,7 @@ info "preparing electrum-locale."
fail "Please install gettext"
fi
for i in ./locale/*; do
dir="$PROJECT_ROOT/electrum/$i/LC_MESSAGES"
dir="$PROJECT_ROOT/electrum_xzc/$i/LC_MESSAGES"
mkdir -p $dir
msgfmt --output-file="$dir/electrum.mo" "$i/electrum.po" || true
done
Expand Down
8 changes: 5 additions & 3 deletions contrib/build-wine/build-electrum-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

NAME_ROOT=electrum-xzc

set -x

# These settings probably don't need any change
export WINEPREFIX=/opt/wine64
export WINEDEBUG=-all
Expand All @@ -19,7 +21,7 @@ here="$(dirname "$(readlink -e "$0")")"

. "$CONTRIB"/build_tools_util.sh

pushd $WINEPREFIX/drive_c/electrum-xzc
pushd $WINEPREFIX/drive_c/electrum

VERSION=`git describe --tags --dirty --always`
info "Last commit: $VERSION"
Expand Down Expand Up @@ -47,7 +49,7 @@ $PYTHON -m pip install --no-warn-script-location -r "$CONTRIB"/deterministic-bui

$PYTHON -m pip install --no-warn-script-location -r "$CONTRIB"/deterministic-build/requirements-hw.txt

pushd $WINEPREFIX/drive_c/electrum-xzc
pushd $WINEPREFIX/drive_c/electrum
# see https://github.com/pypa/pip/issues/2195 -- pip makes a copy of the entire directory
info "Pip installing Electrum. This might take a long time if the project folder is large."
$PYTHON -m pip install --no-warn-script-location .
Expand Down Expand Up @@ -115,4 +117,4 @@ EOF
done
)

sha256sum dist/electrum*.exe
sha256sum dist/electrum-xzc*.exe
2 changes: 1 addition & 1 deletion contrib/build-wine/deterministic.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ else:

PYHOME = 'c:/python3'

home = 'C:\\electrum-xzc\\'
home = 'C:\\electrum\\'

# see https://github.com/pyinstaller/pyinstaller/issues/2005
hiddenimports = []
Expand Down
6 changes: 3 additions & 3 deletions contrib/build-wine/electrum.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -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 "c:\electrum-xzc\electrum_xzc\gui\icons\electrum.ico"
!define MUI_ICON "c:\electrum\electrum_xzc\gui\icons\electrum.ico"

;--------------------------------
;Pages
Expand Down Expand Up @@ -111,7 +111,7 @@ Section

;Files to pack into the installer
File /r "dist\electrum-xzc\*.*"
File "c:\electrum-xzc\electrum_xzc\gui\icons\electrum.ico"
File "c:\electrum\electrum_xzc\gui\icons\electrum.ico"

;Store installation folder
WriteRegStr HKCU "Software\${PRODUCT_NAME}" "" $INSTDIR
Expand All @@ -122,7 +122,7 @@ Section

;Create desktop shortcut
DetailPrint "Creating desktop shortcut..."
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\electrum-${PRODUCT_VERSION}.exe" ""
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\electrum-xzc-${PRODUCT_VERSION}.exe" ""

;Create start-menu items
DetailPrint "Creating start-menu items..."
Expand Down
4 changes: 2 additions & 2 deletions contrib/make_tgz
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ git submodule update --init
exit 1
fi
for i in ./locale/*; do
dir="$ROOT_FOLDER"/electrum-xzc/$i/LC_MESSAGES
dir="$ROOT_FOLDER"/electrum_xzc/$i/LC_MESSAGES
mkdir -p $dir
msgfmt --output-file=$dir/electrum.mo $i/electrum.po || true
cp $i/electrum.po "$ROOT_FOLDER"/electrum-xzc/$i/electrum.po
cp $i/electrum.po "$ROOT_FOLDER"/electrum_xzc/$i/electrum.po
done
)

Expand Down
10 changes: 5 additions & 5 deletions contrib/pull_locale
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ except ImportError as e:
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.chdir('..')

cmd = "find electrum-xzc -type f -name '*.py' -o -name '*.kv'"
cmd = "find electrum_xzc -type f -name '*.py' -o -name '*.kv'"

files = subprocess.check_output(cmd, shell=True)

Expand All @@ -23,13 +23,13 @@ with open("app.fil", "wb") as f:
print("Found {} files to translate".format(len(files.splitlines())))

# Generate fresh translation template
if not os.path.exists('electrum-xzc/locale'):
os.mkdir('electrum-xzc/locale')
cmd = 'xgettext -s --from-code UTF-8 --language Python --no-wrap -f app.fil --output=electrum-xzc/locale/messages.pot'
if not os.path.exists('electrum_xzc/locale'):
os.mkdir('electrum_xzc/locale')
cmd = 'xgettext -s --from-code UTF-8 --language Python --no-wrap -f app.fil --output=electrum_xzc/locale/messages.pot'
print('Generate template')
os.system(cmd)

os.chdir('electrum')
os.chdir('electrum_xzc')

crowdin_identifier = 'electrum'
crowdin_file_name = 'files[electrum-client/messages.pot]'
Expand Down
8 changes: 4 additions & 4 deletions contrib/push_locale
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ except ImportError as e:
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.chdir('..')

cmd = "find electrum-xzc -type f -name '*.py' -o -name '*.kv'"
cmd = "find electrum_xzc -type f -name '*.py' -o -name '*.kv'"

files = subprocess.check_output(cmd, shell=True)

Expand All @@ -23,9 +23,9 @@ with open("app.fil", "wb") as f:
print("Found {} files to translate".format(len(files.splitlines())))

# Generate fresh translation template
if not os.path.exists('electrum-xzc/locale'):
os.mkdir('electrum-xzc/locale')
cmd = 'xgettext -s --from-code UTF-8 --language Python --no-wrap -f app.fil --output=electrum-xzc/locale/messages.pot'
if not os.path.exists('electrum_xzc/locale'):
os.mkdir('electrum_xzc/locale')
cmd = 'xgettext -s --from-code UTF-8 --language Python --no-wrap -f app.fil --output=electrum_xzc/locale/messages.pot'
print('Generate template')
os.system(cmd)

Expand Down
Binary file modified electrum/gui/icons/electrum.icns
Binary file not shown.
Binary file modified electrum/gui/icons/electrum.ico
Binary file not shown.
Binary file modified electrum/gui/icons/electrum_dark_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified electrum/gui/icons/electrum_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified electrum/gui/icons/electrum_light_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified electrum/gui/icons/electrum_presplash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified electrum/gui/icons/electrumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 68c616e

Please sign in to comment.