Mercurial > sypikslang
diff scripts/makensis @ 166:a82cab951ce2
windows packaging stuff
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Fri, 11 May 2012 23:38:25 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/makensis Fri May 11 23:38:25 2012 +0200 @@ -0,0 +1,32 @@ +#!/bin/sh +# Usage: makensis + +NSI_FILE="`dirname $0`/sypikslang.nsi" +SY_VERSION=`sed -ne 's/VERSION_STR = "\(.*\)"/\1/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.6, +# so I haven't tested it. Thiis version works for me +# This is all for the 32 bit version - things will need to be redone for +# 64 bit support. +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 SY_VERSION\\).*#\\1 \"$SY_VERSION\"#" "$TMP_NSI" +makensis "$TMP_NSI" +rm "$TMP_NSI"