Update install.sh

This commit is contained in:
Kroese 2024-04-29 16:50:51 +02:00 committed by GitHub
parent f29f8b8dcc
commit 0d57c4334f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -582,17 +582,37 @@ prepareImage() {
local iso="$1"
local dir="$2"
if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then
if [[ "${DETECTED,,}" != "winxp"* ]] && [[ "${DETECTED,,}" != "win2008"* ]]; then
if [[ "${DETECTED,,}" != "winvista"* ]] && [[ "${DETECTED,,}" != "win7"* ]]; then
if [ -f "$dir/$ETFS" ] && [ -f "$dir/$EFISYS" ]; then
return 0
fi
if [ ! -f "$dir/$ETFS" ]; then
warn "failed to locate file 'etfsboot.com' in ISO image!"
warn "failed to locate file 'etfsboot.com' in ISO image, falling back to legacy boot!"
else
warn "failed to locate file 'efisys_noprompt.bin' in ISO image!"
warn "failed to locate file 'efisys_noprompt.bin' in ISO image, falling back to legacy boot!"
fi
return 1
fi
fi
fi
[[ "${PLATFORM,,}" == "arm64" ]] && return 1
if [[ "${DETECTED,,}" == "winxp"* ]]; then
if ! prepareXP "$iso" "$dir"; then
error "Failed to prepare Windows XP ISO!" && return 1
fi
else
if ! prepareLegacy "$iso" "$dir"; then
error "Failed to prepare Windows ISO!" && return 1
fi
fi
return 0
}
updateImage() {