Changeset 71958 in vbox for trunk/src/VBox/Installer
- Timestamp:
- Apr 22, 2018 12:38:54 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/win/Scripts/PackDriversForSubmission.cmd
r71955 r71958 27 27 set _MY_OPT_PDBDIR= 28 28 set _MY_OPT_WITH_PDB=1 29 set _MY_OPT_EXTPACK= 30 set _MY_OPT_WITH_EXTPACK=1 29 31 set _MY_OPT_OUTPUT= 30 32 set _MY_OPT_DDF_FILE= 33 set _MY_OPT_ARCH= 31 34 32 35 :argument_loop … … 41 44 if ".%1" == ".--help" goto opt_h 42 45 46 if ".%1" == ".-a" goto opt_a 47 if ".%1" == ".--arch" goto opt_a 43 48 if ".%1" == ".-b" goto opt_b 44 49 if ".%1" == ".--bindir" goto opt_b 50 if ".%1" == ".-d" goto opt_d 51 if ".%1" == ".--ddf" goto opt_d 52 if ".%1" == ".-e" goto opt_e 53 if ".%1" == ".--extpack" goto opt_e 54 if ".%1" == ".-n" goto opt_n 55 if ".%1" == ".--no-pdb" goto opt_n 45 56 if ".%1" == ".-o" goto opt_o 46 57 if ".%1" == ".--output" goto opt_o 47 if ".%1" == ".-d" goto opt_d48 if ".%1" == ".--ddf" goto opt_d49 58 if ".%1" == ".-p" goto opt_p 50 59 if ".%1" == ".--pdb" goto opt_p 51 if ".%1" == ".- n" goto opt_n52 if ".%1" == ".--no- pdb" goto opt_n60 if ".%1" == ".-x" goto opt_x 61 if ".%1" == ".--no-extpack" goto opt_x 53 62 echo syntax error: Unknown option: %1 54 63 echo Try --help to list valid options. … … 60 69 goto argument_loop 61 70 71 :opt_a 72 if ".%2" == "." goto syntax_error_missing_value 73 if not "%2" == "x86" if not "%2" == "amd64" goto syntax_error_unknown_arch 74 set _MY_OPT_ARCH=%2 75 goto argument_loop_next_with_value 76 62 77 :opt_b 63 78 if ".%2" == "." goto syntax_error_missing_value … … 68 83 if ".%2" == "." goto syntax_error_missing_value 69 84 set _MY_OPT_DDF_FILE=%2 85 goto argument_loop_next_with_value 86 87 :opt_e 88 if ".%2" == "." goto syntax_error_missing_value 89 set _MY_OPT_EXTPACK=%2 70 90 goto argument_loop_next_with_value 71 91 … … 74 94 echo Microsoft to run on recent Windows 10 installations. 75 95 echo . 76 echo Usage: PackDriversForSubmission.cmd [-b bindir] [-p pdbdir] [-n/--no-pdb] [-o output.cab] [-p output.ddf] 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] 77 98 echo . 78 99 echo Warning! This script should normally be invoked from the repack directory w/o any parameters. … … 94 115 goto argument_loop_next_with_value 95 116 117 :opt_x 118 set _MY_OPT_WITH_EXTPACK=0 119 shift 120 goto argument_loop 121 96 122 :syntax_error_missing_value 97 123 echo syntax error: missing or empty option value after %1 98 124 goto end_failed 99 125 126 :syntax_error_unknown_arch 127 echo syntax error: Unknown architecture: %2 128 goto end_failed 129 100 130 :error_bindir_does_not_exist 101 131 echo syntax error: Specified BIN directory does not exist: "%_MY_OPT_BINDIR%" … … 104 134 :error_pdbdir_does_not_exist 105 135 echo syntax error: Specified PDB directory does not exist: "%_MY_OPT_PDBDIR%" 136 goto end_failed 137 138 :error_extpack_does_not_exist 139 echo syntax error: Specified extension pack does not exist: "%_MY_OPT_EXTPACK%" 106 140 goto end_failed 107 141 … … 123 157 :no_pdbdir_validation 124 158 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 159 if "%_MY_OPT_WITH_EXTPACK" == "0" goto no_extpack_validation 160 if ".%_MY_OPT_EXTPACK%" == "." set _MY_OPT_EXTPACK=%_MY_OPT_BINDIR%\Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack 161 if not exist "%_MY_OPT_EXTPACK%" goto error_extpack_does_not_exist 162 :no_extack_validation 163 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 127 168 if exist "%_MY_OPT_OUTPUT%" goto error_output_exists 128 169 … … 130 171 if exist "%_MY_OPT_DDF_FILE%" goto error_ddf_exists 131 172 173 174 rem 175 rem Unpack the extension pack. 176 rem We unpack it into the bin directory in the usual location. 177 rem 178 if "%_MY_OPT_WITH_EXTPACK" == "0" goto no_extpack_unpack 179 set _MY_EXTPACK_DIR=%_MY_OPT_BINDIR%\ExtensionPacks\Oracle_VM_VirtualBox_Extension_Pack 180 if not exist "%_MY_OPT_BINDIR%\ExtensionPacks" ( mkdir "%_MY_OPT_BINDIR%\ExtensionPacks" || goto end_failed ) 181 if 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 132 184 133 185 rem … … 185 237 :no_vboxdd2r0 186 238 239 if "%_MY_OPT_WITH_EXTPACK" == "0" goto no_extpack_ddf 240 echo .Set DestinationDir=VBoxExtPackPuel>> "%_MY_OPT_DDF_FILE%" 241 echo .\VBoxExtPackPuel.inf VBoxExtPackPuel.inf>> "%_MY_OPT_DDF_FILE%" 242 echo %_MY_EXTPACK_DIR%\win.%_MY_OPT_ARCH%\VBoxEhciR0.r0 VBoxEhciR0.r0>> "%_MY_OPT_DDF_FILE%" 243 echo %_MY_EXTPACK_DIR%\win.%_MY_OPT_ARCH%\VBoxNvmeR0.r0 VBoxNvmeR0.r0>> "%_MY_OPT_DDF_FILE%" 244 echo %_MY_EXTPACK_DIR%\win.%_MY_OPT_ARCH%\VBoxPciRawR0.r0 VBoxPciRawR0.r0>> "%_MY_OPT_DDF_FILE%" 245 :no_extpack_ddf 246 187 247 rem 188 248 rem Create the cabient file.
Note:
See TracChangeset
for help on using the changeset viewer.