summarylogtreecommitdiffstats
path: root/mingw-wine.sh
blob: 49f4bf73b47ec48cc50e51296b7f42b78804d84e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

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 temporary WINEPREFIX in /tmp/arch to not mess with default ~/.wine
# also ~/.wine might be a user-defined 32 bits prefix, which will fail to run x86_64 exes
WINEPREFIX=~/.wine-@TRIPLE@ wine "$@"