From b0573664de7c24bd0b8c4f56279bc93f4f0564ba Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 16 May 2024 07:23:29 +0200 Subject: [PATCH] feat: Added support for Windows 7 x86 (#503) --- Dockerfile | 2 +- src/define.sh | 1 - src/install.sh | 8 ++++++++ src/samba.sh | 6 +++--- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index d044bbc..19685f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM scratch -COPY --from=qemux/qemu-docker:5.03 / / +COPY --from=qemux/qemu-docker:5.04 / / ARG VERSION_ARG="0.0" ARG DEBCONF_NOWARNINGS="yes" diff --git a/src/define.sh b/src/define.sh index 9b2bed9..b7114ce 100644 --- a/src/define.sh +++ b/src/define.sh @@ -1186,7 +1186,6 @@ prepareXP() { local iso="$1" local dir="$2" - MACHINE="pc-q35-2.10" ETFS="[BOOT]/Boot-NoEmul.img" [[ "$MANUAL" == [Yy1]* ]] && return 0 diff --git a/src/install.sh b/src/install.sh index 653edc9..47e4327 100644 --- a/src/install.sh +++ b/src/install.sh @@ -810,6 +810,12 @@ prepareImage() { local dir="$2" local missing + case "${DETECTED,,}" in + "winxp"* | "winvistax86"* | "win7x86"* ) + MACHINE="pc-q35-2.10" + ;; + esac + case "${DETECTED,,}" in "winxp"* ) BOOT_MODE="windows_legacy" @@ -847,6 +853,8 @@ updateImage() { local dat="${file/.xml/.dat}" local desc path src loc xml index result + [[ "${DETECTED,,}" == "winxp"* ]] && return 0 + if [ ! -s "$asset" ] || [ ! -f "$asset" ]; then asset="" if [[ "$MANUAL" != [Yy1]* ]]; then diff --git a/src/samba.sh b/src/samba.sh index 18fa980..dc49bb0 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -72,14 +72,14 @@ mkdir -p "$share" ! smbd && smbd --debug-stdout -isXP="N" +legacy="N" if [ -f "$STORAGE/windows.old" ]; then MT=$(<"$STORAGE/windows.old") - [[ "${MT,,}" == "pc-q35-2"* ]] && isXP="Y" + [[ "${MT,,}" == "pc-q35-2"* ]] && legacy="Y" fi -if [[ "$isXP" == [Yy1]* ]]; then +if [[ "$legacy" == [Yy1]* ]]; then [[ "$DHCP" == [Yy1]* ]] && return 0 # Enable NetBIOS on Windows XP ! nmbd && nmbd --debug-stdout