early-access version 1701
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
buildsys="${1}-${Platform}"
|
||||
|
||||
if [ "${buildsys}" == "MinGW-Win32" ]; then
|
||||
export PATH="/c/mingw-w64/i686-6.3.0-posix-dwarf-rt_v5-rev1/mingw32/bin:${PATH}"
|
||||
elif [ "${buildsys}" == "MinGW-x64" ]; then
|
||||
export PATH="/c/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin:${PATH}"
|
||||
fi
|
||||
|
||||
builddir="build-${buildsys}"
|
||||
installdir="${PWD}/libusb-${buildsys}"
|
||||
|
||||
cd libusb
|
||||
|
||||
echo "Bootstrapping ..."
|
||||
./bootstrap.sh
|
||||
echo ""
|
||||
|
||||
exec .private/ci-build.sh --build-dir "${builddir}" --install -- "--prefix=${installdir}"
|
||||
+1
-1
@@ -51,4 +51,4 @@ 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
|
||||
cd $PWD
|
||||
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
builddir=
|
||||
install=no
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--build-dir)
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "ERROR: missing argument for --build-dir option" >&2
|
||||
exit 1
|
||||
fi
|
||||
builddir=$2
|
||||
shift 2
|
||||
;;
|
||||
--install)
|
||||
install=yes
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break;
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: Unexpected argument: $1" >&2
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "${builddir}" ]; then
|
||||
echo "ERROR: --build-dir option not specified" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e "${builddir}" ]; then
|
||||
echo "ERROR: directory entry named '${builddir}' already exists" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir "${builddir}"
|
||||
cd "${builddir}"
|
||||
|
||||
cflags="-O2"
|
||||
|
||||
# enable extra warnings
|
||||
cflags+=" -Winline"
|
||||
cflags+=" -Wmissing-include-dirs"
|
||||
cflags+=" -Wnested-externs"
|
||||
cflags+=" -Wpointer-arith"
|
||||
cflags+=" -Wredundant-decls"
|
||||
cflags+=" -Wswitch-enum"
|
||||
|
||||
echo ""
|
||||
echo "Configuring ..."
|
||||
CFLAGS="${cflags}" ../configure --enable-examples-build --enable-tests-build "$@"
|
||||
|
||||
echo ""
|
||||
echo "Building ..."
|
||||
make -j4 -k
|
||||
|
||||
if [ "${install}" = "yes" ]; then
|
||||
echo ""
|
||||
echo "Installing ..."
|
||||
make install
|
||||
fi
|
||||
@@ -14,6 +14,10 @@
|
||||
# derivative branch, such as one you would create for private development.
|
||||
#
|
||||
|
||||
if [ -n "$LIBUSB_SKIP_NANO" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
amend)
|
||||
# Check if a .amend exists. If none, create one and warn user to re-commit.
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
BRANCH_OFFSET=10000
|
||||
################################################################################
|
||||
|
||||
if [ -n "$LIBUSB_SKIP_NANO" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$BASH_VERSION" = '' ]; then
|
||||
TYPE_CMD="type git >/dev/null 2>&1"
|
||||
else
|
||||
|
||||
+4
-19
@@ -2,7 +2,7 @@
|
||||
|
||||
*********************************************************************
|
||||
* The latest version of this snapshot can always be downloaded at: *
|
||||
* https://sourceforge.net/projects/libusb/files/ *
|
||||
* https://github.com/libusb/libusb/releases *
|
||||
*********************************************************************
|
||||
|
||||
o Visual Studio:
|
||||
@@ -24,24 +24,6 @@ o Visual Studio:
|
||||
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 libusb 1.0 based console application. In this sample ..\libusb\ 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=..\libusb;$(DDK_INC_PATH)
|
||||
TARGETLIBS=..\libusb\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 libusb 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/libusb-1.0/ to your default include directory,
|
||||
and copy the MinGW32/ or MinGW64/ .a files to your default library directory.
|
||||
@@ -55,6 +37,9 @@ o Additional information:
|
||||
- For some libusb samples (including source), please have a look in examples/
|
||||
- For additional information on the libusb 1.0 Windows backend please visit:
|
||||
http://windows.libusb.info
|
||||
- Using the UsbDk backend is now a run-time choice rather than a compile-time
|
||||
choice. For additional information, including example usage, please visit:
|
||||
http://windows.libusb.info/#Driver_Installation
|
||||
- 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://libusb.info/ and check the
|
||||
|
||||
Reference in New Issue
Block a user