VirtualBox

Ignore:
Timestamp:
Sep 13, 2019 10:04:41 AM (5 years ago)
Author:
vboxsync
Message:

Installer/win: Add prepare/repack scripts for single builds, plus a few copy/paste fixes to error messages in the combined ones.

Location:
trunk/src/VBox/Installer/win/Scripts
Files:
2 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/Scripts/Combined-1-Prepare.cmd

    r79439 r80769  
    125125
    126126:error_x86_bindir_not_found
    127 echo syntax error: The AMD64 bin directory was not found: "%_MY_BINDIR_X86%"
     127echo syntax error: The X86 bin directory was not found: "%_MY_BINDIR_X86%"
    128128goto end_failed
    129129
    130130:error_amd64_repack_dir_not_found
    131 echo syntax error: The AMD64 bin directory was not found: "%_MY_REPACK_DIR_AMD64%"
     131echo syntax error: The AMD64 repack directory was not found: "%_MY_REPACK_DIR_AMD64%"
    132132goto end_failed
    133133
    134134:error_x86_repack_dir_not_found
    135 echo syntax error: The AMD64 bin directory was not found: "%_MY_REPACK_DIR_X86%"
     135echo syntax error: The X86 repack directory was not found: "%_MY_REPACK_DIR_X86%"
    136136goto end_failed
    137137
  • trunk/src/VBox/Installer/win/Scripts/Combined-3-Repack.cmd

    r77351 r80769  
    142142
    143143:error_x86_bindir_not_found
    144 echo syntax error: The AMD64 bin directory was not found: "%_MY_BINDIR_X86%"
     144echo syntax error: The X86 bin directory was not found: "%_MY_BINDIR_X86%"
    145145goto end_failed
    146146
    147147:error_amd64_repack_dir_not_found
    148 echo syntax error: The AMD64 bin directory was not found: "%_MY_REPACK_DIR_AMD64%"
     148echo syntax error: The AMD64 repack directory was not found: "%_MY_REPACK_DIR_AMD64%"
    149149goto end_failed
    150150
    151151:error_x86_repack_dir_not_found
    152 echo syntax error: The AMD64 bin directory was not found: "%_MY_REPACK_DIR_X86%"
     152echo syntax error: The X86 repack directory was not found: "%_MY_REPACK_DIR_X86%"
    153153goto end_failed
    154154
  • trunk/src/VBox/Installer/win/Scripts/Single-1-Prepare.cmd

    r80761 r80769  
    22rem $Id$
    33rem rem @file
    4 rem Windows NT batch script for preparing both amd64 and x86 for signing submission.
     4rem Windows NT batch script for preparing single build (either amd64 and x86) for signing submission.
    55rem
    66
     
    3939set _MY_OPT_BUILD_TYPE=@KBUILD_TYPE@
    4040set _MY_OPT_OUTDIR=%_MY_OPT_UNTAR_DIR%\output
     41set _MY_OPT_ARCH=@KBUILD_TARGET_ARCH@
    4142
    4243:argument_loop
     
    5152if ".%1" == ".--help"       goto opt_h
    5253
     54if ".%1" == ".-a"                   goto opt_a
     55if ".%1" == ".--arch"               goto opt_a
    5356if ".%1" == ".-e"                   goto opt_e
    5457if ".%1" == ".--extpack"            goto opt_e
     
    7073goto argument_loop
    7174
     75:opt_a
     76if ".%~2" == "."            goto syntax_error_missing_value
     77if not "%2" == "x86" if not "%2" == "amd64" goto syntax_error_unknown_arch
     78set _MY_OPT_ARCH=%~2
     79goto argument_loop_next_with_value
     80
    7281:opt_e
    7382if ".%~2" == "."            goto syntax_error_missing_value
     
    7685
    7786:opt_h
    78 echo Toplevel combined package: Prepare both x86 and amd64 for submission.
    79 echo .
    80 echo Usage: Combined-1-Prepare.cmd [-o output-dir] [-e/--extpack puel.vbox-extpack]
     87echo Toplevel single package: Prepare either x86 and amd64 for submission.
     88echo .
     89echo Usage: Single-1-Prepare.cmd [-o output-dir] [-e/--extpack puel.vbox-extpack]
    8190echo            [-s/--extpack-enterprise puel-enterprise.vbox-extpack]
    8291echo            [-u/--vboxall-dir unpacked-vboxall-dir] [-t build-type]
    83 echo .
     92echo            [-a x86/amd64]
     93echo .
     94echo Default -a/--arch value:               %_MY_OPT_ARCH%
    8495echo Default -e/--extpack value:            %_MY_OPT_EXTPACK%
    8596echo Default -s/--extpack-enterprise value: %_MY_OPT_EXTPACK_ENTERPRISE%
     
    115126goto end_failed
    116127
     128:syntax_error_unknown_arch
     129echo syntax error: Unknown architecture: %2
     130goto end_failed
     131
    117132
    118133:error_vboxall_untar_dir_not_found
     
    120135goto end_failed
    121136
    122 :error_amd64_bindir_not_found
    123 echo syntax error: The AMD64 bin directory was not found: "%_MY_BINDIR_AMD64%"
    124 goto end_failed
    125 
    126 :error_x86_bindir_not_found
    127 echo syntax error: The AMD64 bin directory was not found: "%_MY_BINDIR_X86%"
    128 goto end_failed
    129 
    130 :error_amd64_repack_dir_not_found
    131 echo syntax error: The AMD64 bin directory was not found: "%_MY_REPACK_DIR_AMD64%"
    132 goto end_failed
    133 
    134 :error_x86_repack_dir_not_found
    135 echo syntax error: The AMD64 bin directory was not found: "%_MY_REPACK_DIR_X86%"
     137:error_bindir_not_found
     138echo syntax error: The bin directory was not found: "%_MY_BINDIR%"
     139goto end_failed
     140
     141:error_repack_dir_not_found
     142echo syntax error: The repack directory was not found: "%_MY_REPACK_DIR%"
    136143goto end_failed
    137144
     
    153160if not exist "%_MY_OPT_UNTAR_DIR%"      goto error_vboxall_untar_dir_not_found
    154161
    155 set _MY_BINDIR_AMD64=%_MY_OPT_UNTAR_DIR%\win.amd64\%_MY_OPT_BUILD_TYPE%\bin
    156 set _MY_BINDIR_X86=%_MY_OPT_UNTAR_DIR%\win.x86\%_MY_OPT_BUILD_TYPE%\bin
    157 if not exist "%_MY_BINDIR_AMD64%"       goto error_amd64_bindir_not_found
    158 if not exist "%_MY_BINDIR_X86%"         goto error_x86_bindir_not_found
    159 
    160 set _MY_REPACK_DIR_AMD64=%_MY_OPT_UNTAR_DIR%\win.amd64\%_MY_OPT_BUILD_TYPE%\repack
    161 set _MY_REPACK_DIR_X86=%_MY_OPT_UNTAR_DIR%\win.x86\%_MY_OPT_BUILD_TYPE%\repack
    162 if not exist "%_MY_REPACK_DIR_AMD64%"   goto error_amd64_repack_dir_not_found
    163 if not exist "%_MY_REPACK_DIR_X86%"     goto error_x86_repack_dir_not_found
     162set _MY_BINDIR=%_MY_OPT_UNTAR_DIR%\bin
     163if not exist "%_MY_BINDIR%"             goto error_bindir_not_found
     164
     165set _MY_REPACK_DIR=%_MY_OPT_UNTAR_DIR%\repack
     166if not exist "%_MY_REPACK_DIR%"         goto error_repack_dir_not_found
    164167
    165168if not exist "%_MY_OPT_EXTPACK%"        goto error_extpack_not_found
     
    175178rem
    176179echo on
    177 copy /y "%_MY_OPT_EXTPACK%" "%_MY_BINDIR_AMD64%\Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack" || goto end_failed
    178 copy /y "%_MY_OPT_EXTPACK%"   "%_MY_BINDIR_X86%\Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack" || goto end_failed
     180copy /y "%_MY_OPT_EXTPACK%" "%_MY_BINDIR%\Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack" || goto end_failed
    179181@echo off
    180182
     
    183185rem
    184186echo **************************************************************************
    185 echo Packing AMD64 drivers
     187echo Packing drivers
    186188echo **************************************************************************
    187 cd /d "%_MY_REPACK_DIR_AMD64%" || goto end_failed
    188 call "%_MY_REPACK_DIR_AMD64%\PackDriversForSubmission.cmd" -b "%_MY_BINDIR_AMD64%" -a amd64 -e "%_MY_OPT_EXTPACK%" ^
    189     -o "%_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-amd64.cab" || goto end_failed
    190 echo .
    191 echo **************************************************************************
    192 echo Packing X86 drivers
    193 echo **************************************************************************
    194 cd /d "%_MY_REPACK_DIR_X86%" || goto end_failed
    195 call "%_MY_REPACK_DIR_X86%\PackDriversForSubmission.cmd" -b "%_MY_BINDIR_X86%" -a x86 -e "%_MY_OPT_EXTPACK%" ^
    196     -o "%_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-x86.cab" || goto end_failed
     189cd /d "%_MY_REPACK_DIR%" || goto end_failed
     190call "%_MY_REPACK_DIR%\PackDriversForSubmission.cmd" -b "%_MY_BINDIR%" -a "%_MY_OPT_ARCH%" -e "%_MY_OPT_EXTPACK%" ^
     191    -o "%_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-%_MY_OPT_ARCH%.cab" || goto end_failed
    197192echo .
    198193cd /d "%_MY_SAVED_CD%"
     
    201196rem Generate script for taking the next step.
    202197rem
    203 set _MY_NEXT_SCRIPT=%_MY_OPT_OUTDIR%\Combined-3-Repack.cmd
     198set _MY_NEXT_SCRIPT=%_MY_OPT_OUTDIR%\Single-3-Repack.cmd
    204199echo cd /d "%cd%" > "%_MY_NEXT_SCRIPT%"
    205 echo call "%_MY_SCRIPT_DIR%\Combined-3-Repack.cmd" --extpack "%_MY_OPT_EXTPACK%" ^
     200echo call "%_MY_SCRIPT_DIR%\Single-3-Repack.cmd" --extpack "%_MY_OPT_EXTPACK%" ^
    206201    --extpack-enterprise "%_MY_OPT_EXTPACK_ENTERPRISE%" ^
    207202    --vboxall-untar-dir "%_MY_OPT_UNTAR_DIR%" ^
     
    216211echo *
    217212echo * Created:
    218 echo *     %_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-amd64.cab
    219 echo *     %_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-x86.cab
     213echo *     %_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-%_MY_OPT_ARCH%.cab
    220214echo *
    221215echo * Next steps:
    222216echo *   1. Submit the files to Microsoft for attestation signing.
    223217echo *   2. Download the signed result.
    224 echo *   3. "%_MY_NEXT_SCRIPT%" --signed-x86 {zip} --signed-amd64 {zip}
     218echo *   3. "%_MY_NEXT_SCRIPT%" --signed {zip}
    225219
    226220goto end
  • trunk/src/VBox/Installer/win/Scripts/Single-3-Repack.cmd

    r80761 r80769  
    22rem $Id$
    33rem rem @file
    4 rem Windows NT batch script for repacking signed amd64 and x86 drivers.
     4rem Windows NT batch script for repacking signed amd64 or x86 drivers.
    55rem
    66
     
    3939set _MY_OPT_BUILD_TYPE=@KBUILD_TYPE@
    4040set _MY_OPT_OUTDIR=%_MY_OPT_UNTAR_DIR%\output
    41 set _MY_OPT_SIGNED_AMD64=
    42 set _MY_OPT_SIGNED_X86=
     41set _MY_OPT_SIGNED=
    4342
    4443:argument_loop
     
    5958if ".%1" == ".-s"                   goto opt_s
    6059if ".%1" == ".--extpack-enterprise" goto opt_s
    61 if ".%1" == ".--signed-amd64"       goto opt_signed_amd64
    62 if ".%1" == ".--signed-x86"         goto opt_signed_x86
     60if ".%1" == ".--signed"             goto opt_signed
    6361if ".%1" == ".-t"                   goto opt_t
    6462if ".%1" == ".--build-type"         goto opt_t
     
    8583echo            [-s/--extpack-enterprise puel-enterprise.vbox-extpack]
    8684echo            [-u/--vboxall-dir unpacked-vboxall-dir] [-t build-type]
    87 echo            [--signed-amd64 signed-amd64.zip]
    88 echo            [--signed-x86 signed-x86.zip]
     85echo            [--signed signed.zip]
    8986echo
    9087echo .
     
    107104goto argument_loop_next_with_value
    108105
    109 :opt_signed_amd64
    110 if ".%~2" == "."            goto syntax_error_missing_value
    111 set _MY_OPT_SIGNED_AMD64=%~f2
    112 goto argument_loop_next_with_value
    113 
    114 :opt_signed_x86
    115 if ".%~2" == "."            goto syntax_error_missing_value
    116 set _MY_OPT_SIGNED_X86=%~f2
     106:opt_signed
     107if ".%~2" == "."            goto syntax_error_missing_value
     108set _MY_OPT_SIGNED=%~f2
    117109goto argument_loop_next_with_value
    118110
     
    137129goto end_failed
    138130
    139 :error_amd64_bindir_not_found
    140 echo syntax error: The AMD64 bin directory was not found: "%_MY_BINDIR_AMD64%"
    141 goto end_failed
    142 
    143 :error_x86_bindir_not_found
    144 echo syntax error: The AMD64 bin directory was not found: "%_MY_BINDIR_X86%"
    145 goto end_failed
    146 
    147 :error_amd64_repack_dir_not_found
    148 echo syntax error: The AMD64 bin directory was not found: "%_MY_REPACK_DIR_AMD64%"
    149 goto end_failed
    150 
    151 :error_x86_repack_dir_not_found
    152 echo syntax error: The AMD64 bin directory was not found: "%_MY_REPACK_DIR_X86%"
     131:error_bindir_not_found
     132echo syntax error: The bin directory was not found: "%_MY_BINDIR%"
     133goto end_failed
     134
     135:error_repack_dir_not_found
     136echo syntax error: The repack directory was not found: "%_MY_REPACK_DIR%"
    153137goto end_failed
    154138
     
    161145goto end_failed
    162146
    163 :error_signed_amd64_not_found
    164 echo syntax error: Zip with signed AMD64 drivers not found: "%_MY_OPT_SIGNED_AMD64%"
    165 goto end_failed
    166 
    167 :error_signed_x86_not_found
    168 echo syntax error: Zip with signed X86 drivers not found: "%_MY_OPT_SIGNED_X86%"
     147:error_signed_not_found
     148echo syntax error: Zip with signed drivers not found: "%_MY_OPT_SIGNED%"
    169149goto end_failed
    170150
     
    177157if not exist "%_MY_OPT_UNTAR_DIR%"      goto error_vboxall_untar_dir_not_found
    178158
    179 set _MY_BINDIR_AMD64=%_MY_OPT_UNTAR_DIR%\win.amd64\%_MY_OPT_BUILD_TYPE%\bin
    180 set _MY_BINDIR_X86=%_MY_OPT_UNTAR_DIR%\win.x86\%_MY_OPT_BUILD_TYPE%\bin
    181 if not exist "%_MY_BINDIR_AMD64%"       goto error_amd64_bindir_not_found
    182 if not exist "%_MY_BINDIR_X86%"         goto error_x86_bindir_not_found
    183 
    184 set _MY_REPACK_DIR_AMD64=%_MY_OPT_UNTAR_DIR%\win.amd64\%_MY_OPT_BUILD_TYPE%\repack
    185 set _MY_REPACK_DIR_X86=%_MY_OPT_UNTAR_DIR%\win.x86\%_MY_OPT_BUILD_TYPE%\repack
    186 if not exist "%_MY_REPACK_DIR_AMD64%"   goto error_amd64_repack_dir_not_found
    187 if not exist "%_MY_REPACK_DIR_X86%"     goto error_x86_repack_dir_not_found
     159set _MY_BINDIR=%_MY_OPT_UNTAR_DIR%\bin
     160if not exist "%_MY_BINDIR%"             goto error_bindir_not_found
     161
     162set _MY_REPACK_DIR=%_MY_OPT_UNTAR_DIR%\repack
     163if not exist "%_MY_REPACK_DIR%"         goto error_repack_dir_not_found
    188164
    189165if not exist "%_MY_OPT_EXTPACK%"        goto error_extpack_not_found
    190166if not ".%_MY_OPT_EXTPACK_ENTERPRISE%" == "." if not exist "%_MY_OPT_EXTPACK_ENTERPRISE%" goto error_enterprise_extpack_not_found
    191167
    192 if not exist "%_MY_OPT_SIGNED_AMD64%"   goto error_signed_amd64_not_found
    193 if not exist "%_MY_OPT_SIGNED_X86%"     goto error_signed_x86_not_found
     168if not exist "%_MY_OPT_SIGNED%"         goto error_signed_not_found
    194169
    195170rem Make sure the output dir exists.
     
    197172
    198173rem
    199 rem Unpacking the two driver zips.
    200 rem
    201 echo **************************************************************************
    202 echo * AMD64: Unpacking signed drivers...
    203 echo **************************************************************************
    204 cd /d "%_MY_REPACK_DIR_AMD64%" || goto end_failed
    205 call "%_MY_REPACK_DIR_AMD64%\UnpackBlessedDrivers.cmd" -b "%_MY_BINDIR_AMD64%" -i "%_MY_OPT_SIGNED_AMD64%" || goto end_failed
    206 echo .
    207 
    208 echo **************************************************************************
    209 echo * X86: Unpacking signed drivers...
    210 echo **************************************************************************
    211 cd /d "%_MY_REPACK_DIR_X86%" || goto end_failed
    212 call "%_MY_REPACK_DIR_X86%\UnpackBlessedDrivers.cmd" -b "%_MY_BINDIR_X86%" -i "%_MY_OPT_SIGNED_X86%" || goto end_failed
    213 echo .
    214 
    215 
    216 rem
    217 rem Do the AMD64 work.
    218 rem
    219 echo **************************************************************************
    220 echo * AMD64: Repackaging installers
    221 echo **************************************************************************
    222 echo * AMD64: Compiling WIX...
    223 cd /d "%_MY_REPACK_DIR_AMD64%" || goto end_failed
     174rem Unpacking the driver zip.
     175rem
     176echo **************************************************************************
     177echo * Unpacking signed drivers...
     178echo **************************************************************************
     179cd /d "%_MY_REPACK_DIR%" || goto end_failed
     180call "%_MY_REPACK_DIR%\UnpackBlessedDrivers.cmd" -b "%_MY_BINDIR%" -i "%_MY_OPT_SIGNED%" || goto end_failed
     181echo .
     182
     183
     184rem
     185rem Do the work.
     186rem
     187echo **************************************************************************
     188echo * Repackaging installers
     189echo **************************************************************************
     190echo * Compiling WIX...
     191cd /d "%_MY_REPACK_DIR%" || goto end_failed
    224192for %%i in (1-*.cmd) do (call %%i || goto end_failed)
    225193echo .
    226194
    227 echo * AMD64: Linking WIX...
     195echo * Linking WIX...
    228196for %%i in (2-*.cmd) do (call %%i || goto end_failed)
    229197echo .
    230198
    231 echo * AMD64: Applying language patches to MSI...
     199echo * Applying language patches to MSI...
    232200for %%i in (3-*.cmd) do (call %%i || goto end_failed)
    233201echo .
    234202
    235203
    236 rem
    237 rem Do the X86 work.
    238 rem
    239 echo **************************************************************************
    240 echo * X86: Repackaging installers
    241 echo **************************************************************************
    242 echo * X86: Compiling WIX...
    243 cd /d "%_MY_REPACK_DIR_X86%" || goto end_failed
    244 for %%i in (1-*.cmd) do (call %%i || goto end_failed)
    245 echo .
    246 
    247 echo * X86: Linking WIX...
    248 for %%i in (2-*.cmd) do (call %%i || goto end_failed)
    249 echo .
    250 
    251 echo * X86: Applying language patches to MSI...
    252 for %%i in (3-*.cmd) do (call %%i || goto end_failed)
    253 echo .
    254 
    255 echo * X86: Creating multi arch installer...
    256 for %%i in (4-*.cmd) do (call %%i || goto end_failed)
    257 echo .
    258 
    259204set _MY_OUT_FILES=
    260 cd /d "%_MY_REPACK_DIR_AMD64%" || goto end_failed
     205cd /d "%_MY_REPACK_DIR%" || goto end_failed
    261206for %%i in (VBoxMerge*msm) do (
    262207    copy /y "%%i" "%_MY_OPT_OUTDIR%" || goto end_failed
    263208    call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi
    264209)
    265 cd /d "%_MY_REPACK_DIR_X86%" || goto end_failed
    266 for %%i in (VBoxMerge*msm) do (
    267     copy /y "%%i" "%_MY_OPT_OUTDIR%" || goto end_failed
    268     call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi
    269 )
    270210for %%i in (VirtualBox-*MultiArch*exe) do (
    271211    copy /y "%%i" "%_MY_OPT_OUTDIR%" || goto end_failed
     
    280220echo * Repacking extension packs.
    281221echo **************************************************************************
    282 cd /d "%_MY_REPACK_DIR_X86%" || goto end_failed
     222cd /d "%_MY_REPACK_DIR%" || goto end_failed
    283223
    284224echo * Regular PUEL...
     
    288228    call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi
    289229)
    290 call "%_MY_REPACK_DIR_X86%\RepackExtPack.cmd" --bindir-amd64 "%_MY_BINDIR_AMD64%" --bindir-x86 "%_MY_BINDIR_X86%" ^
     230call "%_MY_REPACK_DIR%\RepackExtPack.cmd" --bindir-amd64 "%_MY_BINDIR%" --bindir-x86 "%_MY_BINDIR%" ^
    291231    --input "%_MY_OPT_EXTPACK%" --output "%_MY_TMP_OUT%" || goto end_failed
    292232
     
    298238    call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi
    299239)
    300 call "%_MY_REPACK_DIR_X86%\RepackExtPack.cmd" --bindir-amd64 "%_MY_BINDIR_AMD64%" --bindir-x86 "%_MY_BINDIR_X86%" ^
     240call "%_MY_REPACK_DIR%\RepackExtPack.cmd" --bindir-amd64 "%_MY_BINDIR%" --bindir-x86 "%_MY_BINDIR%" ^
    301241    --input "%_MY_OPT_EXTPACK_ENTERPRISE%" --output "%_MY_TMP_OUT%" || goto end_failed
    302242:no_enterprise_repacking
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