- Changelog / Releases
DfmExtractor is a small command line utility which allows you to extract DFM, LFM and FRM forms from executable files compiled by Delphi, Lazarus and CodeTyphon.
Binary (Windows 32-bit): http://www.pazera-software.com/products/dfm-extractor/
-i=FILE [-n=NAME] [-idx=X] [-o=FILE] [-e=EXT] [-p=STR] [-a] [-d=DIR] [-l] [-h] [-V] [--home]
Mandatory arguments to long options are mandatory for short options too.
Options are case-sensitive. Options in square brackets are optional.
Input / Output options
An executable file containing Delphi, Lazarus or CodeTyphon forms (DFM, LFM, FRM).
Form name or form class name to extract.
The index of the form to extract. Non-negative integer.
The output file with extracted form.
The default extension of the output file(s). If not specified, DFM will be used.
Output file(s) name prefix (for the
Saves all forms from the specified executable file to the given (or current) directory.
Output directory (for the
Displays a list of all forms in the given input file.
Show application version.
Opens program homepage in the default browser.
List all forms in the file AudioExtractor64.exe:
DfmExtractor.exe -i AudioExtractor64.exe -l
Forms: 10 Index | Lines | Form name | Form class ------------------------------------------------------- 0 | 451 | CustomizeFrm | TCustomizeFrm 1 | 343 | FormAbout | TFormAbout 2 | 49 | FormCmdLine | TFormCmdLine 3 | 345 | FormErrors | TFormErrors 4 | 1 621 | FormFileInfo | TFormFileInfo 5 | 474 | FormListFileEdit | TFormListFileEdit 6 | 6 035 | FormMain | TFormMain 7 | 790 | FormOptions | TFormOptions 8 | 422 | FormProgress | TFormProgress 9 | 169 | FormToolsInfo | TFormToolsInfo
Save all forms from the AudioExtractor64.exe file to files with the LFM extension:
DfmExtractor.exe -i AudioExtractor64.exe -a -e lfm
File saved: CustomizeFrm.lfm File saved: FormAbout.lfm File saved: FormCmdLine.lfm File saved: FormErrors.lfm File saved: FormFileInfo.lfm File saved: FormListFileEdit.lfm File saved: FormMain.lfm File saved: FormOptions.lfm File saved: FormProgress.lfm File saved: FormToolsInfo.lfm
FormMainfrom the AudioExtractor64.exe file to
DfmExtractor.exe -i AudioExtractor64.exe -n FormMain -o "main form.dfm"
The form with name/class "FormMain" has been saved to file: main form.dfm
Save form with index
4from the AudioExtractor64.exe file to a DFM file:
DfmExtractor.exe -i AudioExtractor64.exe -idx 4
The form with index 4 has been saved to file: FormFileInfo.dfm
Tested on CodeTyphon 6.40 with FPC 3.1.1 and Laraus 1.9.0 (trunk version) with FPC 3.1.1
To compile, you need:
- CodeTyphon or Lazarus.
- JPL.CmdLineParser unit.
- A several Pascal units from my library JPLib.
- JclPeImage unit and it's dependencies from the JEDI Code Library. (All necessary JCL unit are in the jcl.7z archive in the src/jcl directory.)
How to build:
src\DfmExtractor.ctprfile with CodeTyphon or
- Set build mode.
Project -> Project Options...A new window will appear. In the tree view (on the left), select
Compiler Options. At the top of this window you can select the build mode from the dropdown list. Choose:
- Build project (menu
Changelog / Releases
Version 1.1 (2018.02.28)
- Project ported from Delphi to Lazarus/CodeTyphon.
- The size of the executable file has been reduced twice.
- Internal enhancements.
Version 1.0 (2018.01.11)
This program was made for my private use, but it may also be useful to someone.
When translating one program written in Delphi, I needed DFM forms to make it easier to work with the Poedit program, so I decided to write a small program to extract DFMs.