[RFC] Winelib enhancements
julliard at winehq.com
Thu Nov 28 12:35:31 CST 2002
"Dimitrie O. Paun" <dpaun at rogers.com> writes:
> However, these tweaks are really annoying in the initial
> stages of the port, and would be so nice if we had a nice
> compiler wrapper (call it wcc) that would do that behind
> the scenes, so that the only modification to the makefile
> would be:
> Q: Alexandre, would you accept such a utility in the tree?
I don't know, I don't think you can write a one-size-fits-all script,
different apps will require different options, and then it will get
even more confusing IMO if you have two different ways of doing it
depending on your options. Maybe we should simply have a script
example in the documentation that people can adapt and ship with their
app if the makefile really makes it hard to set options.
> This would mean moving the resources out of the .spec.c
> file, and exporting the resources variable so we can link
> it into the .spec.c file.
> Q: Alexandre, is this acceptable? Does it warrant discussion?
I don't think that's necessary. Using .o files has a number of
problems, and it's really cleaner to use .res IMO. It's also more
along the lines of how Windows does it, and allows you to keep using
windres if you want, instead of being forced to switch to wrc.
> 2. Our linking process is quite different from the "standard"
> one which uses gcc/ld to do the linking. We generate
> intermediate files (.spec.c files), and use different flags.
> Again, the solution for this (to at least help initial
> porting efforts) would be a wrapper script that does this,
> that can be used instead of ld. And so the question comes
> back again, to haunt us: is this needed/wanted/acceptable?
Yes, I think we want a wrapper like dllwrap to do all that. I'm not
sure a script would be enough, we may want a full-fledged C program.
The idea would be that you do something like:
winewrap *.o *.res -o foo -lwhatever
and it builds the .spec.c, compiles it, links everything into
foo.exe.so, and builds a foo executable (which may be a wrapper script
or a real ELF binary). This also (mostly) solves the "Running" issues:
you still have a .exe.so file, but you don't really need to worry
about it. You simply run "foo" and everything works.
julliard at winehq.com
More information about the wine-devel