mirror of
https://github.com/dockur/windows.git
synced 2026-08-03 12:37:20 +01:00
feat: Added support for Reactos (#1999)
This commit is contained in:
+25
-6
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -763,7 +781,8 @@ setMachine() {
|
||||
|
||||
case "${id,,}" in
|
||||
|
||||
"winxp"* | "win2003"* | "winvistax86"* | "win7x86"* | "win2008r2x86"* )
|
||||
"winxp"* | "win2003"* | "winvistax86"* | \
|
||||
"win7x86"* | "win2008r2x86"* | "reactos")
|
||||
|
||||
if isQ35 "${MACHINE:-q35}"; then
|
||||
|
||||
|
||||
Reference in New Issue
Block a user