aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-11-05 11:39:59 +0100
committerPatrik Nyblom <[email protected]>2010-11-30 16:30:47 +0100
commitbe63e483361c9a764f6a68df80e50fd7bd825e6b (patch)
tree28579c7cb8e8e795b94a3ae2ec427f02ddc7d10b /erts
parentc5a67411ce1af7f12184ed3d645c794674cea8f9 (diff)
downloadotp-be63e483361c9a764f6a68df80e50fd7bd825e6b.tar.gz
otp-be63e483361c9a764f6a68df80e50fd7bd825e6b.tar.bz2
otp-be63e483361c9a764f6a68df80e50fd7bd825e6b.zip
Correction of VS2008 redistributables location
Diffstat (limited to 'erts')
-rw-r--r--erts/etc/win32/nsis/find_redist.sh71
1 files changed, 49 insertions, 22 deletions
diff --git a/erts/etc/win32/nsis/find_redist.sh b/erts/etc/win32/nsis/find_redist.sh
index de6ebc8e31..4211bd1dfc 100644
--- a/erts/etc/win32/nsis/find_redist.sh
+++ b/erts/etc/win32/nsis/find_redist.sh
@@ -107,29 +107,56 @@ for x in cl bin vc; do
fi
BPATH="$NBPATH"
done
-#echo $BPATH
-STARTPATH=$BPATH
-for verdir in v2.0 v3.5; do
-BPATH=$STARTPATH
+BPATH_LIST=$BPATH
+
+# rc.exe is in the Microsoft SDK directory of VS2008
+RCPATH=`lookup_prog_in_path rc`
fail=false
-for x in sdk $verdir bootstrapper packages vcredist_x86 vcredist_x86.exe; do
- #echo "x=$x"
- #echo "BPATH=$BPATH"
- NBPATH=`add_path_element $x "$BPATH"`
- if [ "$NBPATH" = "$BPATH" ]; then
- fail=true
- break;
+if [ '!' -z "$RCPATH" ]; then
+ BPATH=$RCPATH
+ for x in rc bin v6.0A ; do
+ NBPATH=`remove_path_element $x "$BPATH"`
+ if [ "$NBPATH" = "$BPATH" ]; then
+ fail=true
+ break;
+ fi
+ BPATH="$NBPATH"
+ done
+ if [ $fail = false ]; then
+ BPATH_LIST="$BPATH_LIST $BPATH"
fi
- BPATH="$NBPATH"
-done
-if [ $fail = false ]; then
- break;
fi
+
+# Frantic search through two roots with different
+# version directories. We want to be very specific about the
+# directory structures as we woildnt want to find the wrong
+# redistributables...
+
+#echo $BPATH
+for BP in $BPATH_LIST; do
+ for verdir in "sdk v2.0" "sdk v3.5" "v6.0A"; do
+ BPATH=$BP
+ fail=false
+ for x in $verdir bootstrapper packages vcredist_x86 vcredist_x86.exe; do
+ #echo "x=$x"
+ #echo "BPATH=$BPATH"
+ NBPATH=`add_path_element $x "$BPATH"`
+ if [ "$NBPATH" = "$BPATH" ]; then
+ fail=true
+ break;
+ fi
+ BPATH="$NBPATH"
+ done
+ if [ $fail = false ]; then
+ break;
+ fi
+ done
+ if [ $fail = false ]; then
+ echo $BPATH
+ exit 0
+ 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
+
+echo "Failed to locate vcredist_x86.exe because directory structure was unexpected" >&2
+exit 3
+