All about automatic BDE -> AnyDAC migration utility.
The AnyDAC ADDFMChanger is a console application, aided for semi-automatic:
The idea behind ADDFMChanger is to replace names of BDE components and properties with appropriate AnyDAC names.
Note: The ADDFMChanger utility and the BDE2AnyDAC.txt files are located in the Bin sub-folder of the AnyDAC installation folder.
Run the ADDFMChanger utility without any arguments. It will output the following reference text:
DFM-Changer 2.3 Copyright (c) 2000-2013 by DA-SOFT Technologies (www.da-soft.com) All Rights Reserved. Use: ADDFMChanger {<filesToProcess>} [-s] [-i] [-a] -f <RuleFile> -s - recurse subdirectories -i - ignore errors -f - path to filter files -a - migrate all occurrences; otherwise, only components will be migrated Example: ADDFMChanger x:\myDir\*.pas x:\myDir\*.dfm -s -a -f x:\MyRules.txt changes all pas and dfm files in myDir incl. subdirs according x:\MyRules.txt
In the command line you define where the files to convert are located. The sample below illustrates the migration of all PAS and DFM files in the directory "x:\myDir\":
ADDFMChanger.exe x:\myDir\*.pas x:\myDir\*.dfm [...]
You also have to define the location of the rule file. The BDE->AnyDAC rule file is located in Bin\BDE2AnyDAC.txt:
ADDFMChanger x:\myDir\*.pas x:\myDir\*.dfm -s -a -f BDE2AnyDAC.txt
The rule file consists of a few lines; each of them looking like:
[old name] -> [new name] -> [add this unit to interface USES clause]
There "unit" may be a coma separated list of the units. An example of a translation rule in the rule file is shown bellow:
[TStoredProc] -> [TADStoredProc] -> [uADCompClient]
This will replace TStoredProc with TADStoredProc and add uADCompClient unit to USES clause.
When the utility finishes conversion successfully, it returns exit code 0. Otherwise the exit code is > 0.
|
What do you think about this topic? Send feedback!
|