VirtualBox

Changeset 71958 in vbox for trunk/src/VBox/Installer


Ignore:
Timestamp:
Apr 22, 2018 12:38:54 PM (7 years ago)
Author:
vboxsync
Message:

Installer/win: Include the PUEL extension pack bits into the submission too. bugref:8691

File:
1 edited

Legend:

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

    r71955 r71958  
    2727set _MY_OPT_PDBDIR=
    2828set _MY_OPT_WITH_PDB=1
     29set _MY_OPT_EXTPACK=
     30set _MY_OPT_WITH_EXTPACK=1
    2931set _MY_OPT_OUTPUT=
    3032set _MY_OPT_DDF_FILE=
     33set _MY_OPT_ARCH=
    3134
    3235:argument_loop
     
    4144if ".%1" == ".--help"       goto opt_h
    4245
     46if ".%1" == ".-a"           goto opt_a
     47if ".%1" == ".--arch"       goto opt_a
    4348if ".%1" == ".-b"           goto opt_b
    4449if ".%1" == ".--bindir"     goto opt_b
     50if ".%1" == ".-d"           goto opt_d
     51if ".%1" == ".--ddf"        goto opt_d
     52if ".%1" == ".-e"           goto opt_e
     53if ".%1" == ".--extpack"    goto opt_e
     54if ".%1" == ".-n"           goto opt_n
     55if ".%1" == ".--no-pdb"     goto opt_n
    4556if ".%1" == ".-o"           goto opt_o
    4657if ".%1" == ".--output"     goto opt_o
    47 if ".%1" == ".-d"           goto opt_d
    48 if ".%1" == ".--ddf"        goto opt_d
    4958if ".%1" == ".-p"           goto opt_p
    5059if ".%1" == ".--pdb"        goto opt_p
    51 if ".%1" == ".-n"           goto opt_n
    52 if ".%1" == ".--no-pdb"     goto opt_n
     60if ".%1" == ".-x"           goto opt_x
     61if ".%1" == ".--no-extpack" goto opt_x
    5362echo syntax error: Unknown option: %1
    5463echo               Try --help to list valid options.
     
    6069goto argument_loop
    6170
     71:opt_a
     72if ".%2" == "."             goto syntax_error_missing_value
     73if not "%2" == "x86" if not "%2" == "amd64" goto syntax_error_unknown_arch
     74set _MY_OPT_ARCH=%2
     75goto argument_loop_next_with_value
     76
    6277:opt_b
    6378if ".%2" == "."             goto syntax_error_missing_value
     
    6883if ".%2" == "."             goto syntax_error_missing_value
    6984set _MY_OPT_DDF_FILE=%2
     85goto argument_loop_next_with_value
     86
     87:opt_e
     88if ".%2" == "."             goto syntax_error_missing_value
     89set _MY_OPT_EXTPACK=%2
    7090goto argument_loop_next_with_value
    7191
     
    7494echo Microsoft to run on recent Windows 10 installations.
    7595echo .
    76 echo Usage: PackDriversForSubmission.cmd [-b bindir] [-p pdbdir] [-n/--no-pdb] [-o output.cab] [-p output.ddf]
     96echo Usage: PackDriversForSubmission.cmd [-b bindir] [-p pdbdir] [-n/--no-pdb]
     97echo           [-e expack] [-x/--no-extpack] [-o output.cab] [-p output.ddf] [-a x86/amd64]
    7798echo .
    7899echo Warning! This script should normally be invoked from the repack directory w/o any parameters.
     
    94115goto argument_loop_next_with_value
    95116
     117:opt_x
     118set _MY_OPT_WITH_EXTPACK=0
     119shift
     120goto argument_loop
     121
    96122:syntax_error_missing_value
    97123echo syntax error: missing or empty option value after %1
    98124goto end_failed
    99125
     126:syntax_error_unknown_arch
     127echo syntax error: Unknown architecture: %2
     128goto end_failed
     129
    100130:error_bindir_does_not_exist
    101131echo syntax error: Specified BIN directory does not exist: "%_MY_OPT_BINDIR%"
     
    104134:error_pdbdir_does_not_exist
    105135echo syntax error: Specified PDB directory does not exist: "%_MY_OPT_PDBDIR%"
     136goto end_failed
     137
     138:error_extpack_does_not_exist
     139echo syntax error: Specified extension pack does not exist: "%_MY_OPT_EXTPACK%"
    106140goto end_failed
    107141
     
    123157:no_pdbdir_validation
    124158
    125 if ".%_MY_OPT_OUTPUT%" == "." if exist "%_MY_OPT_BINDIR%\x86" set _MY_OPT_OUTPUT=VBoxDrivers-amd64.cab
    126 if ".%_MY_OPT_OUTPUT%" == "."       set _MY_OPT_OUTPUT=VBoxDrivers-x86.cab
     159if "%_MY_OPT_WITH_EXTPACK" == "0"   goto no_extpack_validation
     160if ".%_MY_OPT_EXTPACK%" == "."      set _MY_OPT_EXTPACK=%_MY_OPT_BINDIR%\Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack
     161if not exist "%_MY_OPT_EXTPACK%"    goto error_extpack_does_not_exist
     162:no_extack_validation
     163
     164if ".%_MY_OPT_ARCH%" == "."         if exist "%_MY_OPT_BINDIR%\x86" set _MY_OPT_ARCH=amd64
     165if ".%_MY_OPT_ARCH%" == "."         set _MY_OPT_ARCH=x86
     166
     167if ".%_MY_OPT_OUTPUT%" == "."       set _MY_OPT_OUTPUT=VBoxDrivers-%_MY_OPT_ARCH%.cab
    127168if exist "%_MY_OPT_OUTPUT%"         goto error_output_exists
    128169
     
    130171if exist "%_MY_OPT_DDF_FILE%"       goto error_ddf_exists
    131172
     173
     174rem
     175rem Unpack the extension pack.
     176rem We unpack it into the bin directory in the usual location.
     177rem
     178if "%_MY_OPT_WITH_EXTPACK" == "0"   goto no_extpack_unpack
     179set _MY_EXTPACK_DIR=%_MY_OPT_BINDIR%\ExtensionPacks\Oracle_VM_VirtualBox_Extension_Pack
     180if not exist "%_MY_OPT_BINDIR%\ExtensionPacks"  ( mkdir "%_MY_OPT_BINDIR%\ExtensionPacks" || goto end_failed )
     181if not exist "%_MY_EXTPACK_DIR%"                ( mkdir "%_MY_EXTPACK_DIR%" || goto end_failed )
     182"%_MY_OPT_BINDIR%\tools\RTTar.exe" -xzf "%_MY_OPT_EXTPACK%"  -C "%_MY_EXTPACK_DIR%" || goto _end_failed
     183:no_extpack_unpack
    132184
    133185rem
     
    185237:no_vboxdd2r0
    186238
     239if "%_MY_OPT_WITH_EXTPACK" == "0"   goto no_extpack_ddf
     240echo .Set DestinationDir=VBoxExtPackPuel>>                                              "%_MY_OPT_DDF_FILE%"
     241echo .\VBoxExtPackPuel.inf VBoxExtPackPuel.inf>>                                        "%_MY_OPT_DDF_FILE%"
     242echo %_MY_EXTPACK_DIR%\win.%_MY_OPT_ARCH%\VBoxEhciR0.r0 VBoxEhciR0.r0>>                 "%_MY_OPT_DDF_FILE%"
     243echo %_MY_EXTPACK_DIR%\win.%_MY_OPT_ARCH%\VBoxNvmeR0.r0 VBoxNvmeR0.r0>>                 "%_MY_OPT_DDF_FILE%"
     244echo %_MY_EXTPACK_DIR%\win.%_MY_OPT_ARCH%\VBoxPciRawR0.r0 VBoxPciRawR0.r0>>             "%_MY_OPT_DDF_FILE%"
     245:no_extpack_ddf
     246
    187247rem
    188248rem Create the cabient file.
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