How klocman/bulk-crap-uninstaller works
Main Components
• Core Application – The main Bulk Crap Uninstaller executable (found under source/BulkCrapUninstaller) that implements the uninstallation logic.
• UI Layer – A Windows Forms-based presentation layer providing forms and dialogs (see Forms directories and numerous Designer files).
• Uninstallation Engine – Modules that scan the system, interact with the registry, execute uninstallation commands, and manage orphaned/leftover files.
• Helper Libraries and Utilities – Several subprojects (for example, KlocTools, NetSettingBinder, ObjectListView, PortableSettingsProvider, etc.) that provide reusable functions, controls, settings management, and supporting infrastructure.
• Installer – An installer composition based on Inno Setup scripts (stored in the installer directory) that packages and deploys the application.
• Test Suites – Directories such as BulkCrapUninstallerTests that validate core functionalities.
• External Modules – Components like NBug (for error reporting) and integration code for third-party systems (e.g., support for NSIS, InnoSetup, Msiexec, Steam, and Windows Store apps).
Establish Relationships and Interactions
• The UI layer interacts with the core uninstallation engine, displaying information, receiving user inputs, and triggering functions.
• The Uninstallation Engine uses various helper libraries (for registry scanning, file and process operations, and language localization) to perform its functions.
• The Installer (separate Inno Setup scripts and additional language and product configuration files) packages the core application and its dependencies.
• There is bidirectional data flow: from the UI to core logic and then feedback (including logging and error reports via NBug) that is then displayed.
• Test projects are linked to core libraries to validate functionality but are not part of production deployment.
Architectural Patterns and Design Principles
• Modular design: The application is split into distinct modules – core, UI, utilities, and installers – which interact via well-defined interfaces.
• Abstraction and reusability: Many common functionalities (file manipulation, registry interaction, control rendering, language localization) are encapsulated within dedicated libraries.
• Separation of concerns: The installer, business logic, UI, and testing suites are clearly segregated.
• Extensibility: The presence of many plug-in style “factories” and “adders” (see the InfoAdders in UninstallTools/Factory) indicates an architecture favoring modular extensions.
Relevant Technologies, Frameworks, or Libraries
• Visual Studio and .NET (C# and C++ projects indicate mixed-language components).
• Windows Forms for the UI.
• Inno Setup for the installer.
• Custom libraries such as KlocTools, ObjectListView, and NetSettingBinder.
• NBug for error reporting.
• Built-in support for integration with other uninstallation systems (MSI, NSIS, etc.).
Detail Level
You detail every functional layer:
– Start with the external installer that deploys the application.
– Follow with the Core Application which acts as the central controller.
– Break the Core into subcomponents: the UI, the uninstallation/screen scraping mechanisms, and the underlying helper libraries.
– Optionally, include a layer for error reporting and logging (NBug) and testing modules.
Happy diagramming!