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.
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.
Regards,
Maciej
_______________________________________________
webkit-dev mailing list
[email protected]
http://www.opendarwin.org/mailman/listinfo/webkit-dev