windows builds: fetch locale files from github repo
This commit is contained in:
parent
d7fb5825f4
commit
67c561e4cd
|
@ -1,9 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# You probably need to update only this link
|
|
||||||
ELECTRUM_GIT_URL=https://github.com/spesmilo/electrum.git
|
|
||||||
ELECTRUM_ICONS_URL=https://github.com/spesmilo/electrum-icons.git
|
|
||||||
BRANCH=master
|
|
||||||
NAME_ROOT=electrum
|
NAME_ROOT=electrum
|
||||||
PYTHON_VERSION=3.5.4
|
PYTHON_VERSION=3.5.4
|
||||||
|
|
||||||
|
@ -26,45 +22,35 @@ set -e
|
||||||
|
|
||||||
cd tmp
|
cd tmp
|
||||||
|
|
||||||
if [ -d "electrum-git" ]; then
|
for repo in electrum electrum-locale electrum-icons; do
|
||||||
# GIT repository found, update it
|
if [ -d $repo ]; then
|
||||||
echo "Pull"
|
cd $repo
|
||||||
cd electrum-git
|
git pull
|
||||||
git pull
|
git checkout master
|
||||||
git checkout $BRANCH
|
cd ..
|
||||||
cd ..
|
else
|
||||||
else
|
URL=https://github.com/spesmilo/$repo.git
|
||||||
# GIT repository not found, clone it
|
git clone -b master $URL $repo
|
||||||
echo "Clone"
|
fi
|
||||||
git clone -b $BRANCH $ELECTRUM_GIT_URL electrum-git
|
done
|
||||||
fi
|
|
||||||
|
|
||||||
cd electrum-git
|
pushd electrum-locale
|
||||||
|
for i in ./locale/*; do
|
||||||
|
dir=$i/LC_MESSAGES
|
||||||
|
mkdir -p $dir
|
||||||
|
msgfmt --output-file=$dir/electrum.mo $i/electrum.po || true
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd electrum-git
|
||||||
VERSION=`git describe --tags`
|
VERSION=`git describe --tags`
|
||||||
echo "Last commit: $VERSION"
|
echo "Last commit: $VERSION"
|
||||||
|
popd
|
||||||
cd ..
|
|
||||||
|
|
||||||
rm -rf $WINEPREFIX/drive_c/electrum
|
rm -rf $WINEPREFIX/drive_c/electrum
|
||||||
cp -r electrum-git $WINEPREFIX/drive_c/electrum
|
cp -r electrum $WINEPREFIX/drive_c/electrum
|
||||||
cp electrum-git/LICENCE .
|
cp electrum/LICENCE .
|
||||||
|
cp -r electrum-locale/locale $WINEPREFIX/drive_c/electrum/lib/
|
||||||
# add locale dir
|
|
||||||
cp -r ../../../lib/locale $WINEPREFIX/drive_c/electrum/lib/
|
|
||||||
|
|
||||||
# Build Qt resources
|
|
||||||
# wine $WINEPREFIX/drive_c/python$PYTHON_VERSION/Scripts/pyrcc5.exe C:/electrum/icons.qrc -o C:/electrum/gui/qt/icons_rc.py
|
|
||||||
# fetch icons file
|
|
||||||
if [ -d "electrum-icons" ]; then
|
|
||||||
echo "Pull"
|
|
||||||
cd electrum-icons
|
|
||||||
git pull
|
|
||||||
git checkout master
|
|
||||||
cd ..
|
|
||||||
else
|
|
||||||
echo "Clone"
|
|
||||||
git clone -b master $ELECTRUM_ICONS_URL electrum-icons
|
|
||||||
fi
|
|
||||||
cp electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/gui/qt/
|
cp electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/gui/qt/
|
||||||
|
|
||||||
# Install frozen dependencies
|
# Install frozen dependencies
|
||||||
|
|
Loading…
Reference in New Issue