14.4  Mac OS X Driver Distribution

[Note]
If you have renamed the WinDriver kernel module (WinDriver.kext), as explained in section 15.2, replace the relevant WinDriver references with the name of your driver, and replace references to the ~/WinDriver/redist folder with the path to the location of the modified installation files. For example, when using the generated DriverWizard renamed driver files for your driver project, as explained in section 15.2.2, you can replace references to ~/WinDriver/redist with the path to the generated xxx_installation/redist folder (where xxx is the name of your generated driver project).

14.4.1  Preparing the Distribution Package

Before distributing your driver, prepare a distribution package that includes the following files:

  • The WinDriver kernel extension – WinDriver.kext, or your renamed version of this extension [15.2].
    Get this file from the ~/WinDriver/redist folder.
  • The WinDriver API framework – WDAPI.framework.
    Get this file from the ~/WinDriver/redist folder.
  • If you have created a Kernel PlugIn driver [11]: Your Kernel PlugIn kernel extension – <KP driver name>.kext.
  • The wdreg installation script [13.3.1.1].
    Get this file from the ~/WinDriver/redist folder.
  • Your hardware-control application/framework.

14.4.2  Installing Your Driver on the Target Computer

[Note]
Driver installation on Mac OS X requires root privileges.

To install your driver on the target computer, follow these steps:

  1. Install the WinDriver kernel module:
    1. Copy the WinDriver kernel extension folder – WinDriver.kext, or your renamed version of this extension [15.2] – to the target's /System/Library/Extensions folder (optional).
      [Note]
      • Copying the extension to the this location requires root:wheel ownership with permissions non-writable by group and other – rwxr-xr-x (755).
      • This step is optional, but it is recommended, since it ensures that the driver will be loaded automatically on each boot, and it eliminates the need to provide the full extension path in the wdreg installation command (see step b).
    2. Install the driver using the wdreg installation script [13.3.1.1]:
      $ sudo <path to wdreg> <path to the driver's kext folder>
      [Note]
      • The extension name can be specified with or without the .kext extension.
      • When installing the driver from the OS's extensions folder – /System/Library/Extensions – you do not need to specify the full extension path in the installation command. For example, if you copied the default WinDriver.kext extension to /System/Library/Extensions, you can install the driver by running
        $ sudo <path to wdreg> WinDriver
    [Caution]
    When distributing your driver, take care not to overwrite a newer version of WinDriver.kext with an older version. You should configure your installation program (if you are using one) so that the installer automatically compares the time stamp on the kernel extension folders, and does not overwrite a newer version with an older one.
  2. Install your Kernel PlugIn driver: If you have created a Kernel PlugIn driver, install its kernel extension in the same way that you installed the WinDriver kernel extension in step a – just replace references to the WinDriver kernel extension in this step with your Kernel PlugIn extension.
  3. Install the WinDriver API framework: Copy WDAPI.framework to the /Library/Frameworks folder on the target machine.
  4. Install your hardware control application/framework: Copy your hardware-control application to the target's /Applications folder, or copy your hardware-control framwork to the target's /Library/Frameworks folder, and run the application/framwork.