summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToby Gray <toby.gray@realvnc.com>2013-04-04 13:32:31 +0100
committerPete Batard <pete@akeo.ie>2013-04-11 22:41:42 +0100
commita66cfa05fe384e2aa09ceb1660e83d51adbc4cd3 (patch)
tree24cee8be5a1dd8c69d058d7bc93a1aaacbb91d8d
parent3b50a9391a137acf11a03d55751c14999bdf4ecd (diff)
downloadlibusb-a66cfa05fe384e2aa09ceb1660e83d51adbc4cd3.tar.gz
WinCE: Add internal build script for WinCE binaries
* Also copy over .pdb for WinCE and WDK generated DLLs
-rw-r--r--.private/bd.cmd6
-rwxr-xr-x.private/bwince.cmd56
-rwxr-xr-x.private/wbs_wince.txt37
-rw-r--r--libusb/version_nano.h2
4 files changed, 98 insertions, 3 deletions
diff --git a/.private/bd.cmd b/.private/bd.cmd
index d9455e8..d02ce23 100644
--- a/.private/bd.cmd
+++ b/.private/bd.cmd
@@ -4,7 +4,7 @@ rem !!!THIS SCRIPT IS FOR INTERNAL DEVELOPER USE ONLY!!!
if NOT x%DDK_TARGET_OS%==xWinXP goto usage
-set PWD=%~dp0
+set IWD=%~dp0
cd ..
mkdir E:\dailies\%DATE%
for %%A in (MS32 MS64) do mkdir E:\dailies\%DATE%\%%A
@@ -47,6 +47,7 @@ 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
+copy Win32\Release\dll\libusb-1.0.pdb E:\dailies\%DATE%\MS32\dll
set 386=
set AMD64=1
@@ -72,6 +73,7 @@ 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
+copy x64\Release\dll\libusb-1.0.pdb E:\dailies\%DATE%\MS64\dll
set BUILD_ALT_DIR=%ORG_BUILD_ALT_DIR%
set _BUILDARCH=%ORG_BUILDARCH%
@@ -84,4 +86,4 @@ goto done
echo must be run in a WXP build environment!
:done
-cd %PWD% \ No newline at end of file
+cd %IWD% \ No newline at end of file
diff --git a/.private/bwince.cmd b/.private/bwince.cmd
new file mode 100755
index 0000000..555e3b2
--- /dev/null
+++ b/.private/bwince.cmd
@@ -0,0 +1,56 @@
+@echo off
+rem produce the Win CE binary files for snapshots
+rem !!!THIS SCRIPT IS FOR INTERNAL DEVELOPER USE ONLY!!!
+
+if "x%VSINSTALLDIR%"=="x" goto usage
+
+if "x%WINCE_TARGET_DIR_BASE%"=="x" set WINCE_TARGET_DIR_BASE=E:\dailies
+if "x%WINCE_TARGET_ARCHES%"=="x" set WINCE_TARGET_ARCHES=ARMV4I MIPSII MIPSII_FP MIPSIV MIPSIV_FP SH4 x86
+
+
+set WINCE_TARGET_DIR=%WINCE_TARGET_DIR_BASE%\%DATE:/=-%
+set MSBUILD_CMD=msbuild.exe
+set MSBUILD_TARGET=Rebuild
+set MSBUILD_CONFIGURATION=Release
+set WINCE_SLN=msvc\libusbx_wince.sln
+set PLATFORM_PREFIX=STANDARDSDK_500 (
+set PLATFORM_POSTFIX=)
+
+
+set PWD=%~dp0
+cd ..
+
+mkdir %WINCE_TARGET_DIR%
+mkdir %WINCE_TARGET_DIR%\include\libusbx-1.0
+copy libusb\libusb-1.0.def %WINCE_TARGET_DIR%
+copy libusb\libusb.h %WINCE_TARGET_DIR%\include\libusbx-1.0
+for %%A in (%WINCE_TARGET_ARCHES%) do mkdir %WINCE_TARGET_DIR%\%%A
+for %%A in (%WINCE_TARGET_ARCHES%) do mkdir %WINCE_TARGET_DIR%\%%A\static
+for %%A in (%WINCE_TARGET_ARCHES%) do mkdir %WINCE_TARGET_DIR%\%%A\dll
+for %%A in (%WINCE_TARGET_ARCHES%) do mkdir %WINCE_TARGET_DIR%\examples\%%A
+mkdir %WINCE_TARGET_DIR%\examples\source
+copy examples\listdevs.c %WINCE_TARGET_DIR%\examples\source
+copy examples\xusb.c %WINCE_TARGET_DIR%\examples\source
+copy msvc\stdint.h %WINCE_TARGET_DIR%\examples\source
+copy .private\wbs_wince.txt %WINCE_TARGET_DIR%\README.txt
+
+rem Perform the rebuild
+for %%A in (%WINCE_TARGET_ARCHES%) do %MSBUILD_CMD% %WINCE_SLN% /property:Platform="%PLATFORM_PREFIX%%%A%PLATFORM_POSTFIX%" /property:Configuration=%MSBUILD_CONFIGURATION% /target:%MSBUILD_TARGET%"
+
+
+rem Copy across the binaries
+for %%A in (%WINCE_TARGET_ARCHES%) do (
+ copy %%A\%MSBUILD_CONFIGURATION%\lib\libusb-1.0.lib %WINCE_TARGET_DIR%\%%A\static
+ copy %%A\%MSBUILD_CONFIGURATION%\examples\listdevs.exe %WINCE_TARGET_DIR%\examples\%%A
+ copy %%A\%MSBUILD_CONFIGURATION%\examples\xusb.exe %WINCE_TARGET_DIR%\examples\%%A
+ copy %%A\%MSBUILD_CONFIGURATION%\dll\libusb-1.0.lib %WINCE_TARGET_DIR%\%%A\dll
+ copy %%A\%MSBUILD_CONFIGURATION%\dll\libusb-1.0.dll %WINCE_TARGET_DIR%\%%A\dll
+ copy %%A\%MSBUILD_CONFIGURATION%\dll\libusb-1.0.pdb %WINCE_TARGET_DIR%\%%A\dll )
+
+goto done
+
+:usage
+echo must be run in a Visual Studio 2005 build environment!
+
+:done
+cd %PWD% \ No newline at end of file
diff --git a/.private/wbs_wince.txt b/.private/wbs_wince.txt
new file mode 100755
index 0000000..b835eea
--- /dev/null
+++ b/.private/wbs_wince.txt
@@ -0,0 +1,37 @@
+ libusbx 1.0 Windows CE 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 ARMV4I, MIPSII, MIPSII_FP, MIPSIV, MIPSIV_FP,
+ SH4 or x86 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 Additional information:
+ - The libusbx 1.0 API documentation can be accessed at:
+ http://api.libusbx.org
+ - For some libusb samples (including source), please have a look in examples/
+ - For additional information on the libusbx 1.0 Windows backend please visit:
+ http://windows.libusbx.org
+ - It is necessary to install the CE USB Kernel Wrapper driver for libusbx to
+ function on a device. This is obtainable from:
+ https://github.com/RealVNC/CEUSBKWrapper
+ - If you find any issue, please visit http://libusbx.org/ and check the
+ Support section
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 5e4fc68..d862eee 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10642
+#define LIBUSB_NANO 10643