- Timestamp:
- Apr 27, 2018 12:07:20 AM (7 years ago)
- Location:
- trunk/src/VBox/Installer/win
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/win/Makefile.kmk
r72044 r72047 1005 1005 RePackScripts_INSTTYPE = stage 1006 1006 RePackScripts_SOURCES = \ 1007 Scripts/PackDriversForSubmission.cmd \1008 1007 Scripts/UnpackBlessedDrivers.cmd \ 1008 $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \ 1009 1009 $(RePackScripts_0_OUTDIR)/sign-dual.cmd \ 1010 1010 $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \ … … 1013 1013 if !defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "x86" 1014 1014 RePackScripts_SOURCES += \ 1015 Scripts/RepackExtPack.cmd 1015 $(RePackScripts_0_OUTDIR)/RepackExtPack.cmd 1016 endif 1017 if 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 1016 1021 endif 1017 1022 RePackScripts_CLEAN = \ 1023 $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \ 1018 1024 $(RePackScripts_0_OUTDIR)/sign-dual.cmd \ 1019 1025 $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \ 1020 1026 $(RePackScripts_0_OUTDIR)/VMMR0.inf \ 1021 1027 $(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) 1022 1033 1023 1034 $$(RePackScripts_0_OUTDIR)/sign-dual.cmd: | $$(dir $$@) -
trunk/src/VBox/Installer/win/Scripts/PackDriversForSubmission.cmd
r71991 r72047 31 31 set _MY_OPT_OUTPUT= 32 32 set _MY_OPT_DDF_FILE= 33 set _MY_OPT_ARCH= 33 set _MY_OPT_ARCH=@KBUILD_TARGET_ARCH@ 34 34 35 35 :argument_loop … … 70 70 71 71 :opt_a 72 if ".% 2" == "."goto syntax_error_missing_value72 if ".%~2" == "." goto syntax_error_missing_value 73 73 if not "%2" == "x86" if not "%2" == "amd64" goto syntax_error_unknown_arch 74 set _MY_OPT_ARCH=% 274 set _MY_OPT_ARCH=%~2 75 75 goto argument_loop_next_with_value 76 76 77 77 :opt_b 78 if ".% 2" == "."goto syntax_error_missing_value79 set _MY_OPT_BINDIR=% 278 if ".%~2" == "." goto syntax_error_missing_value 79 set _MY_OPT_BINDIR=%~2 80 80 goto argument_loop_next_with_value 81 81 82 82 :opt_d 83 if ".% 2" == "."goto syntax_error_missing_value84 set _MY_OPT_DDF_FILE=% 283 if ".%~2" == "." goto syntax_error_missing_value 84 set _MY_OPT_DDF_FILE=%~2 85 85 goto argument_loop_next_with_value 86 86 87 87 :opt_e 88 if ".% 2" == "."goto syntax_error_missing_value89 set _MY_OPT_EXTPACK=% 288 if ".%~2" == "." goto syntax_error_missing_value 89 set _MY_OPT_EXTPACK=%~2 90 90 goto argument_loop_next_with_value 91 91 … … 106 106 107 107 :opt_p 108 if ".% 2" == "."goto syntax_error_missing_value109 set _MY_OPT_PDBDIR=% 2108 if ".%~2" == "." goto syntax_error_missing_value 109 set _MY_OPT_PDBDIR=%~2 110 110 goto argument_loop_next_with_value 111 111 112 112 :opt_o 113 if ".% 2" == "."goto syntax_error_missing_value114 set _MY_OPT_OUTPUT=% 2113 if ".%~2" == "." goto syntax_error_missing_value 114 set _MY_OPT_OUTPUT=%~2 115 115 goto argument_loop_next_with_value 116 116 … … 162 162 :no_extack_validation 163 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 164 if ".%_MY_OPT_OUTPUT%" == "." set _MY_OPT_OUTPUT=VBoxDrivers-@VBOX_VERSION_STRING@r@VBOX_SVN_REV@-%_MY_OPT_ARCH%.cab 168 165 if exist "%_MY_OPT_OUTPUT%" goto error_output_exists 169 166 -
trunk/src/VBox/Installer/win/Scripts/RepackExtPack.cmd
r72044 r72047 30 30 rem Parse arguments. 31 31 rem 32 set _MY_OPT_BINDIR_X86=..\ bin33 set _MY_OPT_BINDIR_AMD64= 32 set _MY_OPT_BINDIR_X86=..\..\..\win.x86\@KBUILD_TYPE@\bin 33 set _MY_OPT_BINDIR_AMD64=..\..\..\win.amd64\@KBUILD_TYPE@\bin 34 34 set _MY_OPT_INPUT= 35 35 set _MY_OPT_OUTPUT= 36 36 set _MY_OPT_STAGE_DIR=.\repack-extpack-%RANDOM% 37 for %%i in (%_MY_OPT_STAGE_DIR%) do set _MY_OPT_STAGE_DIR=%%~fi 37 38 set _MY_OPT_SIGN_CAT=1 38 39 … … 68 69 69 70 :opt_a 70 if ".% 2" == "."goto syntax_error_missing_value71 set _MY_OPT_BINDIR_AMD64=% 271 if ".%~2" == "." goto syntax_error_missing_value 72 set _MY_OPT_BINDIR_AMD64=%~f2 72 73 goto argument_loop_next_with_value 73 74 74 75 :opt_b 75 if ".% 2" == "."goto syntax_error_missing_value76 set _MY_OPT_BINDIR_X86=% 276 if ".%~2" == "." goto syntax_error_missing_value 77 set _MY_OPT_BINDIR_X86=%~f2 77 78 goto argument_loop_next_with_value 78 79 … … 90 91 91 92 :opt_i 92 if ".% 2" == "."goto syntax_error_missing_value93 set _MY_OPT_INPUT=% 293 if ".%~2" == "." goto syntax_error_missing_value 94 set _MY_OPT_INPUT=%~f2 94 95 goto argument_loop_next_with_value 95 96 96 97 :opt_o 97 if ".% 2" == "."goto syntax_error_missing_value98 set _MY_OPT_OUTPUT=% 298 if ".%~2" == "." goto syntax_error_missing_value 99 set _MY_OPT_OUTPUT=%~f2 99 100 goto argument_loop_next_with_value 100 101 101 102 :opt_s 102 if ".% 2" == "."goto syntax_error_missing_value103 set _MY_OPT_STAGE_DIR=% 2103 if ".%~2" == "." goto syntax_error_missing_value 104 set _MY_OPT_STAGE_DIR=%~f2 104 105 goto argument_loop_next_with_value 105 106 … … 125 126 126 127 :no_more_arguments 127 rem validate specified options128 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\bin128 rem 129 rem Validate and adjust specified options. 130 rem 131 if not exist "%_MY_OPT_BINDIR_X86%" goto error_bindir_x86_does_not_exist 131 132 if not exist "%_MY_OPT_BINDIR_AMD64%" goto error_bindir_amd64_does_not_exist 132 133 … … 134 135 if not exist "%_MY_OPT_INPUT%" goto error_input_not_found 135 136 136 if ".%_MY_OPT_OUTPUT%" == "." set _MY_OPT_OUTPUT=Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack137 if ".%_MY_OPT_OUTPUT%" == "." for %%i in ("%_MY_OPT_INPUT%") do set _MY_OPT_OUTPUT=.\%%~nxi 137 138 138 139 rem Make _MY_OPT_STAGE_DIR absolute. 139 for %%i in (%_MY_OPT_STAGE_DIR%) do set _MY_OPT_STAGE_DIR=%%~fi140 140 if exist "%_MY_OPT_STAGE_DIR%" goto error_stage_dir_exists 141 141 -
trunk/src/VBox/Installer/win/Scripts/UnpackBlessedDrivers.cmd
r72040 r72047 22 22 23 23 rem 24 rem Check for environment variables we need.24 rem Globals and Check for environment variables we need. 25 25 rem 26 26 if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & goto end_failed) 27 set _MY_DRIVER_BASE_NAMES=VBoxDrv VBoxNetAdp6 VBoxNetLwf VBoxUSB VBoxUSBMon 28 set _MY_DRIVER_BASE_NAMES=VBoxDrv VBoxNetAdp6 VBoxNetLwf VBoxUSB VBoxUSBMon 29 set _MY_UNZIP=%KBUILD_DEVTOOLS%\win.x86\bin\unzip.exe 30 if not exist "%_MY_UNZIP%" (echo "%_MY_UNZIP%" does not exist & goto end_failed) 27 31 28 32 rem … … 60 64 61 65 :opt_b 62 if ".% 2" == "."goto syntax_error_missing_value63 set _MY_OPT_BINDIR=% 266 if ".%~2" == "." goto syntax_error_missing_value 67 set _MY_OPT_BINDIR=%~2 64 68 goto argument_loop_next_with_value 65 69 … … 75 79 76 80 :opt_i 77 if ".% 2" == "."goto syntax_error_missing_value78 set _MY_OPT_INPUT=% 281 if ".%~2" == "." goto syntax_error_missing_value 82 set _MY_OPT_INPUT=%~2 79 83 goto argument_loop_next_with_value 80 84 … … 106 110 rem 107 111 rem Unpack the stuff. 112 rem We ignore error level 1 here as that is what unzip returns on warning (slashes). 108 113 rem 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 115 if NOT ERRORLEVEL 1 goto end_failed 116 :unzip_okay 117 118 rem 119 rem Verify it against the PreW10 catalog files we saved. 120 rem 121 set _MY_SIGNTOOL=%KBUILD_DEVTOOLS%\win.x86\sdk\v8.1\bin\x86\signtool.exe 122 if not exist "%_MY_SIGNTOOL%" set _MY_SIGNTOOL=%KBUILD_DEVTOOLS%\win.x86\selfsign\r3\signtool.exe 123 124 for %%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 110 133 111 134 rem 112 135 rem Modify the catalog signatures. 113 136 rem 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_failed116 call sign-dual.cmd "%_MY_OPT_BINDIR%\% cat%" || goto end_failed117 "%_MY_OPT_BINDIR%\tools\RTSignTool.exe" add-nested-exe-signature -v "%_MY_OPT_BINDIR%\% cat%" "%_MY_OPT_BINDIR%\%cat%.ms" || goto end_failed137 for %%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 118 141 ) 119 142 … … 121 144 122 145 :end_failed 146 @echo failed (%ERRORLEVEL%) 123 147 @endlocal 124 148 @endlocal
Note:
See TracChangeset
for help on using the changeset viewer.