1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Main Page

From libwdi

(Difference between revisions)
Jump to: navigation, search
(About)
Line 40: Line 40:
=== '''Getting Support''' ===
=== '''Getting Support''' ===
-
If you have a question that cannot be answered in these pages, please send an e-mail to [mailto://libusb-devel@lists.sourceforge.net?subject=libwdi libusb-devel@lists.sourceforge.net]. Or you can also try to mail [mailto://pbatard@gmail.com?subject=libwdi the developers] directly.
+
If you have a question that cannot be answered in these pages, please send an e-mail to [mailto://libwdi-devel@lists.sourceforge.net?subject=libwdi libwdi-devel@lists.sourceforge.net]. Or you can also try to mail [mailto://pete@akeo.ie?subject=libwdi the developers] directly.
=== '''Features''' ===
=== '''Features''' ===
Line 48: Line 48:
* Automated driverless device detection
* Automated driverless device detection
* Automated inf creation, using the name reported by the USB device
* Automated inf creation, using the name reported by the USB device
 +
* Automated inf package self-signing (Catalog File) and private certificate installation, for 100% promptless driver installation
* Automated driver files extraction, for both 32 and 64 bit platforms
* Automated driver files extraction, for both 32 and 64 bit platforms
* Automated driver installation, including UAC elevation where necessary
* Automated driver installation, including UAC elevation where necessary
* A single library, embedding all the required files. Can be statically or dynamically linked to an application, so that driver installation can be taken care automatically of when required.
* A single library, embedding all the required files. Can be statically or dynamically linked to an application, so that driver installation can be taken care automatically of when required.
-
* Ability to produce a single library that runs and can install drivers on any platform from Windows 2000 to Windows 7
+
* Ability to produce a single library that runs and can install drivers on any platform from Windows XP to Windows 8
* Ability to produce a single library that runs and can install drivers on both 32 and 64 bit versions of Windows
* Ability to produce a single library that runs and can install drivers on both 32 and 64 bit versions of Windows
   
   
==== Additional Features ====
==== Additional Features ====
-
* Allows the embedding and selection of WinUSB, libusb0.sys (from libusb-win32) or your own USB driver (eg. WHQL drivers)
+
* Allows the embedding and selection of WinUSB, libusb0.sys (from libusb-win32), libusbK or your own USB driver (eg. WHQL drivers)
* Allows the installation of your code signing certificate as a Trusted Publisher
* Allows the installation of your code signing certificate as a Trusted Publisher
* Full locale support. All API strings are UTF-8, and the generated inf is UTF-16
* Full locale support. All API strings are UTF-8, and the generated inf is UTF-16
-
* Open Source, with a proprietary application friendly license (LGPL v2.1)
+
* Open Source, with a proprietary application friendly license (LGPL v3.0)
= Downloads =
= Downloads =
Line 91: Line 92:
The following development environments are currently supported for libwdi on Windows:
The following development environments are currently supported for libwdi on Windows:
-
* [http://www.mingw.org MinGW] (32 bit) or [http://mingw-w64.sourceforge.net/ MinGW-w64]. To compile a library that is both 32 and 64 bit compatible, you should use a version of MinGW-w64 that supports both -m32 and -m64 (a.k.a. "multilib"). [http://tdm-gcc.tdragon.net/download TDM64] is a good MinGW-w64 distribution under Windows which fulfills this requirement.
+
* [http://www.mingw.org MinGW] (32 bit) or [http://mingw-w64.sourceforge.net/ MinGW-w64]. To compile a library that is both 32 and 64 bit compatible, you should use a version of MinGW-w64 that supports both -m32 and -m64 (a.k.a. "multilib"). [http://tdm-gcc.tdragon.net/download TDM64] is a good MinGW-w64 distribution under Windows which fulfils this requirement.
* [http://msdn.microsoft.com/en-us/visualc/default.aspx Microsoft Visual C++ (Visual Studio) 2008]. Only the full version will allow you to produce 64 bit or or 32+64 bit binaries.
* [http://msdn.microsoft.com/en-us/visualc/default.aspx Microsoft Visual C++ (Visual Studio) 2008]. Only the full version will allow you to produce 64 bit or or 32+64 bit binaries.
-
* [http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=36a2630f-5d56-43b5-b996-7633f2ec14ff Windows DDK build environment], which is '''freely available''', through the use of the 'ddk_build.cmd' file. This will also produce all of 32, 64 or 32+64 bits binaries. Note that if you want to produce libwdi applications that are compatible with all supported platforms from XP onwards, '''you will need to use the Windows XP WDK build environment for the 32bit builds and Windows Server 2003 build environment for the 64bit build'''. Take note the WDK versions after 7600.16385.0 drop the support for Windows 2k. If you want to support Windows 2k, then you may have to use the 6001.18002 version (the last WDK version to support Windows 2k). However, please take note Microsoft recommends to use the latest WDK so using WDK 6001.18002 is not officially supported.
+
* [http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=36a2630f-5d56-43b5-b996-7633f2ec14ff Windows DDK build environment], which is '''freely available''', through the use of the 'ddk_build.cmd' file. This will also produce all of 32, 64 or 32+64 bits binaries. Note that if you want to produce libwdi applications that are compatible with all supported platforms from XP onwards, '''you will need to use the Windows XP WDK build environment for the 32bit builds and Windows Server 2003 build environment for the 64bit build'''.
-
* [http://www.cygwin.com/ cygwin] (32 bit only). Requires <code>-mno-cygwin</code> support, which has been removed from latest versions of cygwin. As a result cygwin support will be phased out from new libwdi releases.
+
-
The recommended development environment to compile the library/apps is the latest Windows DDK as it allows the building of a 32+64 bit compatible library, and ensures that the required WinUSB DLL files are available. If you need Windows 2000 compatibility you may have to use MinGW.org (32bit only) or the older version of WDK 6001.18002. You can also use multilib MinGW-w64, which appears to work fine, but be mindful that Windows 2000 targets are not officially supported by the MinGW-w64 team.
+
The recommended development environment to compile the library/apps is the latest Windows WDK as it allows the building of a 32+64 bit compatible library, and ensures that the required WinUSB DLL files are available.
=== '''Source''' ===
=== '''Source''' ===
Line 111: Line 111:
Git Extensions comes ready to use, but note that before you can install [http://code.google.com/p/tortoisegit TortoiseGit] you need to install [http://code.google.com/p/msysgit MSysGit].
Git Extensions comes ready to use, but note that before you can install [http://code.google.com/p/tortoisegit TortoiseGit] you need to install [http://code.google.com/p/msysgit MSysGit].
-
Also note that, for MinGW and cygwin, as with the libusb development tree, you need to run <code>./autogen.sh</code> in order to have configure and Makefile created for you.
+
Also note that, for MinGW you need to run <code>./autogen.sh</code> (after editing it according to your paths) or run the autotools creation utilities, in order to have configure and Makefile created for you.
-
To create projects relying on libwdi, please refer to how the sample executables zadic (console) and zadig (GUI) are compiled.
+
To create projects relying on libwdi, please refer to how the sample executables zadic, wdi-simple (console) and zadig (GUI) are compiled.
=== '''Development Considerations''' ===
=== '''Development Considerations''' ===
* Because the driver installation requires administrative privileges, but enumeration does not, the library compiled and embeds a 32/64 bit installer, that requires UAC elevation on platforms supporting UAC (Windows Vista and later).
* Because the driver installation requires administrative privileges, but enumeration does not, the library compiled and embeds a 32/64 bit installer, that requires UAC elevation on platforms supporting UAC (Windows Vista and later).
-
* The project also uses a customer embedder to include the required driver resources (DLLs, 32 and 64 bit installer) along with any files you want to add (eg. signed inf). Note that since most of the DLLs are already compressed, there's not much space to be gained in using compression in the embedder.
+
* The project also uses a customer embedder to include the required driver resources (DLLs, 32 and 64 bit installer) along with any files you want to add (eg. signed inf).
* The reliance on DifXAPI.dll was dropped in w20, as the DLL is not available by default on XP and would increase the binary size.
* The reliance on DifXAPI.dll was dropped in w20, as the DLL is not available by default on XP and would increase the binary size.
* It is possible to produce a 32 bit library that is 32+64 bit compatible, but the opposite is not true. As such, when compiling for 64 bit, 32 bit compatibility will be removed to make the library smaller.
* It is possible to produce a 32 bit library that is 32+64 bit compatible, but the opposite is not true. As such, when compiling for 64 bit, 32 bit compatibility will be removed to make the library smaller.
Line 134: Line 134:
'''Done'''
'''Done'''
 +
* libusb-win32 filter driver support
* WCID driver support
* WCID driver support
* provision of a custom GUID and other inf features
* provision of a custom GUID and other inf features

Revision as of 22:45, 11 October 2011


libwdi: Windows Driver Installer library for USB devices
Support This Project

Contents
1 Description

1.1 About
1.2 Getting Support
1.3 Features

2 Downloads

2.1 libwdi v1.1.1
2.2 older releases
2.3 Zadig

3 Documentation

3.1 FAQ
3.2 Using Zadig (the GUI driver installer application)
3.3 Library Installation & Configuration
3.4 Library API Documentation & Usage
3.5 Signed driver installation walkthrough
3.6 WCID devices

4 Reusable Code Parts: Can our code solve your problems?

4.1 Libwdi Reuse

5 Development

5.1 Supported Environments
5.2 Source
5.3 Development Considerations
5.4 Progress
5.5 Status log
5.6 Links

Description

About

The aim of this project is to provide Windows application developers and driver makers, with a convenient way of extracting and installing USB drivers on end-users systems. Such drivers can then be used with, but not limited to, libusb applications using libusb 1.0, libusb-win32 or libusbK.

Getting Support

If you have a question that cannot be answered in these pages, please send an e-mail to libwdi-devel@lists.sourceforge.net. Or you can also try to mail the developers directly.

Features

Main Features

  • Automated driverless device detection
  • Automated inf creation, using the name reported by the USB device
  • Automated inf package self-signing (Catalog File) and private certificate installation, for 100% promptless driver installation
  • Automated driver files extraction, for both 32 and 64 bit platforms
  • Automated driver installation, including UAC elevation where necessary
  • A single library, embedding all the required files. Can be statically or dynamically linked to an application, so that driver installation can be taken care automatically of when required.
  • Ability to produce a single library that runs and can install drivers on any platform from Windows XP to Windows 8
  • Ability to produce a single library that runs and can install drivers on both 32 and 64 bit versions of Windows

Additional Features

  • Allows the embedding and selection of WinUSB, libusb0.sys (from libusb-win32), libusbK or your own USB driver (eg. WHQL drivers)
  • Allows the installation of your code signing certificate as a Trusted Publisher
  • Full locale support. All API strings are UTF-8, and the generated inf is UTF-16
  • Open Source, with a proprietary application friendly license (LGPL v3.0)

Downloads

  1. libwdi v1.1.1 (released 2011.04.13)

  2. older releases

  3. Zadig

Zadig is a standalone driver installer GUI application, built on libwdi and ready to run. You may have to install a decompressor, such as 7-zip, to be able to uncompress the .7z file.

Documentation

FAQ

  1. FAQ

  2. Using Zadig (the GUI driver installer application)

  3. Library Installation & Configuration

  4. Library API Documentation & Usage

  5. Signed driver installation walkthrough

  6. WCID devices

Reusable Code Parts: Can our code solve your problems?

As a FOSS developer, there's nothing more frustrating than having to reinvent the wheel while harbouring a strong suspicion that someone, somewhere, might already have solved a similar issue. On the other hand, googling around and looking through scores of FOSS code listings to find that particular section of code which might be of interest to you is quite time consuming. Wouldn't it be just swell if the developers simply gave an detailed, high level overview of the problems they solved, whose solutions they think you can reuse?

The following page does just that and goes through a list of the features we implemented, which you might be interested in (provided your license is compatible with LGPL):

Development

Supported Environments

The following development environments are currently supported for libwdi on Windows:

  • MinGW (32 bit) or MinGW-w64. To compile a library that is both 32 and 64 bit compatible, you should use a version of MinGW-w64 that supports both -m32 and -m64 (a.k.a. "multilib"). TDM64 is a good MinGW-w64 distribution under Windows which fulfils this requirement.
  • Microsoft Visual C++ (Visual Studio) 2008. Only the full version will allow you to produce 64 bit or or 32+64 bit binaries.
  • Windows DDK build environment, which is freely available, through the use of the 'ddk_build.cmd' file. This will also produce all of 32, 64 or 32+64 bits binaries. Note that if you want to produce libwdi applications that are compatible with all supported platforms from XP onwards, you will need to use the Windows XP WDK build environment for the 32bit builds and Windows Server 2003 build environment for the 64bit build.

The recommended development environment to compile the library/apps is the latest Windows WDK as it allows the building of a 32+64 bit compatible library, and ensures that the required WinUSB DLL files are available.

Source

The current development tree is available from our SourceForge repository.

For those not familiar with git, here are the git commands you can use retrieve and compile the Windows branch:

git clone git://libwdi.git.sourceforge.net/gitroot/libwdi/libwdi ; retrieve development branch (this only needs to be done once)
git pull                                                         ; for further updates, once the clone has been done

If you don't want to use git from the commandline, you can use TortoiseGit or Git Extensions to access and keep in sync with the git repository. Git Extensions comes ready to use, but note that before you can install TortoiseGit you need to install MSysGit.

Also note that, for MinGW you need to run ./autogen.sh (after editing it according to your paths) or run the autotools creation utilities, in order to have configure and Makefile created for you.

To create projects relying on libwdi, please refer to how the sample executables zadic, wdi-simple (console) and zadig (GUI) are compiled.

Development Considerations

  • Because the driver installation requires administrative privileges, but enumeration does not, the library compiled and embeds a 32/64 bit installer, that requires UAC elevation on platforms supporting UAC (Windows Vista and later).
  • The project also uses a customer embedder to include the required driver resources (DLLs, 32 and 64 bit installer) along with any files you want to add (eg. signed inf).
  • The reliance on DifXAPI.dll was dropped in w20, as the DLL is not available by default on XP and would increase the binary size.
  • It is possible to produce a 32 bit library that is 32+64 bit compatible, but the opposite is not true. As such, when compiling for 64 bit, 32 bit compatibility will be removed to make the library smaller.

Progress

To Do

  • downloading vs embedding of the driver files
  • 7z based improved embedder

In Progress

  • v1.2.0 release

Done

  • libusb-win32 filter driver support
  • WCID driver support
  • provision of a custom GUID and other inf features
  • self signed .cat creation, for promptless install
  • disabling of the creation of a restore point
  • libusbK support
  • trusted publisher certificate installation for promptless install
  • cross-compilation & embedder improvements
  • GUI sample application (zadig)
  • Documentation
  • allow the editing of the device name
  • libusb0.sys driver support
  • MinGW/cygwim/MSVC/DDK support
  • 32 and 64 bit support and compilation time detection
  • UAC elevation
  • retrieval of device name
  • automated inf generation

Status log

Please consult the git log or the WDI section of the raw Activity Log.

Links

Personal tools