summaryrefslogtreecommitdiff
path: root/ddk_build.cmd
diff options
context:
space:
mode:
Diffstat (limited to 'ddk_build.cmd')
-rw-r--r--ddk_build.cmd55
1 files changed, 55 insertions, 0 deletions
diff --git a/ddk_build.cmd b/ddk_build.cmd
index 4ff6c02..e51d939 100644
--- a/ddk_build.cmd
+++ b/ddk_build.cmd
@@ -38,6 +38,9 @@ mkdir %dstPath%\dll
if exist %dstPath%\lib goto md5
md %dstPath%\lib
:md5
+if exist %dstPath%\examples goto md6
+md %dstPath%\examples
+:md6
@echo on
copy %srcPath%\libusb-%version%.dll %dstPath%\dll
@@ -45,6 +48,48 @@ copy %srcPath%\libusb-%version%.pdb %dstPath%\dll
copy %srcPath%\libusb-%version%.lib %dstPath%\lib
@echo off
+
+if exist examples\lsusb_ddkbuild goto md7
+md examples\lsusb_ddkbuild
+:md7
+
+cd examples\lsusb_ddkbuild
+copy ..\lsusb_sources sources
+@echo on
+build -cZ
+@echo off
+if errorlevel 1 goto buildlsusberror
+cd ..\..
+
+set srcPath=examples\lsusb_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
+@echo on
+
+copy %srcPath%\lsusb.exe %dstPath%\examples
+copy %srcPath%\lsusb.pdb %dstPath%\examples
+
+@echo off
+
+if exist examples\xusb_ddkbuild goto md8
+md examples\xusb_ddkbuild
+:md8
+
+cd examples\xusb_ddkbuild
+copy ..\xusb_sources sources
+@echo on
+build -cZ
+@echo off
+if errorlevel 1 goto buildxusberror
+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
+
+
goto done
@@ -54,6 +99,16 @@ cd ..\..
echo Build failed
goto done
+:buildlsusberror
+cd ..\..
+echo lsusb build failed
+goto done
+
+:buildxusberror
+cd ..\..
+echo xusb build failed
+goto done
+
:usage
echo ddk_build must be run in a WDK build environment
goto done