63 Commits

Author SHA1 Message Date
RipleyTom
ac5c05b3c3 output to ProjectDir not SolutionDir 2019-02-02 00:59:04 +01:00
Chris Dickens
dc5e33e382 Windows: Add back resource and definition files to VS DLL projects
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-03-20 10:01:48 -07:00
Chris Dickens
0aac390bb2 Windows: Restructure DDK/MSVC project files
For simplicity and to address some build warnings, this commit reworks
the project files to eliminate duplication and consolidate common build
flags and options. Also adds the stress and testlibusb projects to the
DDK build script.

Closes #402

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-03-12 10:39:26 -07:00
Chris Dickens
ca0b6c09fa Fix appveyor scripts for Cygwin and MinGW to build as intended
The sub-directory created to store the generated files and build objects
was not being used as intended, because each invocation of the bash
starts in the home directory. Fix this by changing to the intended
directory prior to each command invocation.

Also replace the invocation of autogen.sh with bootstrap.sh, since using
autogen.sh calls ./configure and we weren't using the results of that
work. Instead we call configure directly from the sub-directory while
enabling the examples and test builds (for Cygwin) as autogen.sh would do.

Also fix the invalid value for the --build option provided to the x64
build of MinGW.

Finally, propagate errors from each script command so that failures are
caught and reported.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-01-08 21:03:50 -08:00
Sameeh Jubran
020103af78 Windows: Ditch UsbDk build configuration
Previous patch introduced run-time UsbDk backend activation,
therefore separate build configuration is not needed anymore.

Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
2018-01-08 10:18:09 -08:00
Chris Dickens
54884e84d0 Windows: Enable dynamic selection between WinUSB and UsbDk backends
This commit unifies the two Windows backends into a single project and
enables the user to switch to the UsbDk backend, if available, using the
libusb_set_option() function. All contexts will use the WinUSB backend
by default for backwards compatibility.

With this change, the UsbDk-specific projects are no longer required.

Closes #309

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-01-08 10:17:26 -08:00
Chris Dickens
4da478cce0 Misc: Add TargetName to getopt VS project files to supress warning
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-01-04 23:44:57 -08:00
Chris Dickens
9843b689df Misc: Sort projects alphabetically in VS solution files
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-01-04 23:33:09 -08:00
Chris Dickens
8b6639ea6f Misc: Fix references section in fxload VS project files
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-01-04 23:32:33 -08:00
Chris Dickens
6dd2b7f9a5 Misc: Fix linker options in getopt VS project files
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-01-04 23:32:14 -08:00
Chris Dickens
e25e0ce759 Misc: Add missing files to VS2005 projects for libusb
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-01-04 23:21:48 -08:00
Chris Dickens
cbf2cc8847 Misc: Fix minor discrepancies in WinCE MSVC files
Add missing header files, fix preprocessor definitions for static
library, and sort projects and files by name.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-01-04 23:19:47 -08:00
Chris Dickens
af1f17536f Windows: Fix some minor style issues
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-01-03 23:27:11 -08:00
Chris Dickens
3001f93477 Misc: Ensure that both WINVER and _WIN32_WINNT are defined for Windows builds
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2018-01-03 19:19:39 -08:00
Chris Dickens
6402a10c14 Misc: Add _CRT_SECURE_NO_WARNINGS to testlibusb to suppress warning C4996
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2017-12-28 22:52:36 -08:00
Chris Dickens
539a3230cf Misc: Fix testlibusb build on VS2013 and earlier and suppress warnings
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2017-12-26 23:58:00 -08:00
Chris Dickens
2ae2348c66 Windows: Add VS 2010/2012/2013/2017 project files for testlibusb
Inspired by PR #201 (commit fa19c152), this commit adds the same project
files for the other supported versions of Visual Studio.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2017-12-26 17:25:59 -08:00
Anil Nair
fa19c15237 Windows: testlibusb example for VS2015
Closes #201

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2017-12-26 17:14:32 -08:00
Chris Dickens
80f1657f06 core: Remove check for and inclusion of signal.h
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2017-01-12 15:02:59 -08:00
Chris Dickens
322d146572 Windows: Fix DDK build's missing files
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2017-01-12 15:02:40 -08:00
Chris Dickens
96f8273c5e Windows: Add Visual Studio 2017 support
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2017-01-06 10:59:43 -08:00
Pete Batard
3564c18d83 windows: use appropriate version for VS2015 solution files
* Closes #193
2016-07-22 12:57:40 +01:00
hacker2490
40fb6ff0a0 AppVeyor: use a .bat file now
- Changes in platform configuration, x86 breaks the build
- Solution file does not contain platform for Any CPU,fixing it to Win32
- Added Multiple solutions to appveyor configuration file
- Added batch script for VS2010 builds
- Added fixes to appveyor.bat file and appveyor.yml
- Fixes for Platform and Configuration in appveyor.bat
- Fixed windows exit code, Appveyor reports exit on succesful build
- Multiple Builds in same platform and configuration,fixed it
2016-03-06 21:55:28 +01:00
Chris Dickens
4a0446f51b Misc: Fix up Visual Studio project files
This commit sorts the source and header files by name (for easier
human parsing), adds windows_nt_common.c to the 2010 and 2012
projects, and removes some CPP defines that should not be present
in the libusb_static_2015.vcxproj file.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2016-01-27 00:15:11 -08:00
Dmitry Fleytman
24c5289342 build: Integrate usbdk backend
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2016-01-26 23:38:23 -08:00
Dmitry Fleytman
5d83abac3f windows: Rename windows_usb.h/c windows_winusb.h/c
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2016-01-23 22:58:35 -08:00
Dmitry Fleytman
92a327815b windows: Move common definitions to a separate file
New files windows_nt_common.h/c introduced.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2016-01-23 22:58:10 -08:00
Brent Rector
a34ba28b40 Windows: Add Visual Studio 2015 support
Modified from original to remove two unnecessary files and address
type-casting discrepancies across platforms.

