diff options
-rw-r--r-- | .private/bd.cmd | 83 | ||||
-rw-r--r-- | .private/bm.sh | 54 | ||||
-rw-r--r-- | .private/wbs.txt | 61 | ||||
-rw-r--r-- | libusb/version.h | 2 |
4 files changed, 199 insertions, 1 deletions
diff --git a/.private/bd.cmd b/.private/bd.cmd new file mode 100644 index 0000000..e81aa94 --- /dev/null +++ b/.private/bd.cmd @@ -0,0 +1,83 @@ +@echo off +rem produce the DDK binary files for snapshots +rem !!!THIS SCRIPT IS FOR INTERNAL DEVELOPER USE ONLY!!! + +if NOT x%DDK_TARGET_OS%==xWinXP goto usage + +set PWD=%~dp0 +cd .. +mkdir E:\dailies\%DATE% +for %%A in (MS32 MS64) do mkdir E:\dailies\%DATE%\%%A +for %%A in (MS32 MS64) do mkdir E:\dailies\%DATE%\%%A\static +for %%A in (MS32 MS64) do mkdir E:\dailies\%DATE%\%%A\dll +for %%A in (source bin32 bin64) do mkdir E:\dailies\%DATE%\examples\%%A +copy examples\listdevs.c E:\dailies\%DATE%\examples\source +copy examples\xusb.c E:\dailies\%DATE%\examples\source +copy msvc\stdint.h E:\dailies\%DATE%\examples\source +copy .private\wbs.txt E:\dailies\%DATE%\README.txt + +set ORG_BUILD_ALT_DIR=%BUILD_ALT_DIR% +set ORG_BUILDARCH=%_BUILDARCH% +set ORG_PATH=%PATH% +set ORG_BUILD_DEFAULT_TARGETS=%BUILD_DEFAULT_TARGETS% + +set 386=1 +set AMD64= +set BUILD_DEFAULT_TARGETS=-386 +set _AMD64bit= +set _BUILDARCH=x86 +set PATH=%BASEDIR%\bin\x86;%BASEDIR%\bin\x86\x86 + +cd msvc +call ddk_build +cd .. + +@echo off +copy Win32\Release\lib\libusb-1.0.lib E:\dailies\%DATE%\MS32\static +copy Win32\Release\examples\listdevs.exe E:\dailies\%DATE%\examples\bin32 +copy Win32\Release\examples\xusb.exe E:\dailies\%DATE%\examples\bin32 + +cd msvc +call ddk_build DLL +cd .. + +@echo off +copy Win32\Release\lib\libusb-1.0.lib E:\dailies\%DATE%\MS32\dll +copy Win32\Release\dll\libusb-1.0.dll E:\dailies\%DATE%\MS32\dll + +set 386= +set AMD64=1 +set BUILD_DEFAULT_TARGETS=-amd64 +set _AMD64bit=true +set _BUILDARCH=AMD64 +set PATH=%BASEDIR%\bin\x86\amd64;%BASEDIR%\bin\x86 + +cd msvc +call ddk_build +cd .. + +@echo off +copy x64\Release\lib\libusb-1.0.lib E:\dailies\%DATE%\MS64\static +copy x64\Release\examples\listdevs.exe E:\dailies\%DATE%\examples\bin64 +copy x64\Release\examples\xusb.exe E:\dailies\%DATE%\examples\bin64 + +cd msvc +call ddk_build DLL +cd .. + +@echo off +copy x64\Release\lib\libusb-1.0.lib E:\dailies\%DATE%\MS64\dll +copy x64\Release\dll\libusb-1.0.dll E:\dailies\%DATE%\MS64\dll + +set BUILD_ALT_DIR=%ORG_BUILD_ALT_DIR% +set _BUILDARCH=%ORG_BUILDARCH% +set PATH=%ORG_PATH% +set BUILD_DEFAULT_TARGETS=%ORG_BUILD_DEFAULT_TARGETS% + +goto done + +:usage +echo must be run in a WXP build environment! + +:done +cd %PWD%
\ No newline at end of file diff --git a/.private/bm.sh b/.private/bm.sh new file mode 100644 index 0000000..217baf8 --- /dev/null +++ b/.private/bm.sh @@ -0,0 +1,54 @@ +#!/bin/sh +# produce the MinGW binary files for snapshots +# !!!THIS SCRIPT IS FOR INTERNAL DEVELOPER USE ONLY!!! + +PWD=`pwd` +cd .. +date=`date +%Y.%m.%d` +target=e:/dailies/$date +mkdir -p $target/include/libusbx-1.0 +cp -v libusb/libusb-1.0.def $target +cp -v libusb/libusb.h $target/include/libusbx-1.0 + +# +# 32 bit binaries +# +target=e:/dailies/$date/MinGW32 +git clean -fdx +# Not using debug (-g) in CFLAGS DRAMATICALLY reduces the size of the binaries +export CFLAGS="-O2 -m32" +export LDFLAGS="-m32" +export RCFLAGS="--target=pe-i386" +export DLLTOOLFLAGS="-m i386 -f --32" +echo `pwd` +(glibtoolize --version) < /dev/null > /dev/null 2>&1 && LIBTOOLIZE=glibtoolize || LIBTOOLIZE=libtoolize +$LIBTOOLIZE --copy --force || exit 1 +aclocal || exit 1 +autoheader || exit 1 +autoconf || exit 1 +automake -a -c || exit 1 +./configure +make -j2 +mkdir -p $target/static +mkdir -p $target/dll +cp -v libusb/.libs/libusb-1.0.a $target/static +cp -v libusb/.libs/libusb-1.0.dll $target/dll +cp -v libusb/.libs/libusb-1.0.dll.a $target/dll +make clean -j2 + +# +# 64 bit binaries +# +target=e:/dailies/$date/MinGW64 +export CFLAGS="-O2" +export LDFLAGS="" +export RCFLAGS="" +export DLLTOOLFLAGS="" +./configure +make -j2 +mkdir -p $target/static +mkdir -p $target/dll +cp -v libusb/.libs/libusb-1.0.a $target/static +cp -v libusb/.libs/libusb-1.0.dll $target/dll +cp -v libusb/.libs/libusb-1.0.dll.a $target/dll +cd $PWD
\ No newline at end of file diff --git a/.private/wbs.txt b/.private/wbs.txt new file mode 100644 index 0000000..8738cd8 --- /dev/null +++ b/.private/wbs.txt @@ -0,0 +1,61 @@ + libusbx 1.0 Windows binary snapshot - README + + ********************************************************************* + * The latest version of this snapshot can always be downloaded at: * + * https://sourceforge.net/projects/libusbx/files/ * + ********************************************************************* + +o Visual Studio: + - Open existing or create a new project for your application + - Copy libusb.h, from the include\libusbx-1.0\ directory, into your project and + make sure that the location where the file reside appears in the 'Additional + Include Directories' section (Configuration Properties -> C/C++ -> General). + - Copy the relevant .lib file from MS32\ or MS64\ and add 'libusb-1.0.lib' to + your 'Additional Dependencies' (Configuration Properties -> Linker -> Input) + Also make sure that the directory where libusb-1.0.lib resides is added to + 'Additional Library Directories' (Configuration Properties -> Linker + -> General) + - If you use the static version of the libusbx library, make sure that + 'Runtime Library' is set to 'Multi-threaded DLL (/MD)' (Configuration + Properties -> C/C++ -> Code Generation). + NB: If your application requires /MT (Multi-threaded/libCMT), you need to + recompile a static libusbx 1.0 library from source. + - Compile and run your application. If you use the DLL version of libusb-1.0, + remember that you need to have a copy of the DLL either in the runtime + directory or in system32 + +o WDK/DDK: + - The following is an example of a sources files that you can use to compile + a libusbx 1.0 based console application. In this sample ..\libusbx\ is the + directory where you would have copied libusb.h as well as the relevant + libusb-1.0.lib + + TARGETNAME=your_app + TARGETTYPE=PROGRAM + USE_MSVCRT=1 + UMTYPE=console + INCLUDES=..\libusbx;$(DDK_INC_PATH) + TARGETLIBS=..\libusbx\libusb-1.0.lib + SOURCES=your_app.c + + - Note that if you plan to use libCMT instead of MSVCRT (USE_LIBCMT=1 instead + of USE_MSVCRT=1), you will need to recompile libusbx to use libCMT. This can + easily be achieved, in the DDK environment, by running 'ddk_build /MT' + +o MinGW/cygwin + - Copy libusb.h, from include/libusbx-1.0/ to your default include directory, + and copy the MinGW32/ or MinGW64/ .a files to your default library directory. + Or, if you don't want to use the default locations, make sure that you feed + the relevant -I and -L options to the compiler. + - Add the '-lusb-1.0' linker option when compiling. + +o Additional information: + - The libusbx 1.0 API documentation can be accessed at: + http://libusbx.sourceforge.net/api-1.0/modules.html + - For some libusb samples (including source), please have a look in examples/ + - For additional information on the libusbx 1.0 Windows backend please visit: + https://sourceforge.net/apps/mediawiki/libusbx/index.php?title=Windows + - The MinGW and MS generated DLLs are fully interchangeable, provided that you + use the import libs provided or generate one from the .def also provided. + - If you find any issue, please visit http://libusbx.org/ and check the + Support section diff --git a/libusb/version.h b/libusb/version.h index 2549bde..43d115e 100644 --- a/libusb/version.h +++ b/libusb/version.h @@ -9,7 +9,7 @@ #define LIBUSB_MICRO 9 #endif #ifndef LIBUSB_NANO -#define LIBUSB_NANO 10470 +#define LIBUSB_NANO 10471 #endif /* LIBUSB_RC is the release candidate suffix. Should normally be empty. */ #ifndef LIBUSB_RC |