From 748ba1e967749724b0e70b14460c2c4acca18b82 Mon Sep 17 00:00:00 2001 From: Hsiao-nan Cheung Date: Fri, 14 Oct 2022 17:57:13 +0800 Subject: [PATCH] 7zip: Add ARM64 arch (#4025) * 7zip: Add ARM64 arch * Remove unused exe * Remove 7zr Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com> Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com> --- bucket/7zip.json | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/bucket/7zip.json b/bucket/7zip.json index 1b009b2d30..e8c52749be 100644 --- a/bucket/7zip.json +++ b/bucket/7zip.json @@ -6,15 +6,26 @@ "notes": "Add 7-Zip as a context menu option by running: \"$dir\\install-context.reg\"", "architecture": { "64bit": { - "url": "https://7-zip.org/a/7z2201-x64.msi", - "hash": "f4afba646166999d6090b5beddde546450262dc595dddeb62132da70f70d14ca" + "url": "https://www.7-zip.org/a/7z2201-x64.msi", + "hash": "f4afba646166999d6090b5beddde546450262dc595dddeb62132da70f70d14ca", + "extract_dir": "Files\\7-Zip" }, "32bit": { - "url": "https://7-zip.org/a/7z2201.msi", - "hash": "a4913f98821e0da0c58cd3a7f2a59f1834b85b6ca6b3fdefa5454d6c3bbef54c" + "url": "https://www.7-zip.org/a/7z2201.msi", + "hash": "a4913f98821e0da0c58cd3a7f2a59f1834b85b6ca6b3fdefa5454d6c3bbef54c", + "extract_dir": "Files\\7-Zip" + }, + "arm64": { + "url": "https://www.7-zip.org/a/7z2201-arm64.exe", + "hash": "700dea3e4012319a09ccadfce91cf090334cfe658d0bdc42204e77acbea1ef99", + "pre_install": [ + "$7zr = Join-Path $env:TMP '7zr.exe'", + "Invoke-WebRequest https://www.7-zip.org/a/7zr.exe -OutFile $7zr", + "Invoke-ExternalCommand $7zr @('x', \"$dir\\$fname\", \"-o$dir\", '-y') | Out-Null", + "Remove-Item \"$dir\\Uninstall.exe\", \"$dir\\*-arm64.exe\", $7zr" + ] } }, - "extract_dir": "Files\\7-Zip", "post_install": [ "$7zip_root = \"$dir\".Replace('\\', '\\\\')", "'install-context.reg', 'uninstall-context.reg' | ForEach-Object {", @@ -48,10 +59,13 @@ "autoupdate": { "architecture": { "64bit": { - "url": "https://7-zip.org/a/7z$cleanVersion-x64.msi" + "url": "https://www.7-zip.org/a/7z$cleanVersion-x64.msi" }, "32bit": { - "url": "https://7-zip.org/a/7z$cleanVersion.msi" + "url": "https://www.7-zip.org/a/7z$cleanVersion.msi" + }, + "arm64": { + "url": "https://www.7-zip.org/a/7z$cleanVersion-arm64.exe" } } }