Changelog: Francois Gouget <fgouget@codeweavers.com> * tools/winemaker Generate wineapploader using autoconf rather than from the Makefile wineapploader: try to load xxx.exe.so to be sure we get the builtin rather than an exe that would happen to be in the same directory wineapploader: use @WINE@ from autoconf to find wine -- Francois Gouget fgouget@codeweavers.com
Index: tools/winemaker =================================================================== RCS file: /home/wine/wine/tools/winemaker,v retrieving revision 1.44 diff -u -r1.44 winemaker --- tools/winemaker 6 Sep 2002 18:36:19 -0000 1.44 +++ tools/winemaker 9 Sep 2002 07:40:53 -0000 @@ -1880,7 +1811,6 @@ print FILEO "### Generic autoconf targets\n\n"; print FILEO "all:"; if (@$project[$P_PATH] eq "") { - print FILEO " wineapploader"; print FILEO " \$(SUBDIRS)"; } if (@{@$project[$P_TARGETS]} > 0) { @@ -1880,11 +1811,4 @@ print FILEO "\n\n"; - if (@$project[$P_PATH] eq "") { - print FILEO "wineapploader: wineapploader.in\n"; - print FILEO "\tsed -e 's,\@bindir\\\@,\$(bindir),g' " . - "-e 's,\@winelibdir\\\@,.,g' " . - "\$(SRCDIR)/wineapploader.in >\$\@ || \$(RM) \$\@\n"; - print FILEO "\n"; - } print FILEO "\@MAKE_RULES\@\n"; print FILEO "\n"; print FILEO "install::\n"; @@ -1915,16 +1838,7 @@ print FILEO "\t_list=\"\$(EXES)\"; for i in \$\$_list; do \$(RM) \$(bindir)/\$\$i;done\n"; print FILEO "\t_list=\"\$(DLLS)\"; for i in \$\$_list; do \$(RM) \$(libdir)/\$\$i;done\n"; } print FILEO "\n"; - print FILEO "clean::\n"; - print FILEO "\t\$(RM)"; - if (@$project[$P_PATH] eq "") { - print FILEO " wineapploader"; - } - if (@{@$project[$P_TARGETS]} > 0) { - print FILEO " \$(EXES)"; - } - print FILEO "\n\n"; if (@{@$project[$P_TARGETS]} > 0) { print FILEO "### Target specific build rules\n\n"; @@ -1915,5 +1838,7 @@ if (@$target[$T_TYPE] ne $TT_DLL) { - print FILEO "\ttest -f @$target[$T_NAME] || \$(INSTALL_SCRIPT) wineapploader @$target[$T_NAME]\n"; + my $basename=@$target[$T_NAME]; + $basename=~ s/\.exe$//; + print FILEO "\ttest -f @$target[$T_NAME] || \$(LN_S) \$(TOPOBJDIR)/wineapploader $basename\n"; } print FILEO "\n\n"; } @@ -2921,10 +2902,24 @@ AC_SUBST_FILE(MAKE_RULES) AC_OUTPUT([ +wineapploader Make.rules ##WINEMAKER_PROJECTS## ]) +dnl Make wineapploader executable +omode=`ls -l wineapploader | cut -d' ' -f1` +nmode="u+x" +if test `echo $omode | cut -c 5` = "r" +then + nmode="$nmode,g+x" +fi +if test `echo $omode | cut -c 8` = "r" +then + nmode="$nmode,o+x" +fi +chmod $nmode wineapploader + echo echo "Configure finished. Do 'make' to build the project." echo @@ -3099,16 +3104,14 @@ # Copyright (C) 2002 Alexandre Julliard # determine the app Winelib library name -appname=`basename "$0" .exe`.exe - -#allow Wine to load Winelib application from the current directory -export WINEDLLPATH=$WINEDLLPATH:@winelibdir@ +appname=`basename "$0"`.so # first try explicit WINELOADER if [ -x "$WINELOADER" ]; then exec "$WINELOADER" "$appname" "$@"; fi # then default bin directory -if [ -x "@bindir@/wine" ]; then exec "@bindir@/wine" "$appname" "$@"; fi +WINE="@WINE@" +if [ -x "$WINE" ]; then exec "$WINE" "$appname" "$@"; fi # now try the directory containing $0 appdir=""