marcoesposito1988 / dependency_runner

ldd for Windows - and more!
GNU Lesser General Public License v3.0
30 stars 2 forks source link
dependencies dependencies-checking dll ldd windows

crates.io Dependency Runner CI

Dependency runner

ldd for Windows - and more!

Features

Try it out:

dependency_runner> cargo run --bin deprun -- test_data\test_project1\DepRunTest\build\DepRunTest\Debug\DepRunTest.exe --check-symbols --userpath test_data\test_project1\DepRunTestLibWrong\build\Debug

DepRunTest.exe => C:\Users\Marco Esposito\Projects\personal\dependency_runner\test_data\test_project1\DepRunTest\build\DepRunTest\Debug
        DepRunTestLib.dll => C:\Users\Marco Esposito\Projects\personal\dependency_runner\test_data\test_project1\DepRunTestLibWrong\build\Debug

Checking symbols...

No missing libraries detected

Missing symbols detected!
[Importing executable, exporting executable, missing symbols]

DepRunTest.exe
    DepRunTestLib.dll
        public: float TestClass::testMethod(int)

This repository contains tools to analyze the dependencies of a Windows Portable Executable (PE) file, usually in order to debug application startup problems.

These tools are:

All these tools target Windows PE exe files, but are designed to be portable. The default behavior attempts to guess sane defaults to make it easy to inspect executables located on a neighboring Windows installation from another operating system, or to ignore missing system libraries if no such partition is available on the system. The example above should work on any operating system.

Getting started

Binary releases (any OS)

Installation from source with Cargo (any OS)

Usage

deprun

Printing the dependency tree

deprun path/to/your/executable.exe

Default behavior:

Limiting the scanning and output depth

deprun --depth 4 path/to/your/executable.exe

Saving the scan results to a JSON file

deprun --output-json-path path/to/output.json path/to/your/executable.exe

Each executable will be represented by a single object. The dependency tree can be reconstructed from the dependency list of each node.

Printing recursively all system dependencies

deprun --print-system-dlls path/to/your/executable.exe

Browsing the DLLs with fuzzy search

deprun --skim path/to/your/executable.exe

Lookup path

Defining the whole DLL lookup path with a .dwp file (Dependency Walker format)

deprun --dwp_path=path/to/config.dwp path/to/your/executable.exe

Scanning the executable produced by a given .vcxproj (Visual Studio) project

deprun --vcx-config=Release path/to/visual_studio_solution/executable.vcxproj

The configuration must only be provided if more than one are listed in the vcxproj file.

Extending the DLL lookup user path as in the .vcxproj.user file

deprun --vcx-config=Release --vcxproj_user_path=path/to/visual_studio_solution/executable.vcxproj.user path/to/visual_studio_solution/executable.vcxproj

The configuration must only be provided if more than one are listed in the vcxproj file. The executable can also be referred to directly, instead of providing the path to the .vcxproj file.

DLL symbols

Checking for missing symbols

deprun --check-symbols path/to/your/executable.exe

Browsing the symbols imported/exported by the all found DLLs (not supported yet on Windows)

deprun --skim-symbols path/to/your/executable.exe

wldd

a subset of the above, check with -h

Roadmap

Help is welcome in the form of issues and pull request!

Limitations

Acknowledgements

License

LGPLv3