Use Delphi to write database programs, but also need to publish BDE (BDE, but BDE is large, if Delphi5 is 17.4m, far more than the general program itself. In fact, some files are not used at all, so we can create an installer with the InstallShield Express for Delphi included with Delphi when publishing, so you can achieve the purpose of "weight loss" for our database applications.
Here is the role of the key files of the BDE engine, we use this as a basis for streamline BDE drivers:
First, an indispensable document
BLW32.DLL: Language drive function library.
Idapi32.dll: BDE Basic Library.
FareAast.btl, USA.BTL: Far East language and American language drivers are indispensable to Chinese software.
IDR20009.DLL: Error Information Library.
Second, the database driver (select one or more as needed)
IDasci32.dll: ASCII text database driver function library, if you do not need ASCII text database, you can.
IDDAO32.DLL: Access database driver log library, if you don't need Access database, you can.
IDDBAS32.DLL: DBase database driver log library, if you don't have a dbase database, you can.
IDODBC32.DLL: ODBC Database Driver Release Library, if you don't have to use an ODBC database, don't.
IDPDX32.dll: Paradox Database Driver Release Library, if you don't have to use the Paradox database, you can.
Third, other drivers and configuration files (select one or more as needed)
IDBAT32.DLL: Batch Operation Driver Database, if you don't have to use the TBATCHMOVE control or dbibatchMove class function, you can.
IDDR32.DLL: Data Repository driver function library, if you don't have to use a Data Repository function, you can.
IDPROV32.DLL: BDE DataSet Provider driver log library, if you don't have to use a TPROVIDER control, you can.
IDQbe32.dll: QBE driver function library, if you don't have query by example, you can.
IDSQL32.DLL: SQL query driver log library, if you don't have to query with TQuery, don't.
IDapi32.cfg: BDE configuration file, if there is no special requirements in the program, don't. It is also possible to set it correctly after the BDE manager.
Fourth, other documents (generally not available)
Other * .btl: Language drivers in other countries and regions, don't.
BDE32.HLP, BDE32.cnt: BDE Help file, you can.
BDEADMIN.EXE, BDEADMIN.HLP, BDEADMIN.CNT: BDE Manager, and help files, if you don't need software users to configure BDE yourself, you may not.
DataBump.exe, DataBump.hlp, DataBump.cnt: Database Data Transfer Tool and Help File, you can.
Localsql.hlp, localsql.cnt: SQL query statement help file, don't.
SQLLNK32.HLP, SQLLNK32.cnt: SQL Connection Help file, you can. After selecting the file as needed, write a registry file. The registry key value that needs to be set is: the setting of the directory where the data driver is:
HKEY_LOCAL_MACHINE / SOFTWARE / BORLAND / DATABASE Engine / DLLPATH (string value)
The setting of the directory where the language driver is located:
HKEY_LOCAL_MACHINE / SOFTWARE / BORLAND / BLW32 / BLAPIPATH (string value)
Language driver file name:
HKEY_LOCAL_MACHINE / SOFTWARE / BORLAND / BLW32 / LOCALE_LIB # (string value) where # is numbered, in order is 0, 1, 2, 3 ... such as:
HKEY_LOCAL_MACHINE / SOFTWARE / BORLAND / BLW32 / LOCALE_LIB0 = "FareArsst.btl" HKEY_LOCAL_MACHINE / SOFTWARE / BORLAND /BLW32/LOCALE_LIB1="usa.btl "
It is enough to do this, which can effectively reduce the size of the BDE driver, such as using the TTable control to operate the Paradox database, as long as iDapi32.dll, bLW32.dll, idr20009.dll, frareast.btl, usa.btl Idpdx32.dll six files. These files can be placed in any directory, as long as the registry is indicated. BDE is reduced by 17.4m to 1.48m, and only a few hundred k, which makes the program decrease.
Below we use InstallShield Express for Delphi5.0 to make a PARADOX database application installer as an example:
1. Start InstallShield Express for Delphi5.0 program;
2. Set the relevant file directory path in the New Project dialog, 3. Then enter setup checklist;
4. Set the program name 5., program directory, installer main window, etc. in Set The Visual Design;
6. Set General Options, 7. Select the BDE database engine in Specify InstallShield Objects for Delphi5;
8. Set the Groups and Files items in the Specify Components and Files, 9. Add all program files and database table files to the user in Program Files, 10. Remove idbat32.dll, usa.btl, iDAPI in BDE / IDAPI Files .cfg, charset.cvb, Bantam.dll, BLW32.DLL, IDAPI32.DLL, FAREAST.BTL, IDPDX32.DLL, IDR20009.DLL, IDSQL32.DLL;
11. Set the required installation dialog box in Dialog Boxes;
12. Set the keyS item in Make Registry Change, 13. Add Software / Borland / BLW32 and Software / Borland / Database Engine, 14. 14.. "Locale_lib0 'above file path' /fareast.dll" and "local_lib1 'above file path' /usa.dll" 15. Add "DLLPath 'above file path'" in the database engine value, "configfile01 'above file path" /Idapi.cfg" ;16. In Specify Folder and ICons, the relevant items are set according to the actual requirements;
17. Set the information about the installation disk in Run Disk Builder;
18. Finally, Test The Installation and Create Distribution Media can complete the installation of the installer.