[patch_done] TZIBEventAlerter and Delphi linker
Posted: 12.08.2008, 18:57
After introducing TZIBEventAlerter component, Interbase/firebird units are always linked into app, used or not. This unnecessary increases exe size approx. 100k. Commenting ENABLE_INTERBASE in Zeos.inc wont help either.
Problem lies in ZComponentReg.pas which always uses ZIBEventAlerter unit, no matter ENABLE_INTERBASE is defined or not. So...here's patch against trunk, rev408:
Problem lies in ZComponentReg.pas which always uses ZIBEventAlerter unit, no matter ENABLE_INTERBASE is defined or not. So...here's patch against trunk, rev408:
Code: Select all
Index: src/component/ZComponentReg.pas
===================================================================
--- src/component/ZComponentReg.pas (revision 410)
+++ src/component/ZComponentReg.pas (working copy)
@@ -87,7 +87,8 @@
{$ENDIF}
{$ENDIF}
Classes, ZConnection, ZDataset, ZSqlUpdate, ZSqlProcessor, ZStoredProcedure,
- ZSqlMonitor, ZSqlMetadata, ZSequence, ZIBEventAlerter;
+ ZSqlMonitor, ZSqlMetadata, ZSequence
+ {$IFDEF ENABLE_INTERBASE}, ZIBEventAlerter {$ENDIF ENABLE_INTERBASE};
{**
Registers components in a component palette.
@@ -96,7 +97,8 @@
begin
RegisterComponents(ZEOS_DB_PALETTE, [
TZConnection, TZReadOnlyQuery, TZQuery, TZTable, TZUpdateSQL,
- TZStoredProc, TZSQLMetadata, TZSQLProcessor, TZSQLMonitor, TZSequence, TZIBEventAlerter]);
+ TZStoredProc, TZSQLMetadata, TZSQLProcessor, TZSQLMonitor, TZSequence
+ {$IFDEF ENABLE_INTERBASE}, TZIBEventAlerter {$ENDIF ENABLE_INTERBASE}]);
{$IFDEF WITH_PROPERTY_EDITOR}
RegisterPropertyEditor(TypeInfo(string), TZConnection, 'Protocol',