Commit b1be7245 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont Committed by Alexandre Julliard

wineprefixcreate: Make path searching relative.

parent 52645e11
......@@ -70,7 +70,7 @@ bin2res$(EXEEXT): bin2res.o
$(CC) $(CFLAGS) -o $@ bin2res.o $(LIBPORT)
wineprefixcreate: wineprefixcreate.in
sed -e 's,@dlldir\@,$(dlldir),g' -e 's,@datadir\@,$(datadir),g' $(SRCDIR)/wineprefixcreate.in >$@ || ($(RM) $@ && false)
sed -e "s,@bintodlldir\@,`$(RELPATH) $(bindir) $(dlldir)`,g" -e "s,@bintodatadir\@,`$(RELPATH) $(bindir) $(datadir)`,g" $(SRCDIR)/wineprefixcreate.in >$@ || ($(RM) $@ && false)
chmod +x wineprefixcreate
install install-lib:: wineprefixcreate
......
......@@ -36,8 +36,31 @@ usage()
set -e
dlldir="@dlldir@"
datadir="@datadir@/wine"
bindir=""
case "$0" in
*/*)
# $0 contains a path, use it
bindir=`dirname "$0"`
;;
*)
# no directory in $0, search in PATH
saved_ifs=$IFS
IFS=:
for d in $PATH
do
IFS=$saved_ifs
if [ -x "$d/$0" ]
then
bindir="$d"
break
fi
done
;;
esac
bindir=`cd "$bindir" && pwd`
dlldir="$bindir/@bintodlldir@"
datadir="$bindir/@bintodatadir@"
do_wait=0
quiet=0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment