annotate scripts/makensis @ 267:a534629f490f default tip

Fix urls
author Neil Muller <drnlmuller@gmail.com>
date Tue, 17 Mar 2020 22:39:54 +0200
parents a82cab951ce2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
166
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
1 #!/bin/sh
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
2 # Usage: makensis
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
3
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
4 NSI_FILE="`dirname $0`/sypikslang.nsi"
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
5 SY_VERSION=`sed -ne 's/VERSION_STR = "\(.*\)"/\1/p' setup.py`
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
6 TMP_NSI="$NSI_FILE.tmp"
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
7
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
8 # We include the pre-SP1 version of the MS redistibutable package - there are
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
9 # contradictory reports of whether the SP1 release will work with python 2.6,
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
10 # so I haven't tested it. Thiis version works for me
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
11 # This is all for the 32 bit version - things will need to be redone for
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
12 # 64 bit support.
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
13 if [ ! -f "dist/vcredist_x86.exe" ]; then
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
14 echo "Please copy the required vcredist_x86.exe version into dist/"
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
15 echo "(version downloaded from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1b)"
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
16 exit
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
17 else
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
18 # md5sum from 2011-06-25 - MS haven't changed this package in some
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
19 # time, so hopefully this will stay valid
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
20 EXPECTED="b936f0f378b9a35489353e878154e899"
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
21 MD5=`md5sum dist/vcredist_x86.exe | cut -d " " -f 1`
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
22 if [ "$MD5" != "$EXPECTED" ]; then
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
23 echo "Unexpected md5sum for vcredist_x86.exe"
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
24 echo "expected $EXPECTED, got $MD5"
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
25 exit
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
26 fi
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
27 fi
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
28
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
29 cp "$NSI_FILE" "$TMP_NSI"
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
30 sed -i -e "s#\\(\\s*!define SY_VERSION\\).*#\\1 \"$SY_VERSION\"#" "$TMP_NSI"
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
31 makensis "$TMP_NSI"
a82cab951ce2 windows packaging stuff
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
32 rm "$TMP_NSI"