Re: winemaker problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch should correct both problems.
1.) I believe the wrc command line opions changed slightly. Used the options
programs/winemine/Makefile ends up using.
2.) winemine-hcs.so is being produced, while winemine-hcs.exe.so is expected
by the winemine-hcs script. winemine-hcs.exe.so is now produced instead.
I made several other improvements as well, such as some paramaterization and
making the build rules match up more closely with those of wine itself.

Changelog:
Several improvements and corrections to winemaker, foremost being
correcting wrc flags and shared object file naming.


From: Hans Christian Studt <hcstudt@post10.tele.dk>

Hi,

Problem 1
=========
I am trying to follow this discription on how to compile win32 source code with the winelib
http://www.winehq.org/Docs/winelib-user/
winelib-getting-started.shtml#WINEMAKER-INTRODUCTION

The process generates a Makefile that is supposed to complie a
ressource file e.g. winemine.rc with the wrc compiler, but winemaker adds a '-L' option to the wrc compilwr that is does not recognize.

I am using wine-20021219 on RedHat 8.0.

It seems like a bug in winemaker.
<snip>

Problem 2
=========
When i try to run winemine I get this error
(/user/usr/local/wine/programs/winemine-hcs) #./winemine-hcs winemine-hcs.so
Warning: could not find wine config [Drive x] entry for current working directory /user/usr/local/wine/programs/winemine-hcs; starting in windows directory.
/usr/local/bin/wine: cannot find 'winemine-hcs.exe'

<snip>
Any suggestions ?

Regards
--
Hans Christian Studt  : http://hc.studt.dk  mailto:hc@studt.dk
.dk og W3C standarder : http://w3c.studt.dk
_________________________________________________________________
The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup
Index: winemaker
===================================================================
RCS file: /home/wine/wine/tools/winemaker,v
retrieving revision 1.59
diff -u -r1.59 winemaker
--- winemaker	15 Dec 2002 03:00:40 -0000	1.59
+++ winemaker	2 Jan 2003 06:42:20 -0000
@@ -677,6 +677,8 @@
 	$name =~ s+(/|\.[^.]*)$++;
 	if ($opt_target_type == $TT_DLL) {
 	  $name = "$name.dll";
+	} else {
+	  $name = "$name.exe";
 	}
 	$targets{$name}=1;
       }
@@ -1784,8 +1786,24 @@
     # Iterate over all the targets...
     foreach my $target (@{@$project[$P_TARGETS]}) {
       print FILEO "### @$target[$T_NAME] sources and settings\n\n";
+      my $appmode;
+      my $basemodule=@$target[$T_NAME];
       my $canon=canonize("@$target[$T_NAME]");
       $canon =~ s+_so$++;
+      if (@$target[$T_TYPE] == $TT_CUIEXE) {
+        $appmode = "cui";
+        $basemodule =~ s/\.exe$//;
+      } elsif (@$target[$T_TYPE] == $TT_GUIEXE) {
+        $appmode = "gui";
+        $basemodule =~ s/\.exe$//;
+      } else {
+        $appmode = "";
+        $basemodule =~ s/\.dll$//;
+      }
+
+      generate_list("${canon}_MODULE",1,[@$target[$T_NAME]]);
+      generate_list("${canon}_BASEMODULE",1,[$basemodule]);
+      generate_list("${canon}_APPMODE",1,[$appmode]);
       generate_list("${canon}_C_SRCS",1,@$target[$T_SOURCES_C]);
       generate_list("${canon}_CXX_SRCS",1,@$target[$T_SOURCES_CXX]);
       generate_list("${canon}_RC_SRCS",1,@$target[$T_SOURCES_RC]);
@@ -1862,7 +1880,7 @@
     print FILEO "\t_list=\"\$(SUBDIRS)\"; for i in \$\$_list; do (cd \$\$i; \$(MAKE) install) || exit 1; done\n";
   }
   if (@{@$project[$P_TARGETS]} > 0) {
-    print FILEO "\t_list=\"\$(EXES)\"; for i in \$\$_list; do \$(INSTALL_SCRIPT) \$\$i \$(bindir); done\n";
+    print FILEO "\t_list=\"\$(EXES:%.exe=%)\"; for i in \$\$_list; do \$(INSTALL_SCRIPT) \$\$i \$(bindir); done\n";
     print FILEO "\t_list=\"\$(EXES:%=%.so) \$(DLLS:%=%.so)\"; for i in \$\$_list; do \$(INSTALL_PROGRAM) \$\$i \$(dlldir); done\n";
   }
   print FILEO "\n";
