dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
Customization

A product is a directory beside dxd/ holding its version.h, its device description and compositions (drv.h), one source per driver and a CMakeLists.txt (Windows) or Xcode projects (macOS). The framework reads nothing product specific of its own: every value comes through these files.

All platforms

  • version.h - the product's identity, included by every binary, the plists, the infs and the installer
    #define DX_VERSION_MAJOR 1 // major version: range 0..99
    #define DX_VERSION_MINOR 0 // minor version: range 0..9
    #define DX_VERSION_SUB 0 // sub version: range 0..9
    #define DX_VERSION_DEPLOYMENT b // 'd'evelopment, 'a'lpha, 'b'eta, release 'c'andidate, 'f'inal
    #define DX_VERSION_BUILD 1 // bumped by the release script
    #define DX_VENDOR My Company // the vendor as displayed
    #define DX_VENDOR_SHORT MyCompany
    #define DX_VENDOR_ID com_mycompany // identifier form
    #define DX_VENDOR_URID com.mycompany // reverse DNS form
    #define DX_TEAM_ID XXXXXXXXXX // the Apple Developer ID team, the binaries' signature check
    #define DX_FILENAME MyCompanyMyProduct // every binary's name, the targets derive theirs (Service, ASIO, Install, ...)
    #define DX_PRODUCT My Product
    #define DX_PRODUCT_ID DX_CAT(DX_VENDOR_ID,_myproduct)
    #define DX_PRODUCT_URID DX_VENDOR_URID.myproduct // the service, the registry root, the plugin bundle, the daemon
    #define DX_PRODUCT_GUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // the device interface class, the installer's upgrade code
    #define DX_USB_VID 0x1234 // the devices the product matches
    #define DX_USB_PID_MODEL 0x0001
    #define DX_MACH_SERVICES <string>DX_PRODUCT_URID.daemon</string> // Info.plist: the Mach services the plugin looks up
    #define DX_DAEMON_DEVICES <string>DX_USB_VID:DX_USB_PID_MODEL</string> // launchd.plist: the devices the daemon captures
  • drv.h - the device description (dx::stream::desc, a constexpr table of models: endpoints, clocks, streams, pins) and the compositions of the drivers - which layers make the USB device, the proxy device, the service client, the CoreAudio client - plus the product's license (its root CA, its subject) as the base of every device
  • the license: certificates issued by the product's root CA (license/ in the product's tree: the CA, license.sh, the license server), bound to a device serial number or a machine, in the platform's certificate store; the software refuses an unbound one

macOS

  • the Xcode projects reference interface/macOS/dx.xcodeproj; the plugin's Info.plist and the daemon's launchd.plist are generated from the templates under interface/macOS/plist/ with version.h's macros; etc/<product>/postinstall are the package scripts

Windows

  • CMakeLists.txt: add_subdirectory(${DXD}/interface) for the user mode targets, the kernel driver's directory adds ${DXD}/kernel/wdk and links dxd, driver_package(<target> INF <inf> [FILES ...]) stages, stamps and catalogs the driver package (build\<dir>\package\<config>\<target>) and copies it to bin\<platform>\<config>
  • the inf: $ARCH$ and DriverVer stamped by stampinf, the class the devices belong to, the models' hardware ids; a WinUSB inf publishes DeviceInterfaceGUIDs = DX_PRODUCT_GUID for the user mode driver to enumerate
  • installer/version.wxi: what the module and the .msi carry
    <?define vendor="My Company"?>
    <?define product="My Product"?>
    <?define guid="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"?>
    <?define urid="com.mycompany.myproduct"?>
    <?define filename="$(var.SolutionName)"?>
    <?define driver="$(var.filename)"?> <!-- the kernel driver package: <driver>.inf/.cat/.sys -->
    <?define winusb="$(var.filename)WinUSB"?> <!-- a WinUSB package: <winusb>.inf/.cat; both defined: DRIVER=portcls|winusb selects -->
    <?define install="$(var.filename)Install.exe"?> <!-- the install executable the custom actions run -->
    <?define service="$(var.filename)Service.exe"?>
    <?define asio="$(var.filename)ASIO.dll"?>
    <?define license_purpose="My Company License"?> <!-- the license certificates' extended key usage as the viewer names it -->
    optional: asio32 (the 32 bit ASIO driver on x64), cpl/cpl32 (a control panel), misc (further files beside the driver package), icon

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.