feat: Add support for IoT version of Windows 10 (#394)

This commit is contained in:
Kroese 2024-04-17 22:35:39 +02:00 committed by GitHub
parent 3d4dd48694
commit 4f575ebff2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 425 additions and 8 deletions

View file

@ -93,7 +93,10 @@ fi
CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.iso -printf "%f\n" | head -n 1)
[ -z "$CUSTOM" ] && CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname boot.iso -printf "%f\n" | head -n 1)
[ -z "$CUSTOM" ] && CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.img -printf "%f\n" | head -n 1)
[ -z "$CUSTOM" ] && CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname "${VERSION/\/storage\//}" -printf "%f\n" | head -n 1)
if [ -z "$CUSTOM" ] && [[ "${VERSION,,}" != "http"* ]]; then
CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname "${VERSION/\/storage\//}" -printf "%f\n" | head -n 1)
fi
ESD_URL=""
MACHINE="q35"
@ -120,8 +123,11 @@ printVersion() {
[[ "$id" == "win2016"* ]] && desc="Windows Server 2016"
[[ "$id" == "win2012"* ]] && desc="Windows Server 2012"
[[ "$id" == "win2008"* ]] && desc="Windows Server 2008"
[[ "$id" == "win10x64-ltsc" ]] && desc="Windows 10 LTSC"
[[ "$id" == "win10x64-iot" ]] && desc="Windows 10 IoT"
[[ "$id" == "win11x64-iot" ]] && desc="Windows 11 IoT"
[[ "$id" == "win10x64-ltsc" ]] && desc="Windows 10 LTSC"
[[ "$id" == "win11x64-ltsc" ]] && desc="Windows 11 LTSC"
echo "$desc"
return 0
}
@ -181,18 +187,23 @@ getVersion() {
[[ "${name,,}" == *"windows 8"* ]] && detected="win81x64"
[[ "${name,,}" == *"windows 11"* ]] && detected="win11x64"
[[ "${name,,}" == *"windows vista"* ]] && detected="winvistax64"
[[ "${name,,}" == *"server 2008"* ]] && detected="win2008r2"
[[ "${name,,}" == *"server 2025"* ]] && detected="win2025-eval"
[[ "${name,,}" == *"server 2022"* ]] && detected="win2022-eval"
[[ "${name,,}" == *"server 2019"* ]] && detected="win2019-eval"
[[ "${name,,}" == *"server 2016"* ]] && detected="win2016-eval"
[[ "${name,,}" == *"server 2012"* ]] && detected="win2012r2-eval"
[[ "${name,,}" == *"server 2008"* ]] && detected="win2008r2"
if [[ "${name,,}" == *"windows 10"* ]]; then
if [[ "${name,,}" == *"ltsc"* ]]; then
detected="win10x64-ltsc"
if [[ "${name,,}" == *" iot "* ]]; then
detected="win10x64-iot"
else
detected="win10x64"
if [[ "${name,,}" == *"ltsc"* ]]; then
detected="win10x64-ltsc"
else
detected="win10x64"
fi
fi
fi