Closes #60
Closes #83
Closes #120

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2016-01-06 00:27:12 -08:00
hjelmn@cs.unm.edu
1eff220474 Misc: Revert all references to libusb/libusb.info 2014-01-08 23:51:01 +00:00
Joshua Blake
805cc3ec40 Windows: Add Visual Studio 2013 solution files
* Also update gitignore
* Closes #162
2013-12-13 00:52:54 +00:00
Pete Batard
368d613a17 Windows: Fix a cast warning when compiling for x64 in VS
* Also fixes and closes #129 again
2013-08-13 19:00:54 +01:00
Pete Batard
d28ab4bf13 Windows: Fix VS2010 project files
* Closes #129
2013-08-12 22:04:39 +01:00
Toby Gray
9222a548bd Core: Add compile time option to use native OS logging facility
* This change makes it easier to debug issues in UI applications
  which don't necessarily have a console connected to stderr.
* Outputting to the debugger shouldn't occur in normal situations so
  this change has to be explicitly enabled by a build-time config flag.
* Uses OutputDebugString() on Windows platforms or the syslog facility
  on other OSes, if available.
* Also align the report of configure defaults to autotool's.
2013-08-09 01:55:04 +01:00
Hans de Goede
511ed18228 Core: Add a libusb_strerror() function
This patch adds the much requested libusb_strerror() function, taking into
account all issues people raised wrt previous attempts.

Criteria / Decisions underlying this implementation:
- Must support translated messages
- Must not use gettext as that does not work well in combination with Windows
 (when building with Visual C, or for Windows CE)
- API compatible with FreeBSD and various patched libusb-s floating around
- KISS:
 - Do not add any (other) library dependencies
 - Do not try to deal with message encodings (iconv), simply always return UTF-8
   making encoding the problem of the application using libusb_strerror.
 - Defaults to English, so apps which don't want translated messages,
   don't need to do anything special
 - Defaults to English (with pure ASCII messages), so apps which don't
   call libusb_setlocale() don't need to worry about encoding
