mirror of
https://github.com/dockur/windows.git
synced 2026-08-25 08:09:04 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3735a26629 | |||
| cf3772768e |
@@ -26,7 +26,7 @@ jobs:
|
||||
-e SC2317
|
||||
-
|
||||
name: Lint Dockerfile
|
||||
uses: hadolint/hadolint-action@v3.4.0
|
||||
uses: hadolint/hadolint-action@v3.5.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
ignore: DL3006,DL3008,DL3067
|
||||
|
||||
@@ -31,9 +31,6 @@ setMachine() {
|
||||
"winnt4" )
|
||||
writeState "vga" "cirrus" || return 1 ;;
|
||||
|
||||
"win2k"* | "winxp"* | "win2003"* )
|
||||
writeState "vga" "vmware" || return 1 ;;
|
||||
|
||||
*) writeState "vga" "std" || return 1 ;;
|
||||
|
||||
esac
|
||||
|
||||
+35
-46
@@ -46,14 +46,9 @@ SIFInstall() {
|
||||
|
||||
"2k" )
|
||||
# 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
|
||||
|
||||
if ! addVMSVGADriver "$dir" "$driver" "$arch" "$drivers"; then
|
||||
rm -rf "$drivers" || :
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! addDisplayDriver "$dir" "$driver" "$arch" "$drivers"; then
|
||||
rm -rf "$drivers" || :
|
||||
return 1
|
||||
@@ -188,7 +183,6 @@ addLegacyDrivers() {
|
||||
copyStorageDriver "$dir" "$target" "$driver" "$arch" "$drivers" || return 1
|
||||
addNetworkDriver "$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
|
||||
disableGenericDisplay "$target" "$driver" "$arch" "$drivers" || return 1
|
||||
addBalloonDriver "$dir" "$driver" "$arch" "$drivers" || return 1
|
||||
@@ -293,44 +287,6 @@ addQXLDriver() {
|
||||
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() {
|
||||
|
||||
local dir="$1"
|
||||
@@ -815,7 +771,7 @@ writeSIF() {
|
||||
' WaitForReboot="No"' \
|
||||
' DriverSigningPolicy="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' \
|
||||
' NoWaitAfterGUIMode=1' \
|
||||
' FileSystem=ConvertNTFS' \
|
||||
@@ -1121,6 +1077,39 @@ writeVBS() {
|
||||
} | unix2dos > "$dir/\$OEM\$/install.vbs" || return 1
|
||||
|
||||
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
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user