2012-09-14 15:31:11 +04:00
|
|
|
--- b/tools/wineapploader.in 2012-06-15 23:17:00.000000000 +0400
|
|
|
|
+++ a/tools/wineapploader.in 2012-09-14 13:10:17.235533949 +0400
|
|
|
|
@@ -21,12 +21,20 @@
|
|
|
|
|
|
|
|
# determine the app Winelib library name
|
|
|
|
appname=`basename "$0" .exe`.exe
|
|
|
|
+compbit=`uname -m`
|
|
|
|
|
|
|
|
# first try explicit WINELOADER
|
2012-09-06 10:30:57 +04:00
|
|
|
if [ -x "$WINELOADER" ]; then exec "$WINELOADER" "$appname" "$@"; fi
|
|
|
|
|
|
|
|
# then default bin directory
|
|
|
|
-if [ -x "@bindir@/wine" ]; then exec "@bindir@/wine" "$appname" "$@"; fi
|
2012-09-14 15:31:11 +04:00
|
|
|
+if [ -x "@bindir@/wine" ]; then
|
|
|
|
+ if [[ $compbit = "x86_64" ]]
|
|
|
|
+ then
|
|
|
|
+ exec "@bindir@/wine64" "$appname" "$@"
|
|
|
|
+ else
|
|
|
|
+ exec "@bindir@/wine" "$appname" "$@"
|
|
|
|
+ fi
|
|
|
|
+fi
|
2012-09-06 10:30:57 +04:00
|
|
|
|
|
|
|
# now try the directory containing $0
|
|
|
|
appdir=""
|
2012-09-14 15:31:11 +04:00
|
|
|
@@ -46,7 +54,12 @@
|
2012-09-06 10:30:57 +04:00
|
|
|
done
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
-if [ -x "$appdir/wine" ]; then exec "$appdir/wine" "$appname" "$@"; fi
|
2012-09-14 15:31:11 +04:00
|
|
|
+if [ -x "$appdir/wine64" && $compbit = "x86_64" ]
|
|
|
|
+ then
|
|
|
|
+ exec "$appdir/wine64" "$appname" "$@"
|
|
|
|
+ else
|
|
|
|
+ exec "$appdir/wine" "$appname" "$@"
|
|
|
|
+fi
|
2012-09-06 10:30:57 +04:00
|
|
|
|
|
|
|
# finally look in PATH
|
|
|
|
exec wine "$appname" "$@"
|