aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/win32/nsis/dll_version_helper.sh
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2012-11-28 16:36:41 +0100
committerPatrik Nyblom <[email protected]>2012-11-28 16:36:41 +0100
commitc4d680549e11e116dcdd95ac29101ef3e54aba5f (patch)
tree7a8b779598ca89711c3c1f21a491ec78c976f4df /erts/etc/win32/nsis/dll_version_helper.sh
parent0ba0ffb914fa423ef34faa233f5bd92e9fa753ab (diff)
parentaf68f5a22f995284b07ece178c42e630ecf94d54 (diff)
downloadotp-c4d680549e11e116dcdd95ac29101ef3e54aba5f.tar.gz
otp-c4d680549e11e116dcdd95ac29101ef3e54aba5f.tar.bz2
otp-c4d680549e11e116dcdd95ac29101ef3e54aba5f.zip
Merge branch 'maint'
Diffstat (limited to 'erts/etc/win32/nsis/dll_version_helper.sh')
-rwxr-xr-xerts/etc/win32/nsis/dll_version_helper.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/erts/etc/win32/nsis/dll_version_helper.sh b/erts/etc/win32/nsis/dll_version_helper.sh
index 96e4532b7a..0d9ba4248d 100755
--- a/erts/etc/win32/nsis/dll_version_helper.sh
+++ b/erts/etc/win32/nsis/dll_version_helper.sh
@@ -25,6 +25,13 @@
# echo "8.0.50727.763"
# exit 0
+if [ "$1" = "-n" ]; then
+ SWITCH=$1
+ shift
+else
+ SWITCH=""
+fi
+
cat > hello.c <<EOF
#include <windows.h>
#include <stdio.h>
@@ -42,11 +49,16 @@ if [ '!' -f hello.exe.manifest ]; then
# need another way of getting the version
DLLNAME=`dumpbin.exe -imports hello.exe | egrep MSVCR.*dll`
DLLNAME=`echo $DLLNAME`
+ if [ '!' -z "$1" ]; then
+ FILETOLOOKIN=$1
+ else
+ FILETOLOOKIN=$DLLNAME
+ fi
cat > helper.c <<EOF
#include <windows.h>
#include <stdio.h>
-#define REQ_MODULE "$DLLNAME"
+#define REQ_MODULE "$FILETOLOOKIN"
int main(void)
{
@@ -100,7 +112,7 @@ else
NAME=`grep '<assemblyIdentity' hello.exe.manifest | sed 's,.*name=.[A-Za-z\.]*\([0-9]*\).*,msvcr\1.dll,g' | grep -v '<'`
fi
#rm -f hello.c hello.obj hello.exe hello.exe.manifest helper.c helper.obj helper.exe helper.exe.manifest
-if [ "$1" = "-n" ]; then
+if [ "$SWITCH" = "-n" ]; then
ASKEDFOR=$NAME
else
ASKEDFOR=$VERSION