[wingide-users] Not able to run wingide 2.0.2
Wing IDE Support
support at wingware.com
Mon Mar 14 13:13:28 EST 2005
Vicente Ferrando wrote:
> Hi,
>
> I've just upgraded to wingide 2.0.2 from 2.0.1 and at the moment I
> can't launch it. I get this error:
> /usr/local/lib/wingide2.0/run-wing.sh: 117: Syntax error: Bad
> substitution
This occurs on some Linux versions and is caused by invalid sh script
syntax in a portion of the script that is specific to OS X. The
attached version of the script removes the offending lines.
We will be releasing a "brown-bag" 2.0.2-2 release for Linux later today
with this fix.
Sorry for the inconvenience,
John
-------------- next part --------------
#!/bin/sh
# Shell script for invoking the wing IDE. If the first argument is --winghome
# then the directory wing is installed in is echoed to stdout and the script exits.
# Other arguments are:
# --verbose Print debugging output
# --silent Run silently
# --system-gtk Use system-wide version of gtk, rather than Wing's copy
# --private-gtk Use Wing's copy of gtk rather than the system version
#
# To develop and run from sources, set WINGHOME and WINGPYTHON
#
# Copyright (c) 2000-2003, Archaeopteryx Software, Inc. All rights reserved.
#
# Written by Stephan R.A. Deibel and John P. Ehresman
# Find WINGHOME unless caller has passed it in
if [ "${WINGHOME}" = "" ]; then
WINGHOME=`dirname "$0"`; export WINGHOME
fi
# Check if user requested debug output or we're running from source in which
# case we also want debug output (but can use --silent to force squelching of
# output also when running from source)
if [ "$1" = "--verbose" ]; then
shift
DEBUGARG=
elif [ "$1" = "--silent" ]; then
shift
DEBUGARG=--squelch-output
else
DEBUGARG=--squelch-output
fi
# Location of Python interpreter to use, if not already set
if [ "${WINGPYTHON}" = "" ]; then
if [ -x "${WINGHOME}/bin/PyCore/python" ]; then
WINGPYTHON="${WINGHOME}/bin/PyCore/python"
else
WINGPYTHON="python2.3"
fi
fi
# Just echo home and exit if requested
if [ "$1" = "--winghome" ]; then
echo ${WINGHOME}
exit 0
fi
# Where we install our private copy of GTK and related libs
WING_GTK_PREFIX="${WINGHOME}/bin/gtk-bin"
# Force use of system-wide or private if requested on command line
if [ "$1" = "--system-gtk" ]; then
shift
WING_USE_SYSTEM_GTK="1"; export WING_USE_SYSTEM_GTK
elif [ "$1" = "--private-gtk" ]; then
shift
WING_USE_SYSTEM_GTK="0"; export WING_USE_SYSTEM_GTK
# Otherwise use system-wide gtk if ~/.wingide2/use-system-gtk is
# present unless this is OS X. On OS X, you must use --system-gtk argument
elif [ "`uname`" != "Darwin" -a -f "${HOME}/.wingide2/use-system-gtk" ]; then
WING_USE_SYSTEM_GTK="1"; export WING_USE_SYSTEM_GTK
else
WING_USE_SYSTEM_GTK="0"; export WING_USE_SYSTEM_GTK
fi
WING_ORIG_WING_USE_SYSTEM_GTK=__undefined__; export WING_ORIG_WING_USE_SYSTEM_GTK
# Use our private gtk installation
if [ "${WING_USE_SYSTEM_GTK}" = "0" ]; then
# Need to add our private library areas to the library path
if [ "`uname`" = "Darwin" ]; then
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
WING_ORIG_DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}
DYLD_LIBRARY_PATH="${WING_GTK_PREFIX}/lib:${DYLD_LIBRARY_PATH}"
else
WING_ORIG_DYLD_LIBRARY_PATH=__undefined__ ;
DYLD_LIBRARY_PATH="${WING_GTK_PREFIX}/lib" ;
fi
export WING_ORIG_DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH
else
if [ "$LD_LIBRARY_PATH" != "" ]; then
WING_ORIG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
LD_LIBRARY_PATH="${WING_GTK_PREFIX}/lib:${LD_LIBRARY_PATH}"
else
WING_ORIG_LD_LIBRARY_PATH=__undefined__
LD_LIBRARY_PATH="${WING_GTK_PREFIX}/lib"
fi
export WING_ORIG_LD_LIBRARY_PATH
export LD_LIBRARY_PATH
fi
fi
# On Darwin only, start X11 and set DISPLAYdefault the display to :0
if [ "`uname`" = "Darwin" -a "${DISPLAY}" = "" ]; then
SECONDS=0
USER=`whoami`
DISPLAY_DIR=/tmp/.X11-unix
X11_APP_NAME=X11
FIRST_TIME=yes
LISTING=`ls -l $DISPLAY_DIR | grep $USER`
while [ $SECONDS -le 30 ] && [ -z "$LISTING" ]
do
if [ "${FIRST_TIME}" == "yes" ]; then
FIRST_TIME="no"
/usr/bin/open -a $X11_APP_NAME
fi
sleep 1
let "SECONDS = $SECONDS + 1"
LISTING=`ls -l $DISPLAY_DIR | grep $USER`
done
DISPLAY=:0
export DISPLAY
fi
# If display is not set, print an error message
if [ "${DISPLAY}" = "" ]; then
echo "wing: Error: DISPLAY is not set"
exit 1
fi
# Check for psyco
if [ "$1" = "--with-psyco" ]; then
PYTHON_ARGS="-OE"
else
PYTHON_ARGS="-OSE"
fi
# Run the IDE
if [ -f "${WINGHOME}/bin/wing.py" ]; then
exec "${WINGPYTHON}" $PYTHON_ARGS "${WINGHOME}/bin/wing.py" $DEBUGARG "$@"
elif [ -f "${WINGHOME}/src/wing.py" ]; then
exec "${WINGPYTHON}" $PYTHON_ARGS "${WINGHOME}/src/wing.py" $DEBUGARG "$@"
elif [ "$DEBUGARG" = "" ]; then
echo "wing: Error: wing.py not found. Please check your Wing IDE installation"
fi
More information about the wingide-users
mailing list