aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/km/build/wdk7.1/build_driver.bat
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-04-28 04:13:07 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-04-28 04:13:07 +0300
commit93b4a8271a58fa8ee1261d541ae1eeb45a954711 (patch)
tree7a11756190918aeba473246e135e454577fdbe41 /km/build/wdk7.1/build_driver.bat
parentREADME updates (diff)
downloadwindows7-drivers-93b4a8271a58fa8ee1261d541ae1eeb45a954711.tar.gz
windows7-drivers-93b4a8271a58fa8ee1261d541ae1eeb45a954711.zip
build/wdk7.1: refactoring
Diffstat (limited to 'km/build/wdk7.1/build_driver.bat')
-rw-r--r--km/build/wdk7.1/build_driver.bat37
1 files changed, 18 insertions, 19 deletions
diff --git a/km/build/wdk7.1/build_driver.bat b/km/build/wdk7.1/build_driver.bat
index 1cf2a9a..80089b8 100644
--- a/km/build/wdk7.1/build_driver.bat
+++ b/km/build/wdk7.1/build_driver.bat
@@ -7,34 +7,33 @@
@echo off
if "%~1" == "" (
- echo Usage: %~nx0 DRIVER_SRC_ROOT >&2
+ echo Usage: %~nx0 DRIVER_SRC_DIR >&2
exit /b 1
)
call check_env.bat || exit /b !errorlevel!
-call check_ddk.bat || exit /b !errorlevel!
-set "driver_src_root=%~f1"
+set "drv_src_dir=%~f1"
-for /f %%i in ("%driver_src_root%") do (
- set "driver_name=%%~ni"
- set "driver_dist_subdir=%%~dpi"
+for /f %%i in ("%drv_src_dir%") do (
+ set "drv_name=%%~ni"
+ set "drv_subdir=%%~dpi"
)
-call :make_relative driver_dist_subdir "%src_root%"
+call :make_relative drv_subdir "%proj_src_dir%"
-set "sys_dist_dir=%bin_root%\%target_platform%\%target_configuration%\%driver_dist_subdir%"
-set "pdb_dist_dir=%bin_root%\%target_platform%\%target_configuration%\%driver_dist_subdir%"
-set "lib_dist_dir=%lib_root%\%target_platform%\%target_configuration%\%driver_dist_subdir%"
+set "sys_dist_dir=%proj_bin_dir%\%target_platform%\%target_configuration%\%drv_subdir%"
+set "pdb_dist_dir=%proj_bin_dir%\%target_platform%\%target_configuration%\%drv_subdir%"
+set "lib_dist_dir=%proj_lib_dir%\%target_platform%\%target_configuration%\%drv_subdir%"
echo =========================== DRIVER INFO ===========================
-echo Driver source directory: %driver_src_root%
-echo Driver name: %driver_name%
+echo Driver source directory: %drv_src_dir%
+echo Driver name: %drv_name%
echo ========================= END DRIVER INFO =========================
echo.
echo ============================== BUILD ==============================
set "LIBDISTDIR=%lib_dist_dir%"
-pushd "%driver_src_root%" && (
+pushd "%drv_src_dir%" && (
build.exe /cegwZ
popd
)
@@ -46,18 +45,18 @@ if errorlevel 0 (
)
if "%_BUILDARCH%" == "x86" (
- set buildarch_directory=i386
+ set buildarch_dir=i386
) else (
- set "buildarch_directory=%_BUILDARCH%"
+ set "buildarch_dir=%_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"
+set "sys_path=%drv_src_dir%\obj%BUILD_ALT_DIR%\%buildarch_dir%\%drv_name%.sys"
+set "pdb_path=%drv_src_dir%\obj%BUILD_ALT_DIR%\%buildarch_dir%\%drv_name%.pdb"
+set "lib_path=%drv_src_dir%\obj%BUILD_ALT_DIR%\%buildarch_dir%\%drv_name%.lib"
if exist "%sys_path%" (
echo.
- call "%build_root%\sign.bat" "%sys_path%" || exit /b !errorlevel!
+ call "%proj_build_dir%\sign.bat" "%sys_path%" || exit /b !errorlevel!
)
echo.