Whither DWT? (wxD)

Anders F Björklund afb at algonet.se
Sat Apr 22 02:46:17 PDT 2006


Charles Hixson wrote:

> I haven't considered it with D largely because of the low revision number
> at SourceForge.  0.3 is a bit scarey.

Hehe, I guess a version number of 0.04 would be just ghostly then :-)

I have been rewriting the http://wxd.sourceforge.net/ page, to make it
less scary, but there is no timeline for when it would reach a "1.0"...

> For my purposes, size isn't a major consideration.  I've been considering
> (among other things) C++ & Qt.  I just don't like to need to depend so much
> on pointers.  

Cutting down on the size is a *big* item on the TODO, but currently
if you link a (stand-alone!) program with wxD it's around 10 MB. :-(

One likely reason is probably that it doesn't strip the "dead code" ?
(if you link to the shared wx libraries, it's instead more like 3 MB)

> And garbage collection is really a VERY nice feature.

I think one of the gripes that people *seem* to have about SWT (& DWT)
is that the resources aren't garbage collected but need to be managed ?

They do have a pretty elaborate rationale why it does, though:
http://www.eclipse.org/articles/swt-design-2/swt-design-2.html

>>The *-config scripts output stuff in GCC format, so you need to use GDC
>>- or feed it through some kind of preprocessing filter for DMD syntax...
>>I ended up hardcoding DMs Makefile, and using wx-config for GNUmakefile.
>>But I had to use "gcc" for the actual linking, not the "dmd" command ?
> 
> You are clearly MUCH more expert than I am.  I still build makefiles by
> guess and try, based on what worked previously.  Programming I've done for
> decades, but I'm in my early days with Linux and assoc GNU utils.

It's the other way around here. I've been using Linux and GNU tools
for a decade, but just trying to figure out Windows... @echo off ?

For the GNU tools, you do things like `wx-config --libs` and so on.
But it doesn't work so easy when working with Windows and Macintosh,
as they often require you to set it up explicitly in a GUI instead ?
(even if you *can* do it the GNU way too, in both MinGW and Darwin)

I think Bero made some progress with using Bakefiles, but it's still
somewhat tricky to get OpenGL or wx shared libraries working with DMD.
So for the moment there are two wxD compilation tracks: "DM" and "GNU"
And I'm mostly doing the three GNU ones, while yet others do the DM...

> Huuu... I would rate D as Beta.  If wxD is on the same level of stability as
> D, perhaps I should think more seriously about it.  

There are some crashes at the moment, but when I meant stability I was
more talking in terms of API and big features etc - D is still adding ?

Once we get the "crashers" out, and polish wxD a little (i.e. lose some 
wx.NET references and add some better documentation) - then it's a beta.

It's not many items left to decide, one of the last is if the classes 
should use short names like "Frame", or "wxFrame" - for compatibility ?


A *minor* setback is that the wx.NET project seems to have slowed to a 
stop, which means that our wxD project needs to pull a heavier load...

Our "wxc" is based on their "wx-c", and our "wxd" is based on "wx.NET",
as noted explicitly in the source code. It has been a big help for wxD.

I do plan on sending most of my D extensions upstream to wx.NET as well,
since I don't really want to fork but rather use the same base for both.


If you're interested in C#, you should definitely check the project out!
http://wxnet.sourceforge.net/ (versions for: Windows, Linux, Macintosh)

All these are open source projects, and pulling in the same direction:
wxWidgets (C++) --> wx.NET (C#) --> wxD (D). With mutual benefits, too ?

All code is released under the LGPL-ish "wxWindows License", by the way.
It should work for everyone ? See http://www.wxwidgets.org/newlicen.htm


>(Perhaps, anyway, I
> should install gdc and see what can be done that way.  Would gdc link well
> with wxD?)

Yes, wxD supports both DMD and GDC. It actually needs to detect which
D compiler is being used, since their ABI for arrays differs a little.

You'll find that the Makefiles do this, and set a __DMD__ or __GDC__
macro. They also add platform versions: __WXMSW__ __WXGTK__ __WXMAC__

(i.e. macros for the C++ library, and versions for the D library...)
wxD 0.04 uses some platform hacks, it has been rewritten for wxD 0.05

--anders



More information about the Digitalmars-d-dwt mailing list