Changeset 72047 in vbox for trunk/src/VBox/Installer/win/Scripts/UnpackBlessedDrivers.cmd
- Timestamp:
- Apr 27, 2018 12:07:20 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/win/Scripts/UnpackBlessedDrivers.cmd
r72040 r72047 22 22 23 23 rem 24 rem Check for environment variables we need.24 rem Globals and Check for environment variables we need. 25 25 rem 26 26 if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & goto end_failed) 27 set _MY_DRIVER_BASE_NAMES=VBoxDrv VBoxNetAdp6 VBoxNetLwf VBoxUSB VBoxUSBMon 28 set _MY_DRIVER_BASE_NAMES=VBoxDrv VBoxNetAdp6 VBoxNetLwf VBoxUSB VBoxUSBMon 29 set _MY_UNZIP=%KBUILD_DEVTOOLS%\win.x86\bin\unzip.exe 30 if not exist "%_MY_UNZIP%" (echo "%_MY_UNZIP%" does not exist & goto end_failed) 27 31 28 32 rem … … 60 64 61 65 :opt_b 62 if ".% 2" == "."goto syntax_error_missing_value63 set _MY_OPT_BINDIR=% 266 if ".%~2" == "." goto syntax_error_missing_value 67 set _MY_OPT_BINDIR=%~2 64 68 goto argument_loop_next_with_value 65 69 … … 75 79 76 80 :opt_i 77 if ".% 2" == "."goto syntax_error_missing_value78 set _MY_OPT_INPUT=% 281 if ".%~2" == "." goto syntax_error_missing_value 82 set _MY_OPT_INPUT=%~2 79 83 goto argument_loop_next_with_value 80 84 … … 106 110 rem 107 111 rem Unpack the stuff. 112 rem We ignore error level 1 here as that is what unzip returns on warning (slashes). 108 113 rem 109 %KBUILD_DEVTOOLS%\win.x86\bin\unzip.exe -o -j "%_MY_OPT_INPUT%" -d "%_MY_OPT_BINDIR%" || goto end_failed 114 "%_MY_UNZIP%" -o -j "%_MY_OPT_INPUT%" -d "%_MY_OPT_BINDIR%" && goto unzip_okay 115 if NOT ERRORLEVEL 1 goto end_failed 116 :unzip_okay 117 118 rem 119 rem Verify it against the PreW10 catalog files we saved. 120 rem 121 set _MY_SIGNTOOL=%KBUILD_DEVTOOLS%\win.x86\sdk\v8.1\bin\x86\signtool.exe 122 if not exist "%_MY_SIGNTOOL%" set _MY_SIGNTOOL=%KBUILD_DEVTOOLS%\win.x86\selfsign\r3\signtool.exe 123 124 for %%d in (%_MY_DRIVER_BASE_NAMES%) do ( 125 @echo * Verifying %%d against %%d.cat... 126 "%_MY_SIGNTOOL%" verify /kp /c "%_MY_OPT_BINDIR%\%%d.cat" "%_MY_OPT_BINDIR%\%%d.inf" || goto end_failed 127 "%_MY_SIGNTOOL%" verify /kp /c "%_MY_OPT_BINDIR%\%%d.cat" "%_MY_OPT_BINDIR%\%%d.sys" || goto end_failed 128 @echo * Verifying %%d against %%d-PreW10.cat... 129 "%_MY_SIGNTOOL%" verify /kp /c "%_MY_OPT_BINDIR%\%%d-PreW10.cat" "%_MY_OPT_BINDIR%\%%d.inf" || goto end_failed 130 "%_MY_SIGNTOOL%" verify /kp /c "%_MY_OPT_BINDIR%\%%d-PreW10.cat" "%_MY_OPT_BINDIR%\%%d.sys" || goto end_failed 131 ) 132 110 133 111 134 rem 112 135 rem Modify the catalog signatures. 113 136 rem 114 for %% cat in (VBoxDrv.cat VBoxNetAdp6.cat VBoxNetLwf.cat VBoxUSB.cat VBoxUSBMon.cat) do (115 copy /y "%_MY_OPT_BINDIR%\% cat%" "%_MY_OPT_BINDIR%\%cat%.ms" || goto end_failed116 call sign-dual.cmd "%_MY_OPT_BINDIR%\% cat%" || goto end_failed117 "%_MY_OPT_BINDIR%\tools\RTSignTool.exe" add-nested-exe-signature -v "%_MY_OPT_BINDIR%\% cat%" "%_MY_OPT_BINDIR%\%cat%.ms" || goto end_failed137 for %%d in (%_MY_DRIVER_BASE_NAMES%) do ( 138 copy /y "%_MY_OPT_BINDIR%\%%d.cat" "%_MY_OPT_BINDIR%\%%d.cat.ms" || goto end_failed 139 call sign-dual.cmd "%_MY_OPT_BINDIR%\%%d.cat" || goto end_failed 140 "%_MY_OPT_BINDIR%\tools\RTSignTool.exe" add-nested-exe-signature -v "%_MY_OPT_BINDIR%\%%d.cat" "%_MY_OPT_BINDIR%\%%d.cat.ms" || goto end_failed 118 141 ) 119 142 … … 121 144 122 145 :end_failed 146 @echo failed (%ERRORLEVEL%) 123 147 @endlocal 124 148 @endlocal
Note:
See TracChangeset
for help on using the changeset viewer.