VirtualBox

Ignore:
Timestamp:
Apr 27, 2018 12:07:20 AM (7 years ago)
Author:
vboxsync
Message:

Installer/win,Config.kmk: First draft of toplevel scripts for combined builds. Added revision as comment on inf-files. Added VBOX_EDIT_VERSION_AND_BUILD_RULE_FN macro. bugref:8691

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/Scripts/UnpackBlessedDrivers.cmd

    r72040 r72047  
    2222
    2323rem
    24 rem Check for environment variables we need.
     24rem Globals and Check for environment variables we need.
    2525rem
    2626if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & goto end_failed)
     27set _MY_DRIVER_BASE_NAMES=VBoxDrv VBoxNetAdp6 VBoxNetLwf VBoxUSB VBoxUSBMon
     28set _MY_DRIVER_BASE_NAMES=VBoxDrv VBoxNetAdp6 VBoxNetLwf VBoxUSB VBoxUSBMon
     29set _MY_UNZIP=%KBUILD_DEVTOOLS%\win.x86\bin\unzip.exe
     30if not exist "%_MY_UNZIP%" (echo "%_MY_UNZIP%" does not exist & goto end_failed)
    2731
    2832rem
     
    6064
    6165:opt_b
    62 if ".%2" == "."             goto syntax_error_missing_value
    63 set _MY_OPT_BINDIR=%2
     66if ".%~2" == "."            goto syntax_error_missing_value
     67set _MY_OPT_BINDIR=%~2
    6468goto argument_loop_next_with_value
    6569
     
    7579
    7680:opt_i
    77 if ".%2" == "."             goto syntax_error_missing_value
    78 set _MY_OPT_INPUT=%2
     81if ".%~2" == "."            goto syntax_error_missing_value
     82set _MY_OPT_INPUT=%~2
    7983goto argument_loop_next_with_value
    8084
     
    106110rem
    107111rem Unpack the stuff.
     112rem We ignore error level 1 here as that is what unzip returns on warning (slashes).
    108113rem
    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
     115if NOT ERRORLEVEL 1 goto end_failed
     116:unzip_okay
     117
     118rem
     119rem Verify it against the PreW10 catalog files we saved.
     120rem
     121set _MY_SIGNTOOL=%KBUILD_DEVTOOLS%\win.x86\sdk\v8.1\bin\x86\signtool.exe
     122if not exist "%_MY_SIGNTOOL%" set _MY_SIGNTOOL=%KBUILD_DEVTOOLS%\win.x86\selfsign\r3\signtool.exe
     123
     124for %%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
    110133
    111134rem
    112135rem Modify the catalog signatures.
    113136rem
    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_failed
    116     call sign-dual.cmd "%_MY_OPT_BINDIR%\%cat%" || goto end_failed
    117     "%_MY_OPT_BINDIR%\tools\RTSignTool.exe"  add-nested-exe-signature -v "%_MY_OPT_BINDIR%\%cat%" "%_MY_OPT_BINDIR%\%cat%.ms" || goto end_failed
     137for %%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
    118141)
    119142
     
    121144
    122145:end_failed
     146@echo failed (%ERRORLEVEL%)
    123147@endlocal
    124148@endlocal
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette