VirtualBox

Changeset 72047 in vbox for trunk/src


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

Location:
trunk/src/VBox/Installer/win
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/Makefile.kmk

    r72044 r72047  
    10051005RePackScripts_INSTTYPE = stage
    10061006RePackScripts_SOURCES = \
    1007         Scripts/PackDriversForSubmission.cmd \
    10081007        Scripts/UnpackBlessedDrivers.cmd \
     1008        $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \
    10091009        $(RePackScripts_0_OUTDIR)/sign-dual.cmd \
    10101010        $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \
     
    10131013if !defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "x86"
    10141014 RePackScripts_SOURCES += \
    1015         Scripts/RepackExtPack.cmd
     1015        $(RePackScripts_0_OUTDIR)/RepackExtPack.cmd
     1016endif
     1017if defined(VBOX_WITH_COMBINED_PACKAGE) && "$(KBUILD_TARGET_ARCH)" == "x86"
     1018 RePackScripts_SOURCES += \
     1019        $(RePackScripts_0_OUTDIR)/Combined-1-Prepare.cmd \
     1020        $(RePackScripts_0_OUTDIR)/Combined-3-Repack.cmd
    10161021endif
    10171022RePackScripts_CLEAN = \
     1023        $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \
    10181024        $(RePackScripts_0_OUTDIR)/sign-dual.cmd \
    10191025        $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \
    10201026        $(RePackScripts_0_OUTDIR)/VMMR0.inf \
    10211027        $(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf
     1028
     1029$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/PackDriversForSubmission.cmd,PackDriversForSubmission.cmd)
     1030$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/RepackExtPack.cmd,RepackExtPack.cmd)
     1031$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-1-Prepare.cmd,Combined-1-Prepare.cmd)
     1032$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-3-Repack.cmd,Combined-3-Repack.cmd)
    10221033
    10231034$$(RePackScripts_0_OUTDIR)/sign-dual.cmd: | $$(dir $$@)
  • trunk/src/VBox/Installer/win/Scripts/PackDriversForSubmission.cmd

    r71991 r72047  
    3131set _MY_OPT_OUTPUT=
    3232set _MY_OPT_DDF_FILE=
    33 set _MY_OPT_ARCH=
     33set _MY_OPT_ARCH=@KBUILD_TARGET_ARCH@
    3434
    3535:argument_loop
     
    7070
    7171:opt_a
    72 if ".%2" == "."             goto syntax_error_missing_value
     72if ".%~2" == "."            goto syntax_error_missing_value
    7373if not "%2" == "x86" if not "%2" == "amd64" goto syntax_error_unknown_arch
    74 set _MY_OPT_ARCH=%2
     74set _MY_OPT_ARCH=%~2
    7575goto argument_loop_next_with_value
    7676
    7777:opt_b
    78 if ".%2" == "."             goto syntax_error_missing_value
    79 set _MY_OPT_BINDIR=%2
     78if ".%~2" == "."            goto syntax_error_missing_value
     79set _MY_OPT_BINDIR=%~2
    8080goto argument_loop_next_with_value
    8181
    8282:opt_d
    83 if ".%2" == "."             goto syntax_error_missing_value
    84 set _MY_OPT_DDF_FILE=%2
     83if ".%~2" == "."            goto syntax_error_missing_value
     84set _MY_OPT_DDF_FILE=%~2
    8585goto argument_loop_next_with_value
    8686
    8787:opt_e
    88 if ".%2" == "."             goto syntax_error_missing_value
    89 set _MY_OPT_EXTPACK=%2
     88if ".%~2" == "."            goto syntax_error_missing_value
     89set _MY_OPT_EXTPACK=%~2
    9090goto argument_loop_next_with_value
    9191
     
    106106
    107107:opt_p
    108 if ".%2" == "."             goto syntax_error_missing_value
    109 set _MY_OPT_PDBDIR=%2
     108if ".%~2" == "."            goto syntax_error_missing_value
     109set _MY_OPT_PDBDIR=%~2
    110110goto argument_loop_next_with_value
    111111
    112112:opt_o
    113 if ".%2" == "."             goto syntax_error_missing_value
    114 set _MY_OPT_OUTPUT=%2
     113if ".%~2" == "."            goto syntax_error_missing_value
     114set _MY_OPT_OUTPUT=%~2
    115115goto argument_loop_next_with_value
    116116
     
    162162:no_extack_validation
    163163
    164 if ".%_MY_OPT_ARCH%" == "."         if exist "%_MY_OPT_BINDIR%\x86" set _MY_OPT_ARCH=amd64
    165 if ".%_MY_OPT_ARCH%" == "."         set _MY_OPT_ARCH=x86
    166 
    167 if ".%_MY_OPT_OUTPUT%" == "."       set _MY_OPT_OUTPUT=VBoxDrivers-%_MY_OPT_ARCH%.cab
     164if ".%_MY_OPT_OUTPUT%" == "."       set _MY_OPT_OUTPUT=VBoxDrivers-@VBOX_VERSION_STRING@r@VBOX_SVN_REV@-%_MY_OPT_ARCH%.cab
    168165if exist "%_MY_OPT_OUTPUT%"         goto error_output_exists
    169166
  • trunk/src/VBox/Installer/win/Scripts/RepackExtPack.cmd

    r72044 r72047  
    3030rem Parse arguments.
    3131rem
    32 set _MY_OPT_BINDIR_X86=..\bin
    33 set _MY_OPT_BINDIR_AMD64=
     32set _MY_OPT_BINDIR_X86=..\..\..\win.x86\@KBUILD_TYPE@\bin
     33set _MY_OPT_BINDIR_AMD64=..\..\..\win.amd64\@KBUILD_TYPE@\bin
    3434set _MY_OPT_INPUT=
    3535set _MY_OPT_OUTPUT=
    3636set _MY_OPT_STAGE_DIR=.\repack-extpack-%RANDOM%
     37for %%i in (%_MY_OPT_STAGE_DIR%) do set _MY_OPT_STAGE_DIR=%%~fi
    3738set _MY_OPT_SIGN_CAT=1
    3839
     
    6869
    6970:opt_a
    70 if ".%2" == "."             goto syntax_error_missing_value
    71 set _MY_OPT_BINDIR_AMD64=%2
     71if ".%~2" == "."            goto syntax_error_missing_value
     72set _MY_OPT_BINDIR_AMD64=%~f2
    7273goto argument_loop_next_with_value
    7374
    7475:opt_b
    75 if ".%2" == "."             goto syntax_error_missing_value
    76 set _MY_OPT_BINDIR_X86=%2
     76if ".%~2" == "."            goto syntax_error_missing_value
     77set _MY_OPT_BINDIR_X86=%~f2
    7778goto argument_loop_next_with_value
    7879
     
    9091
    9192:opt_i
    92 if ".%2" == "."             goto syntax_error_missing_value
    93 set _MY_OPT_INPUT=%2
     93if ".%~2" == "."            goto syntax_error_missing_value
     94set _MY_OPT_INPUT=%~f2
    9495goto argument_loop_next_with_value
    9596
    9697:opt_o
    97 if ".%2" == "."             goto syntax_error_missing_value
    98 set _MY_OPT_OUTPUT=%2
     98if ".%~2" == "."            goto syntax_error_missing_value
     99set _MY_OPT_OUTPUT=%~f2
    99100goto argument_loop_next_with_value
    100101
    101102:opt_s
    102 if ".%2" == "."             goto syntax_error_missing_value
    103 set _MY_OPT_STAGE_DIR=%2
     103if ".%~2" == "."            goto syntax_error_missing_value
     104set _MY_OPT_STAGE_DIR=%~f2
    104105goto argument_loop_next_with_value
    105106
     
    125126
    126127:no_more_arguments
    127 rem validate specified options
    128 if not exist "%_MY_OPT_BINDIR_X86%" goto error_bindir_x86_does_not_exist
    129 
    130 if ".%_MY_OPT_BINDIR_AMD64%" == "." set _MY_OPT_BINDIR_AMD64=%_MY_OPT_BINDIR_X86%\..\..\..\win.amd64\release\bin
     128rem
     129rem Validate and adjust specified options.
     130rem
     131if not exist "%_MY_OPT_BINDIR_X86%"   goto error_bindir_x86_does_not_exist
    131132if not exist "%_MY_OPT_BINDIR_AMD64%" goto error_bindir_amd64_does_not_exist
    132133
     
    134135if not exist "%_MY_OPT_INPUT%"      goto error_input_not_found
    135136
    136 if ".%_MY_OPT_OUTPUT%" == "."       set _MY_OPT_OUTPUT=Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack
     137if ".%_MY_OPT_OUTPUT%" == "."       for %%i in ("%_MY_OPT_INPUT%") do set _MY_OPT_OUTPUT=.\%%~nxi
    137138
    138139rem Make _MY_OPT_STAGE_DIR absolute.
    139 for %%i in (%_MY_OPT_STAGE_DIR%) do set _MY_OPT_STAGE_DIR=%%~fi
    140140if exist "%_MY_OPT_STAGE_DIR%"      goto error_stage_dir_exists
    141141
  • 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