Hi Maciej,
On Apr 16, 2006, at 2:41 PM, Maciej Stachowiak wrote:
Hi Kevin,
On Apr 16, 2006, at 11:09 AM, Kevin Ollivier wrote:
This is what I am going to do with the wx-specific sources. But,
and I know this is being a bit picky ;-), I hesitate to put the
project files there because platform != port in some cases. e.g.
since wx is cross-platform, it may be able to, or need to, use
some sources from platform/win, platform/linux, or platform/mac.
So I guess I see platform as a mixture of "port" specific and "os"
specific sources, and I think it could get confusing as to where
to put (or where to find) a port's project files.
We actually have three levels of platform defined.
1) Core operating system dependencies:
PLATFORM(DARWIN) PLATFORM(WIN_OS) PLATFORM(POSIX)
We'll probably add PLATFORM(SYMBIAN) and maybe others at this level.
2) Desktop environment / UI toolkit:
PLATFORM(MAC) PLATFORM(WIN)
We'll probably add PLATFORM(S60), PLATFORM(KDE), PLATFORM(GTK),
PLATFORM(WX), etc at this level.
3) Graphics API:
PLATFORM(CAIRO) PLATFORM(CG)
If any port wants to use a different graphics API besides these we
could add PLATFORM(QPAINTER) and so forth as needed.
Ideally, anything that might be needed by a port using a cross-
platform UI toolkit would be defined as an OS-level platform
dependency, not a toolkit-level platform dependency.
We haven't fully deployed this scheme yet in WebCore but we are
working towards it. The platform directory names should match this
concept of platform.
Thanks for the info!
Well, in any case, for now I've set things up to put Bakefile-
generated projects in WebCore/ports/<PORT> directory. (Perhpas
'projects' would be a better term?) I've also made everything in
the Bakefiles relative to SRCDIR, too, so that if we move the
project files into another folder, the only change we need to make
to the Bakefiles is to make sure that SRCDIR points to the WebCore
folder. I should be able to create a patch in a day or two,
assuming anonsvn comes back up. :-) I'm going to give Mike a heads-
up first to see if what I've done works for him, or if I need to
change something first, but once that's done I'll submit it to
Bugzilla.
BTW, you might want to consider having a separate project file
that generates the cross-platform webcore sources as a static
library (say, a "WebCoreBase" project file), and then have the
Win32, etc. projects statically link in that library and only
build the files specific to their port/platform (and of course,
depend on WebCoreBase). Actually, I've pretty much already set up
the Bakefile projects this way, so that you can see what I mean
when I submit the patch. :-) This way there wouldn't be any
redundancy among projects in terms of maintaining the cross-
platform sources, and each port will only ever have to worry about
updating/maintaining its own specific files.
Even cross-platform files might get compiled differently for
different ports - the PLATFORM defines will be different. So I
wouldn't recommend this. And anyway, the whole thing compiles from
scratch in only 5 minutes or so on a fast mac or PC so you're not
saving much.
I'm not really concerned about speed - I'm looking at it more from a
maintenance perspective. For example, consider you have 6 ports in
the tree, and you add/remove a source file used by all of them. If
you have a "base" project, you can remove the file from one project
file and rebuild, whereas if each project maintains a version of the
'base' project in its own project files, the change has to be made in
all 6 project files. IMHO keeping the ports (including Safari) in
sync automatically, as much as possible at least, would be ideal.
Actually, if the port uses Bakefile to generate its makefiles, we can
already do this, and without making things a two-step process of base
library + port library. This is because Bakefile lets you create
templates, and in my system here I have a webcore_base template which
holds all the include dirs, defines, etc. shared by all ports. Then
each specific port inherits from that and sets any specific defines,
libs/includes, etc. it needs.
Anyways, sorry, I realize it might be more helpful to discuss this
after you've all had some time to look at the Bakefile patch, so you
can actually see what I'm trying to explain, and then we could look
at how to move forward from there. I sometimes get a bit ahead of
myself. :-/ I'm pretty much finished with the implementation but want
to test on Win/Linux as well, and give Mike a chance to identify any
changes the patch would need for his port to work with it. Hopefully
in the next couple days or so! If someone wants
Regards,
Kevin
Regards,
Maciej
_______________________________________________
webkit-dev mailing list
[email protected]
http://www.opendarwin.org/mailman/listinfo/webkit-dev