Skip to content

Commit

Permalink
feat: Added support for Windows 7 x86 (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored May 16, 2024
1 parent fb690f2 commit b057366
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 0 additions & 1 deletion src/define.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions src/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/samba.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b057366

Please sign in to comment.