From c5a67411ce1af7f12184ed3d645c794674cea8f9 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Thu, 4 Nov 2010 17:53:21 +0100 Subject: Allow installer to take redistributables from VC9 --- erts/etc/win32/nsis/Makefile | 2 ++ erts/etc/win32/nsis/dll_version_helper.sh | 10 ++++++++-- erts/etc/win32/nsis/erlang20.nsi | 10 +++++----- erts/etc/win32/nsis/find_redist.sh | 23 ++++++++++++++++++----- 4 files changed, 33 insertions(+), 12 deletions(-) mode change 100755 => 100644 erts/etc/win32/nsis/dll_version_helper.sh mode change 100755 => 100644 erts/etc/win32/nsis/find_redist.sh diff --git a/erts/etc/win32/nsis/Makefile b/erts/etc/win32/nsis/Makefile index ebb3ad9a96..981a232c69 100644 --- a/erts/etc/win32/nsis/Makefile +++ b/erts/etc/win32/nsis/Makefile @@ -45,6 +45,7 @@ WTARGET_DIR=$(shell (cygpath -d $(TARGET_DIR) 2>/dev/null || cygpath -d $(TARGET REDIST_FILE=$(shell (sh ./find_redist.sh || echo "")) REDIST_DLL_VERSION=$(shell (sh ./dll_version_helper.sh || echo "")) +REDIST_DLL_NAME=$(shell (sh ./dll_version_helper.sh -n || echo "")) release_spec: @NSIS_VER=`makensis /hdrinfo | head -1 | awk '{print $$2}'`; \ @@ -73,6 +74,7 @@ release_spec: cp $(REDIST_FILE) $(RELEASE_PATH)/vcredist_x86.exe;\ echo '!define HAVE_REDIST_FILE 1' >> $(VERSION_HEADER); \ echo '!define REDIST_DLL_VERSION "$(REDIST_DLL_VERSION)"' >> $(VERSION_HEADER);\ + echo '!define REDIST_DLL_NAME "$(REDIST_DLL_NAME)"' >> $(VERSION_HEADER);\ fi;\ if [ -f $(RELEASE_PATH)/docs/doc/index.html ];\ then \ diff --git a/erts/etc/win32/nsis/dll_version_helper.sh b/erts/etc/win32/nsis/dll_version_helper.sh old mode 100755 new mode 100644 index e0047dea8b..73a9183d68 --- a/erts/etc/win32/nsis/dll_version_helper.sh +++ b/erts/etc/win32/nsis/dll_version_helper.sh @@ -41,9 +41,15 @@ if [ '!' -f hello.exe.manifest ]; then exit 0 fi VERSION=`grep '&2 - exit 3 + fail=true + break; fi BPATH="$NBPATH" done -echo $BPATH -exit 0 \ No newline at end of file +if [ $fail = false ]; then + break; +fi +done +if [ $fail = false ]; then + echo $BPATH + exit 0 +else + echo "Failed to locate vcredist_x86.exe because directory structure was unexpected" >&2 + exit 3 +fi -- cgit v1.2.3