How to build program with DWT2 and DMD2?

JohnnyK johnnykinsey at comcast.net
Wed Aug 21 09:39:18 PDT 2013


On Tuesday, 20 August 2013 at 17:31:30 UTC, Jacob Carlborg wrote:
> On 2013-08-20 15:31, JohnnyK wrote:
>
>> This particular executable compiled to 2.7MB.  Most DWT 
>> Executables are
>> between 2.3MB and 3MB.  I will say this the executables 
>> compress pretty
>> good with the latest UPX exe compressor for windows.  With UPX 
>> the
>> executable became 766KB in size so in the end it is below 1MB.
>
> I'm guessing that most of DWT will always be pulled in when 
> compiling. Hopefully that means that the executable won't grow 
> that much when adding new code from DWT.

So far I have tried different things and I don't see the 
executables growing much.  Still this is by far less than having 
to deploy the GTK or some other GUI shared library.  Also you 
don't have to worry about updates to externals.  So when you 
compile an app with DWT that app will be the same today, tomorrow 
and forever.  You don't have to worry about a user upgrading 
their copy of the GTK or some other library and bang your app 
fails.  This is why I worked so hard and wanted to use DWT over 
GTKd or any of the others.  It's self contained.  Now I can build 
an app and send the executable and the user need only copy it to 
a directory and execute it.  Everything for the app can be in 
that one directory no externals beyond OS specific stuff.
   BTW I have tried several of the GUI libraries for D and I have 
only gotten GTKd and DWT to work successfully.  Out of the 2 I 
like DWT better because of the above mentioned reasons.  The GTK 
is just too big and complex to require people to install for a 
simple utility with a couple of controls to do some simple little 
thing.  Don't get me wrong GTKd works and very well once you get 
the correct GTK library installed properly.  Now this is specific 
to Windows.  Many Linux distros have GTK and most automatically 
install it when you install the OS.  I know nothing about MAC as 
that OS is not a target for me.
   The only other thing I am having issues with as far as DWT goes 
is these darn Layout things.  I understand what they are there 
for but I don't know if I like software moving my controls all 
over the window without me knowing that they are showing 
properly.  My only advice is when using the layout things once 
you put the control on the window don't move it or re-size it let 
the layout thing do that.  I have several times now made it where 
you could not see any controls on the screen because I messed up 
the layout things.  Sometimes the controls would be showing until 
the user maximizes or re-sizes the screen the window and then the 
controls would either change size hiding data or other controls 
messing up the display or totally disappear.  Anyway I suggest 
don't use them until you get more comfortable with DWT.  IMHO DWT 
gives you too much candy to choose from and you could end up with 
a belly ache if not careful.  I say keep things really simple to 
start.  At least that is what I am trying to do for now.  Anyway 
I am a happy DWT user for now.  Jacob thank you so much for all 
your hard work this library does the trick for me.


More information about the Digitalmars-d-dwt mailing list