mirror of
https://github.com/dockur/windows.git
synced 2025-06-23 16:07:47 +00:00
Compare commits
No commits in common. "80dead14461b0fb0e4b373ba2234164bba0c0e3a" and "80c5ba2231eadfa39a51ada9b1e7bb3e95e41d18" have entirely different histories.
80dead1446
...
80c5ba2231
@ -1,5 +1,5 @@
|
|||||||
FROM scratch AS build-amd64
|
FROM scratch AS build-amd64
|
||||||
COPY --from=qemux/qemu-docker:6.06 / /
|
COPY --from=qemux/qemu-docker:6.05 / /
|
||||||
|
|
||||||
ARG VERSION_ARG="0.0"
|
ARG VERSION_ARG="0.0"
|
||||||
ARG DEBCONF_NOWARNINGS="yes"
|
ARG DEBCONF_NOWARNINGS="yes"
|
||||||
|
@ -2106,35 +2106,39 @@ setMachine() {
|
|||||||
local dir="$3"
|
local dir="$3"
|
||||||
local desc="$4"
|
local desc="$4"
|
||||||
|
|
||||||
|
case "${id,,}" in
|
||||||
|
"win9"* | "win2k"* )
|
||||||
|
MACHINE="pc-i440fx-2.4" ;;
|
||||||
|
"winxp"* | "win2003"* | "winvistax86"* | "win7x86"* )
|
||||||
|
MACHINE="pc-q35-2.10" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "${id,,}" in
|
||||||
|
"win9"* | "win2k"* | "winxp"* | "win2003"* )
|
||||||
|
BOOT_MODE="windows_legacy" ;;
|
||||||
|
"winvista"* | "win7"* | "win2008"* )
|
||||||
|
BOOT_MODE="windows_legacy" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
case "${id,,}" in
|
case "${id,,}" in
|
||||||
"win9"* )
|
"win9"* )
|
||||||
|
DISK_TYPE="auto"
|
||||||
ETFS="[BOOT]/Boot-1.44M.img" ;;
|
ETFS="[BOOT]/Boot-1.44M.img" ;;
|
||||||
"win2k"* )
|
"win2k"* )
|
||||||
|
DISK_TYPE="auto"
|
||||||
ETFS="[BOOT]/Boot-NoEmul.img" ;;
|
ETFS="[BOOT]/Boot-NoEmul.img" ;;
|
||||||
"winxp"* )
|
"winxp"* )
|
||||||
|
DISK_TYPE="blk"
|
||||||
if ! prepareXP "$iso" "$dir" "$desc"; then
|
if ! prepareXP "$iso" "$dir" "$desc"; then
|
||||||
error "Failed to prepare $desc ISO!" && return 1
|
error "Failed to prepare $desc ISO!" && return 1
|
||||||
fi ;;
|
fi ;;
|
||||||
"win2003"* )
|
"win2003"* )
|
||||||
|
DISK_TYPE="blk"
|
||||||
if ! prepare2k3 "$iso" "$dir" "$desc"; then
|
if ! prepare2k3 "$iso" "$dir" "$desc"; then
|
||||||
error "Failed to prepare $desc ISO!" && return 1
|
error "Failed to prepare $desc ISO!" && return 1
|
||||||
fi ;;
|
fi ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "${id,,}" in
|
|
||||||
"win9"* | "win2k"* )
|
|
||||||
DISK_TYPE="auto"
|
|
||||||
MACHINE="pc-i440fx-2.4"
|
|
||||||
BOOT_MODE="windows_legacy" ;;
|
|
||||||
"winxp"* | "win2003"* )
|
|
||||||
DISK_TYPE="blk"
|
|
||||||
BOOT_MODE="windows_legacy"
|
|
||||||
# Prevent bluescreen if 64 bit PCI hole size is >2G.
|
|
||||||
ARGS="-global q35-pcihost.x-pci-hole64-fix=false" ;;
|
|
||||||
"winvista"* | "win7"* | "win2008"* )
|
|
||||||
BOOT_MODE="windows_legacy" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,6 @@ finishInstall() {
|
|||||||
|
|
||||||
rm -f "$STORAGE/windows.old"
|
rm -f "$STORAGE/windows.old"
|
||||||
rm -f "$STORAGE/windows.vga"
|
rm -f "$STORAGE/windows.vga"
|
||||||
rm -f "$STORAGE/windows.args"
|
|
||||||
rm -f "$STORAGE/windows.base"
|
rm -f "$STORAGE/windows.base"
|
||||||
rm -f "$STORAGE/windows.boot"
|
rm -f "$STORAGE/windows.boot"
|
||||||
rm -f "$STORAGE/windows.mode"
|
rm -f "$STORAGE/windows.mode"
|
||||||
@ -157,11 +156,6 @@ finishInstall() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${ARGS:-}" ]; then
|
|
||||||
ARGUMENTS="$ARGS ${ARGUMENTS:-}"
|
|
||||||
echo "$ARGS" > "$STORAGE/windows.args"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${DISK_TYPE:-}" ] && [[ "${DISK_TYPE:-}" != "scsi" ]]; then
|
if [ -n "${DISK_TYPE:-}" ] && [[ "${DISK_TYPE:-}" != "scsi" ]]; then
|
||||||
echo "$DISK_TYPE" > "$STORAGE/windows.type"
|
echo "$DISK_TYPE" > "$STORAGE/windows.type"
|
||||||
fi
|
fi
|
||||||
@ -971,11 +965,6 @@ bootWindows() {
|
|||||||
|
|
||||||
rm -rf "$TMP"
|
rm -rf "$TMP"
|
||||||
|
|
||||||
if [ -f "$STORAGE/windows.args" ]; then
|
|
||||||
ARGS=$(<"$STORAGE/windows.args")
|
|
||||||
ARGUMENTS="$ARGS ${ARGUMENTS:-}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -s "$STORAGE/windows.type" ] && [ -f "$STORAGE/windows.type" ]; then
|
if [ -s "$STORAGE/windows.type" ] && [ -f "$STORAGE/windows.type" ]; then
|
||||||
[ -z "${DISK_TYPE:-}" ] && DISK_TYPE=$(<"$STORAGE/windows.type")
|
[ -z "${DISK_TYPE:-}" ] && DISK_TYPE=$(<"$STORAGE/windows.type")
|
||||||
fi
|
fi
|
||||||
|
12
src/samba.sh
12
src/samba.sh
@ -94,8 +94,16 @@ if ! smbd; then
|
|||||||
smbd -i --debug-stdout || true
|
smbd -i --debug-stdout || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then
|
legacy=""
|
||||||
# Enable NetBIOS on Windows 7 and lower
|
|
||||||
|
if [ -f "$STORAGE/windows.old" ]; then
|
||||||
|
MT=$(<"$STORAGE/windows.old")
|
||||||
|
[[ "${MT,,}" == "pc-q35-2"* ]] && legacy="y"
|
||||||
|
[[ "${MT,,}" == "pc-i440fx-2"* ]] && legacy="y"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$legacy" ]; then
|
||||||
|
# Enable NetBIOS on Windows XP and lower
|
||||||
if ! nmbd; then
|
if ! nmbd; then
|
||||||
error "NetBIOS daemon failed to start!"
|
error "NetBIOS daemon failed to start!"
|
||||||
nmbd -i --debug-stdout || true
|
nmbd -i --debug-stdout || true
|
||||||
|
Loading…
Reference in New Issue
Block a user