loader: Rename the 32-bit loader in the build tree too when doing a Wow64 build.
authorAlexandre Julliard <julliard@winehq.org>
Mon, 29 Mar 2010 15:53:30 +0000 (17:53 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 29 Mar 2010 15:53:30 +0000 (17:53 +0200)
.gitignore
loader/Makefile.in
tools/winewrapper

index 6ea657de14f5a32353c05a9186396afffbadf82d..264e2de9010754cf16b2358a2c674822427481d2 100644 (file)
@@ -229,6 +229,7 @@ loader/wine-preloader
 loader/wine.de.man
 loader/wine.fr.man
 loader/wine.man
+loader/wine32
 programs/Makeprog.rules
 programs/rpcss/epm.h
 programs/rpcss/epm_s.c
index c314c9b626fd821aa364fd06924a382eb7b16427..6e0806613cad639f75b232c168c94db1b9dd3ffa 100644 (file)
@@ -13,6 +13,7 @@ EXTRA_BINARIES = @EXTRA_BINARIES@
 
 PROGRAMS = \
        wine \
+       wine32 \
        wine-installed \
        wine-preloader
 
@@ -27,7 +28,7 @@ INSTALLDIRS = \
        $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext) \
        $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)
 
-all: wine wine-installed $(EXTRA_BINARIES) $(MANPAGES)
+all: $(MAIN_BINARY) wine-installed $(EXTRA_BINARIES) $(MANPAGES)
 
 @MAKE_RULES@
 
@@ -37,7 +38,7 @@ LDEXECFLAGS = @LDEXECFLAGS@
 wine-preloader: preloader.o Makefile.in
        $(CC) -o $@ -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c000000 preloader.o $(LIBPORT) $(LDFLAGS)
 
-wine: main.o Makefile.in
+$(MAIN_BINARY): main.o Makefile.in
        $(CC) -o $@ $(LDEXECFLAGS) main.o $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_LOCAL)
 
 wine-installed: main.o Makefile.in
index 13be936260e4303dabdcd8aa3fca925f97e34424..c664142446286d6b9752bc232ae2ff7b949e203c 100755 (executable)
@@ -81,7 +81,14 @@ else
   export LD_LIBRARY_PATH
 fi
 
-WINELOADER="$topdir/loader/wine"
+if [ -x "$topdir/loader/wine" ]
+then WINELOADER="$topdir/loader/wine"
+elif [ -x "$topdir/loader/wine32" ]
+then WINELOADER="$topdir/loader/wine32"
+else
+  echo "$0: could not find the wine loader in $topdir"
+  exit 1
+fi
 export WINELOADER
 
 # any local settings ?
@@ -92,18 +99,4 @@ fi
 
 # and run the application
 
-case "$0" in
-  wine|*/wine)
-    exec "$WINELOADER" "$@"
-    ;;
-  */*)
-    [ -f "$0.exe.so" ] && exec "$WINELOADER" "$0.exe.so" "$@"
-    echo "$0: cannot find corresponding application"
-    exit 1
-    ;;
-  *)
-    [ -f "$appdir/$0.exe.so" ] && exec "$WINELOADER" "$appdir/$0.exe.so" "$@"
-    echo "$0: cannot find corresponding application"
-    exit 1
-    ;;
-esac
+exec "$WINELOADER" "$@"