A command-line utility to analyze runtime dependencies of Delphi BPL (Borland Package Library) files.
- Direct dependencies: Shows only packages that the BPL imports directly
- Recursive dependencies: Shows all transitive dependencies (default)
- Tree view: Visualizes the complete dependency hierarchy
- Verbose mode: Shows full paths and found/not found summary
- Automatic search: Can find BPL files in common paths if you only provide the name
When working with Delphi packages, the IDE's "Project Information" dialog shows all dependencies but:
- ❌ You cannot copy/paste the list
- ❌ It's not automatable
- ❌ It doesn't show where each BPL is located
- ❌ It doesn't distinguish between found and missing dependencies
BPLDeps solves all these problems by reading the PE Import Table directly and providing:
- ✅ Copyable/pasteable output
- ✅ Scriptable for CI/CD
- ✅ Full path information for each dependency
- ✅ Clear identification of missing dependencies
- ✅ Statistics (total/found/not found)
Download the latest release from Releases and extract BPLDeps.exe to a directory in your PATH.
Requires Embarcadero Delphi 12 (Athens) or later.
git clone https://github.com/yourusername/bpldeps.git
cd bpldeps
msbuild BPLDeps.dproj /p:Config=ReleaseThe compiled executable will be in the project directory.
BPLDeps <file.bpl> [options]-r- Show recursive dependencies (default)-d- Show only direct dependencies-t- Show as tree-v- Verbose mode (show paths and summary)
BPLDeps rtl290.bplOutput:
Analyzing: rtl290.bpl
Full path: C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\rtl290.bpl
All dependencies (0):
BPLDeps MyPackage.bpl -dShows only packages that MyPackage imports directly, without transitive dependencies.
BPLDeps MyPackage.bpl -tOutput:
Dependency tree:
MyPackage.bpl
rtl290.bpl
vcl290.bpl
rtl290.bpl
dbrtl290.bpl
rtl290.bpl
BPLDeps MyPackage.bpl -vOutput:
Analyzing: MyPackage.bpl
Full path: W:\BPL\290\MyPackage.bpl
All dependencies (73):
BaseMAX290.bpl
-> W:\BPL\290\BaseMAX290.bpl
CustomPackage.bpl
-> NOT FOUND
rtl290.bpl
-> C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\rtl290.bpl
...
Summary:
Total dependencies: 73
Found: 72
Not found: 1
BPLDeps "C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\vcl290.bpl"BPLDeps rtl290.bplThe tool automatically searches in:
- Current directory
- Executable directory
- RAD Studio bin directories
- System PATH
BPLDeps MyPackage.bpl -v > dependencies.txtGet the complete list of required BPL files for deployment.
BPLDeps PackageA.bpl -tIf you see PackageA → PackageB → PackageA, you have a circular dependency.
If you modify BaseMAX, you can see which packages depend on it:
for bpl in *.bpl; do
echo "Checking $bpl..."
BPLDeps "$bpl" | grep -q "BaseMAX" && echo " → Depends on BaseMAX"
doneThe .dpk file only lists direct requires. Use BPLDeps to see the complete real list:
# See what the code says
grep "requires" MyPackage.dpk
# See what the compiled BPL really needs
BPLDeps MyPackage.bpl# Check for missing dependencies in CI
BPLDeps MyPackage.bpl -v | grep "NOT FOUND" && exit 1- Uses Windows
ImageHlpAPI to read the PE Import Table - Only analyzes
.bplfile dependencies (ignores system DLLs) - Requires dependent BPLs to be accessible for recursive analysis
- If a BPL is not found, it reports it but continues with others
- Thread-safe and handles locked files
BPLDeps directly parses the PE32 (Portable Executable) format:
- Reads the DOS header
- Locates the NT headers
- Finds the Import Directory
- Iterates through Import Descriptors
- Filters only
.bplfiles - Recursively analyzes each found dependency
This approach is more reliable than parsing text files and shows the actual runtime dependencies, not just what's declared in source code.
All output goes to stdout, allowing:
# Save to file
BPLDeps MyPackage.bpl > deps.txt
# Count dependencies
BPLDeps MyPackage.bpl | grep -c "\.bpl"
# Filter specific packages
BPLDeps MyPackage.bpl | grep "rtl\|vcl"
# Pipeline with other tools
BPLDeps *.bpl | sort | uniq| Feature | IDE Dialog | BPLDeps |
|---|---|---|
| Copy/Paste | ❌ | ✅ |
| Show Paths | ❌ | ✅ (with -v) |
| Identify Missing | ❌ | ✅ (with -v) |
| Scriptable | ❌ | ✅ |
| Tree View | ❌ | ✅ (with -t) |
| Statistics | ❌ | ✅ (with -v) |
| Direct vs All | ❌ | ✅ |
- Windows (uses Windows PE format)
- No external DLLs required (standalone executable)
- Works with any Delphi version (analyzes compiled BPLs, not source)
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.
Created for the Delphi development community.
Version: 1.0.0 Last Updated: 2025-10-29