mirror of
https://github.com/dockur/windows.git
synced 2026-05-18 19:27:56 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b4404db6b | |||
| 2412a3ed18 | |||
| 8c57b119cf |
+14
-13
@@ -24,7 +24,9 @@ parseVersion() {
|
|||||||
VERSION="${VERSION:1:-1}"
|
VERSION="${VERSION:1:-1}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$VERSION" ] && VERSION=$(expr "$VERSION" : "^\ *\(.*[^ ]\)\ *$")
|
VERSION="${VERSION#"${VERSION%%[! ]*}"}"
|
||||||
|
VERSION="${VERSION%"${VERSION##*[! ]}"}"
|
||||||
|
|
||||||
[ -z "$VERSION" ] && VERSION="win11"
|
[ -z "$VERSION" ] && VERSION="win11"
|
||||||
|
|
||||||
case "${VERSION,,}" in
|
case "${VERSION,,}" in
|
||||||
@@ -376,9 +378,9 @@ getLanguage() {
|
|||||||
|
|
||||||
parseLanguage() {
|
parseLanguage() {
|
||||||
|
|
||||||
REGION="${REGION//_/-/}"
|
REGION="${REGION//_/-}"
|
||||||
KEYBOARD="${KEYBOARD//_/-/}"
|
KEYBOARD="${KEYBOARD//_/-}"
|
||||||
LANGUAGE="${LANGUAGE//_/-/}"
|
LANGUAGE="${LANGUAGE//_/-}"
|
||||||
|
|
||||||
[ -z "$LANGUAGE" ] && LANGUAGE="en"
|
[ -z "$LANGUAGE" ] && LANGUAGE="en"
|
||||||
|
|
||||||
@@ -1391,7 +1393,6 @@ prepareInstall() {
|
|||||||
|
|
||||||
local pid=""
|
local pid=""
|
||||||
local file=""
|
local file=""
|
||||||
local iso="$1"
|
|
||||||
local dir="$2"
|
local dir="$2"
|
||||||
local desc="$3"
|
local desc="$3"
|
||||||
local driver="$4"
|
local driver="$4"
|
||||||
@@ -1576,8 +1577,8 @@ prepareInstall() {
|
|||||||
[ -z "$WIDTH" ] && WIDTH="1280"
|
[ -z "$WIDTH" ] && WIDTH="1280"
|
||||||
[ -z "$HEIGHT" ] && HEIGHT="720"
|
[ -z "$HEIGHT" ] && HEIGHT="720"
|
||||||
|
|
||||||
XHEX=$(printf '%08x' "$WIDTH")
|
XHEX=$(printf '%x\n' "$WIDTH")
|
||||||
YHEX=$(printf '%08x' "$HEIGHT")
|
YHEX=$(printf '%x\n' "$HEIGHT")
|
||||||
|
|
||||||
local username=""
|
local username=""
|
||||||
local password=""
|
local password=""
|
||||||
@@ -1696,13 +1697,13 @@ prepareInstall() {
|
|||||||
echo ""
|
echo ""
|
||||||
echo "[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\{23A77BF7-ED96-40EC-AF06-9B1F4867732A}\0000]"
|
echo "[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\{23A77BF7-ED96-40EC-AF06-9B1F4867732A}\0000]"
|
||||||
echo "\"DefaultSettings.BitsPerPel\"=dword:00000020"
|
echo "\"DefaultSettings.BitsPerPel\"=dword:00000020"
|
||||||
echo "\"DefaultSettings.XResolution\"=dword:$XHEX"
|
echo "\"DefaultSettings.XResolution\"=dword:00000$XHEX"
|
||||||
echo "\"DefaultSettings.YResolution\"=dword:$YHEX"
|
echo "\"DefaultSettings.YResolution\"=dword:00000$YHEX"
|
||||||
echo ""
|
echo ""
|
||||||
echo "[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\{23A77BF7-ED96-40EC-AF06-9B1F4867732A}\0000]"
|
echo "[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\{23A77BF7-ED96-40EC-AF06-9B1F4867732A}\0000]"
|
||||||
echo "\"DefaultSettings.BitsPerPel\"=dword:00000020"
|
echo "\"DefaultSettings.BitsPerPel\"=dword:00000020"
|
||||||
echo "\"DefaultSettings.XResolution\"=dword:$XHEX"
|
echo "\"DefaultSettings.XResolution\"=dword:00000$XHEX"
|
||||||
echo "\"DefaultSettings.YResolution\"=dword:$YHEX"
|
echo "\"DefaultSettings.YResolution\"=dword:00000$YHEX"
|
||||||
echo ""
|
echo ""
|
||||||
echo "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce]"
|
echo "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce]"
|
||||||
echo "\"ScreenSaver\"=\"reg add \\\"HKCU\\\\Control Panel\\\\Desktop\\\" /f /v \\\"SCRNSAVE.EXE\\\" /t REG_SZ /d \\\"off\\\"\""
|
echo "\"ScreenSaver\"=\"reg add \\\"HKCU\\\\Control Panel\\\\Desktop\\\" /f /v \\\"SCRNSAVE.EXE\\\" /t REG_SZ /d \\\"off\\\"\""
|
||||||
@@ -1723,7 +1724,7 @@ prepareInstall() {
|
|||||||
echo "@=dword:00000000"
|
echo "@=dword:00000000"
|
||||||
echo ""
|
echo ""
|
||||||
echo "[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ServerOOBE\SecurityOOBE]"
|
echo "[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ServerOOBE\SecurityOOBE]"
|
||||||
echo "\"DontLaunchSecurityOOBE\"=dword:00000001"
|
echo "\"DontLaunchSecurityOOBE\"=dword:00000000"
|
||||||
echo ""
|
echo ""
|
||||||
} | unix2dos >> "$dir/\$OEM\$/install.reg"
|
} | unix2dos >> "$dir/\$OEM\$/install.reg"
|
||||||
fi
|
fi
|
||||||
@@ -1861,7 +1862,7 @@ detectLegacy() {
|
|||||||
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51IB -print -quit)
|
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51IB -print -quit)
|
||||||
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51ID -print -quit)
|
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51ID -print -quit)
|
||||||
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51IL -print -quit)
|
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51IL -print -quit)
|
||||||
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51IE -print -quit)
|
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51AA -print -quit)
|
||||||
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51AD -print -quit)
|
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51AD -print -quit)
|
||||||
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51AS -print -quit)
|
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51AS -print -quit)
|
||||||
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51MA -print -quit)
|
[ -z "$find" ] && find=$(find "$dir" -maxdepth 1 -type f -iname WIN51MA -print -quit)
|
||||||
|
|||||||
+5
-5
@@ -379,8 +379,8 @@ extractESD() {
|
|||||||
local version="$3"
|
local version="$3"
|
||||||
local desc="$4"
|
local desc="$4"
|
||||||
local size size_gb sizes space space_gb
|
local size size_gb sizes space space_gb
|
||||||
local total total1 total2 total3 total4
|
local retVal total total1 total2 total3 total4
|
||||||
local retVal imageIndex links links1 links2 links3 links4
|
local imageIndex links links1 links2 links3 links4
|
||||||
|
|
||||||
local msg="Extracting $desc bootdisk"
|
local msg="Extracting $desc bootdisk"
|
||||||
info "$msg..." && html "$msg..."
|
info "$msg..." && html "$msg..."
|
||||||
@@ -1218,11 +1218,11 @@ buildImage() {
|
|||||||
error "Failed to build image!" && return 1
|
error "Failed to build image!" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local log_content=""
|
local err=""
|
||||||
local hide="Warning: creating filesystem that does not conform to ISO-9660."
|
local hide="Warning: creating filesystem that does not conform to ISO-9660."
|
||||||
|
|
||||||
[ -s "$log" ] && log_content="$(<"$log")"
|
[ -s "$log" ] && err="$(<"$log")"
|
||||||
[[ "$log_content" != "$hide" ]] && echo "$log_content"
|
[[ "$err" != "$hide" ]] && echo "$err"
|
||||||
|
|
||||||
mv -f "$out" "$BOOT" || return 1
|
mv -f "$out" "$BOOT" || return 1
|
||||||
! setOwner "$BOOT" && error "Failed to set the owner for \"$BOOT\" !"
|
! setOwner "$BOOT" && error "Failed to set the owner for \"$BOOT\" !"
|
||||||
|
|||||||
+2
-1
@@ -49,7 +49,7 @@ handle_curl_error() {
|
|||||||
|
|
||||||
get_agent() {
|
get_agent() {
|
||||||
|
|
||||||
local user_agent
|
local browser_version
|
||||||
|
|
||||||
# Determine approximate latest Firefox release
|
# Determine approximate latest Firefox release
|
||||||
browser_version="$((124 + ($(date +%s) - 1710892800) / 2419200))"
|
browser_version="$((124 + ($(date +%s) - 1710892800) / 2419200))"
|
||||||
@@ -273,6 +273,7 @@ download_windows_eval() {
|
|||||||
culture=$(getLanguage "$lang" "culture")
|
culture=$(getLanguage "$lang" "culture")
|
||||||
|
|
||||||
local country="${culture#*-}"
|
local country="${culture#*-}"
|
||||||
|
local iso_download_links=""
|
||||||
local iso_download_page_html=""
|
local iso_download_page_html=""
|
||||||
local url="https://www.microsoft.com/en-us/evalcenter/download-$windows_version"
|
local url="https://www.microsoft.com/en-us/evalcenter/download-$windows_version"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -97,7 +97,7 @@ finish() {
|
|||||||
# Workaround for zombie pid
|
# Workaround for zombie pid
|
||||||
[ ! -s "$QEMU_PID" ] && break
|
[ ! -s "$QEMU_PID" ] && break
|
||||||
|
|
||||||
if [ "$cnt" == "5" ]; then
|
if [ "$cnt" -eq 5 ]; then
|
||||||
echo && error "QEMU did not terminate itself, forcefully killing process..."
|
echo && error "QEMU did not terminate itself, forcefully killing process..."
|
||||||
{ kill -9 "$pid" || true; } 2>/dev/null
|
{ kill -9 "$pid" || true; } 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user