<commit_before>#!/bin/bash

NAME_ROOT=electrum-ltc

export PYTHONDONTWRITEBYTECODE=1  # don't create __pycache__/ folders with .pyc files


# Let's begin!
set -e

. "$CONTRIB"/build_tools_util.sh

pushd $WINEPREFIX/drive_c/electrum-ltc

VERSION=`git describe --tags --dirty --always`
info "Last commit: $VERSION"

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

pushd ./contrib/deterministic-build/electrum-ltc-locale
if ! which msgfmt > /dev/null 2>&1; then
    fail "Please install gettext"
fi
# we want the binary to have only compiled (.mo) locale files; not source (.po) files
rm -rf "$WINEPREFIX/drive_c/electrum/electrum/locale/"
for i in ./locale/*; do
    dir="$WINEPREFIX/drive_c/electrum-ltc/electrum_ltc/$i/LC_MESSAGES"
    mkdir -p $dir
    msgfmt --output-file="$dir/electrum.mo" "$i/electrum.po" || true
done
popd

find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
popd

# Install frozen dependencies
$WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \
    --cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements.txt

$WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \<commit_msg>Litecoin: fix Windows build script<commit_after>#!/bin/bash

NAME_ROOT=electrum-ltc

export PYTHONDONTWRITEBYTECODE=1  # don't create __pycache__/ folders with .pyc files


# Let's begin!
set -e

. "$CONTRIB"/build_tools_util.sh

pushd $WINEPREFIX/drive_c/electrum-ltc

VERSION=`git describe --tags --dirty --always`
info "Last commit: $VERSION"

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

pushd ./contrib/deterministic-build/electrum-ltc-locale
if ! which msgfmt > /dev/null 2>&1; then
    fail "Please install gettext"
fi
# we want the binary to have only compiled (.mo) locale files; not source (.po) files
rm -rf "$WINEPREFIX/drive_c/electrum-ltc/electrum_ltc/locale/"
for i in ./locale/*; do
    dir="$WINEPREFIX/drive_c/electrum-ltc/electrum_ltc/$i/LC_MESSAGES"
    mkdir -p $dir
    msgfmt --output-file="$dir/electrum.mo" "$i/electrum.po" || true
done
popd

find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
popd

# Install frozen dependencies
$WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \
    --cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements.txt

$WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \
{'fraction_non_alphanumeric': 0.13776531838205847, 'fraction_numerical': 0.01682018422106528, 'mean_word_length': 3.9173228346456694, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3386485', 'n_tokens_mistral': 955, 'n_tokens_neox': 898, 'n_words': 224}