aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/build_driver.bat
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-05-07 18:48:43 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-05-07 18:48:43 +0300
commit9245d6d8d6989704c1f22a54303877ac37c81e91 (patch)
tree83543173a8af5fa4e10aa7e00695cc7507a79b12 /build_driver.bat
parentREADME update (diff)
downloadwindows7-drivers-9245d6d8d6989704c1f22a54303877ac37c81e91.tar.gz
windows7-drivers-9245d6d8d6989704c1f22a54303877ac37c81e91.zip
sign.bat: fail gracefully if the DDK's not present
Diffstat (limited to '')
-rw-r--r--build_driver.bat18
1 files changed, 10 insertions, 8 deletions
diff --git a/build_driver.bat b/build_driver.bat
index 750a0f8..7eeaa24 100644
--- a/build_driver.bat
+++ b/build_driver.bat
@@ -14,7 +14,6 @@ call check_env.bat || exit /b !errorlevel!
call check_ddk.bat || exit /b !errorlevel!
set driver_src_root=%~f1
-cd "%driver_src_root%"
for /f %%i in ("%driver_src_root%") do (
set driver_name=%%~ni
@@ -34,7 +33,10 @@ echo ========================= END DRIVER INFO =========================
echo.
echo ============================== BUILD ==============================
set LIBDISTDIR=%lib_dist_dir%
-build.exe /cegwZ
+pushd "%driver_src_root%" && (
+ build.exe /cegwZ
+ popd
+)
if %errorlevel% equ 0 (
echo ========================== BUILD SUCCESS ==========================
) else (
@@ -43,15 +45,15 @@ if %errorlevel% equ 0 (
)
if [%_BUILDARCH%] == [x86] (
- set sys_path=obj%BUILD_ALT_DIR%\i386\%driver_name%.sys
- set pdb_path=obj%BUILD_ALT_DIR%\i386\%driver_name%.pdb
- set lib_path=obj%BUILD_ALT_DIR%\i386\%driver_name%.lib
+ set buildarch_directory=i386
) else (
- set sys_path=obj%BUILD_ALT_DIR%\%_BUILDARCH%\%driver_name%.sys
- set pdb_path=obj%BUILD_ALT_DIR%\%_BUILDARCH%\%driver_name%.pdb
- set lib_path=obj%BUILD_ALT_DIR%\%_BUILDARCH%\%driver_name%.lib
+ set buildarch_directory=%_BUILDARCH%
)
+set sys_path=%driver_src_root%\obj%BUILD_ALT_DIR%\%buildarch_directory%\%driver_name%.sys
+set pdb_path=%driver_src_root%\obj%BUILD_ALT_DIR%\%buildarch_directory%\%driver_name%.pdb
+set lib_path=%driver_src_root%\obj%BUILD_ALT_DIR%\%buildarch_directory%\%driver_name%.lib
+
echo.
call "%root%\sign.bat" "%sys_path%" || exit /b !errorlevel!