Update install.sh

This commit is contained in:
Kroese 2024-05-26 22:15:58 +02:00 committed by GitHub
parent f3e953d1d4
commit 01f970855a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -122,6 +122,7 @@ finishInstall() {
rm -f "$STORAGE/windows.base"
rm -f "$STORAGE/windows.boot"
rm -f "$STORAGE/windows.mode"
rm -f "$STORAGE/windows.type"
cp -f /run/version "$STORAGE/windows.ver"
@ -154,6 +155,10 @@ finishInstall() {
fi
fi
if [ -n "$DISK_TYPE" ] && [[ "${DISK_TYPE,,}" != "scsi" ]]; then
echo "$DISK_TYPE" > "$STORAGE/windows.type"
fi
rm -rf "$TMP"
return 0
}
@ -645,7 +650,7 @@ prepareImage() {
case "${DETECTED,,}" in
"winxp"* )
HV="N"
DISK_TYPE="auto"
DISK_TYPE="ide"
BOOT_MODE="windows_legacy"
prepareXP "$iso" "$dir" && return 0
error "Failed to prepare Windows XP ISO!" && return 1
@ -1046,6 +1051,10 @@ bootWindows() {
[[ "${PLATFORM,,}" == "arm64" ]] && VGA="virtio-gpu"
if [ -s "$STORAGE/windows.type" ] && [ -f "$STORAGE/windows.type" ]; then
DISK_TYPE=$(<"$STORAGE/windows.type")
fi
if [ -s "$STORAGE/windows.mode" ] && [ -f "$STORAGE/windows.mode" ]; then
BOOT_MODE=$(<"$STORAGE/windows.mode")
if [ -s "$STORAGE/windows.old" ] && [ -f "$STORAGE/windows.old" ]; then