From d94a117dbc53ec3fd4166359e3c71b9d6928aef3 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 23 Jun 2017 23:08:55 +0100 Subject: [PATCH] [core] use 'wdk' instead of 'ddk' and drop IA64 support * This means that DDK_DIR/--with-ddkdir has been changed to WDK_DIR/--with-wdkdir * Also fix precommit version update and AppVeyor builds --- .gitignore | 4 ++ _pre-commit.sh | 4 +- appveyor.yml | 6 ++- autogen.sh | 2 +- configure.ac | 58 +++++++--------------- examples/wdi-simple.rc | 8 +-- examples/zadic.rc | 8 +-- examples/zadig.h | 2 +- examples/zadig.rc | 8 +-- libwdi/.msvc/libwdi_dll.vcxproj | 1 + libwdi/.msvc/libwdi_dll.vcxproj.filters | 3 ++ libwdi/.msvc/libwdi_static.vcxproj | 1 + libwdi/.msvc/libwdi_static.vcxproj.filters | 3 ++ libwdi/embedder.h | 6 +-- libwdi/embedder_files.h | 38 ++++---------- libwdi/libusb0.inf.in | 19 +------ libwdi/libwdi.c | 2 +- libwdi/libwdi.rc | 8 +-- msvc/config.h | 9 ++-- 19 files changed, 73 insertions(+), 117 deletions(-) diff --git a/.gitignore b/.gitignore index cdab0e6a..e9ca576e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,11 @@ *.aps +*.db* *.dep *.exe *.htm *.idb +*.ilk +*.ipch *.la *.lib *.lo @@ -13,6 +16,7 @@ *.ncb *.o *.obj +*.opendb *.opt *.pc *.pdb diff --git a/_pre-commit.sh b/_pre-commit.sh index af01de12..1b6d1326 100644 --- a/_pre-commit.sh +++ b/_pre-commit.sh @@ -24,8 +24,8 @@ fi echo "setting nano to $TAGVER" cat > cmd.sed <<\_EOF -s/^[ \t]*FILEVERSION[ \t]*\(.*\),\(.*\),\(.*\),.*/ FILEVERSION \1,\2,\3,@@TAGVER@@/ -s/^[ \t]*PRODUCTVERSION[ \t]*\(.*\),\(.*\),\(.*\),.*/ PRODUCTVERSION \1,\2,\3,@@TAGVER@@/ +s/^[ \t]*FILEVERSION[ \t]*\(.*\),\(.*\),.*,0/ FILEVERSION \1,\2,@@TAGVER@@,0/ +s/^[ \t]*PRODUCTVERSION[ \t]*\(.*\),\(.*\),.*,0/ PRODUCTVERSION \1,\2,@@TAGVER@@,0/ s/^\([ \t]*\)VALUE[ \t]*"FileVersion",[ \t]*"\(.*\)\..*"/\1VALUE "FileVersion", "\2.@@TAGVER@@"/ s/^\([ \t]*\)VALUE[ \t]*"ProductVersion",[ \t]*"\(.*\)\..*"/\1VALUE "ProductVersion", "\2.@@TAGVER@@"/ s/^\(.*\)"Zadig \(.*\)\..*"\(.*\)/\1"Zadig \2.@@TAGVER@@"\3/ diff --git a/appveyor.yml b/appveyor.yml index c07a1285..f032f384 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -38,13 +38,15 @@ build: verbosity: detailed install: + - curl -o wdk10-redist.7z -L http://files.akeo.ie/appveyor/libwdi/wdk10-redist.7z - curl -o libusb-win32-bin-1.2.6.0.zip -L http://files.akeo.ie/appveyor/libwdi/libusb-win32-bin-1.2.6.0.zip - curl -o libusbK-3.0.7.0-bin.7z -L http://files.akeo.ie/appveyor/libwdi/libusbK-3.0.7.0-bin.7z + - 7z x wdk10-redist.7z - 7z x libusb-win32-bin-1.2.6.0.zip - 7z x libusbK-3.0.7.0-bin.7z - if [%PLATFORM%]==[x86_64] set BITS=64 - if [%PLATFORM%]==[x86_64] set EXTRA_OPTS=--disable-32bit build_script: - - if [%COMPILER%]==[MSVC] msbuild libwdi.sln /m /p:Configuration=%CONFIGURATION%,Platform=%PLATFORM%,BuildMacros="LIBUSB0_DIR=\"c:/projects/libwdi/libusb-win32-bin-1.2.6.0\";LIBUSBK_DIR=\"c:/projects/libwdi/libusbK-3.0.7.0-bin/bin\"" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - - if [%COMPILER%]==[MinGW] C:\msys64\usr\bin\bash -lc "export PATH=/mingw%BITS%/bin:$PATH; cd /c/projects/libwdi; ./bootstrap.sh; ./configure --build=%PLATFORM%-w64-mingw32 --host=%PLATFORM%-w64-mingw32 --enable-toggable-debug --enable-examples-build --disable-debug --disable-shared %EXTRA_OPTS% --with-ddkdir=\"C:/Program Files (x86)/Windows Kits/10\" --with-wdfver=1011 --with-libusb0=\"C:/Projects/libwdi/libusb-win32-bin-1.2.6.0\" --with-libusbk=\"C:/Projects/libwdi/libusbK-3.0.7.0-bin/bin\"; make -j4" + - if [%COMPILER%]==[MSVC] msbuild libwdi.sln /m /p:Configuration=%CONFIGURATION%,Platform=%PLATFORM%,BuildMacros="WDK_DIR=\"c:/projects/libwdi/wdk\";LIBUSB0_DIR=\"c:/projects/libwdi/libusb-win32-bin-1.2.6.0\";LIBUSBK_DIR=\"c:/projects/libwdi/libusbK-3.0.7.0-bin/bin\"" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + - if [%COMPILER%]==[MinGW] C:\msys64\usr\bin\bash -lc "export PATH=/mingw%BITS%/bin:$PATH; cd /c/projects/libwdi; ./bootstrap.sh; ./configure --build=%PLATFORM%-w64-mingw32 --host=%PLATFORM%-w64-mingw32 --enable-toggable-debug --enable-examples-build --disable-debug --disable-shared %EXTRA_OPTS% --with-wdkdir=\"C:/Projects/libwdi/wdk\" --with-wdfver=1011 --with-libusb0=\"C:/Projects/libwdi/libusb-win32-bin-1.2.6.0\" --with-libusbk=\"C:/Projects/libwdi/libusbK-3.0.7.0-bin/bin\"; make -j4" diff --git a/autogen.sh b/autogen.sh index b54141e0..69cf22de 100755 --- a/autogen.sh +++ b/autogen.sh @@ -23,6 +23,6 @@ create_def() set -e ./bootstrap.sh -./configure --enable-toggable-debug --enable-examples-build --disable-debug --with-ddkdir="C:/Program Files (x86)/Windows Kits/10" --with-wdfver=1011 --with-libusb0="D:/libusb-win32" --with-libusbk="D:/libusbK/bin" $* +./configure --enable-toggable-debug --enable-examples-build --disable-debug --with-wdkdir="C:/Program Files (x86)/Windows Kits/10" --with-wdfver=1011 --with-libusb0="D:/libusb-win32" --with-libusbk="D:/libusbK/bin" $* # rebuild .def, if sed is available type -P sed &>/dev/null && create_def diff --git a/configure.ac b/configure.ac index f8adf202..297e8bbf 100644 --- a/configure.ac +++ b/configure.ac @@ -16,19 +16,19 @@ AC_C_INLINE AM_PROG_CC_C_O AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions]) -AC_ARG_WITH([ddkdir], - [AS_HELP_STRING([--with-ddkdir], [embed WinUSB driver files from the following DDK location])], - [DDK_DIR=$withval], - [DDK_DIR=""]) -if test "x$DDK_DIR" != "x"; then - AC_DEFINE_UNQUOTED([DDK_DIR], ["${DDK_DIR}"], [embed WinUSB driver files from the following DDK location]) +AC_ARG_WITH([wdkdir], + [AS_HELP_STRING([--with-wdkdir], [embed WinUSB driver files from the following WDK location])], + [WDK_DIR=$withval], + [WDK_DIR=""]) +if test "x$WDK_DIR" != "x"; then + AC_DEFINE_UNQUOTED([WDK_DIR], ["${WDK_DIR}"], [embed WinUSB driver files from the following WDK location]) fi AC_ARG_WITH([wdfver], [AS_HELP_STRING([--with-wdfver], [WDF/KDMF version to use (default 1011)])], [WDF_VER=$withval], [WDF_VER=1011]) -AC_DEFINE_UNQUOTED([WDF_VER], [${WDF_VER}], [DDK WDF/KMDF coinstaller version]) +AC_DEFINE_UNQUOTED([WDF_VER], [${WDF_VER}], [WDK WDF/KMDF coinstaller version]) AC_ARG_WITH([libusb0], [AS_HELP_STRING([--with-libusb0], [embed libusb0 driver files from the following location])], @@ -54,8 +54,8 @@ if test "x$USER_DIR" != "x"; then AC_DEFINE_UNQUOTED([USER_DIR], ["${USER_DIR}"], [embed user defined driver files from the following location]) fi -if test "x$USER_DIR" == "x" -a "x$DDK_DIR" == "x" -a "x$LIBUSB0_DIR" == "x" -a "x$LIBUSBK_DIR" == "x"; then - AC_MSG_ERROR([One of --with-ddkdir, --with-libusb0, --with-libusbk or --with-userdir options MUST be provided.]) +if test "x$USER_DIR" == "x" -a "x$WDK_DIR" == "x" -a "x$LIBUSB0_DIR" == "x" -a "x$LIBUSBK_DIR" == "x"; then + AC_MSG_ERROR([One of --with-wdkdir, --with-libusb0, --with-libusbk or --with-userdir options MUST be provided.]) fi AC_MSG_CHECKING([development environment]) @@ -155,10 +155,6 @@ AC_ARG_ENABLE([64bit], [AS_HELP_STRING([--enable-64bit], [build 64 bit compatible library (default y)])], [enable_64bit='$enableval'], [enable_64bit='yes']) -AC_ARG_ENABLE([ia64], [AS_HELP_STRING([--enable-ia64], - [embed IA64/Itanium driver files (default n)])], - [enable_ia64='$enableval'], - [enable_ia64='no']) if test "x$enable_64bit" == "xno" -a "x$enable_32bit" == "xno"; then AC_MSG_ERROR([you cannot disable both 32 and 64 bit support]) fi @@ -191,10 +187,6 @@ if test "x$enable_64bit" != "xno"; then AC_SUBST([OPT_M64]) fi AM_CONDITIONAL([OPT_M64], [test "x$enable_64bit" != "xno"]) -if test "x$enable_ia64" != "xno"; then - AC_DEFINE([OPT_IA64], [], [embed IA64 driver files]) - AC_SUBST([OPT_IA64]) -fi if test "x$enable_64bit" != "xno"; then # the default is to produce 32 bit, when both 64 and 32 bit support are available @@ -221,29 +213,25 @@ AC_SUBST([ARCH_RCFLAGS]) # AC_CHECK_FILES only works when not cross compiling if test "$cross_compiling" != "yes" then - if test "x$DDK_DIR" != "x"; then - # check that the required WinUSB DDK files are available - AC_CHECK_FILES([$DDK_DIR/redist/winusb/], [COINSTALLER_DIR="winusb"], [COINSTALLER_DIR="wdf"]) + if test "x$WDK_DIR" != "x"; then + # check that the required WinUSB WDK files are available + AC_CHECK_FILES([$WDK_DIR/redist/winusb/], [COINSTALLER_DIR="winusb"], [COINSTALLER_DIR="wdf"]) AC_DEFINE_UNQUOTED([COINSTALLER_DIR], ["${COINSTALLER_DIR}"], [CoInstaller subdirectory for WinUSB redist files ("winusb" or "wdf")]) AC_SUBST([COINSTALLER_DIR]) if test "x$enable_64bit" != "xno"; then - AC_CHECK_FILES([$DDK_DIR/redist/wdf/x64/], [X64_DIR="x64"], [X64_DIR="amd64"]) + AC_CHECK_FILES([$WDK_DIR/redist/wdf/x64/], [X64_DIR="x64"], [X64_DIR="amd64"]) AC_DEFINE_UNQUOTED([X64_DIR], ["${X64_DIR}"], [64bit subdirectory for WinUSB redist files ("x64" or "amd64")]) AC_SUBST([X64_DIR]) - AC_CHECK_FILES([$DDK_DIR/redist/wdf/${X64_DIR}/WdfCoInstaller0${WDF_VER}.dll $DDK_DIR/redist/${COINSTALLER_DIR}/${X64_DIR}/winusbcoinstaller2.dll], [], - [AC_MSG_ERROR([the WinUSB x64 driver files could not be detected (--with-ddkdir)])]) + AC_CHECK_FILES([$WDK_DIR/redist/wdf/${X64_DIR}/WdfCoInstaller0${WDF_VER}.dll $WDK_DIR/redist/${COINSTALLER_DIR}/${X64_DIR}/winusbcoinstaller2.dll], [], + [AC_MSG_ERROR([the WinUSB x64 driver files could not be detected (--with-wdkdir)])]) fi if test "x$enable_32bit" != "xno"; then - AC_CHECK_FILES([$DDK_DIR/redist/wdf/x86/WdfCoInstaller0${WDF_VER}.dll $DDK_DIR/redist/${COINSTALLER_DIR}/x86/winusbcoinstaller2.dll], [], - [AC_MSG_ERROR([the WinUSB x86 driver files could not be detected (--with-ddkdir)])]) - fi - if test "x$enable_ia64" != "xno"; then - AC_CHECK_FILES([$DDK_DIR/redist/wdf/ia64/WdfCoInstaller0${WDF_VER}.dll $DDK_DIR/redist/${COINSTALLER_DIR}/ia64/winusbcoinstaller2.dll], [], - [AC_MSG_ERROR([the WinUSB ia64 driver files could not be detected (--with-ddkdir)])]) + AC_CHECK_FILES([$WDK_DIR/redist/wdf/x86/WdfCoInstaller0${WDF_VER}.dll $WDK_DIR/redist/${COINSTALLER_DIR}/x86/winusbcoinstaller2.dll], [], + [AC_MSG_ERROR([the WinUSB x86 driver files could not be detected (--with-wdkdir)])]) fi - case "$DDK_DIR" in + case "$WDK_DIR" in [[\\/]]*|?:[[\\/]]*) ;; - *) AC_DEFINE_UNQUOTED([DDK_DIR], "../$DDK_DIR");; + *) AC_DEFINE_UNQUOTED([WDK_DIR], "../$WDK_DIR");; esac fi @@ -255,10 +243,6 @@ then AC_CHECK_FILES([$LIBUSB0_DIR/bin/amd64/libusb0.sys $LIBUSB0_DIR/bin/amd64/libusb0.dll],, [AC_MSG_ERROR([the libusb0 amd64 driver files could not be detected (--with-libusb0)])]) fi - if test "x$enable_ia64" != "xno"; then - AC_CHECK_FILES([$LIBUSB0_DIR/bin/ia64/libusb0.sys $LIBUSB0_DIR/bin/ia64/libusb0.dll],, - [AC_MSG_ERROR([the libusb0 ia64 driver files could not be detected (--with-libusb0)])]) - fi case "$LIBUSB0_DIR" in [[\\/]]*|?:[[\\/]]*) ;; *) AC_DEFINE_UNQUOTED([LIBUSB0_DIR], "../$LIBUSB0_DIR");; @@ -273,10 +257,6 @@ then AC_CHECK_FILES([$LIBUSBK_DIR/sys/amd64/libusbK.sys $LIBUSBK_DIR/dll/amd64/libusbK.dll $LIBUSBK_DIR/dll/amd64/libusb0.dll],, [AC_MSG_ERROR([the libusbK amd64 driver files could not be detected (--with-libusbk)])]) fi - if test "x$enable_ia64" != "xno"; then - AC_CHECK_FILES([$LIBUSBK_DIR/sys/ia64/libusbK.sys $LIBUSBK_DIR/dll/ia64/libusbK.dll $LIBUSBK_DIR/dll/ia64/libusb0.dll],, - [AC_MSG_ERROR([the libusbK ia64 driver files could not be detected (--with-libusbk)])]) - fi case "$LIBUSBK_DIR" in [[\\/]]*|?:[[\\/]]*) ;; *) AC_DEFINE_UNQUOTED([LIBUSBK_DIR], "../$LIBUSBK_DIR");; diff --git a/examples/wdi-simple.rc b/examples/wdi-simple.rc index 9cdb07ee..93d09161 100644 --- a/examples/wdi-simple.rc +++ b/examples/wdi-simple.rc @@ -7,8 +7,8 @@ #endif VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,708 - PRODUCTVERSION 1,3,0,708 + FILEVERSION 1,3,709,0 + PRODUCTVERSION 1,3,709,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -25,13 +25,13 @@ BEGIN BEGIN VALUE "CompanyName", "akeo.ie" VALUE "FileDescription", "WDI-Simple" - VALUE "FileVersion", "1.3.0.708" + VALUE "FileVersion", "1.3.709" VALUE "InternalName", "WDI-Simple" VALUE "LegalCopyright", "� 2010-2017 Pete Batard (LGPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/lesser.html" VALUE "OriginalFilename", "wdi-simple.exe" VALUE "ProductName", "WDI-Simple" - VALUE "ProductVersion", "1.3.0.708" + VALUE "ProductVersion", "1.3.709" VALUE "Comments", "http://libwdi.akeo.ie" END END diff --git a/examples/zadic.rc b/examples/zadic.rc index 6de8b46d..33efab6f 100644 --- a/examples/zadic.rc +++ b/examples/zadic.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,708 - PRODUCTVERSION 1,3,0,708 + FILEVERSION 1,3,709,0 + PRODUCTVERSION 1,3,709,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,13 +74,13 @@ BEGIN BEGIN VALUE "CompanyName", "akeo.ie" VALUE "FileDescription", "Zadic" - VALUE "FileVersion", "1.3.0.708" + VALUE "FileVersion", "1.3.709" VALUE "InternalName", "Zadic" VALUE "LegalCopyright", "� 2010-2017 Pete Batard (LGPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/lesser.html" VALUE "OriginalFilename", "zadic.exe" VALUE "ProductName", "Zadic" - VALUE "ProductVersion", "1.3.0.708" + VALUE "ProductVersion", "1.3.709" VALUE "Comments", "http://libwdi.akeo.ie" END END diff --git a/examples/zadig.h b/examples/zadig.h index ebc10871..db5f3400 100644 --- a/examples/zadig.h +++ b/examples/zadig.h @@ -59,7 +59,7 @@ #define FIELD_ORANGE RGB(255,240,200) #define ARROW_GREEN RGB(92,228,65) #define ARROW_ORANGE RGB(253,143,56) -#define APP_VERSION "Zadig 2.3.708" +#define APP_VERSION "Zadig 2.3.709" // These are used to flag end users about the driver they are going to replace enum driver_type { diff --git a/examples/zadig.rc b/examples/zadig.rc index e16838f8..e64dfa0d 100644 --- a/examples/zadig.rc +++ b/examples/zadig.rc @@ -246,8 +246,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,3,682,708 - PRODUCTVERSION 2,3,682,708 + FILEVERSION 2,3,709,0 + PRODUCTVERSION 2,3,709,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -264,13 +264,13 @@ BEGIN BEGIN VALUE "CompanyName", "akeo.ie" VALUE "FileDescription", "Zadig" - VALUE "FileVersion", "2.3.708" + VALUE "FileVersion", "2.3.709" VALUE "InternalName", "Zadig" VALUE "LegalCopyright", "� 2010-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "zadig.exe" VALUE "ProductName", "Zadig" - VALUE "ProductVersion", "2.3.708" + VALUE "ProductVersion", "2.3.709" VALUE "Comments", "http://libwdi.akeo.ie" END END diff --git a/libwdi/.msvc/libwdi_dll.vcxproj b/libwdi/.msvc/libwdi_dll.vcxproj index d97efe12..6c9c8d11 100644 --- a/libwdi/.msvc/libwdi_dll.vcxproj +++ b/libwdi/.msvc/libwdi_dll.vcxproj @@ -192,6 +192,7 @@ embedder embedded.h + diff --git a/libwdi/.msvc/libwdi_dll.vcxproj.filters b/libwdi/.msvc/libwdi_dll.vcxproj.filters index eb3785c9..9f0c4b11 100644 --- a/libwdi/.msvc/libwdi_dll.vcxproj.filters +++ b/libwdi/.msvc/libwdi_dll.vcxproj.filters @@ -61,6 +61,9 @@ Header Files + + Header Files + diff --git a/libwdi/.msvc/libwdi_static.vcxproj b/libwdi/.msvc/libwdi_static.vcxproj index ac10b76d..93a37c7d 100644 --- a/libwdi/.msvc/libwdi_static.vcxproj +++ b/libwdi/.msvc/libwdi_static.vcxproj @@ -177,6 +177,7 @@ embedder embedded.h + diff --git a/libwdi/.msvc/libwdi_static.vcxproj.filters b/libwdi/.msvc/libwdi_static.vcxproj.filters index aa13f9e4..edea80a7 100644 --- a/libwdi/.msvc/libwdi_static.vcxproj.filters +++ b/libwdi/.msvc/libwdi_static.vcxproj.filters @@ -64,6 +64,9 @@ Header Files + + Header Files + diff --git a/libwdi/embedder.h b/libwdi/embedder.h index f9c8b5e0..411c8df4 100644 --- a/libwdi/embedder.h +++ b/libwdi/embedder.h @@ -1,7 +1,7 @@ /* * embedder : converts binary resources into a .h include * "If you can think of a better way to get ice, I'd like to hear it." - * Copyright (c) 2010-2013 Pete Batard + * Copyright (c) 2010-2017 Pete Batard * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,8 +23,8 @@ #error both 32 and 64 bit support have been disabled - check your config.h #endif -#if !defined(DDK_DIR) && !defined(LIBUSB0_DIR) && !defined(USER_DIR) && !defined(LIBUSBK_DIR) -#error at least one of DDK_DIR, LIBUSB0_DIR, LIBUSBK_DIR or USER_DIR must be defined - check your config.h +#if !defined(WDK_DIR) && !defined(LIBUSB0_DIR) && !defined(USER_DIR) && !defined(LIBUSBK_DIR) +#error at least one of WDK_DIR, LIBUSB0_DIR, LIBUSBK_DIR or USER_DIR must be defined - check your config.h #endif // Some adjustment is needed for MSVC diff --git a/libwdi/embedder_files.h b/libwdi/embedder_files.h index 36359411..9b8bb121 100644 --- a/libwdi/embedder_files.h +++ b/libwdi/embedder_files.h @@ -42,20 +42,16 @@ struct emb { struct emb embeddable_fixed[] = { // WinUSB -#if defined(DDK_DIR) +#if defined(WDK_DIR) # if defined(OPT_M32) - { 0, DDK_DIR "\\redist\\wdf\\x86\\WdfCoInstaller0" STR(WDF_VER) ".dll", "x86" }, - { 0, DDK_DIR "\\redist\\" COINSTALLER_DIR "\\x86\\winusbcoinstaller2.dll", "x86" }, + { 0, WDK_DIR "\\redist\\wdf\\x86\\WdfCoInstaller0" STR(WDF_VER) ".dll", "x86" }, + { 0, WDK_DIR "\\redist\\" COINSTALLER_DIR "\\x86\\winusbcoinstaller2.dll", "x86" }, # endif // OPT_M32 # if defined(OPT_M64) - { 0, DDK_DIR "\\redist\\wdf\\" X64_DIR "\\WdfCoInstaller0" STR(WDF_VER) ".dll", "amd64" }, - { 0, DDK_DIR "\\redist\\" COINSTALLER_DIR "\\" X64_DIR "\\winusbcoinstaller2.dll", "amd64" }, + { 0, WDK_DIR "\\redist\\wdf\\" X64_DIR "\\WdfCoInstaller0" STR(WDF_VER) ".dll", "amd64" }, + { 0, WDK_DIR "\\redist\\" COINSTALLER_DIR "\\" X64_DIR "\\winusbcoinstaller2.dll", "amd64" }, # endif // OPT_M64 -# if defined(OPT_IA64) - { 0, DDK_DIR "\\redist\\wdf\\ia64\\WdfCoInstaller0" STR(WDF_VER) ".dll", "ia64" }, - { 0, DDK_DIR "\\redist\\" COINSTALLER_DIR "\\ia64\\winusbcoinstaller2.dll", "ia64" }, -# endif // OPT_IA64 -#endif // DDK_DIR +#endif // WDK_DIR // libusb0 #if defined(LIBUSB0_DIR) @@ -77,11 +73,6 @@ struct emb embeddable_fixed[] = { { 0, LIBUSB0_DIR "\\bin\\amd64\\libusb0.sys", "amd64" }, { 0, LIBUSB0_DIR "\\bin\\amd64\\install-filter.exe", "amd64" }, # endif // OPT_M64 -# if defined(OPT_IA64) - { 0, LIBUSB0_DIR "\\bin\\ia64\\libusb0.dll", "ia64" }, - { 0, LIBUSB0_DIR "\\bin\\ia64\\libusb0.sys", "ia64" }, - { 0, LIBUSB0_DIR "\\bin\\ia64\\install-filter.exe", "ia64" }, -# endif // OPT_IA64 { 0, LIBUSB0_DIR "\\installer_license.txt", "license\\libusb0" }, #endif // LIBUSB0_DIR @@ -89,9 +80,9 @@ struct emb embeddable_fixed[] = { #if defined(LIBUSBK_DIR) # if defined(OPT_M32) -# if !defined(DDK_DIR) +# if !defined(WDK_DIR) { 0, LIBUSBK_DIR "\\sys\\x86\\WdfCoInstaller" STR(WDF_VER) ".dll", "x86" }, -# endif // DDK_DIR +# endif // WDK_DIR { 0, LIBUSBK_DIR "\\sys\\x86\\libusbK.sys", "x86" }, { 0, LIBUSBK_DIR "\\dll\\x86\\libusbK.dll", "x86" }, # if defined(OPT_M64) @@ -106,9 +97,9 @@ struct emb embeddable_fixed[] = { # endif // OPT_M32 # if defined(OPT_M64) -# if !defined(DDK_DIR) +# if !defined(WDK_DIR) { 0, LIBUSBK_DIR "\\sys\\amd64\\WdfCoInstaller" STR(WDF_VER) ".dll", "amd64" }, -# endif // DDK_DIR +# endif // WDK_DIR { 0, LIBUSBK_DIR "\\sys\\amd64\\libusbK.sys", "amd64" }, { 0, LIBUSBK_DIR "\\dll\\amd64\\libusbK.dll", "amd64" }, # if !defined(LIBUSB0_DIR) @@ -125,15 +116,6 @@ struct emb embeddable_fixed[] = { # endif // OPT_M32 # endif // OPT_M64 -# if defined(OPT_IA64) -# if !defined(DDK_DIR) - { 0, LIBUSBK_DIR "\\sys\\ia64\\WdfCoInstaller" STR(WDF_VER) ".dll", "ia64" }, -# endif // DDK_DIR - { 0, LIBUSBK_DIR "\\sys\\ia64\\libusbK.sys", "ia64" }, - { 0, LIBUSBK_DIR "\\dll\\ia64\\libusbK.dll", "ia64" }, - { 0, LIBUSBK_DIR "\\dll\\ia64\\libusb0.dll", "ia64" }, -# endif // OPT_IA64 - #endif // LIBUSBK_DIR // Common files diff --git a/libwdi/libusb0.inf.in b/libwdi/libusb0.inf.in index 05da88e5..3a6d9fdc 100644 --- a/libwdi/libusb0.inf.in +++ b/libwdi/libusb0.inf.in @@ -23,7 +23,7 @@ HKR,,,0,"libusb-win32 devices" HKR,,Icon,,-20 [Manufacturer] -%VendorName% = Devices, NT, NTAMD64, NTIA64 +%VendorName% = Devices, NT, NTAMD64 ;-------------------------------------------------------------------------- ; libusb-win32 files @@ -44,10 +44,6 @@ libusb0.dll = 1,amd64 libusb0_x86.dll = 1,x86 #LK_X86_DLL# #LK_EQ_X86# -[SourceDisksFiles.ia64] -libusb0.sys = 1,ia64 -libusb0.dll = 1,ia64 - [DestinationDirs] libusb_files_sys = 10,system32\drivers libusb_files_dll = 10,system32 @@ -77,9 +73,6 @@ CopyFiles = libusb_files_sys, libusb_files_dll_x86 [LIBUSB_WIN32_DEV.NTAMD64] CopyFiles = libusb_files_sys, libusb_files_dll, libusb_files_dll_wow64 -[LIBUSB_WIN32_DEV.NTIA64] -CopyFiles = libusb_files_sys, libusb_files_dll, libusb_files_dll_wow64 - [LIBUSB_WIN32_DEV.NT.HW] DelReg = libusb_del_reg_hw AddReg = libusb_add_reg_hw @@ -88,19 +81,12 @@ AddReg = libusb_add_reg_hw DelReg = libusb_del_reg_hw AddReg = libusb_add_reg_hw -[LIBUSB_WIN32_DEV.NTIA64.HW] -DelReg = libusb_del_reg_hw -AddReg = libusb_add_reg_hw - [LIBUSB_WIN32_DEV.NT.Services] AddService = libusb0, 0x00000002, libusb_add_service [LIBUSB_WIN32_DEV.NTAMD64.Services] AddService = libusb0, 0x00000002, libusb_add_service -[LIBUSB_WIN32_DEV.NTIA64.Services] -AddService = libusb0, 0x00000002, libusb_add_service - ; Older versions of this .inf file installed filter drivers. They are not ; needed any more and must be removed [libusb_del_reg_hw] @@ -143,6 +129,3 @@ ServiceBinary = %12%\libusb0.sys [Devices.NTAMD64] %DeviceName% = LIBUSB_WIN32_DEV.NTAMD64, USB\%DeviceID% - -[Devices.NTIA64] -%DeviceName% = LIBUSB_WIN32_DEV.NTIA64, USB\%DeviceID% diff --git a/libwdi/libwdi.c b/libwdi/libwdi.c index 1b8d8d23..c6c20f01 100644 --- a/libwdi/libwdi.c +++ b/libwdi/libwdi.c @@ -531,7 +531,7 @@ BOOL LIBWDI_API wdi_is_driver_supported(int driver_type, VS_FIXEDFILEINFO* drive switch (driver_type) { case WDI_WINUSB: -#if defined(DDK_DIR) +#if defined(WDK_DIR) return TRUE; #else return FALSE; diff --git a/libwdi/libwdi.rc b/libwdi/libwdi.rc index 89a62013..791f2023 100644 --- a/libwdi/libwdi.rc +++ b/libwdi/libwdi.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,708 - PRODUCTVERSION 1,3,0,708 + FILEVERSION 1,3,709,0 + PRODUCTVERSION 1,3,709,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,13 +68,13 @@ BEGIN BEGIN VALUE "CompanyName", "akeo.ie" VALUE "FileDescription", "libwdi: Windows Driver Installer Library" - VALUE "FileVersion", "1.3.0.708" + VALUE "FileVersion", "1.3.709" VALUE "InternalName", "libwdi" VALUE "LegalCopyright", "� 2010-2017 Pete Batard (LGPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/lesser.html" VALUE "OriginalFilename", "libwdi" VALUE "ProductName", "libwdi" - VALUE "ProductVersion", "1.3.0.708" + VALUE "ProductVersion", "1.3.709" VALUE "Comments", "http://libwdi.akeo.ie" END END diff --git a/msvc/config.h b/msvc/config.h index f5c32433..c97d4995 100644 --- a/msvc/config.h +++ b/msvc/config.h @@ -16,12 +16,12 @@ #endif /* - * Embed WinUSB driver files from the following DDK location + * Embed WinUSB driver files from the following WDK location * NB: You must also make sure the WDF_VER, COINSTALLER_DIR and X64_DIR * match your WinUSB redist directrories */ -#ifndef DDK_DIR -#define DDK_DIR "C:/Program Files (x86)/Windows Kits/10" +#ifndef WDK_DIR +#define WDK_DIR "C:/Program Files (x86)/Windows Kits/10" #endif /* WDK WDF coinstaller version */ @@ -54,9 +54,6 @@ /* 64 bit support */ #define OPT_M64 -/* embed IA64 driver files */ -//#define OPT_IA64 - /* Debug message logging */ //#define ENABLE_DEBUG_LOGGING