Alexandre Julliard : wineprefixcreate:
Autodetect the running from build tree case.
Alexandre Julliard
julliard at wine.codeweavers.com
Sat Mar 18 12:51:31 CST 2006
Module: wine
Branch: refs/heads/master
Commit: c33fbc0df8228b062c60294e5de645a9184f87a7
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=c33fbc0df8228b062c60294e5de645a9184f87a7
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Mar 17 12:34:50 2006 +0100
wineprefixcreate: Autodetect the running from build tree case.
---
tools/wineprefixcreate.in | 66 +++++++++++++++++++++++----------------------
1 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/tools/wineprefixcreate.in b/tools/wineprefixcreate.in
index 3effdb5..8a7e6d8 100644
--- a/tools/wineprefixcreate.in
+++ b/tools/wineprefixcreate.in
@@ -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,6 +64,38 @@ datadir="$bindir/@bintodatadir@"
do_wait=0
quiet=0
+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" ]
+ then
+ LD_LIBRARY_PATH="$topdir/libs:$LD_LIBRARY_PATH"
+ else
+ LD_LIBRARY_PATH="$topdir/libs"
+ fi
+ export LD_LIBRARY_PATH
+
+ # find the source directory
+ link=`readlink "$WINELOADER"`
+ if [ -z "$link" ]
+ then
+ topsrcdir="$topdir"
+ else
+ link=`dirname "$link"`
+ case "$link" in
+ /*) topsrcdir=`cd "$link/.." && pwd` ;;
+ *) topsrcdir=`cd "$topdir/$link/.." && pwd` ;;
+ esac
+ fi
+ dlldir="$topdir/programs"
+ datadir="$topsrcdir/tools"
+fi
+
while [ $# -gt 0 ]
do
case "$1" in
@@ -85,38 +116,7 @@ do
shift
;;
--use-wine-tree)
- topdir=`cd "$2" && pwd`
- if [ -x "$topdir/server/wineserver" ]
- then
- WINELOADER="$topdir/wine"
- WINESERVER="$topdir/server/wineserver"
- if [ -n "$LD_LIBRARY_PATH" ]
- then
- LD_LIBRARY_PATH="$topdir/libs:$LD_LIBRARY_PATH"
- else
- LD_LIBRARY_PATH="$topdir/libs"
- fi
- export LD_LIBRARY_PATH
-
- # find the source directory
- link=`readlink "$WINELOADER"`
- if [ -z "$link" ]
- then
- topsrcdir="$topdir"
- else
- link=`dirname "$link"`
- case "$link" in
- /*) topsrcdir=`cd "$link/.." && pwd` ;;
- *) 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
+ # ignored, autodetected now
shift 2
;;
*)
More information about the wine-cvs
mailing list