Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
| `2008` | Windows Server 2008 | 3.0 GB |
| `2003` | Windows Server 2003 | 0.6 GB |
||||
| `core11` | Tiny11 Core | 3.0 GB |
| `tiny11` | Tiny11 | 5.3 GB |
| `tiny10` | Tiny10 | 3.6 GB |
| `core11` | Tiny11 Core | 3.0 GB |
| `tiny11` | Tiny11 | 5.3 GB |
| `tiny10` | Tiny10 | 3.6 GB |
| `reactos` | Reactos | 0.03 GB |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `reactos` | Reactos | 0.03 GB |
| `reactos` | ReactOS | 0.03 GB |


> [!TIP]
> To install ARM64 versions of Windows use [dockur/windows-arm](https://github.com/dockur/windows-arm/).
Expand Down
37 changes: 36 additions & 1 deletion src/define.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ SERVER_EDITION_ORDER=(
"-hv|hv|hv hv-*"
)

MIRRORS=3
MIRRORS=4

parseVersion() {

Expand Down Expand Up @@ -184,6 +184,9 @@ parseVersion() {
"tiny10" | "tiny 10" )
VERSION="tiny10"
;;
"reactos" | "react os" )
VERSION="reactos"
;;
esac

SUGGEST=$(getSuggestedVersion "$VERSION")
Expand Down Expand Up @@ -483,6 +486,7 @@ printVersion() {
"tiny11"* ) desc="Tiny 11" ;;
"tiny10"* ) desc="Tiny 10" ;;
"core11"* ) desc="Core 11" ;;
"reactos"* ) desc="Reactos" ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"reactos"* ) desc="Reactos" ;;
"reactos"* ) desc="ReactOS" ;;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@binarymaster Thanks! It is now fixed

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

"win7"* ) desc="Windows 7" ;;
"win8"* ) desc="Windows 8" ;;
"win10"* ) desc="Windows 10" ;;
Expand Down Expand Up @@ -690,6 +694,8 @@ fromFile() {
id="tiny11" ;;
"tiny10"* | "tiny_10"* )
id="tiny10" ;;
"reactos"* )
id="reactos" ;;
*"_serverhypercore_"* )
id="win2019${add}-hv" ;;
*"server2025"* | *"server_2025"* )
Expand Down Expand Up @@ -1299,6 +1305,35 @@ getLink2() {

getLink3() {

local id="$1"
local lang="$2"
local ret="$3"
local url=""
local sum=""
local size=""
local host="https://iso.reactos.org"

[[ "${lang,,}" != "en" && "${lang,,}" != "en-us" ]] && return 0

case "${id,,}" in
"reactos" )
size=0
sum=""
url="livecd/latest-x86-gcc-lin-rel"
;;
esac

case "${ret,,}" in
"sum" ) echo "$sum" ;;
"size" ) echo "$size" ;;
*) [ -n "$url" ] && echo "$host/$url";;
esac

return 0
}

getLink4() {

local id="$1"
local lang="$2"
local ret="$3"
Expand Down
22 changes: 20 additions & 2 deletions src/image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ skipVersion() {
local id="$1"

case "${id,,}" in
"win9"* | "winxp"* | "win2k"* | "win2003"* )
"win9"* | "winxp"* | "win2k"* | "win2003"* | "reactos" )
return 0 ;;
esac

Expand Down Expand Up @@ -624,6 +624,24 @@ detectLegacy() {
return 1
}

detectReactOS() {

local dir="$1"
local marker

marker=$(find "$dir" -maxdepth 2 -type f \
\( \
-ipath '*/reactos/reactos.inf' -o \
-ipath '*/reactos/unattend.inf' \
\) \
-print -quit) || return 1

[ -n "$marker" ] || return 1

DETECTED="reactos"
return 0
}

