summarylogtreecommitdiffstats
path: root/mingw-wine.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mingw-wine.sh')
-rw-r--r--mingw-wine.sh23
1 files changed, 10 insertions, 13 deletions
diff --git a/mingw-wine.sh b/mingw-wine.sh
index 292e2f49aa31..0f347f89e712 100644
--- a/mingw-wine.sh
+++ b/mingw-wine.sh
@@ -4,21 +4,18 @@ set -e
mingw_prefix=/usr/@TRIPLE@
-# wine requires the dlls to lie next to the exe
-if test -f "$1"
-then
- path=`dirname $1`
- if ! test -f "${path}/libstdc++-6.dll"
- then
- cp ${mingw_prefix}/bin/*.dll ${path}
- fi
-fi
-
# run it in a custom WINEPREFIX to not mess with default ~/.wine
# also default prefix might be a 32 bits prefix, which will fail to run x86_64 exes
if ! test -d "${WINEPREFIX}"
then
- WINEPREFIX=~/.wine-@TRIPLE@ wine "$@"
-else
- wine "$@"
+ export WINEPREFIX=~/.wine-@TRIPLE@
+fi
+
+# WINEPATH is used to find dlls, otherwise they should lie next to the exe
+if test -z "${WINEPATH}"
+then
+ export WINEPATH=${mingw_prefix}/bin
fi
+
+wine "$@"
+