460
|
1 #!/bin/sh
|
|
2 # Usage: makensis <nsi file>
|
|
3
|
|
4 NSI_FILE="$1"
|
|
5 #DEPENDENCIES_FOLDER="$2"
|
|
6 MM_VERSION=`sed -ne 's/VERSION_STR = "\(.*\)"/\1/p' setup.py`
|
|
7 TMP_NSI="$NSI_FILE.tmp"
|
|
8
|
468
|
9 # We include the pre-SP1 version of the MS redistibutable package - there are
|
|
10 # contradictory reports of whether the SP1 release will work with python 2.6,
|
|
11 # so I haven't tested it. Thiis version works for me
|
|
12 # This is all for the 32 bit version - things will need to be redone for
|
|
13 # 64 bit support.
|
|
14 if [ ! -f "dist/vcredist_x86.exe" ]; then
|
|
15 echo "Please copy the required vcredist_x86.exe version into dist/"
|
|
16 echo "(version downloaded from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1b)"
|
|
17 exit
|
|
18 else
|
|
19 # md5sum from 2011-06-25 - MS haven't changed this package in some
|
|
20 # time, so hopefully this will stay valid
|
|
21 EXPECTED="b936f0f378b9a35489353e878154e899"
|
|
22 MD5=`md5sum dist/vcredist_x86.exe | cut -d " " -f 1`
|
|
23 if [ "$MD5" != "$EXPECTED" ]; then
|
|
24 echo "Unexpected md5sum for vcredist_x86.exe"
|
|
25 echo "expected $EXPECTED, got $MD5"
|
|
26 exit
|
|
27 fi
|
|
28 fi
|
|
29
|
460
|
30 cp "$NSI_FILE" "$TMP_NSI"
|
|
31 sed -i -e "s#\\(\\s*!define MM_VERSION\\).*#\\1 \"$MM_VERSION\"#" "$TMP_NSI"
|
|
32 makensis "$TMP_NSI"
|
|
33 rm "$TMP_NSI"
|