VirtualBox

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


Ignore:
Timestamp:
Nov 26, 2019 6:18:16 PM (5 years ago)
Author:
vboxsync
Message:

PackDriversForSubmission.cmd: GuestAdditions packing for M$ signing (bugref:9587)

File:
1 edited

Legend:

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

    r79708 r82226  
    2626set _MY_OPT_BINDIR=..\bin
    2727set _MY_OPT_PDBDIR=
     28set _MY_OPT_GADIR=
     29set _MY_OPT_WITH_MAIN=1
    2830set _MY_OPT_WITH_PDB=1
    2931set _MY_OPT_EXTPACK=
    3032set _MY_OPT_WITH_EXTPACK=1
     33set _MY_OPT_WITH_GA=0
    3134set _MY_OPT_OUTPUT=
    3235set _MY_OPT_DDF_FILE=
    33 set _MY_OPT_ARCH=@KBUILD_TARGET_ARCH@
     36set _MY_OPT_ARCH=amd64
    3437
    3538:argument_loop
     
    5255if ".%1" == ".-e"           goto opt_e
    5356if ".%1" == ".--extpack"    goto opt_e
     57if ".%1" == ".--no-main"    goto opt_m
    5458if ".%1" == ".-n"           goto opt_n
    5559if ".%1" == ".--no-pdb"     goto opt_n
     
    6064if ".%1" == ".-x"           goto opt_x
    6165if ".%1" == ".--no-extpack" goto opt_x
     66if ".%1" == ".-g"           goto opt_g
     67if ".%1" == ".--ga"         goto opt_g
     68if ".%1" == ".--additions"  goto opt_g
    6269echo syntax error: Unknown option: %1
    6370echo               Try --help to list valid options.
     
    94101echo Microsoft to run on recent Windows 10 installations.
    95102echo .
    96 echo Usage: PackDriversForSubmission.cmd [-b bindir] [-p pdbdir] [-n/--no-pdb]
    97 echo           [-e expack] [-x/--no-extpack] [-o output.cab] [-p output.ddf] [-a x86/amd64]
     103echo Usage: PackDriversForSubmission.cmd [-b bindir] [-p pdbdir] [--no-main] [-n/--no-pdb] [-e expack]
     104echo           [-x/--no-extpack] [-g/--ga/--additions] [-o output.cab] [-p output.ddf] [-a x86/amd64]
    98105echo .
    99106echo Warning! This script should normally be invoked from the repack directory w/o any parameters.
    100107goto end_failed
    101108
     109:opt_m
     110set _MY_OPT_WITH_MAIN=0
     111shift
     112goto argument_loop
     113
    102114:opt_n
    103115set _MY_OPT_WITH_PDB=0
     
    120132goto argument_loop
    121133
     134:opt_g
     135set _MY_OPT_WITH_GA=1
     136shift
     137goto argument_loop
     138
     139
    122140:syntax_error_missing_value
    123141echo syntax error: missing or empty option value after %1
     
    139157echo syntax error: Specified extension pack does not exist: "%_MY_OPT_EXTPACK%"
    140158goto end_failed
     159
     160:error_additions_does_not_exist
     161echo syntax error: Specified guest additions does not exist: "%_MY_OPT_GADIR%"
     162goto end_failed
     163
    141164
    142165:error_output_exists
     
    152175if not exist "%_MY_OPT_BINDIR%"     goto error_bindir_does_not_exist
    153176
    154 if "%_MY_OPT_WITH_PDB" == "0"       goto no_pdbdir_validation
     177if "%_MY_OPT_WITH_PDB%" == "0"      goto no_pdbdir_validation
    155178if ".%_MY_OPT_PDBDIR%" == "."       set _MY_OPT_PDBDIR=%_MY_OPT_BINDIR%\..\stage\debug\bin
    156179if not exist "%_MY_OPT_PDBDIR%"     goto error_pdbdir_does_not_exist
    157180:no_pdbdir_validation
    158181
    159 if "%_MY_OPT_WITH_EXTPACK" == "0"   goto no_extpack_validation
     182if "%_MY_OPT_WITH_EXTPACK%" == "0"  goto no_extpack_validation
    160183if ".%_MY_OPT_EXTPACK%" == "."      set _MY_OPT_EXTPACK=%_MY_OPT_BINDIR%\Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack
    161184if not exist "%_MY_OPT_EXTPACK%"    goto error_extpack_does_not_exist
    162 :no_extack_validation
    163 
    164 if ".%_MY_OPT_OUTPUT%" == "."       set _MY_OPT_OUTPUT=VBoxDrivers-@VBOX_VERSION_STRING@r@VBOX_SVN_REV@-%_MY_OPT_ARCH%.cab
     185:no_extpack_validation
     186
     187if "%_MY_OPT_WITH_GA%" == "0"       goto no_additions_validation
     188if ".%_MY_OPT_GADIR%" == "."        set _MY_OPT_GADIR=%_MY_OPT_BINDIR%\additions
     189if not exist "%_MY_OPT_GADIR%"      goto error_additions_does_not_exist
     190:no_additions_validation
     191
     192if ".%_MY_OPT_OUTPUT%" == "."       set _MY_OPT_OUTPUT=VBoxDrivers-6.1.0_RC1_SPBr135037-%_MY_OPT_ARCH%.cab
    165193if exist "%_MY_OPT_OUTPUT%"         goto error_output_exists
    166194
     
    177205rem
    178206set PATH=%SystemRoot%\System32;%PATH%;%_MY_OPT_BINDIR%
    179 if "%_MY_OPT_WITH_EXTPACK" == "0"  goto no_extpack_unpack
     207if "%_MY_OPT_WITH_EXTPACK%" == "0" goto no_extpack_unpack
    180208set _MY_EXTPACK_DIR=%_MY_OPT_BINDIR%\ExtensionPacks\Oracle_VM_VirtualBox_Extension_Pack
    181209if not exist "%_MY_OPT_BINDIR%\ExtensionPacks"  ( mkdir "%_MY_OPT_BINDIR%\ExtensionPacks" || goto end_failed )
     
    202230echo .Set RptFileName=%_MY_OPT_OUTPUT%.rpt>>                                            "%_MY_OPT_DDF_FILE%"
    203231
     232if %_MY_OPT_WITH_MAIN% == 0 goto skip_main_package
    204233echo .Set DestinationDir=VBoxDrv>>                                                      "%_MY_OPT_DDF_FILE%"
    205234echo %_MY_OPT_BINDIR%\VBoxDrv.inf VBoxDrv.inf>>                                         "%_MY_OPT_DDF_FILE%"
     
    232261if "%_MY_OPT_WITH_PDB%" == "1" echo %_MY_OPT_PDBDIR%\VMMR0.pdb VMMR0.pdb>>              "%_MY_OPT_DDF_FILE%"
    233262echo %_MY_OPT_BINDIR%\VBoxDDR0.r0 VBoxDDR0.r0>>                                         "%_MY_OPT_DDF_FILE%"
     263:skip_main_package
     264
    234265if "%_MY_OPT_WITH_PDB%" == "1" echo %_MY_OPT_PDBDIR%\VBoxDDR0.pdb VBoxDDR0.pdb>>        "%_MY_OPT_DDF_FILE%"
    235266
    236 if "%_MY_OPT_WITH_EXTPACK" == "0"  goto no_extpack_ddf
     267if "%_MY_OPT_WITH_EXTPACK%" == "0" goto no_extpack_ddf
    237268echo .Set DestinationDir=VBoxExtPackPuel>>                                              "%_MY_OPT_DDF_FILE%"
    238269echo .\VBoxExtPackPuel.inf VBoxExtPackPuel.inf>>                                        "%_MY_OPT_DDF_FILE%"
     
    242273:no_extpack_ddf
    243274
     275if "%_MY_OPT_WITH_GA%" == "0"   goto no_additions_ddf
     276echo .Set DestinationDir=VBoxGuestAdditions>>                                           "%_MY_OPT_DDF_FILE%"
     277echo %_MY_OPT_GADIR%\VBoxGuest.inf>>                                                    "%_MY_OPT_DDF_FILE%"
     278echo %_MY_OPT_GADIR%\VBoxGuest.sys>>                                                    "%_MY_OPT_DDF_FILE%"
     279echo %_MY_OPT_GADIR%\VBoxMouse.inf>>                                                    "%_MY_OPT_DDF_FILE%"
     280echo %_MY_OPT_GADIR%\VBoxMouse.sys>>                                                    "%_MY_OPT_DDF_FILE%"
     281rem echo %_MY_OPT_GADIR%\VBoxSF.sys>>                                                       "%_MY_OPT_DDF_FILE%"
     282echo %_MY_OPT_GADIR%\VBoxVideo.inf>>                                                    "%_MY_OPT_DDF_FILE%"
     283echo %_MY_OPT_GADIR%\VBoxVideo.sys>>                                                    "%_MY_OPT_DDF_FILE%"
     284echo %_MY_OPT_GADIR%\VBoxWddm.inf>>                                                     "%_MY_OPT_DDF_FILE%"
     285echo %_MY_OPT_GADIR%\VBoxWddm.sys>>                                                     "%_MY_OPT_DDF_FILE%"
     286:no_additions_ddf
     287
    244288rem
    245289rem Create the cabient file.
     
    265309@endlocal
    266310@endlocal
    267 
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