talk about dwt,jface executable size

torhu no at spam.invalid
Sat May 24 07:39:07 PDT 2008


John Reimer wrote:
> Hello torhu,
> 
>>> import dwt.widgets.Display;
>>> import dwt.widgets.Shell;
>>> pragma(lib, "dwt.lib");
>>> pragma(lib, "dwtx.lib");
>>> void main ()
>>> {
>>> auto display = new Display;
>>> auto shell = new Shell(display);
>>> shell.setText = "Hello DWT World ";
>>> shell.open;
>>> while (!shell.isDisposed)
>>> if (!display.readAndDispatch)
>>> display.sleep;
>>> display.dispose;
>>> }
>>> build command:
>>> 
>>> dmd test.d dwt.res -L/SUBSYSTEM:windows:5 -L/rc:dwt.res
>>> -J..\dwt-samples\res -J..\dwt-addons\res -release
>>> 
>>> executable size:
>>> 1.50 MB
>> I tried building this, and got a 1.39 MB exe.  It's still quite big.
>> My DWT application is 1.64 MB, which I don't see as a major problem.
>> So the size difference isn't huge between a minimal app and a real
>> app.
>> 
>> I built DWT (rev. 211) with dsss, with oneatatime=yes and only '-O
>> -release', no inlining. Then I build the app using bud, with inlining
>> enabled.  I don't know how much the inlining matters, since building
>> dwt takes 35 minutes on my pc, I haven't bothered to test much.  So
>> I'm really looking forward to dmd 1.031, with a usable -lib switch.
>> 
> 
> 
> I can't seem to get a helloworld size nearly that small, so I assume I must 
> be doing something differently.  Could you please try using ASpack from here 
> (http://www.aspack.com/downloads.html) and test it on your helloworld example? 
>  I'd like to see how small it shrinks.
> 

I get 379.5 kB.


More information about the Digitalmars-d-dwt mailing list