@@ -1873,7 +1891,7 @@
     print FILEO "\t_list=\"\$(SUBDIRS)\"; for i in \$\$_list; do (cd \$\$i; \$(MAKE) uninstall) || exit 1; done\n";
   }
   if (@{@$project[$P_TARGETS]} > 0) {
-    print FILEO "\t_list=\"\$(EXES)\"; for i in \$\$_list; do \$(RM) \$(bindir)/\$\$i;done\n";
+    print FILEO "\t_list=\"\$(EXES:%.exe=%)\"; for i in \$\$_list; do \$(RM) \$(bindir)/\$\$i;done\n";
     print FILEO "\t_list=\"\$(EXES:%=%.so) \$(DLLS:%=%.so)\"; for i in \$\$_list; do \$(RM) \$(dlldir)/\$\$i;done\n";
   }
   print FILEO "\n";
@@ -1883,7 +1901,7 @@
       print FILEO " wineapploader";
   }
   if (@{@$project[$P_TARGETS]} > 0) {
-      print FILEO " \$(EXES)";
+      print FILEO " \$(EXES:%.exe=%)";
   }
   print FILEO "\n\n";
 
@@ -1896,10 +1914,8 @@
       my $all_libs;
 
       $canon =~ s/_so$//;
-      if (@$target[$T_TYPE] == $TT_GUIEXE) {
-	  $mode = "-m gui --exe @$target[$T_NAME]";
-      } elsif (@$target[$T_TYPE] == $TT_CUIEXE) {
-	  $mode = "-m cui --exe @$target[$T_NAME]";
+      if ((@$target[$T_TYPE]==$TT_GUIEXE) || (@$target[$T_TYPE]==$TT_CUIEXE)) {
+	  $mode = "--exe \$(${canon}_MODULE) -m\$(${canon}_APPMODE)";
       } else {
 	  $mode = "";
       }
@@ -1912,18 +1928,18 @@
         $all_libs="\$(${canon}_LIBRARIES:%=-l%) \$(ALL_LIBRARIES)";
       }
 
-      print FILEO "@$target[$T_NAME].spec.c: \$(${canon}_SPEC_SRCS) \$(${canon}_RC_SRCS:.rc=.res) \$(${canon}_OBJS)\n";
-      print FILEO "\t\$(LD_PATH) \$(WINEBUILD) -fPIC -o \$\@ \$(${canon}_SPEC_SRCS:%=--spec %) \$(${canon}_RC_SRCS:%.rc=-r %.res) \$(${canon}_DLL_PATH) \$(WINE_DLL_PATH) \$(GLOBAL_DLL_PATH) $all_dlls $mode \$(${canon}_OBJS)\n";
+      print FILEO "\$(${canon}_MODULE).spec.c: \$(${canon}_SPEC_SRCS) \$(${canon}_RC_SRCS:.rc=.res) \$(${canon}_OBJS)\n";
+      print FILEO "\t\$(LDPATH) \$(WINEBUILD) -fPIC -o \$\@ $mode \$(${canon}_SPEC_SRCS:%=--spec %) \$(${canon}_RC_SRCS:%.rc=%.res) \$(${canon}_OBJS) \$(${canon}_DLL_PATH) \$(WINE_DLL_PATH) \$(GLOBAL_DLL_PATH) $all_dlls\n";
       print FILEO "\n";
-      print FILEO "@$target[$T_NAME].so: @$target[$T_NAME].spec.o \$(${canon}_OBJS) \$(${canon}_DEPENDS) \n";
+      print FILEO "\$(${canon}_MODULE).so: \$(${canon}_MODULE).spec.o \$(${canon}_OBJS) \$(${canon}_DEPENDS)\n";
       if (@{@$target[$T_SOURCES_CXX]} > 0 or @{@$project_settings[$T_SOURCES_CXX]} > 0) {
         print FILEO "\t\$(LDXXSHARED)";
       } else {
         print FILEO "\t\$(LDSHARED)";
       }
