View previous topic :: View next topic |
Author |
Message |
Dune
Joined: 22 Nov 2006 Posts: 6
|
Posted: Wed Nov 22, 2006 2:44 pm Post subject: Using DFL |
|
|
Hi,
I'm fresh to D and found DFL which is really a nice package.
Have some questions though:
Is it possible to get the apps smaller than 300kb? (leave some unused stuff out...)
Is there a possibility to use DFL's non-gui functions without a form? (Console or CGI)
Thanks
Dune |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Fri Nov 24, 2006 12:10 am Post subject: Re: Using DFL |
|
|
I have heard that DFL produces one of the smallest exe sizes for GUI libs with similar feature sets.
Compiling with DFL normally gives me 301 KB for a minimal GUI executable. (Application.run(new Form()); compiled with dfl test.d) This includes debugging information.
Include the -release switch and it goes down to 278 KB.
Run it through UPX and get 98.5 KB.
There is a way to exclude drag n' drop support from DFL, which is a hefty chunk (due to a lot of COM interfacing) which requires recompiling DFL and anything else that uses DFL's Control. An easy way to do this would be to open a command prompt in the DFL source directory, type set dfl_flags=-version=NO_DRAG_DROP and then makelib and copying the updated lib files to DMD's lib directory. Finally, compile the test exe with dfl -release -version=NO_DRAG_DROP test.d (note that you will get linker errors if you do not compile with switch -version=NO_DRAG_DROP when DFL's lib was compiled with it) and the exe size goes down to 256 KB and UPX it down to 93.5 KB. However, NO_DRAG_DROP can complicate things, it is up to you if it is worth it.
It is possible to use DFL for non-GUI applications; I have done it on several occasions (e.g. dfl.exe does this). |
|
Back to top |
|
|
|