aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/check_ddk.bat
blob: 00d5bfb8f57ba2e5e04ca279eb369f94f19ad0bc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@rem Copyright 2015 Egor Tensin <Egor.Tensin@gmail.com>
@rem This file is licensed under the terms of the MIT License.
@rem See LICENSE.txt for details.

@setlocal enabledelayedexpansion
@echo off

call check_env.bat || exit /b !errorlevel!

if [%BUILD_ALT_DIR%] == [] goto :ddk_not_set
if [%_BUILDARCH%] == [] goto :ddk_not_set

if not exist %root%\sign.bat (
  echo Error: %root%\sign.bat is missing ^(don^'t know how to sign drivers^)
  exit /b 1
)

where build.exe >nul 2>&1 || goto :build_not_found
where signtool.exe >nul 2>&1 || goto :signtool_not_found
where makecert.exe >nul 2>&1 || goto :makecert_not_found
exit /b 0

:ddk_not_set
echo Error: either %%BUILD_ALT_DIR%% or %%_BUILDARCH%% are not set ^(perhaps you forgot to set up the WinDDK environment^)
exit /b 1

:build_not_found
echo Error: build.exe not found ^(perhaps you forgot to set up the WinDDK environment^)
exit /b 1

:signtool_not_found
echo Error: signtool.exe not found ^(perhaps you forgot to set up the WinDDK environment^)
exit /b 1

:makecert_not_found
echo Error: makecert.exe not found ^(perhaps you forgot to set up the WinDDK environment^)
exit /b 1