summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2011-08-29 19:22:42 +0000
committerGerald Combs <gerald@wireshark.org>2011-08-29 19:22:42 +0000
commitcd7da58daae34475a07b547f595b0d715707e533 (patch)
tree0e360f376b5c7e8eeff7c0e057a6892a17c67766
parent6c3a7ca052bbc1d2248ab98d2e261ad20ff9b4b9 (diff)
downloadwireshark-cd7da58daae34475a07b547f595b0d715707e533.tar.gz
Add "--windowsonly" and "--cygwinonly" options to win-setup.sh
--appverify. Make sure "mt" is only found in a normaly Windows path and "find" is only found in a Cygwin path. svn path=/trunk/; revision=38781
-rw-r--r--Makefile.nmake4
-rwxr-xr-xtools/win-setup.sh31
2 files changed, 27 insertions, 8 deletions
diff --git a/Makefile.nmake b/Makefile.nmake
index 38cb3b0356..de879764c2 100644
--- a/Makefile.nmake
+++ b/Makefile.nmake
@@ -722,14 +722,14 @@ REQUIRED_TOOLS=\
$(LINK) \
nmake \
!IFDEF MANIFEST_INFO_REQUIRED
- mt \
+ --windowsonly mt \
!ENDIF
$(SH_PROG) \
$(YACC) \
$(LEX) \
env \
grep \
- /usr/bin/find \
+ --cygwinonly /usr/bin/find \
$(PERL) \
$(PYTHON) \
sed \
diff --git a/tools/win-setup.sh b/tools/win-setup.sh
index a9584323d6..16d7d18e9c 100755
--- a/tools/win-setup.sh
+++ b/tools/win-setup.sh
@@ -13,11 +13,11 @@
# Save previous tag.
if [ -z "$DOWNLOAD_TAG" ]; then
- err_exit "DOWNLOAD_TAG not defined (internal error)"
+ err_exit "DOWNLOAD_TAG not defined (internal error)"
fi
if [ -z "$WIRESHARK_TARGET_PLATFORM" ]; then
- err_exit "WIRESHARK_TARGET_PLATFORM not defined (internal error)"
+ err_exit "WIRESHARK_TARGET_PLATFORM not defined (internal error)"
fi
# Set DOWNLOAD_PREFIX to /packages to test uploads before creating the tag.
@@ -31,7 +31,7 @@ err_exit () {
echo "ERROR: $1"
shift
for str in "$@" ; do
- echo "$str"
+ echo "$str"
done
echo ""
exit 1
@@ -97,26 +97,45 @@ find_proxy() {
case "$1" in
--appverify)
shift
+
if [ -z "$*" ] ; then
usage
fi
+
echo "Checking for required applications:"
which which > /dev/null 2>&1 || \
err_exit "Can't find 'which'. Unable to proceed."
MISSING_APPS=
+ PATH_RE=""
for APP in $* ; do
- APP_PATH=`cygpath --unix $APP`
+
+ case "$APP" in
+ --windowsonly)
+ PATH_RE="^/cygdrive/.*/"
+ continue
+ ;;
+ --cygwinonly)
+ PATH_RE="^/usr/.*/"
+ continue
+ ;;
+ esac
+
+ APP_PATH=`cygpath --unix "$APP"`
if [ -x "$APP_PATH" -a ! -d "$APP_PATH" ] ; then
APP_LOC="$APP_PATH"
else
APP_LOC=`which $APP_PATH 2> /dev/null`
fi
- if [ "$APP_LOC" = "" ] ; then
+ echo "$APP_LOC" | grep "$PATH_RE" > /dev/null 2>&1
+ IN_PATH=$?
+ if [ "$APP_LOC" = "" -o $IN_PATH -ne 0 ] ; then
MISSING_APPS="$MISSING_APPS $APP"
else
echo " $APP: $APP_LOC $res"
fi
+
+ PATH_RE=""
done
if [ -n "$MISSING_APPS" ]; then
@@ -134,7 +153,7 @@ case "$1" in
PACKAGE_PATH=$4
PACKAGE=`basename "$PACKAGE_PATH"`
if [ ! -e $DEST_PATH/$PACKAGE ] ; then
- err_exit "Package $PACKAGE is needed but is apparently not downloaded; 'nmake -f ... setup' required ?"
+ err_exit "Package $PACKAGE is needed but is apparently not downloaded; 'nmake -f ... setup' required ?"
fi
;;
--download)