X-Git-Url: https://git.ctpug.org.za/?p=tabakrolletjie.git;a=blobdiff_plain;f=packaging%2Fmakensis;fp=packaging%2Fmakensis;h=26f388c4682f7650215264c8cf899a966a82b7aa;hp=0000000000000000000000000000000000000000;hb=980e10ce19a73a84d7d3d3ac10e11462a0a7bfb1;hpb=61414d7b471661f35e533cb1430c6fea1d2ea48c diff --git a/packaging/makensis b/packaging/makensis new file mode 100755 index 0000000..26f388c --- /dev/null +++ b/packaging/makensis @@ -0,0 +1,31 @@ +#!/bin/sh +# Usage: makensis + +NSI_FILE="`dirname $0`/tabakrolletjie.nsi" +WS_VERSION=`sed -nre 's/( *)version="(.*)",/\2/p' setup.py` +TMP_NSI="$NSI_FILE.tmp" + +# We include the pre-SP1 version of the MS redistibutable package - there are +# contradictory reports of whether the SP1 release will work with python 2.7, +# so I haven't tested it. Thiis version works for me +# This is all for the 32 bit version +if [ ! -f "dist/vcredist_x86.exe" ]; then + echo "Please copy the required vcredist_x86.exe version into dist/" + echo "(version downloaded from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1b)" + exit +else + # md5sum from 2011-06-25 - MS haven't changed this package in some + # time, so hopefully this will stay valid + EXPECTED="b936f0f378b9a35489353e878154e899" + MD5=`md5sum dist/vcredist_x86.exe | cut -d " " -f 1` + if [ "$MD5" != "$EXPECTED" ]; then + echo "Unexpected md5sum for vcredist_x86.exe" + echo "expected $EXPECTED, got $MD5" + exit + fi +fi + +cp "$NSI_FILE" "$TMP_NSI" +sed -i -e "s#\\(\\s*!define WS_VERSION\\).*#\\1 \"$WS_VERSION\"#" "$TMP_NSI" +makensis "$TMP_NSI" +rm "$TMP_NSI"