Use zip file format for virtual disk images (#1327)

Virtual Disk images are often used on Windows and/or Mac platforms where
xz is not a widely known file ending and also not supported by dafault.
Use zip which is much better known.

Keep using xz for boards since those are not meant to be extracted by
users but directly used in Etcher. Also keep using xz for qcow2, since
qcow2 is mostly used on Linux platforms where xz is available by default
and zip usually needs an extra package.
This commit is contained in:
Stefan Agner
2021-04-19 10:53:22 +02:00
committed by GitHub
parent 05ba57e006
commit 2a910b0e45
4 changed files with 21 additions and 12 deletions

View File

@@ -325,3 +325,11 @@ function convert_disk_image_xz() {
rm -f "${hdd_img}.xz"
xz -3 -T0 "${hdd_img}"
}
function convert_disk_image_zip() {
local hdd_ext=${1:-img}
local hdd_img="$(hassos_image_name "${hdd_ext}")"
rm -f "${hdd_img}.zip"
zip -r "${hdd_img}.zip" "${hdd_img}"
}