FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using DFL

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
Dune



Joined: 22 Nov 2006
Posts: 6

PostPosted: Wed Nov 22, 2006 2:44 pm    Post subject: Using DFL Reply with quote

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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Fri Nov 24, 2006 12:10 am    Post subject: Re: Using DFL Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group