-      print FILEO " \$(LDDLLFLAGS) -o \$\@ \$(${canon}_OBJS) @$target[$T_NAME].spec.o \$(${canon}_LIBRARY_PATH) \$(ALL_LIBRARY_PATH) $all_libs \$(LIBS)\n";
-      if (@$target[$T_TYPE] ne $TT_DLL) {
-        print FILEO "\ttest -f @$target[$T_NAME] || \$(INSTALL_SCRIPT) wineapploader @$target[$T_NAME]\n";
+      print FILEO " \$(LDDLLFLAGS) -o \$\@ \$(${canon}_OBJS) \$(${canon}_MODULE).spec.o \$(${canon}_LIBRARY_PATH) \$(ALL_LIBRARY_PATH) $all_libs \$(LIBS)\n";
+      if (@$target[$T_TYPE] != $TT_DLL) {
+        print FILEO "\ttest -f \$(${canon}_BASEMODULE) || \$(INSTALL_SCRIPT) wineapploader \$(${canon}_BASEMODULE)\n";
       }
       print FILEO "\n\n";
     }
@@ -1931,7 +1947,7 @@
   close(FILEO);
 
   foreach my $target (@{@$project[$P_TARGETS]}) {
-    if (@$target[$T_TYPE] eq $TT_DLL) {
+    if (@$target[$T_TYPE] == $TT_DLL) {
       generate_spec_file(@$project[$P_PATH],$target,$project_settings);
     }
     if (@$target[$T_FLAGS] & $TF_WRAPPER) {
@@ -2622,7 +2638,7 @@
 
 dnl **** Try to find where winelib is located ****
 
-LD_PATH=""
+LDPATH=""
 WINE_INCLUDE_ROOT=""
 WINE_INCLUDE_PATH=""
 WINE_LIBRARY_ROOT=""
@@ -2736,7 +2752,7 @@
 if test -n "$WINE_LIBRARY_ROOT"
 then
   WINE_LIBRARY_PATH="-L$WINE_LIBRARY_ROOT"
-  LD_PATH="$WINE_LIBRARY_ROOT"
+  LDPATH="$WINE_LIBRARY_ROOT"
 else
   WINE_LIBRARY_PATH=""
 fi
@@ -2756,7 +2772,7 @@
 if test -n "$WINE_UNICODE_ROOT" -a "$WINE_UNICODE_ROOT" != "$WINE_LIBRARY_ROOT"
 then
   WINE_LIBRARY_PATH="$WINE_LIBRARY_PATH -L$WINE_UNICODE_ROOT"
-  LD_PATH="$LD_PATH:$WINE_UNICODE_ROOT"
+  LDPATH="$LDPATH:$WINE_UNICODE_ROOT"
 fi
 
 if test -z "$WINE_UUID_ROOT"
@@ -2774,7 +2790,7 @@
 if test -n "$WINE_UUID_ROOT" -a "$WINE_UUID_ROOT" != "$WINE_LIBRARY_ROOT"
 then
   WINE_LIBRARY_PATH="$WINE_LIBRARY_PATH -L$WINE_UUID_ROOT"
-  LD_PATH="$LD_PATH:$WINE_UUID_ROOT"
+  LDPATH="$LDPATH:$WINE_UUID_ROOT"
 fi
 
 if test -z "$WINE_DLL_ROOT"
@@ -2795,13 +2811,13 @@
 ],[$WINE_DLL_ROOT])
 WINE_DLL_PATH="-L$WINE_DLL_ROOT/wine"
 
-if test -n "$LD_PATH"
+if test -n "$LDPATH"
 then
-  LD_PATH="$LD_PATH:$WINE_DLL_ROOT"
+  LDPATH="$LDPATH:$WINE_DLL_ROOT"
 else
-  LD_PATH="$WINE_DLL_ROOT"
+  LDPATH="$WINE_DLL_ROOT"
 fi
-LD_PATH="LD_LIBRARY_PATH=\"$LD_PATH:\$\$LD_LIBRARY_PATH\""
+LDPATH="LD_LIBRARY_PATH=\"$LDPATH:\$\$LD_LIBRARY_PATH\""
 
 if test -z "$WINE_TOOL_PATH"
 then
@@ -2823,7 +2839,7 @@
   AC_MSG_ERROR([Could not find Wine's wrc tool])
 fi
 
-AC_SUBST(LD_PATH)
+AC_SUBST(LDPATH)
 AC_SUBST(WINE_INCLUDE_PATH)
 AC_SUBST(WINE_LIBRARY_PATH)
 AC_SUBST(WINE_DLL_PATH)
@@ -3009,7 +3025,7 @@
 WINE_DLL_ROOT     = @WINE_DLL_ROOT@
 WINE_DLL_PATH     = @WINE_DLL_PATH@
 
-LD_PATH           = @LD_PATH@
+LDPATH            = @LDPATH@
 
 # Where are the MFC
 
@@ -3036,20 +3052,20 @@
 CPP       = @CPP@
 CXX       = @CXX@
 WRC       = @WRC@
-CFLAGS    = @CFLAGS@
-CXXFLAGS  = @CXXFLAGS@
-WRCFLAGS  = -r -L
-OPTIONS   = @OPTIONS@ -D_REENTRANT -DWINELIB $(GLOBAL_DEFINES) $(GLOBAL_INCLUDE_PATH)
+CFLAGS    = @CFLAGS@ $(CEXTRA)
+CXXFLAGS  = @CXXFLAGS@ $(CXXEXTRA)
+WRCFLAGS  = -J -m $(WRCEXTRA)
+OPTIONS   = @OPTIONS@ -D_REENTRANT
 LIBS      = @LIBS@ $(LIBRARY_PATH)
-ALLFLAGS  = $(DEFINES) -I$(SRCDIR) $(INCLUDE_PATH) $(WINE_INCLUDE_PATH)
-ALLCFLAGS = $(CFLAGS) $(CEXTRA) $(OPTIONS) $(ALLFLAGS)
-ALLCXXFLAGS=$(CXXFLAGS) $(CXXEXTRA) $(OPTIONS) $(ALLFLAGS)
-ALLWRCFLAGS=$(WRCFLAGS) $(WRCEXTRA) $(OPTIONS) $(ALLFLAGS)
+DIVINCL   = $(GLOBAL_INCLUDE_PATH) -I$(SRCDIR) $(INCLUDE_PATH) $(WINE_INCLUDE_PATH)
+ALLCFLAGS = $(DIVINCL) $(CFLAGS) $(GLOBAL_DEFINES) $(DEFINES) $(OPTIONS)
+ALLCXXFLAGS=$(DIVINCL) $(CXXFLAGS) $(GLOBAL_DEFINES) $(DEFINES) $(OPTIONS)
 ALL_DLL_PATH  = $(DLL_PATH) $(GLOBAL_DLL_PATH) $(WINE_DLL_PATH)
 ALL_LIBRARY_PATH = $(LIBRARY_PATH) $(GLOBAL_LIBRARY_PATH) $(WINE_LIBRARY_PATH)
 WINE_LIBRARIES = -lwine -lwine_unicode -lwine_uuid
 ALL_LIBRARIES = $(LIBRARIES:%=-l%) $(GLOBAL_LIBRARIES:%=-l%) $(WINE_LIBRARIES)
-LDCOMBINE = ld -r
+LD        = ld
+LDCOMBINE = $(LD) -r
 LDSHARED  = @LDSHARED@
 LDXXSHARED= @LDXXSHARED@
 LDDLLFLAGS= @LDDLLFLAGS@
@@ -3101,7 +3117,7 @@
 	$(CXX) -c $(ALLCXXFLAGS) -o $@ $<
 
 .rc.res:
-	$(LD_PATH) $(WRC) $(ALLWRCFLAGS) -o $@ $<
+	$(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ -r $<
 
 .PHONY: all install uninstall clean distclean depend dummy
 


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux