Skip to content

Commit

Permalink
Track icons and locale version in submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
bauerj committed May 13, 2018
1 parent a94e1d9 commit 354c737
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 34 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
@@ -0,0 +1,6 @@
[submodule "contrib/deterministic-build/electrum-icons"]
path = contrib/deterministic-build/electrum-icons
url = https://github.com/spesmilo/electrum-icons
[submodule "contrib/deterministic-build/electrum-locale"]
path = contrib/deterministic-build/electrum-locale
url = https://github.com/spesmilo/electrum-locale
27 changes: 12 additions & 15 deletions contrib/build-osx/make_osx
Expand Up @@ -16,14 +16,14 @@ VERSION=`git describe --tags --dirty`

info "Installing Python $PYTHON_VERSION"
export PATH="~/.pyenv/bin:~/.pyenv/shims:~/Library/Python/3.6/bin:$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 [ -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"


info "Installing pyinstaller"
Expand All @@ -37,17 +37,14 @@ pyinstaller --version

rm -rf ./dist

git submodule init
git submodule update

rm -rf $BUILDDIR > /dev/null 2>&1
mkdir $BUILDDIR

info "Downloading icons and locale..."
for repo in icons locale; do
git clone $GIT_REPO-$repo $BUILDDIR/electrum-$repo
done

cp -R $BUILDDIR/electrum-locale/locale/ ./lib/locale/
cp $BUILDDIR/electrum-icons/icons_rc.py ./gui/qt/
cp -R ./contrib/deterministic-build/electrum-locale/locale/ ./lib/locale/
cp ./contrib/deterministic-build/electrum-icons/icons_rc.py ./gui/qt/


info "Downloading libusb..."
Expand Down
36 changes: 17 additions & 19 deletions contrib/build-wine/build-electrum-git.sh
Expand Up @@ -19,31 +19,29 @@ set -e
mkdir -p tmp
cd tmp

for repo in electrum electrum-locale electrum-icons; do
if [ -d $repo ]; then
cd $repo
git pull
git checkout master
cd ..
else
URL=https://github.com/spesmilo/$repo.git
git clone -b master $URL $repo
fi
done
if [ -d ./electrum ]; then
rm ./electrum -rf
fi

git clone https://github.com/spesmilo/electrum -b master

pushd electrum
if [ ! -z "$1" ]; then
git checkout $1
fi

# Load electrum-icons and electrum-locale for this release
git submodule init
git submodule update

pushd electrum-locale
pushd ./contrib/deterministic-build/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
if [ ! -z "$1" ]; then
git checkout $1
fi

VERSION=`git describe --tags --dirty`
echo "Last commit: $VERSION"
find -exec touch -d '2000-11-11T11:11:11+00:00' {} +
Expand All @@ -52,8 +50,8 @@ popd
rm -rf $WINEPREFIX/drive_c/electrum
cp -r electrum $WINEPREFIX/drive_c/electrum
cp electrum/LICENCE .
cp -r electrum-locale/locale $WINEPREFIX/drive_c/electrum/lib/
cp electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/gui/qt/
cp -r ./electrum/contrib/deterministic-build/electrum-locale/locale $WINEPREFIX/drive_c/electrum/lib/
cp ./electrum/contrib/deterministic-build/electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/gui/qt/

# Install frozen dependencies
$PYTHON -m pip install -r ../../deterministic-build/requirements.txt
Expand Down
1 change: 1 addition & 0 deletions contrib/deterministic-build/electrum-icons
Submodule electrum-icons added at a1a986
1 change: 1 addition & 0 deletions contrib/deterministic-build/electrum-locale
Submodule electrum-locale added at c234aa

0 comments on commit 354c737

Please sign in to comment.