Compare commits

..

2 Commits

Author SHA1 Message Date
renovate[bot] 3735a26629 chore(deps): update hadolint/hadolint-action action to v3.5.0 2026-08-25 01:35:50 +00:00
Kroese cf3772768e feat: Reduce XP and 2003 recovery menu timeout (#2187) 2026-08-25 03:35:29 +02:00
3 changed files with 36 additions and 50 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
-e SC2317 -e SC2317
- -
name: Lint Dockerfile name: Lint Dockerfile
uses: hadolint/hadolint-action@v3.4.0 uses: hadolint/hadolint-action@v3.5.0
with: with:
dockerfile: Dockerfile dockerfile: Dockerfile
ignore: DL3006,DL3008,DL3067 ignore: DL3006,DL3008,DL3067
-3
View File
@@ -31,9 +31,6 @@ setMachine() {
"winnt4" ) "winnt4" )
writeState "vga" "cirrus" || return 1 ;; writeState "vga" "cirrus" || return 1 ;;
"win2k"* | "winxp"* | "win2003"* )
writeState "vga" "vmware" || return 1 ;;
*) writeState "vga" "std" || return 1 ;; *) writeState "vga" "std" || return 1 ;;
esac esac
+35 -46
View File
@@ -46,14 +46,9 @@ SIFInstall() {
"2k" ) "2k" )
# Windows 2000 keeps its existing storage/network path, but still needs # Windows 2000 keeps its existing storage/network path, but still needs
# its display driver packages staged for Plug and Play setup. # the QBochs display package staged for Plug and Play setup.
extractDrivers "$drivers" || return 1 extractDrivers "$drivers" || return 1
if ! addVMSVGADriver "$dir" "$driver" "$arch" "$drivers"; then
rm -rf "$drivers" || :
return 1
fi
if ! addDisplayDriver "$dir" "$driver" "$arch" "$drivers"; then if ! addDisplayDriver "$dir" "$driver" "$arch" "$drivers"; then
rm -rf "$drivers" || : rm -rf "$drivers" || :
return 1 return 1
@@ -188,7 +183,6 @@ addLegacyDrivers() {
copyStorageDriver "$dir" "$target" "$driver" "$arch" "$drivers" || return 1 copyStorageDriver "$dir" "$target" "$driver" "$arch" "$drivers" || return 1
addNetworkDriver "$dir" "$driver" "$arch" "$drivers" || return 1 addNetworkDriver "$dir" "$driver" "$arch" "$drivers" || return 1
addQXLDriver "$dir" "$driver" "$arch" "$drivers" || return 1 addQXLDriver "$dir" "$driver" "$arch" "$drivers" || return 1
addVMSVGADriver "$dir" "$driver" "$arch" "$drivers" || return 1
addDisplayDriver "$dir" "$driver" "$arch" "$drivers" || return 1 addDisplayDriver "$dir" "$driver" "$arch" "$drivers" || return 1
disableGenericDisplay "$target" "$driver" "$arch" "$drivers" || return 1 disableGenericDisplay "$target" "$driver" "$arch" "$drivers" || return 1
addBalloonDriver "$dir" "$driver" "$arch" "$drivers" || return 1 addBalloonDriver "$dir" "$driver" "$arch" "$drivers" || return 1
@@ -293,44 +287,6 @@ addQXLDriver() {
return 0 return 0
} }
addVMSVGADriver() {
local dir="$1"
local driver="$2"
local arch="$3"
local drivers="$4"
local vmsvga_arch="$arch"
[[ "${vmsvga_arch,,}" == "amd64" ]] && vmsvga_arch="x64"
local source="$drivers/vmsvga/$driver/$vmsvga_arch"
local destination="$dir/\$OEM\$/\$1/Drivers/VMSVGA"
if [ ! -d "$source" ]; then
error "Failed to locate required VMware SVGA display driver directory: $source"
return 1
fi
local files="vmx_svgaver.dll vmx_svga.cat vmx_mode.dll vmx_svga.sys vmwogl32.dll vmx_fb.dll vmx_svga.inf"
[[ "$vmsvga_arch" == "x64" ]] && files+=" vmwogl64.dll"
local file
for file in $files; do
if [ ! -f "$source/$file" ]; then
error "Failed to locate required VMware SVGA display driver file: $file"
return 1
fi
done
mkdir -p "$destination" || return 1
cp -Lr "$source/." "$destination" || return 1
return 0
}
addDisplayDriver() { addDisplayDriver() {
local dir="$1" local dir="$1"
@@ -815,7 +771,7 @@ writeSIF() {
' WaitForReboot="No"' \ ' WaitForReboot="No"' \
' DriverSigningPolicy="Ignore"' \ ' DriverSigningPolicy="Ignore"' \
' NonDriverSigningPolicy="Ignore"' \ ' NonDriverSigningPolicy="Ignore"' \
' OemPnPDriversPath="Drivers\viostor;Drivers\NetKVM;Drivers\sata;Drivers\QXL;Drivers\VMSVGA;Drivers\QBochs;Drivers\Balloon"' \ ' OemPnPDriversPath="Drivers\viostor;Drivers\NetKVM;Drivers\sata;Drivers\QXL;Drivers\QBochs;Drivers\Balloon"' \
' NoWaitAfterTextMode=1' \ ' NoWaitAfterTextMode=1' \
' NoWaitAfterGUIMode=1' \ ' NoWaitAfterGUIMode=1' \
' FileSystem=ConvertNTFS' \ ' FileSystem=ConvertNTFS' \
@@ -1121,6 +1077,39 @@ writeVBS() {
} | unix2dos > "$dir/\$OEM\$/install.vbs" || return 1 } | unix2dos > "$dir/\$OEM\$/install.vbs" || return 1
if [[ "$driver" == "xp" || "$driver" == "2k3" ]]; then if [[ "$driver" == "xp" || "$driver" == "2k3" ]]; then
# Windows XP and Server 2003 store the automatic recovery menu timeout
# in byte 0x09 of bootstat.dat. Patch only that byte and leave the boot
# success/shutdown state in the rest of the file untouched.
{
printf '%s\n' \
'On Error Resume Next' \
'BootStatPath = WshShell.ExpandEnvironmentStrings("%SystemRoot%\bootstat.dat")' \
'Set BootStatStream = WScript.CreateObject("ADODB.Stream")' \
'Set BootStatXML = WScript.CreateObject("Msxml2.DOMDocument.3.0")' \
'Set BootStatByte = BootStatXML.CreateElement("byte")' \
'BootStatByte.DataType = "bin.base64"' \
'BootStatByte.Text = "Aw=="' \
'If IsObject(BootStatStream) And IsObject(BootStatByte) Then' \
' BootStatStream.Type = 1' \
' BootStatStream.Open' \
' Err.Clear' \
' BootStatStream.LoadFromFile BootStatPath' \
' If Err.Number = 0 Then' \
' If BootStatStream.Size > 9 Then' \
' BootStatStream.Position = 9' \
' BootStatStream.Write BootStatByte.NodeTypedValue' \
' BootStatStream.SaveToFile BootStatPath, 2' \
' End If' \
' End If' \
' BootStatStream.Close' \
'End If' \
'Set BootStatByte = Nothing' \
'Set BootStatXML = Nothing' \
'Set BootStatStream = Nothing' \
'On Error GoTo 0' \
''
} | unix2dos >> "$dir/\$OEM\$/install.vbs" || return 1
mkdir -p "$(dirname "$power")" || return 1 mkdir -p "$(dirname "$power")" || return 1
{ {