trichview.com

trichview.support.examples




How to reduce size of executable with RichView


Return to index


Author

Message

Sergey Tkachenko

Posted: 01/23/2002 23:53:10


This tip can be applied only to the registered version (with source code).


You can remove unused RichView features from the compiled exe-file, if you

add the following compiler defines:


RVDONOTUSEJPEGIMAGE - remove a special support for Jpegs;

RVDONOTUSEHTML - remove a code for HTML export;

RVDONOTUSERTF - remove a code for RTF export;

RVDONOTUSERTFIMPORT - remove a code for RTF import;

RVDONOTUSERVF - remove a code working with native RichView format (you

cannot remove it if you use TRichViewEdit, TDBRichView or TDBRichViewEdit in

your project);

RVDONOTUSEUNICODE - remove a code for Unicode support;

RVDONOTUSETABLES - remove all code related to tables.


There are some more useful defines, see RV_Defs.inc


How to use:

In Delphi IDE, choose menu Project | Options, tab Directories/Conditionals.

Enter semicolon-delimited list of defines in the field "Conditional

defines".

Click OK.

Rebuild the project (menu Project | Build All Projects)


For example,

size of the demo with semi-transparent images

(from demos\addins\blendbitmap\delphi\) is

918,525 bytes (Delphi 6, with optimization)

The size with the all above mentioned compiler defines:

574,464 - only 63% of original size!



--

Sergey Tkachenko

svt@trichview.com

www.trichview.com





Powered by ABC Amber Outlook Express Converter