From 8c662b38cd7e3c7a45a1b50e492d16c4f76a1333 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 10 Jun 2024 14:16:24 +0200 Subject: [PATCH] Update install.sh --- src/install.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/install.sh b/src/install.sh index 0aada6e..4e31087 100644 --- a/src/install.sh +++ b/src/install.sh @@ -119,10 +119,11 @@ finishInstall() { fi rm -f "$STORAGE/windows.old" - rm -f "$STORAGE/windows.type" + rm -f "$STORAGE/windows.vga" 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" @@ -155,6 +156,12 @@ finishInstall() { fi fi + [[ "${PLATFORM,,}" == "arm64" ]] && VGA="virtio-gpu" + + if [ -n "${VGA:-}" ] && [[ "${VGA:-}" != "virtio" ]]; then + echo "$VGA" > "$STORAGE/windows.vga" + fi + if [ -n "${DISK_TYPE:-}" ] && [[ "${DISK_TYPE:-}" != "scsi" ]]; then echo "$DISK_TYPE" > "$STORAGE/windows.type" fi @@ -967,7 +974,14 @@ bootWindows() { rm -rf "$TMP" - [[ "${PLATFORM,,}" == "arm64" ]] && VGA="virtio-gpu" + if [ -s "$STORAGE/windows.vga" ] && [ -f "$STORAGE/windows.vga" ]; then + VGA=$(<"$STORAGE/windows.vga") + else + if [[ "${PLATFORM,,}" == "arm64" ]]; then + VGA="virtio-gpu" + echo "$VGA" > "$STORAGE/windows.vga" + fi + fi if [ -s "$STORAGE/windows.type" ] && [ -f "$STORAGE/windows.type" ]; then DISK_TYPE=$(<"$STORAGE/windows.type")