Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: third_party/libusb/src/msvc/ddk_build.cmd

Issue 19713005: Update libusb 1.0.9 to libusbx 1.0.16 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libusb/src/msvc/ddk_build.cmd
diff --git a/third_party/libusb/src/msvc/ddk_build.cmd b/third_party/libusb/src/msvc/ddk_build.cmd
index ed9b8a8b9e65e7dffcd4f3bf203f027f04017db3..aadab502e4598989dde1d5e80fc9610c3691791f 100644
--- a/third_party/libusb/src/msvc/ddk_build.cmd
+++ b/third_party/libusb/src/msvc/ddk_build.cmd
@@ -1,18 +1,20 @@
-@rem default builds static library.
-@rem you can pass the following arguments (case insensitive):
-@rem - "DLL" to build a DLL instead of a static library
-@rem - "/MT" to build a static library compatible with MSVC's /MT option (LIBCMT vs MSVCRT)
@echo off
+::# default builds static library.
+::# you can pass the following arguments (case insensitive):
+::# - "DLL" to build a DLL instead of a static library
+::# - "/MT" to build a static library compatible with MSVC's /MT option (LIBCMT vs MSVCRT)
if Test%BUILD_ALT_DIR%==Test goto usage
-rem process commandline parameters
+::# process commandline parameters
set TARGET=LIBRARY
set STATIC_LIBC=
set version=1.0
+set PWD=%~dp0
+set BUILD_CMD=build -bcwgZ -M2
if "%1" == "" goto no_more_args
-rem /I for case insensitive
+::# /I for case insensitive
if /I Test%1==TestDLL set TARGET=DYNLINK
if /I Test%1==Test/MT set STATIC_LIBC=1
:no_more_args
@@ -22,7 +24,7 @@ echo TARGETTYPE=%TARGET% > target
copy target+..\..\msvc\libusb_sources sources >NUL 2>&1
del target
@echo on
-build -cwgZ
+%BUILD_CMD%
@echo off
if errorlevel 1 goto builderror
cd ..\..
@@ -73,9 +75,9 @@ md examples\listdevs_ddkbuild
cd examples\listdevs_ddkbuild
copy ..\..\msvc\listdevs_sources sources >NUL 2>&1
@echo on
-build -cwgZ
+%BUILD_CMD%
@echo off
-if errorlevel 1 goto buildlistdevserror
+if errorlevel 1 goto builderror
cd ..\..
set srcPath=examples\listdevs_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
@@ -84,18 +86,81 @@ set srcPath=examples\listdevs_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
copy %srcPath%\listdevs.exe %dstPath%\examples
copy %srcPath%\listdevs.pdb %dstPath%\examples
-cd msvc
-goto done
+@echo off
+if exist examples\xusb_ddkbuild goto md8
+md examples\xusb_ddkbuild
+:md8
-:builderror
-cd ..\..\msvc
-echo Build failed
-goto done
+cd examples\xusb_ddkbuild
+copy ..\..\msvc\xusb_sources sources >NUL 2>&1
+@echo on
+%BUILD_CMD%
+@echo off
+if errorlevel 1 goto builderror
+cd ..\..
+
+set srcPath=examples\xusb_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
+@echo on
+
+copy %srcPath%\xusb.exe %dstPath%\examples
+copy %srcPath%\xusb.pdb %dstPath%\examples
+
+@echo off
+
+if exist examples\getopt\getopt_ddkbuild goto md9
+md examples\getopt\getopt_ddkbuild
+:md9
+
+cd examples\getopt\getopt_ddkbuild
+copy ..\..\..\msvc\getopt_sources sources >NUL 2>&1
+@echo on
+%BUILD_CMD%
+@echo off
+if errorlevel 1 goto builderror
+cd ..\..\..
-:buildlistdevserror
-cd ..\..\msvc
-echo listdevs build failed
+if exist examples\fxload_ddkbuild goto md10
+md examples\fxload_ddkbuild
+:md10
+
+cd examples\fxload_ddkbuild
+copy ..\..\msvc\fxload_sources sources >NUL 2>&1
+@echo on
+%BUILD_CMD%
+@echo off
+if errorlevel 1 goto builderror
+cd ..\..
+
+set srcPath=examples\fxload_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
+@echo on
+
+copy %srcPath%\fxload.exe %dstPath%\examples
+copy %srcPath%\fxload.pdb %dstPath%\examples
+
+@echo off
+
+if exist examples\hotplugtest_ddkbuild goto md11
+md examples\hotplugtest_ddkbuild
+:md11
+
+cd examples\hotplugtest_ddkbuild
+copy ..\..\msvc\hotplugtest_sources sources >NUL 2>&1
+@echo on
+%BUILD_CMD%
+@echo off
+if errorlevel 1 goto builderror
+cd ..\..
+
+set srcPath=examples\hotplugtest_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
+@echo on
+
+copy %srcPath%\hotplugtest.exe %dstPath%\examples
+copy %srcPath%\hotplugtest.pdb %dstPath%\examples
+
+@echo off
+
+cd msvc
goto done
:usage
@@ -103,4 +168,8 @@ echo ddk_build must be run in a WDK build environment
pause
goto done
+:builderror
+echo Build failed
+
:done
+cd %PWD%

Powered by Google App Engine
This is Rietveld 408576698