resolveImage() {

local version="$1"
Expand Down Expand Up @@ -821,7 +839,7 @@ detectImage() {

info "Detecting version from ISO image..."

if detectLegacy "$dir"; then
if detectLegacy "$dir" || detectReactOS "$dir"; then
desc=$(printEdition "$DETECTED" "$DETECTED" "Y") || return 1
info "Detected: $desc"
return 0
Expand Down
31 changes: 25 additions & 6 deletions src/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,8 @@ extractImage() {

size=$(stat -c%s "$iso")

if (( size < 100000000 )); then
error "Invalid ISO file: Size is smaller than 100 MB" && return 1
if (( size < 10000000 )); then
error "Invalid ISO file: Size is smaller than 10 MB" && return 1
fi

checkFreeSpace "$dir" "$size" || return 1
Expand Down Expand Up @@ -684,15 +684,23 @@ extractImage() {
file=$(find "$dir" -maxdepth 1 -type f -iname "*.iso" -print -quit)

if [ -z "$file" ]; then
error "Failed to find any .iso file in archive!" && return 1
error "Failed to find any .iso file in archive!"
return 1
fi

if ! 7z x "$file" -o"$dir" > /dev/null; then
error "Failed to extract archive!" && return 1
error "Failed to extract archive!"
return 1
fi

LABEL=$(isoinfo -d -i "$file" | sed -n 's/Volume id: //p') || LABEL=""
rm -f "$file" || warn "Failed to remove temporary ISO file: $file"

if ! mv -f -- "$file" "$iso"; then
error "Failed to preserve extracted ISO file: $file"
return 1
fi

UNPACK=""

fi

Expand Down Expand Up @@ -750,6 +758,16 @@ setMachine() {
"winvista"* | "win7"* | "win2008"* )
BOOT_MODE="windows_legacy" ;;

"reactos" )
VGA="cirrus"
MACHINE="pc"
REMOVE="N"
REBUILD="N"
USB="pci-ohci"
DISK_TYPE="auto"
BOOT_MODE="windows_legacy"
[ -z "${ADAPTER:-}" ] && ADAPTER="rtl8139" ;;

esac

case "${id,,}" in
Expand All @@ -763,7 +781,8 @@ setMachine() {

case "${id,,}" in

"winxp"* | "win2003"* | "winvistax86"* | "win7x86"* | "win2008r2x86"* )
"winxp"* | "win2003"* | "winvistax86"* | \
"win7x86"* | "win2008r2x86"* | "reactos")

if isQ35 "${MACHINE:-q35}"; then

Expand Down
18 changes: 12 additions & 6 deletions src/mido.sh
Original file line number Diff line number Diff line change
Expand Up @@ -841,11 +841,13 @@ getESD() {

isCompressed() {

local file="$1"
local url="${1%%\?*}"

case "${file,,}" in
*".7z" | *".zip" | *".rar" | *".lzma" | *".bz" | *".bz2" )
return 0 ;;
case "${url,,}" in
*.7z | *.zip | *.rar | *.tar | *.cab | *.cpio | \
*.lzh | *.lha | *.xar | */latest-x86-gcc-lin-rel )
return 0
;;
esac

return 1
Expand Down Expand Up @@ -950,14 +952,18 @@ tryDownload() {
local desc="$6"
local seconds="$7"
local web_desc="$8"
local total
local total minimum="104857600"

if isCompressed "$url"; then
minimum="10485760"
fi

if downloadRetry \
"$iso" \
"${CONNECTIONS:-1}" \
"$seconds" \
"$desc" \
"100000000" \
"$minimum" \
"$iso" \
"$url" \
"$size" \
Expand Down
38 changes: 29 additions & 9 deletions src/power.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,23 @@ boot() {

legacyBootReady() {

local last
local bios="Booting from Hard"
local line last recent
local hard="Booting from Hard"
local cdrom="Booting from DVD/CD"

line=$(grep -n "^Booting.*" "$QEMU_PTY" | tail -1)
[ -z "$line" ] && return 1

last="${line#*:}"
recent=$(tail -n +"${line%%:*}" "$QEMU_PTY")

[[ "${last,,}" != "${hard,,}"* ]] && return 1

last=$(grep "^Booting.*" "$QEMU_PTY" | tail -1)
[[ "${last,,}" != "${bios,,}"* ]] && return 1
grep -Fq "No bootable device." "$QEMU_PTY" && return 1
grep -Fq "BOOTMGR is missing" "$QEMU_PTY" && return 1
grep -Fq "Loading FreeLoader..." <<< "$recent" && return 0
grep -Fq "No bootable device." <<< "$recent" && return 1
grep -Fq "BOOTMGR is missing" <<< "$recent" && return 1
grep -Fq "Boot failed: not a bootable disk" <<< "$recent" && return 1
grep -Fq "Boot failed: could not read the boot disk" <<< "$recent" && return 1

return 0
}
Expand All @@ -75,8 +85,14 @@ ready() {
return 1
fi

local line="\"Windows Boot Manager\""
grep -Fq "$line" "$QEMU_PTY" && return 0
local last
last=$(grep -E \
'BdsDxe: starting Boot[[:xdigit:]]{4} ' \
"$QEMU_PTY" | tail -1)

grep -Eq \
'BdsDxe: starting Boot[[:xdigit:]]{4} "Windows Boot Manager" from HD\(' \
<<< "$last" && return 0

return 1
}
Expand Down Expand Up @@ -150,7 +166,11 @@ abortDuringSetup() {

local code="$1"

info "Cannot send ACPI signal during $(app) setup, aborting..."
if [[ "${DETECTED,,}" != "reactos" ]] || [ -n "${CUSTOM:-}" ]; then
info "Cannot send ACPI signal during $(app) setup, aborting..."
else
info "ReactOS LiveCD does not support ACPI shutdown, terminating..."
fi

terminateQemu

Expand Down