Changes between Version 59 and Version 60 of libwdi


Ignore:
Timestamp:
04/19/11 12:01:54 (2 years ago)
Author:
pbatard
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • libwdi

    v59 v60  
    22#!html 
    33<h1 style="color: red">THIS PROJECT HAS MOVED TO: <a href="http://sourceforge.net/projects/libwdi/">http://sourceforge.net/projects/libwdi</a></h1> 
    4 <h1 style="color: red">THE CONTENT BELOW IS NOW OBSOLETE AND WILL BE DELETED SOON!</h1> 
    54}}} 
    6  
    7 = libwdi: Windows Driver Installer library for usb devices = 
    8 [[PageOutline(2-5, libwdi)]] 
    9  
    10 == About == 
    11  
    12 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 [http://libusb.org/ libusb 1.0] or [http://sourceforge.net/apps/trac/libusb-win32/wiki libusb-win32]. 
    13  
    14 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].[[BR]] 
    15 '''Make sure you have '[libwdi]' in the e-mail subject''' so that your question is dealt with appropriately. Or you can also try to mail [mailto://pbatard@gmail.com?subject=libwdi the developers] directly. 
    16  
    17 == Main Features == 
    18  
    19   * Automated driverless device detection 
    20   * Automated inf creation, using the name reported by the USB device 
    21   * Automated driver files extraction, for both 32 and 64 bit platforms 
    22   * Automated driver installation, including UAC elevation where necessary 
    23   * 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. 
    24   * Ability to produce a single library that runs and can install drivers on any platform from Windows 2000 to Windows 7 
    25   * Ability to produce a single library that runs and can install drivers on both 32 and 64 bit versions of Windows 
    26   
    27 == Additional Features == 
    28  * Allows the embedding and selection of WinUSB, libusb0.sys (from libusb-win32) or your own USB driver (eg. WHQL drivers) 
    29  * Full locale support. All API strings are UTF-8, and the generated inf is UTF-16 
    30  * Open Source, with a proprietary application friendly license (LGPL v2.1) 
    31  
    32 == Downloads == 
    33  
    34 * '''[http://libusb-winusb-wip.googlecode.com/files/libwdi-1.0.4.tar.gz v1.0.4]''' was released on 2011.01.22. 
    35 * '''[http://libusb-winusb-wip.googlecode.com/files/libwdi-1.0.3.tar.gz v1.0.3]''' was released on 2010.10.07. 
    36 * '''[http://libusb-winusb-wip.googlecode.com/files/libwdi-1.0.2.tar.gz v1.0.2]''' was released on 2010.09.15. 
    37 * '''[http://libusb-winusb-wip.googlecode.com/files/libwdi-1.0.1.tar.gz v1.0.1]''' was released on 2010.09.01. 
    38 * For '''[http://libusb-winusb-wip.googlecode.com/files/zadig.exe Zadig]''', the WinUSB and libusb-win32 driver installer, you can either click the previous link or visit the [http://libusb.org/wiki/windows_backend#DriverInstallation Driver Installation section] of the libusb Windows backend page. 
    39  
    40 == Documentation == 
    41  
    42  1. [http://sourceforge.net/apps/mediawiki/libwdi/index.php?title=Faq FAQ] 
    43  1. [http://sourceforge.net/apps/mediawiki/libwdi/index.php?title=Zadig Using Zadig (the GUI driver installer application)] 
    44  1. [http://sourceforge.net/apps/mediawiki/libwdi/index.php?title=Install Library Installation & Configuration] 
    45  1. [http://sourceforge.net/apps/mediawiki/libwdi/index.php?title=Usage Library API Documentation & Usage] 
    46  1. [http://sourceforge.net/apps/mediawiki/libwdi/index.php?title=Signed_driver_walkthrough Signed driver installation walkthrough] 
    47  
    48 == Supported development environments == 
    49  
    50 The following development environments are currently supported for libwdi on Windows: 
    51   * [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. 
    52   * [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. 
    53   * [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. 
    54   * [http://www.cygwin.com/ cygwin] (32 bit only). 
    55  
    56 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. 
    57  
    58 == Development Source == 
    59  
    60 The current development tree is available from our [http://libwdi.git.sourceforge.net/git/gitweb.cgi?p=libwdi/libwdi SourceForge repository]. 
    61  
    62 For those not familiar with git, here are the git commands you can use retrieve and compile the Windows branch: 
    63 {{{ 
    64 git clone git://libwdi.git.sourceforge.net/gitroot/libwdi/libwdi ; retrieve development branch (this only needs to be done once) 
    65 git pull                                                         ; for further updates, once the clone has been done 
    66 }}} 
    67  
    68 If you don't want to use git from the commandline, you can use [http://code.google.com/p/tortoisegit TortoiseGit] or [http://code.google.com/p/gitextensions/ Git Extensions] to access and keep in sync with the git repository. 
    69 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] and make sure that, during the installation of [http://code.google.com/p/msysgit MSysGit], when prompted to adjust the PATH environment, you select "Run Git from the Windows Command Prompt" (2nd option). Also, in the general settings of [http://code.google.com/p/tortoisegit TortoiseGit], the MSysGit path must point to the MSysGit bin directory (eg: C:Program Files (x86)Gitin") 
    70  
    71 Also note that, for MinGW and cygwin, as with the libusb development tree, you need to run {{{./autogen.sh}}} in order to have configure and Makefile created for you. 
    72  
    73 To create projects relying on libwdi, please refer to how the sample executables zadic (console) and zadig (GUI) are compiled. 
    74  
    75 == Reusable Code Parts: Can our code solve your problems? == 
    76  
    77 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.[[BR]] 
    78 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? 
    79  
    80 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 v2): 
    81   * '''[http://sourceforge.net/apps/mediawiki/libwdi/index.php?title=Reuse Libwdi Reuse]''' 
    82  
    83 == Development Considerations == 
    84  
    85   * 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). 
    86   * 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. 
    87   * 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. 
    88   * 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. 
    89  
    90 == To Do == 
    91  
    92   * downloading vs embedding of the driver files 
    93  
    94 == In Progress == 
    95  
    96 == Done == 
    97  
    98   * cross-compilation & embedder improvements 
    99   * GUI sample application (zadig) 
    100   * Documentation 
    101   * allow the editing of the device name 
    102   * libusb0.sys driver support 
    103   * MinGW/cygwim/MSVC/DDK support 
    104   * 32 and 64 bit support and compilation time detection 
    105   * UAC elevation 
    106   * retrieval of device name 
    107   * automated inf generation 
    108  
    109 == Development's status log == 
    110  
    111 Please consult the '''[http://libwdi.git.sourceforge.net/git/gitweb.cgi?p=libwdi/libwdi;a=log git log]''' or the WDI section of the '''raw''' [wiki:windows_backend_activity_log Activity Log]. 
    112  
    113 == Development Links == 
    114  
    115   * [http://msdn.microsoft.com/en-us/library/ms790227.aspx Writing a Device Installation Application] 
    116   * [http://msdn.microsoft.com/en-us/library/aa906206.aspx Determining Whether a Device Is Plugged In and removal of phantom devices] 
    117   * [http://msdn.microsoft.com/en-us/library/bb530410.aspx#vistauac_topic3 Installer Detection for 32 bit applications] 
    118   * [http://jpassing.com/2008/02/01/how-to-use-manifests-with-buildexe/ Embedding manifests (for UAC elevation) with the DDK build environment] 
    119   * [http://www.microsoft.com/whdc/driver/install/setupapilog.mspx Troubleshooting Device Installation with the SetupAPI Log File] 
    120   * [http://www.microsoft.com/whdc/driver/install/diagnose.mspx Debugging Device Installation in Windows Vista] 
    121   * [http://support.microsoft.com/kb/179378 How To Browse for Folders from the Current Directory] 
    122   * [http://msdn.microsoft.com/en-us/library/aa511279.aspx UI] [http://msdn.microsoft.com/en-us/library/aa511453.aspx design] [http://msdn.microsoft.com/en-us/library/aa511458.aspx guidelines] from MSDN 
    123   * [http://msdn.microsoft.com/en-us/library/ms997646.aspx Setting Visual Styles] 
    124   * [http://msdn.microsoft.com/en-us/library/bb760728.aspx Creating Status Bars] 
    125   * [http://www.microsoft.com/whdc/driver/install/drvsign/pnp-driver.mspx How Windows elects the driver to use against a newly plugged device] 
    126   * [http://msdn.microsoft.com/en-us/library/ff545473%28VS.85%29.aspx Using INX Files to Create INF Files] 
    127   * [http://msdn.microsoft.com/en-us/library/ff553377.aspx Summary of INF Sections]