annotate packaging/makensis @ 669:30ae339d7224

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