mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 11:25:49 +00:00
Compare commits
6 commits
22235bf48e
...
1ebb4c8d58
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ebb4c8d58 | ||
|
|
e3dc889601 | ||
|
|
22511b16ae | ||
|
|
d0ac685a81 | ||
|
|
36e69fba72 | ||
|
|
2983b2b677 |
5 changed files with 105 additions and 76 deletions
|
|
@ -5,6 +5,7 @@ FROM scratch AS build-amd64
|
||||||
|
|
||||||
COPY --from=qemux/qemu:7.12 / /
|
COPY --from=qemux/qemu:7.12 / /
|
||||||
|
|
||||||
|
ARG TARGETARCH
|
||||||
ARG DEBCONF_NOWARNINGS="yes"
|
ARG DEBCONF_NOWARNINGS="yes"
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
ARG DEBCONF_NONINTERACTIVE_SEEN="true"
|
ARG DEBCONF_NONINTERACTIVE_SEEN="true"
|
||||||
|
|
@ -17,9 +18,8 @@ RUN set -eu && \
|
||||||
dos2unix \
|
dos2unix \
|
||||||
cabextract \
|
cabextract \
|
||||||
libxml2-utils \
|
libxml2-utils \
|
||||||
libarchive-tools \
|
libarchive-tools && \
|
||||||
netcat-openbsd && \
|
wget "https://github.com/gershnik/wsdd-native/releases/download/v1.21/wsddn_1.21_${TARGETARCH}.deb" -O /tmp/wsddn.deb -q && \
|
||||||
wget "https://github.com/gershnik/wsdd-native/releases/download/v1.21/wsddn_1.21_amd64.deb" -O /tmp/wsddn.deb -q && \
|
|
||||||
dpkg -i /tmp/wsddn.deb && \
|
dpkg -i /tmp/wsddn.deb && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `11` | Windows 11 Pro | 5.4 GB |
|
| `11` | Windows 11 Pro | 5.4 GB |
|
||||||
| `11l` | Windows 11 LTSC | 4.7 GB |
|
| `11l` | Windows 11 LTSC | 4.7 GB |
|
||||||
| `11e` | Windows 11 Enterprise | 4.0 GB |
|
| `11e` | Windows 11 Enterprise | 5.3 GB |
|
||||||
||||
|
||||
|
||||||
| `10` | Windows 10 Pro | 5.7 GB |
|
| `10` | Windows 10 Pro | 5.7 GB |
|
||||||
| `10l` | Windows 10 LTSC | 4.6 GB |
|
| `10l` | Windows 10 LTSC | 4.6 GB |
|
||||||
|
|
@ -107,8 +107,8 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||||
| `xp` | Windows XP Professional | 0.6 GB |
|
| `xp` | Windows XP Professional | 0.6 GB |
|
||||||
| `2k` | Windows 2000 Professional | 0.4 GB |
|
| `2k` | Windows 2000 Professional | 0.4 GB |
|
||||||
||||
|
||||
|
||||||
| `2025` | Windows Server 2025 | 5.6 GB |
|
| `2025` | Windows Server 2025 | 6.7 GB |
|
||||||
| `2022` | Windows Server 2022 | 4.7 GB |
|
| `2022` | Windows Server 2022 | 6.0 GB |
|
||||||
| `2019` | Windows Server 2019 | 5.3 GB |
|
| `2019` | Windows Server 2019 | 5.3 GB |
|
||||||
| `2016` | Windows Server 2016 | 6.5 GB |
|
| `2016` | Windows Server 2016 | 6.5 GB |
|
||||||
| `2012` | Windows Server 2012 | 4.3 GB |
|
| `2012` | Windows Server 2012 | 4.3 GB |
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,11 @@ parseVersion() {
|
||||||
"11e" | "win11e" | "windows11e" | "windows 11e" )
|
"11e" | "win11e" | "windows11e" | "windows 11e" )
|
||||||
VERSION="win11x64-enterprise-eval"
|
VERSION="win11x64-enterprise-eval"
|
||||||
;;
|
;;
|
||||||
"11i" | "11iot" | "iot11" | "win11i" | "win11-iot" | "win11x64-iot" | "win11x64-enterprise-iot-eval" )
|
"11i" | "11iot" | "iot11" | "win11i" | "win11-iot" | "win11x64-iot" )
|
||||||
VERSION="win11x64-enterprise-iot-eval"
|
VERSION="win11x64-enterprise-iot-eval"
|
||||||
[ -z "$DETECTED" ] && DETECTED="win11x64-iot"
|
[ -z "$DETECTED" ] && DETECTED="win11x64-iot"
|
||||||
;;
|
;;
|
||||||
"11l" | "11ltsc" | "ltsc11" | "win11l" | "win11-ltsc" | "win11x64-ltsc" | "win11x64-enterprise-ltsc-eval" )
|
"11l" | "11ltsc" | "ltsc11" | "win11l" | "win11-ltsc" | "win11x64-ltsc" )
|
||||||
VERSION="win11x64-enterprise-ltsc-eval"
|
VERSION="win11x64-enterprise-ltsc-eval"
|
||||||
[ -z "$DETECTED" ] && DETECTED="win11x64-ltsc"
|
[ -z "$DETECTED" ] && DETECTED="win11x64-ltsc"
|
||||||
;;
|
;;
|
||||||
|
|
@ -47,11 +47,11 @@ parseVersion() {
|
||||||
"10e" | "win10e" | "windows10e" | "windows 10e" )
|
"10e" | "win10e" | "windows10e" | "windows 10e" )
|
||||||
VERSION="win10x64-enterprise-eval"
|
VERSION="win10x64-enterprise-eval"
|
||||||
;;
|
;;
|
||||||
"10i" | "10iot" | "iot10" | "win10i" | "win10-iot" | "win10x64-iot" | "win10x64-enterprise-iot-eval" )
|
"10i" | "10iot" | "iot10" | "win10i" | "win10-iot" | "win10x64-iot" )
|
||||||
VERSION="win10x64-enterprise-iot-eval"
|
VERSION="win10x64-enterprise-iot-eval"
|
||||||
[ -z "$DETECTED" ] && DETECTED="win10x64-iot"
|
[ -z "$DETECTED" ] && DETECTED="win10x64-iot"
|
||||||
;;
|
;;
|
||||||
"10l" | "10ltsc" | "ltsc10" | "win10l" | "win10-ltsc" | "win10x64-ltsc" | "win10x64-enterprise-ltsc-eval" )
|
"10l" | "10ltsc" | "ltsc10" | "win10l" | "win10-ltsc" | "win10x64-ltsc" )
|
||||||
VERSION="win10x64-enterprise-ltsc-eval"
|
VERSION="win10x64-enterprise-ltsc-eval"
|
||||||
[ -z "$DETECTED" ] && DETECTED="win10x64-ltsc"
|
[ -z "$DETECTED" ] && DETECTED="win10x64-ltsc"
|
||||||
;;
|
;;
|
||||||
|
|
@ -693,26 +693,9 @@ switchEdition() {
|
||||||
|
|
||||||
local id="$1"
|
local id="$1"
|
||||||
|
|
||||||
case "${id,,}" in
|
if [[ "${id,,}" == *"-eval" ]]; then
|
||||||
"win11${PLATFORM,,}-enterprise-eval" )
|
[ -z "$DETECTED" ] && DETECTED="${id::-5}"
|
||||||
DETECTED="win11${PLATFORM,,}-enterprise"
|
fi
|
||||||
;;
|
|
||||||
"win10${PLATFORM,,}-enterprise-eval" )
|
|
||||||
DETECTED="win10${PLATFORM,,}-enterprise"
|
|
||||||
;;
|
|
||||||
"win81${PLATFORM,,}-enterprise-eval" )
|
|
||||||
DETECTED="win81${PLATFORM,,}-enterprise"
|
|
||||||
;;
|
|
||||||
"win7${PLATFORM,,}" | "win7${PLATFORM,,}-enterprise-eval" )
|
|
||||||
DETECTED="win7${PLATFORM,,}-enterprise"
|
|
||||||
;;
|
|
||||||
"win2025-eval" ) DETECTED="win2025" ;;
|
|
||||||
"win2022-eval" ) DETECTED="win2022" ;;
|
|
||||||
"win2019-eval" ) DETECTED="win2019" ;;
|
|
||||||
"win2016-eval" ) DETECTED="win2016" ;;
|
|
||||||
"win2012r2-eval" ) DETECTED="win2012r2" ;;
|
|
||||||
"win2008r2-eval" ) DETECTED="win2008r2" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
@ -734,8 +717,8 @@ getMido() {
|
||||||
sum="b56b911bf18a2ceaeb3904d87e7c770bdf92d3099599d61ac2497b91bf190b11"
|
sum="b56b911bf18a2ceaeb3904d87e7c770bdf92d3099599d61ac2497b91bf190b11"
|
||||||
;;
|
;;
|
||||||
"win11x64-enterprise-eval" )
|
"win11x64-enterprise-eval" )
|
||||||
size=4295096320
|
size=5387960320
|
||||||
sum="dad633276073f14f3e0373ef7e787569e216d54942ce522b39451c8f2d38ad43"
|
sum="755a90d43e826a74b9e1932a34788b898e028272439b777e5593dee8d53622ae"
|
||||||
url="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_CLIENTENTERPRISEEVAL_OEMRET_A64FRE_en-us.iso"
|
url="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_CLIENTENTERPRISEEVAL_OEMRET_A64FRE_en-us.iso"
|
||||||
;;
|
;;
|
||||||
"win11x64-enterprise-iot-eval" | "win11x64-enterprise-ltsc-eval" )
|
"win11x64-enterprise-iot-eval" | "win11x64-enterprise-ltsc-eval" )
|
||||||
|
|
@ -828,12 +811,12 @@ getLink1() {
|
||||||
sum="aa1ad990f930d907b7a34ea897abbb0dfbe47552ca8acc146f92e40381839e05"
|
sum="aa1ad990f930d907b7a34ea897abbb0dfbe47552ca8acc146f92e40381839e05"
|
||||||
url="11/en-us_windows_11_24h2_x64.iso"
|
url="11/en-us_windows_11_24h2_x64.iso"
|
||||||
;;
|
;;
|
||||||
"win11x64-iot" | "win11x64-enterprise-iot-eval" )
|
"win11x64-iot" | "win11x64-enterprise-iot" | "win11x64-enterprise-iot-eval" )
|
||||||
size=5144817664
|
size=5144817664
|
||||||
sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a"
|
sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a"
|
||||||
url="11/X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso"
|
url="11/X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso"
|
||||||
;;
|
;;
|
||||||
"win11x64-ltsc" | "win11x64-enterprise-ltsc-eval" )
|
"win11x64-ltsc" | "win11x64-enterprise-ltsc" | "win11x64-enterprise-ltsc-eval" )
|
||||||
size=5144817664
|
size=5144817664
|
||||||
sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a"
|
sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a"
|
||||||
url="11/X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso"
|
url="11/X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso"
|
||||||
|
|
@ -843,12 +826,12 @@ getLink1() {
|
||||||
sum="557871965263d0fd0a1ea50b5d0d0d7cb04a279148ca905c1c675c9bc0d5486c"
|
sum="557871965263d0fd0a1ea50b5d0d0d7cb04a279148ca905c1c675c9bc0d5486c"
|
||||||
url="10/en-us_windows_10_22h2_x64.iso"
|
url="10/en-us_windows_10_22h2_x64.iso"
|
||||||
;;
|
;;
|
||||||
"win10x64-iot" | "win10x64-enterprise-iot-eval" )
|
"win10x64-iot" | "win10x64-enterprise-iot" | "win10x64-enterprise-iot-eval" )
|
||||||
size=4851668992
|
size=4851668992
|
||||||
sum="a0334f31ea7a3e6932b9ad7206608248f0bd40698bfb8fc65f14fc5e4976c160"
|
sum="a0334f31ea7a3e6932b9ad7206608248f0bd40698bfb8fc65f14fc5e4976c160"
|
||||||
url="10/en-us_windows_10_iot_enterprise_ltsc_2021_x64_dvd_257ad90f.iso"
|
url="10/en-us_windows_10_iot_enterprise_ltsc_2021_x64_dvd_257ad90f.iso"
|
||||||
;;
|
;;
|
||||||
"win10x64-ltsc" | "win10x64-enterprise-ltsc-eval" )
|
"win10x64-ltsc" | "win10x64-enterprise-ltsc" | "win10x64-enterprise-ltsc-eval" )
|
||||||
size=4899461120
|
size=4899461120
|
||||||
sum="c90a6df8997bf49e56b9673982f3e80745058723a707aef8f22998ae6479597d"
|
sum="c90a6df8997bf49e56b9673982f3e80745058723a707aef8f22998ae6479597d"
|
||||||
url="10/en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso"
|
url="10/en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso"
|
||||||
|
|
@ -864,14 +847,14 @@ getLink1() {
|
||||||
url="8.x/8.1/en_windows_8.1_enterprise_with_update_x64_dvd_6054382.iso"
|
url="8.x/8.1/en_windows_8.1_enterprise_with_update_x64_dvd_6054382.iso"
|
||||||
;;
|
;;
|
||||||
"win2025" | "win2025-eval" )
|
"win2025" | "win2025-eval" )
|
||||||
size=5307176960
|
size=6786627584
|
||||||
sum="2293897341febdcea599f5412300b470b5288c6fd2b89666a7b27d283e8d3cf3"
|
sum="bf3ef0849c7cb5e818e1035b7466d206af5aa227ace1a3f4b0de2bf00d2e2144"
|
||||||
url="server/2025/en-us_windows_server_2025_preview_x64_dvd_ce9eb1a5.iso"
|
url="server/2025/en-us_windows_server_2025_updated_april_2025_x64_dvd_ea86301d.iso"
|
||||||
;;
|
;;
|
||||||
"win2022" | "win2022-eval" )
|
"win2022" | "win2022-eval" )
|
||||||
size=5365624832
|
size=6005706752
|
||||||
sum="c3c57bb2cf723973a7dcfb1a21e97dfa035753a7f111e348ad918bb64b3114db"
|
sum="cea2cb2c09de9910c236e64eae3a801c55e9c77ec25e8d81585e3a4581d24bfb"
|
||||||
url="server/2022/en-us_windows_server_2022_updated_jan_2024_x64_dvd_2b7a0c9f.iso"
|
url="server/2022/en-us_windows_server_2022_updated_april_2025_x64_dvd_3f755ec1.iso"
|
||||||
;;
|
;;
|
||||||
"win2019" | "win2019-eval" )
|
"win2019" | "win2019-eval" )
|
||||||
size=5575774208
|
size=5575774208
|
||||||
|
|
@ -1134,12 +1117,12 @@ getLink4() {
|
||||||
sum="c8dbc96b61d04c8b01faf6ce0794fdf33965c7b350eaa3eb1e6697019902945c"
|
sum="c8dbc96b61d04c8b01faf6ce0794fdf33965c7b350eaa3eb1e6697019902945c"
|
||||||
url="Windows11Enterprise23H2x64/22631.2428.231001-0608.23H2_NI_RELEASE_SVC_REFRESH_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso"
|
url="Windows11Enterprise23H2x64/22631.2428.231001-0608.23H2_NI_RELEASE_SVC_REFRESH_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso"
|
||||||
;;
|
;;
|
||||||
"win11x64-iot" | "win11x64-enterprise-iot-eval" )
|
"win11x64-iot" | "win11x64-enterprise-iot" | "win11x64-enterprise-iot-eval" )
|
||||||
size=5144817664
|
size=5144817664
|
||||||
sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a"
|
sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a"
|
||||||
url="Windows11LTSC/X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso"
|
url="Windows11LTSC/X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso"
|
||||||
;;
|
;;
|
||||||
"win11x64-ltsc" | "win11x64-enterprise-ltsc-eval" )
|
"win11x64-ltsc" | "win11x64-enterprise-ltsc" | "win11x64-enterprise-ltsc-eval" )
|
||||||
size=5144817664
|
size=5144817664
|
||||||
sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a"
|
sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a"
|
||||||
url="Windows11LTSC/X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso"
|
url="Windows11LTSC/X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso"
|
||||||
|
|
@ -1149,12 +1132,12 @@ getLink4() {
|
||||||
sum="7847abd6f39abd02dc8089c4177d354f9eb66fa0ee2fe8ae20e596e675d1ab67"
|
sum="7847abd6f39abd02dc8089c4177d354f9eb66fa0ee2fe8ae20e596e675d1ab67"
|
||||||
url="Windows-10-22H2-July-2024-64-bit-DVD-English/en-us_windows_10_business_editions_version_22h2_updated_july_2024_x64_dvd_c004521a.iso"
|
url="Windows-10-22H2-July-2024-64-bit-DVD-English/en-us_windows_10_business_editions_version_22h2_updated_july_2024_x64_dvd_c004521a.iso"
|
||||||
;;
|
;;
|
||||||
"win10x64-iot" | "win10x64-enterprise-iot-eval" )
|
"win10x64-iot" | "win10x64-enterprise-iot" | "win10x64-enterprise-iot-eval" )
|
||||||
size=4851668992
|
size=4851668992
|
||||||
sum="a0334f31ea7a3e6932b9ad7206608248f0bd40698bfb8fc65f14fc5e4976c160"
|
sum="a0334f31ea7a3e6932b9ad7206608248f0bd40698bfb8fc65f14fc5e4976c160"
|
||||||
url="en-us_windows_10_iot_enterprise_ltsc_2021_x64_dvd_257ad90f_202411/en-us_windows_10_iot_enterprise_ltsc_2021_x64_dvd_257ad90f.iso"
|
url="en-us_windows_10_iot_enterprise_ltsc_2021_x64_dvd_257ad90f_202411/en-us_windows_10_iot_enterprise_ltsc_2021_x64_dvd_257ad90f.iso"
|
||||||
;;
|
;;
|
||||||
"win10x64-ltsc" | "win10x64-enterprise-ltsc-eval" )
|
"win10x64-ltsc" | "win10x64-enterprise-ltsc" | "win10x64-enterprise-ltsc-eval" )
|
||||||
size=4899461120
|
size=4899461120
|
||||||
sum="c90a6df8997bf49e56b9673982f3e80745058723a707aef8f22998ae6479597d"
|
sum="c90a6df8997bf49e56b9673982f3e80745058723a707aef8f22998ae6479597d"
|
||||||
url="en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96_202302/en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso"
|
url="en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96_202302/en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso"
|
||||||
|
|
@ -1313,6 +1296,8 @@ isMido() {
|
||||||
local lang="$2"
|
local lang="$2"
|
||||||
local sum
|
local sum
|
||||||
|
|
||||||
|
[[ "${MIDO:-}" == [Nn]* ]] && return 1
|
||||||
|
|
||||||
sum=$(getMido "$id" "en" "sum")
|
sum=$(getMido "$id" "en" "sum")
|
||||||
[ -n "$sum" ] && return 0
|
[ -n "$sum" ] && return 0
|
||||||
|
|
||||||
|
|
@ -1324,6 +1309,8 @@ isESD() {
|
||||||
local id="$1"
|
local id="$1"
|
||||||
local lang="$2"
|
local lang="$2"
|
||||||
|
|
||||||
|
[[ "${ESD:-}" == [Nn]* ]] && return 1
|
||||||
|
|
||||||
case "${id,,}" in
|
case "${id,,}" in
|
||||||
"win11${PLATFORM,,}" | "win10${PLATFORM,,}" )
|
"win11${PLATFORM,,}" | "win10${PLATFORM,,}" )
|
||||||
return 0
|
return 0
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,11 @@ extractESD() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local esdImageCount
|
local esdImageCount
|
||||||
esdImageCount=$(wimlib-imagex info "$iso" | awk '/Image Count:/ {print $3}')
|
esdImageCount=$(wimlib-imagex info "$iso" | iconv -f UTF-16LE -t UTF-8 | awk '/Image Count:/ {print $3}')
|
||||||
|
|
||||||
|
if [ -z "$esdImageCount" ]; then
|
||||||
|
error "Cannot read the image count in ESD file!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
wimlib-imagex apply "$iso" 1 "$dir" --quiet 2>/dev/null || {
|
wimlib-imagex apply "$iso" 1 "$dir" --quiet 2>/dev/null || {
|
||||||
retVal=$?
|
retVal=$?
|
||||||
|
|
@ -344,7 +348,7 @@ extractESD() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for (( imageIndex=4; imageIndex<=esdImageCount; imageIndex++ )); do
|
for (( imageIndex=4; imageIndex<=esdImageCount; imageIndex++ )); do
|
||||||
imageEdition=$(wimlib-imagex info "$iso" ${imageIndex} | grep '^Description:' | sed 's/Description:[ \t]*//')
|
imageEdition=$(wimlib-imagex info "$iso" ${imageIndex} | iconv -f UTF-16LE -t UTF-8 | grep '^Description:' | sed 's/Description:[ \t]*//')
|
||||||
[[ "${imageEdition,,}" != "${edition,,}" ]] && continue
|
[[ "${imageEdition,,}" != "${edition,,}" ]] && continue
|
||||||
wimlib-imagex export "$iso" ${imageIndex} "$installWimFile" --compress=LZMS --chunk-size 128K --quiet || {
|
wimlib-imagex export "$iso" ${imageIndex} "$installWimFile" --compress=LZMS --chunk-size 128K --quiet || {
|
||||||
retVal=$?
|
retVal=$?
|
||||||
|
|
@ -615,7 +619,7 @@ detectImage() {
|
||||||
warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB" && return 1
|
warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info=$(wimlib-imagex info -xml "$wim" | tr -d '\000')
|
info=$(wimlib-imagex info -xml "$wim" | iconv -f UTF-16LE -t UTF-8)
|
||||||
checkPlatform "$info" || exit 67
|
checkPlatform "$info" || exit 67
|
||||||
|
|
||||||
DETECTED=$(detectVersion "$info")
|
DETECTED=$(detectVersion "$info")
|
||||||
|
|
@ -917,7 +921,7 @@ updateImage() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
index="1"
|
index="1"
|
||||||
result=$(wimlib-imagex info -xml "$wim" | tr -d '\000')
|
result=$(wimlib-imagex info -xml "$wim" | iconv -f UTF-16LE -t UTF-8)
|
||||||
|
|
||||||
if [[ "${result^^}" == *"<IMAGE INDEX=\"2\">"* ]]; then
|
if [[ "${result^^}" == *"<IMAGE INDEX=\"2\">"* ]]; then
|
||||||
index="2"
|
index="2"
|
||||||
|
|
|
||||||
90
src/mido.sh
90
src/mido.sh
|
|
@ -264,28 +264,40 @@ download_windows_eval() {
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$enterprise_type" in
|
case "$enterprise_type" in
|
||||||
|
"iot" | "ltsc" )
|
||||||
|
case "${PLATFORM,,}" in
|
||||||
|
"x64" )
|
||||||
|
if [[ "$windows_version" != "windows-10"* ]]; then
|
||||||
|
iso_download_link=$(echo "$iso_download_links" | head -n 1)
|
||||||
|
else
|
||||||
|
iso_download_link=$(echo "$iso_download_links" | head -n 4 | tail -n 1)
|
||||||
|
fi ;;
|
||||||
|
"arm64" )
|
||||||
|
iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1) ;;
|
||||||
|
* )
|
||||||
|
error "Invalid platform specified, value \"$PLATFORM\" is not recognized!" && return 1 ;;
|
||||||
|
esac ;;
|
||||||
"enterprise" )
|
"enterprise" )
|
||||||
iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1)
|
case "${PLATFORM,,}" in
|
||||||
;;
|
"x64" )
|
||||||
"iot" )
|
if [[ "$windows_version" != "windows-10"* ]]; then
|
||||||
if [[ "${PLATFORM,,}" == "x64" ]]; then
|
iso_download_link=$(echo "$iso_download_links" | head -n 1)
|
||||||
iso_download_link=$(echo "$iso_download_links" | head -n 1)
|
else
|
||||||
fi
|
iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1)
|
||||||
if [[ "${PLATFORM,,}" == "arm64" ]]; then
|
fi ;;
|
||||||
iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1)
|
"arm64" )
|
||||||
fi
|
iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1) ;;
|
||||||
;;
|
* )
|
||||||
"ltsc" )
|
error "Invalid platform specified, value \"$PLATFORM\" is not recognized!" && return 1 ;;
|
||||||
iso_download_link=$(echo "$iso_download_links" | head -n 4 | tail -n 1)
|
esac ;;
|
||||||
;;
|
|
||||||
"server" )
|
"server" )
|
||||||
iso_download_link=$(echo "$iso_download_links" | head -n 1)
|
iso_download_link=$(echo "$iso_download_links" | head -n 1) ;;
|
||||||
;;
|
|
||||||
* )
|
* )
|
||||||
error "Invalid type specified, value \"$enterprise_type\" is not recognized!" && return 1 ;;
|
error "Invalid type specified, value \"$enterprise_type\" is not recognized!" && return 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Found download link: $iso_download_link"
|
[[ "$DEBUG" == [Yy1]* ]] && echo "Found download link: $iso_download_link"
|
||||||
|
[ -z "$iso_download_link" ] && error "Could not parse download link from page!" && return 1
|
||||||
|
|
||||||
# Follow redirect so proceeding log message is useful
|
# Follow redirect so proceeding log message is useful
|
||||||
# This is a request we make that Fido doesn't
|
# This is a request we make that Fido doesn't
|
||||||
|
|
@ -323,8 +335,7 @@ getWindows() {
|
||||||
|
|
||||||
case "${version,,}" in
|
case "${version,,}" in
|
||||||
"win11${PLATFORM,,}" ) ;;
|
"win11${PLATFORM,,}" ) ;;
|
||||||
"win11${PLATFORM,,}-enterprise-iot"* ) ;;
|
"win11${PLATFORM,,}-enterprise"* ) ;;
|
||||||
"win11${PLATFORM,,}-enterprise-ltsc"* ) ;;
|
|
||||||
* )
|
* )
|
||||||
if [[ "${PLATFORM,,}" != "x64" ]]; then
|
if [[ "${PLATFORM,,}" != "x64" ]]; then
|
||||||
error "No download for the ${PLATFORM^^} platform available for $edition!"
|
error "No download for the ${PLATFORM^^} platform available for $edition!"
|
||||||
|
|
@ -396,10 +407,11 @@ getESD() {
|
||||||
local version="$2"
|
local version="$2"
|
||||||
local lang="$3"
|
local lang="$3"
|
||||||
local desc="$4"
|
local desc="$4"
|
||||||
|
local result
|
||||||
local culture
|
local culture
|
||||||
local language
|
local language
|
||||||
local editionName
|
local editionName
|
||||||
local winCatalog size
|
local winCatalog
|
||||||
|
|
||||||
culture=$(getLanguage "$lang" "culture")
|
culture=$(getLanguage "$lang" "culture")
|
||||||
winCatalog=$(getCatalog "$version" "url")
|
winCatalog=$(getCatalog "$version" "url")
|
||||||
|
|
@ -441,32 +453,57 @@ getESD() {
|
||||||
error "Failed to find $xFile in $wFile!" && return 1
|
error "Failed to find $xFile in $wFile!" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local edQuery='//File[Architecture="'${PLATFORM}'"][Edition="'${editionName}'"]'
|
local edQuery='//File[Architecture="'${PLATFORM,,}'"][Edition="'${editionName}'"]'
|
||||||
|
result=$(xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" 2>/dev/null)
|
||||||
|
|
||||||
|
if [ -z "$result" ]; then
|
||||||
|
|
||||||
|
edQuery='//File[Architecture="'${PLATFORM^^}'"][Edition="'${editionName}'"]'
|
||||||
|
result=$(xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" 2>/dev/null)
|
||||||
|
|
||||||
|
if [ -z "$result" ]; then
|
||||||
|
|
||||||
|
desc=$(printEdition "$version" "$desc")
|
||||||
|
language=$(getLanguage "$lang" "desc")
|
||||||
|
error "No download link available for $desc!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e '<Catalog>' > "$dir/$fFile"
|
echo -e '<Catalog>' > "$dir/$fFile"
|
||||||
xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" >> "$dir/$fFile" 2>/dev/null
|
echo "$result" >> "$dir/$fFile"
|
||||||
echo -e '</Catalog>'>> "$dir/$fFile"
|
echo -e '</Catalog>'>> "$dir/$fFile"
|
||||||
|
|
||||||
xmllint --nonet --xpath "//File[LanguageCode=\"${culture,,}\"]" "$dir/$fFile" >"$dir/$eFile"
|
result=$(xmllint --nonet --xpath "//File[LanguageCode=\"${culture,,}\"]" "$dir/$fFile" 2>/dev/null)
|
||||||
|
|
||||||
size=$(stat -c%s "$dir/$eFile")
|
if [ -z "$result" ]; then
|
||||||
if ((size<20)); then
|
|
||||||
desc=$(printEdition "$version" "$desc")
|
desc=$(printEdition "$version" "$desc")
|
||||||
language=$(getLanguage "$lang" "desc")
|
language=$(getLanguage "$lang" "desc")
|
||||||
error "No download in the $language language available for $desc!" && return 1
|
error "No download in the $language language available for $desc!" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "$result" > "$dir/$eFile"
|
||||||
|
|
||||||
local tag="FilePath"
|
local tag="FilePath"
|
||||||
ESD=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g")
|
ESD=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g" 2>/dev/null)
|
||||||
|
|
||||||
if [ -z "$ESD" ]; then
|
if [ -z "$ESD" ]; then
|
||||||
error "Failed to find ESD URL in $eFile!" && return 1
|
error "Failed to find ESD URL in $eFile!" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tag="Sha1"
|
tag="Sha1"
|
||||||
ESD_SUM=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g")
|
ESD_SUM=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g" 2>/dev/null)
|
||||||
|
|
||||||
|
if [ -z "$ESD_SUM" ]; then
|
||||||
|
error "Failed to find ESD checksum in $eFile!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
tag="Size"
|
tag="Size"
|
||||||
ESD_SIZE=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g")
|
ESD_SIZE=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g" 2>/dev/null)
|
||||||
|
|
||||||
|
if [ -z "$ESD_SIZE" ]; then
|
||||||
|
error "Failed to find ESD filesize in $eFile!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
return 0
|
return 0
|
||||||
|
|
@ -561,6 +598,7 @@ downloadFile() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info "$msg..."
|
info "$msg..."
|
||||||
|
[[ "$DEBUG" == [Yy1]* ]] && echo "Downloading: $url"
|
||||||
|
|
||||||
{ wget "$url" -O "$iso" -q --timeout=30 --no-http-keep-alive --user-agent "$agent" --show-progress "$progress"; rc=$?; } || :
|
{ wget "$url" -O "$iso" -q --timeout=30 --no-http-keep-alive --user-agent "$agent" --show-progress "$progress"; rc=$?; } || :
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue