wine build - unsign.sh: a bit cleaner output; and no assertion failure for setup.exe

This commit is contained in:
SomberNight 2018-06-30 15:55:33 +02:00
parent fe16af2ffa
commit 38c97c306a
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

@ -20,8 +20,10 @@ version=`python3 -c "import electrum; print(electrum.version.ELECTRUM_VERSION)"`
echo "Found $(ls dist/*.exe | wc -w) files to verify." echo "Found $(ls dist/*.exe | wc -w) files to verify."
for mine in $(ls dist/*.exe); do for mine in $(ls dist/*.exe); do
echo "---------------"
f=$(basename $mine) f=$(basename $mine)
wget https://download.electrum.org/$version/$f -O signed/$f echo "Downloading https://download.electrum.org/$version/$f"
wget -q https://download.electrum.org/$version/$f -O signed/$f
out="signed/stripped/$f" out="signed/stripped/$f"
size=$( wc -c < $mine ) size=$( wc -c < $mine )
# Step 1: Remove PE signature from signed binary # Step 1: Remove PE signature from signed binary
@ -39,7 +41,8 @@ for b in range(4):
l = len(binary) l = len(binary)
n = l - size n = l - size
if n > 0: if n > 0:
assert binary[-n:] == bytearray(n) if binary[-n:] != bytearray(n):
print('expecting failure for', str(pe_file))
binary = binary[:size] binary = binary[:size]
with open(pe_file, "wb") as f: with open(pe_file, "wb") as f:
f.write(binary) f.write(binary)