windows-drivers-rs icon indicating copy to clipboard operation
windows-drivers-rs copied to clipboard

feat: Add driver-install packaging metadata + support for INF only drivers

Open ayodejiige opened this issue 1 year ago • 0 comments

This PR introduces support for building INF-only Windows drivers, which are drivers without a driver binary. INF-only drivers are typically used for:

  1. Extension INFs: These are installed on base drivers to customize them. For more information, see Using an Extension INF File.
  2. NULL Drivers: These can be used for various purposes, such as setting configuration on a device node and installing a Win32 service application.

Note: This PR include support for a new WDK metadata to enable copying additional files to the driver package folder. This particular feature is not exclusive to INF drivers only.

Summary of Changes

  • Add new driver type PACKAGE for INF only drivers to the WDK metadata i.e. wdk.driver-model.driver-type
  • Add new configuration to WDK metadata wdk.driver-install.package-files to enable copying addition files to the driver package folder.
  • Updated the wdk-build to support the additions to the WDK metadata.
  • Added copy-package-files-to-package task to rust-driver-makefile.toml file. The copies the files listed the wdk.driver-install.package-files metadata to the driver package folder.
  • Ensured that tasks in rust-driver-makefile.toml that are required for driver binaries are skipped for PACKAGE driver type.
  • Implemented functions in cargo_make.rs to support the changes in rust-driver-makefile.toml.
  • Added sample inf only driver which is a null driver that installs an sample application into the driver store.

ayodejiige avatar Nov 16 '24 17:11 ayodejiige