2013-06-10 00:16:36 +01:00
Toby Gray
462c88702e WinCE: Add hotplug.c to projects
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-05-28 12:29:03 +02:00
Pete Batard
7e858a3408 Add hotplugtest to msvc project files 2013-05-16 10:55:13 +02:00
Toby Gray
3b50a9391a WinCE: Fix x86 build on Visual Studio 2005 2013-04-11 22:37:29 +01:00
Pete Batard
894e65649c Windows: Fix multiple warnings
* Most of these warnings are false positive from VS2012's "Run Code Analysis"
* Also closes #98: "windows_usb.c:376:30: 'dev_info' may be used uninitialized"
2013-03-12 01:26:08 +00:00
Pete Batard
baf714f5e0 WinCE: Post integration cleanup
* Update copyrights and switch to UTF-8 everywhere
* Add SleepEx() to missing.h, and move include to libusbi.h
* Remove ifdef for GetSystemTimeAsFileTime()
2013-03-03 00:56:06 +00:00
Pete Batard
0ded9c126e Misc: Simplify includes and misc. cleanup
* fxload sample provenance
* No need for <sys/types.h> in samples as already in libusb.h
* Don't bother about sscanf_s in xusb
* Use HAVE_### and rely on config.h where possible
* Formal inclusion of <winsock.h> in libusb.h for WinCE and WDK
* Cleanup of Windows' config.h
* Avoid ENAMETOOLONG and ENOTEMPTY conflict between errno.h and winsock.h for WinCE
* Additional newlines & braces cleanup
2013-02-27 22:58:49 +00:00
Toby Gray
5bdea90cfe WinCE: Add support for WinCE (Solution files) 2013-01-23 00:41:00 +00:00
Toby Gray
244271931a WinCE: Add support for WinCE (sources) 2013-01-23 00:40:18 +00:00
Toby Gray
788e433d0a Windows: Add windows_common.h header
* This file contains definition that will be shared between the
  Windows and Windows CE backends
2013-01-23 00:39:49 +00:00
Pete Batard
1e6928ccab Core: Use HAVE_SYS_TYPES_H and HAVE_SIGNAL_H
* These files may not be available on all platforms (eg. WinCE)
2013-01-23 00:39:47 +00:00
Pete Batard
d7d91d5e87 Windows: Add VS2012 solution files
* As well as try to clean up MS's MSVC mess...
2013-01-07 22:15:23 +00:00
Toby Gray
21cf6e4748 Tests: Add libusbx stress test
See https://github.com/tobygray/libusbx/tree/testing as well
as http://libusbx.1081486.n5.nabble.com/Libusbx-devel-Crashes-tt433.html#a438
2012-11-25 01:32:59 +00:00
Pete Batard
05975333c5 Samples: Add fxload sample for Cypress EZ-USB chips
* This program was modified from the original fxload at:
  http://linux-hotplug.sourceforge.net to add libusbx
  as well as non HEX images support.
* Only supports RAM upload for now, with EEPROM and FX3
  support to be added at a later stage.
2012-09-13 23:58:09 +01:00
Pete Batard
0e0cbb6c27 Windows: Address MSVC Level 4 & WDK's OACR/Prefast warnings
* The library is now compiled with warning level 4 for VS2010
* Move silencing of 4200, 28125 and 28719 to msvc/config.h
* Add fixes in core to silence unused variables warnings
* Ensure that spinlock is always set interlocked in poll_windows
* Add missing check for calloc return value
* Fix data assignation in conditionals warnings
* Fix an OACR/Prefast error related to the use of strncpy in xusb.c
* Also fixes whitespace inconsistencies in core
* Issues reported by Orin Eman and Xiaofan Chen. See:
  https://sourceforge.net/mailarchive/message.php?msg_id=29412656
2012-07-02 18:28:37 +01:00
Pete Batard
cf6e68acb1 Core: Add toggleable debug logging
* Also fix a missing space in debug log messages introduced
  with the previous timestamp logging update
2012-06-04 01:31:06 +01:00
Pete Batard
5b82831df2 Windows: remove obsolete lsusb project files 2012-04-09 23:31:24 +01:00