wineprefixcreate: Autodetect the running from build tree case.
This commit is contained in:
parent
c67728f7c6
commit
c33fbc0df8
|
@ -29,7 +29,6 @@ usage()
|
|||
echo " -h, --help Display this message"
|
||||
echo " --prefix <dir> Directory to create (default: \$WINEPREFIX or ~/.wine)"
|
||||
echo " -q, --quiet Don't print status messages"
|
||||
echo " --use-wine-tree <dir> Run from the Wine build tree <dir>"
|
||||
echo " -w, --wait Wait for the wineserver to exit before returning"
|
||||
echo ""
|
||||
}
|
||||
|
@ -65,29 +64,12 @@ datadir="$bindir/@bintodatadir@"
|
|||
do_wait=0
|
||||
quiet=0
|
||||
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-h|--help)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
--prefix)
|
||||
WINEPREFIX="$2"
|
||||
shift 2
|
||||
;;
|
||||
-q|--quiet)
|
||||
quiet=1
|
||||
shift
|
||||
;;
|
||||
-w|--wait)
|
||||
do_wait=1
|
||||
shift
|
||||
;;
|
||||
--use-wine-tree)
|
||||
topdir=`cd "$2" && pwd`
|
||||
if [ -x "$topdir/server/wineserver" ]
|
||||
if [ ! -f "$dlldir/ntdll.dll.so" -a \
|
||||
-x "$bindir/../server/wineserver" -a \
|
||||
-f "$bindir/../dlls/ntdll/ntdll.dll.so" ]
|
||||
then
|
||||
# running from the wine source tree
|
||||
topdir=`cd "$bindir/.." && pwd`
|
||||
WINELOADER="$topdir/wine"
|
||||
WINESERVER="$topdir/server/wineserver"
|
||||
if [ -n "$LD_LIBRARY_PATH" ]
|
||||
|
@ -110,13 +92,31 @@ do
|
|||
*) topsrcdir=`cd "$topdir/$link/.." && pwd` ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
dlldir="$topdir/programs"
|
||||
datadir="$topsrcdir/tools"
|
||||
else
|
||||
echo "$2 is not a valid Wine build tree"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-h|--help)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
--prefix)
|
||||
WINEPREFIX="$2"
|
||||
shift 2
|
||||
;;
|
||||
-q|--quiet)
|
||||
quiet=1
|
||||
shift
|
||||
;;
|
||||
-w|--wait)
|
||||
do_wait=1
|
||||
shift
|
||||
;;
|
||||
--use-wine-tree)
|
||||
# ignored, autodetected now
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Reference in New Issue