Skip to content

Commit

Permalink
feat(install): Use 7zip when available for faster zip file extraction (
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias authored and r15ch13 committed Sep 1, 2019
1 parent 0d251ba commit e37e4ca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,12 @@ function dl_urls($app, $version, $manifest, $bucket, $architecture, $dir, $use_c
if ($manifest.innosetup) {
$extract_fn = 'Expand-InnoArchive'
} elseif($fname -match '\.zip$') {
$extract_fn = 'Expand-ZipArchive'
# Use 7zip when available (more fast)
if (((get_config 7ZIPEXTRACT_USE_EXTERNAL) -and (Test-CommandAvailable 7z)) -or (Test-HelperInstalled -Helper 7zip)) {
$extract_fn = 'Expand-7zipArchive'
} else {
$extract_fn = 'Expand-ZipArchive'
}
} elseif($fname -match '\.msi$') {
# check manifest doesn't use deprecated install method
if(msi $manifest $architecture) {
Expand Down

0 comments on commit e37e4ca

Please sign in to comment.