diff --git a/assets/winvistax64-enterprise.xml b/assets/winvistax64-enterprise.xml index 8d64187..f2efec3 100644 --- a/assets/winvistax64-enterprise.xml +++ b/assets/winvistax64-enterprise.xml @@ -119,6 +119,7 @@ 0409:00000409 + en-US en-US en-US diff --git a/assets/winvistax64-ultimate.xml b/assets/winvistax64-ultimate.xml index b613f6f..9b80a39 100644 --- a/assets/winvistax64-ultimate.xml +++ b/assets/winvistax64-ultimate.xml @@ -119,6 +119,7 @@ 0409:00000409 + en-US en-US en-US diff --git a/assets/winvistax64.xml b/assets/winvistax64.xml index 252e6ae..009b991 100644 --- a/assets/winvistax64.xml +++ b/assets/winvistax64.xml @@ -119,6 +119,7 @@ 0409:00000409 + en-US en-US en-US diff --git a/assets/winvistax86-enterprise.xml b/assets/winvistax86-enterprise.xml index 8dfaa54..83e7534 100644 --- a/assets/winvistax86-enterprise.xml +++ b/assets/winvistax86-enterprise.xml @@ -119,6 +119,7 @@ 0409:00000409 + en-US en-US en-US diff --git a/assets/winvistax86-ultimate.xml b/assets/winvistax86-ultimate.xml index 2f95237..db407e3 100644 --- a/assets/winvistax86-ultimate.xml +++ b/assets/winvistax86-ultimate.xml @@ -119,6 +119,7 @@ 0409:00000409 + en-US en-US en-US diff --git a/assets/winvistax86.xml b/assets/winvistax86.xml index eb9fb05..07d5926 100644 --- a/assets/winvistax86.xml +++ b/assets/winvistax86.xml @@ -119,6 +119,7 @@ 0409:00000409 + en-US en-US en-US diff --git a/readme.md b/readme.md index 8295f9e..2ade57d 100644 --- a/readme.md +++ b/readme.md @@ -15,6 +15,7 @@ Windows in a Docker container. ## Features + - Multi-language - ISO downloader - KVM acceleration - Web-based viewer @@ -107,6 +108,19 @@ kubectl apply -f kubernetes.yml To install ARM64 versions of Windows use [dockur/windows-arm](https://github.com/dockur/windows-arm/). +* ### How do I select the Windows language? + + By default, the English version of Windows will be downloaded. But you can add the `LANGUAGE` environment variable to your compose file, in order to specify an alternative language: + + ```yaml + environment: + LANGUAGE: "Chinese" + ``` + + You can choose between `Arabic`, `Bulgarian`, `Chinese`, `Croatian`, `Czech`, `Danish`, `Dutch`, `Estonian`, `Finnish`, `French`, `German`, `Greek`, `Hebrew`, `Hungarian`, `Italian`, `Japanese`, `Korean`, `Latvian`, `Lithuanian`, `Norwegian`, `Polish`, `Portuguese`, `Romanian`, `Russian`, `Serbian`, `Slovak`, `Slovenian`, `Spanish`, `Swedish`, `Turkish`, `Thai` and `Ukrainian`. + + If you want to use a keyboard layout or region/locale that is not the default for the selected language, you can add the `KEYBOARD` and `REGION` variables with a culture code, like `en-US`. + * ### How do I change the storage location? To change the storage location, include the following bind mount in your compose file: @@ -242,11 +256,21 @@ kubectl apply -f kubernetes.yml CPU_CORES: "4" ``` +* ### How do I configure the username and password? + + By default, a user called `Docker` is created during installation with an empty password. You can change these credentials in your compose file: + + ```yaml + environment: + USERNAME: "john" + PASSWORD: "secret" + ``` + * ### How do I connect using RDP? The web-viewer is mainly meant to be used during installation, as its picture quality is low, and it has no audio or clipboard for example. - So for a better experience you can connect using any Microsoft Remote Desktop client to the IP of the container, using the username `docker` and by leaving the password empty. + So for a better experience you can connect using any Microsoft Remote Desktop client to the IP of the container, using the username `Docker` and by leaving the password empty. There is a good RDP client for [Android](https://play.google.com/store/apps/details?id=com.microsoft.rdc.androidx) available from the Play Store and one for [iOS](https://apps.apple.com/nl/app/microsoft-remote-desktop/id714464092?l=en-GB) in the Apple Store. For Linux you can use [FreeRDP](https://www.freerdp.com/) and on Windows just type `mstsc` in the search box. diff --git a/src/define.sh b/src/define.sh index c3417fa..d21f41e 100644 --- a/src/define.sh +++ b/src/define.sh @@ -2,10 +2,15 @@ set -Eeuo pipefail : "${VERIFY:=""}" +: "${REGION:=""}" : "${MANUAL:=""}" : "${REMOVE:=""}" : "${VERSION:=""}" : "${DETECTED:=""}" +: "${KEYBOARD:=""}" +: "${LANGUAGE:=""}" +: "${USERNAME:=""}" +: "${PASSWORD:=""}" MIRRORS=5 PLATFORM="x64" @@ -22,40 +27,40 @@ parseVersion() { case "${VERSION,,}" in "11" | "11p" | "win11" | "win11p" | "windows11" | "windows 11" ) - VERSION="win11${PLATFORM,,}" + VERSION="win11x64" ;; "11e" | "win11e" | "windows11e" | "windows 11e" ) - VERSION="win11${PLATFORM,,}-enterprise-eval" + VERSION="win11x64-enterprise-eval" ;; "10" | "10p" | "win10" | "win10p" | "windows10" | "windows 10" ) - VERSION="win10${PLATFORM,,}" + VERSION="win10x64" ;; "10e" | "win10e" | "windows10e" | "windows 10e" ) - VERSION="win10${PLATFORM,,}-enterprise-eval" + VERSION="win10x64-enterprise-eval" ;; "8" | "8p" | "81" | "81p" | "8.1" | "win8" | "win8p" | "win81" | "win81p" | "windows 8" ) - VERSION="win81${PLATFORM,,}" + VERSION="win81x64" ;; "8e" | "81e" | "8.1e" | "win8e" | "win81e" | "windows 8e" ) - VERSION="win81${PLATFORM,,}-enterprise-eval" + VERSION="win81x64-enterprise-eval" ;; "7" | "7e" | "win7" | "win7e" | "windows7" | "windows 7" ) - VERSION="win7${PLATFORM,,}" - [ -z "$DETECTED" ] && DETECTED="win7${PLATFORM,,}-enterprise" + VERSION="win7x64" + [ -z "$DETECTED" ] && DETECTED="win7x64-enterprise" ;; "7u" | "win7u" | "windows7u" | "windows 7u" ) - VERSION="win7${PLATFORM,,}-ultimate" + VERSION="win7x64-ultimate" ;; "7x86" | "win7x86" | "windows7x86" | "win7x86-enterprise" ) VERSION="win7x86" [ -z "$DETECTED" ] && DETECTED="win7x86-enterprise" ;; "vista" | "winvista" | "windowsvista" | "windows vista" ) - VERSION="winvista${PLATFORM,,}" - [ -z "$DETECTED" ] && DETECTED="winvista${PLATFORM,,}-enterprise" + VERSION="winvistax64" + [ -z "$DETECTED" ] && DETECTED="winvistax64-enterprise" ;; "vistu" | "winvistu" | "windowsvistu" | "windows vistu" ) - VERSION="winvista${PLATFORM,,}-ultimate" + VERSION="winvistax64-ultimate" ;; "vistax86" | "winvistax86" | "windowsvistax86" | "winvistax86-enterprise" ) VERSION="winvistax86" @@ -65,7 +70,7 @@ parseVersion() { VERSION="winxpx86" ;; "xp64" | "xpx64" | "winxp64" | "winxpx64" | "windowsxp64" | "windowsxpx64" ) - VERSION="winxp${PLATFORM,,}" + VERSION="winxpx64" ;; "22" | "2022" | "win22" | "win2022" | "windows2022" | "windows 2022" ) VERSION="win2022-eval" @@ -84,33 +89,263 @@ parseVersion() { ;; "core11" | "core 11" ) VERSION="core11" - [ -z "$DETECTED" ] && DETECTED="win11${PLATFORM,,}" + [ -z "$DETECTED" ] && DETECTED="win11x64" ;; "tiny11" | "tiny 11" ) VERSION="tiny11" - [ -z "$DETECTED" ] && DETECTED="win11${PLATFORM,,}" + [ -z "$DETECTED" ] && DETECTED="win11x64" ;; "tiny10" | "tiny 10" ) VERSION="tiny10" - [ -z "$DETECTED" ] && DETECTED="win10${PLATFORM,,}-ltsc" + [ -z "$DETECTED" ] && DETECTED="win10x64-ltsc" ;; - "iot11" | "11iot" | "win11-iot" | "win11${PLATFORM,,}-iot" | "win11${PLATFORM,,}-enterprise-iot-eval" ) - VERSION="win11${PLATFORM,,}-enterprise-iot-eval" - [ -z "$DETECTED" ] && DETECTED="win11${PLATFORM,,}-iot" + "iot11" | "11iot" | "win11-iot" | "win11x64-iot" | "win11x64-enterprise-iot-eval" ) + VERSION="win11x64-enterprise-iot-eval" + [ -z "$DETECTED" ] && DETECTED="win11x64-iot" ;; - "iot10" | "10iot" | "win10-iot" | "win10${PLATFORM,,}-iot" | "win10${PLATFORM,,}-enterprise-iot-eval" ) - VERSION="win10${PLATFORM,,}-enterprise-iot-eval" - [ -z "$DETECTED" ] && DETECTED="win10${PLATFORM,,}-iot" + "iot10" | "10iot" | "win10-iot" | "win10x64-iot" | "win10x64-enterprise-iot-eval" ) + VERSION="win10x64-enterprise-iot-eval" + [ -z "$DETECTED" ] && DETECTED="win10x64-iot" ;; - "ltsc10" | "10ltsc" | "win10-ltsc" | "win10${PLATFORM,,}-ltsc" | "win10${PLATFORM,,}-enterprise-ltsc-eval" ) - VERSION="win10${PLATFORM,,}-enterprise-ltsc-eval" - [ -z "$DETECTED" ] && DETECTED="win10${PLATFORM,,}-ltsc" + "ltsc10" | "10ltsc" | "win10-ltsc" | "win10x64-ltsc" | "win10x64-enterprise-ltsc-eval" ) + VERSION="win10x64-enterprise-ltsc-eval" + [ -z "$DETECTED" ] && DETECTED="win10x64-ltsc" ;; esac return 0 } +getLanguage() { + + local id="$1" + local ret="$2" + local lang="" + local desc="" + local culture="" + + case "${id,,}" in + "ar" | "ar-"* ) + lang="Arabic" + desc="$lang" + culture="ar-SA" ;; + "bg" | "bg-"* ) + lang="Bulgarian" + desc="$lang" + culture="bg-BG" ;; + "cs" | "cs-"* | "cz" | "cz-"* ) + lang="Czech" + desc="$lang" + culture="cs-CZ" ;; + "da" | "da-"* | "dk" | "dk-"* ) + lang="Danish" + desc="$lang" + culture="da-DK" ;; + "de" | "de-"* ) + lang="German" + desc="$lang" + culture="de-DE" ;; + "el" | "el-"* | "gr" | "gr-"* ) + lang="Greek" + desc="$lang" + culture="el-GR" ;; + "gb" | "en-gb" ) + lang="English International" + desc="English" + culture="en-GB" ;; + "en" | "en-"* ) + lang="English (United States)" + desc="English" + culture="en-US" ;; + "mx" | "es-mx" ) + lang="Spanish (Mexico)" + desc="Spanish" + culture="es-MX" ;; + "es" | "es-"* ) + lang="Spanish" + desc="$lang" + culture="es-ES" ;; + "et" | "et-"* ) + lang="Estonian" + desc="$lang" + culture="et-EE" ;; + "fi" | "fi-"* ) + lang="Finnish" + desc="$lang" + culture="fi-FI" ;; + "ca" | "fr-ca" ) + lang="French Canadian" + desc="French" + culture="fr-CA" ;; + "fr" | "fr-"* ) + lang="French" + desc="$lang" + culture="fr-FR" ;; + "he" | "he-"* | "il" | "il-"* ) + lang="Hebrew" + desc="$lang" + culture="he-IL" ;; + "hr" | "hr-"* | "cr" | "cr-"* ) + lang="Croatian" + desc="$lang" + culture="hr-HR" ;; + "hu" | "hu-"* ) + lang="Hungarian" + desc="$lang" + culture="hu-HU" ;; + "it" | "it-"* ) + lang="Italian" + desc="$lang" + culture="it-IT" ;; + "ja" | "ja-"* | "jp" | "jp-"* ) + lang="Japanese" + desc="$lang" + culture="ja-JP" ;; + "ko" | "ko-"* | "kr" | "kr-"* ) + lang="Korean" + desc="$lang" + culture="ko-KR" ;; + "lt" | "lt-"* ) + lang="Lithuanian" + desc="$lang" + culture="lv-LV" ;; + "lv" | "lv-"* ) + lang="Latvian" + desc="$lang" + culture="lt-LT" ;; + "nb" | "nb-"* |"nn" | "nn-"* | "no" | "no-"* ) + lang="Norwegian" + desc="$lang" + culture="nb-NO" ;; + "nl" | "nl-"* ) + lang="Dutch" + desc="$lang" + culture="nl-NL" ;; + "pl" | "pl-"* ) + lang="Polish" + desc="$lang" + culture="pl-PL" ;; + "br" | "pt-br" ) + lang="Brazilian Portuguese" + desc="Portuguese" + culture="pt-BR" ;; + "pt" | "pt-"* ) + lang="Portuguese" + desc="$lang" + culture="pt-BR" ;; + "ro" | "ro-"* ) + lang="Romanian" + desc="$lang" + culture="ro-RO" ;; + "ru" | "ru-"* ) + lang="Russian" + desc="$lang" + culture="ru-RU" ;; + "sk" | "sk-"* ) + lang="Slovak" + desc="$lang" + culture="sk-SK" ;; + "sl" | "sl-"* | "si" | "si-"* ) + lang="Slovenian" + desc="$lang" + culture="sl-SI" ;; + "sr" | "sr-"* ) + lang="Serbian Latin" + desc="Serbian" + culture="sr-Latn-RS" ;; + "sv" | "sv-"* | "se" | "se-"* ) + lang="Swedish" + desc="$lang" + culture="sv-SE" ;; + "th" | "th-"* ) + lang="Thai" + desc="$lang" + culture="th-TH" ;; + "tr" | "tr-"* ) + lang="Turkish" + desc="$lang" + culture="tr-TR" ;; + "ua" | "ua-"* | "uk" | "uk-"* ) + lang="Ukrainian" + desc="$lang" + culture="uk-UA" ;; + "hk" | "zh-hk" | "cn-hk" ) + lang="Chinese Traditional" + desc="Chinese HK" + culture="zh-TW" ;; + "tw" | "zh-tw" | "cn-tw" ) + lang="Chinese Traditional" + desc="Chinese TW" + culture="zh-TW" ;; + "zh" | "zh-"* | "cn" | "cn-"* ) + lang="Chinese Simplified" + desc="Chinese" + culture="zh-CN" ;; + esac + + case "${ret,,}" in + "desc" ) echo "$desc" ;; + "name" ) echo "$lang" ;; + "culture" ) echo "$culture" ;; + *) echo "$desc";; + esac + + return 0 +} + +parseLanguage() { + + REGION="${REGION/_/-/}" + KEYBOARD="${KEYBOARD/_/-/}" + LANGUAGE="${LANGUAGE/_/-/}" + + [ -z "$LANGUAGE" ] && LANGUAGE="en" + + case "${LANGUAGE,,}" in + "arabic" | "arab" ) LANGUAGE="ar" ;; + "bulgarian" | "bu" ) LANGUAGE="bg" ;; + "chinese" | "cn" ) LANGUAGE="zh" ;; + "croatian" | "cr" | "hrvatski" ) LANGUAGE="hr" ;; + "czech" | "cz" | "cesky" ) LANGUAGE="cs" ;; + "danish" | "dk" | "danske" ) LANGUAGE="da" ;; + "dutch" | "nederlands" ) LANGUAGE="nl" ;; + "english" | "gb" | "british" ) LANGUAGE="en" ;; + "estonian" | "eesti" ) LANGUAGE="et" ;; + "finnish" | "suomi" ) LANGUAGE="fi" ;; + "french" | "français" | "francais" ) LANGUAGE="fr" ;; + "german" | "deutsch" ) LANGUAGE="de" ;; + "greek" | "gr" ) LANGUAGE="el" ;; + "hebrew" | "il" ) LANGUAGE="he" ;; + "hungarian" | "magyar" ) LANGUAGE="hu" ;; + "italian" | "italiano" ) LANGUAGE="it" ;; + "japanese" | "jp" ) LANGUAGE="ja" ;; + "korean" | "kr" ) LANGUAGE="ko" ;; + "latvian" | "latvijas" ) LANGUAGE="lv" ;; + "lithuanian" | "lietuvos" ) LANGUAGE="lt" ;; + "norwegian" | "no" | "nb" | "norsk" ) LANGUAGE="nn" ;; + "polish" | "polski" ) LANGUAGE="pl" ;; + "portuguese" | "pt" | "br" ) LANGUAGE="pt-br" ;; + "português" | "portugues" ) LANGUAGE="pt-br" ;; + "romanian" | "română" | "romana" ) LANGUAGE="ro" ;; + "russian" | "ruski" ) LANGUAGE="ru" ;; + "serbian" | "serbian latin" ) LANGUAGE="sr" ;; + "slovak" | "slovenský" | "slovensky" ) LANGUAGE="sk" ;; + "slovenian" | "si" | "slovenski" ) LANGUAGE="sl" ;; + "spanish" | "espanol" | "español" ) LANGUAGE="es" ;; + "swedish" | "se" | "svenska" ) LANGUAGE="sv" ;; + "turkish" | "türk" | "turk" ) LANGUAGE="tr" ;; + "thai" ) LANGUAGE="th" ;; + "ukrainian" | "ua" ) LANGUAGE="uk" ;; + esac + + local culture + culture=$(getLanguage "$LANGUAGE" "culture") + [ -n "$culture" ] && return 0 + + error "Invalid LANGUAGE specified, value \"$LANGUAGE\" is not recognized!" + return 1 +} + printVersion() { local id="$1" @@ -154,12 +389,6 @@ printEdition() { [[ "$result" == "x" ]] && echo "$desc" && return 0 case "${id,,}" in - *"-iot" ) - edition="IoT" - ;; - *"-ltsc" ) - edition="LTSC" - ;; *"-home" ) edition="Home" ;; @@ -175,6 +404,12 @@ printEdition() { *"-education" ) edition="Education" ;; + *"-iot" | *"-iot-eval" ) + edition="IoT" + ;; + *"-ltsc" | *"-ltsc-eval" ) + edition="LTSC" + ;; *"-enterprise-eval" ) edition="Enterprise (Evaluation)" ;; @@ -377,80 +612,42 @@ switchEdition() { return 0 } -getCatalog() { - - local id="$1" - local ret="$2" - local url="" - local name="" - local edition="" - - case "${id,,}" in - "win11${PLATFORM,,}" ) - edition="Professional" - name="Windows 11 Pro" - url="https://go.microsoft.com/fwlink?linkid=2156292" - ;; - "win10${PLATFORM,,}" ) - edition="Professional" - name="Windows 10 Pro" - url="https://go.microsoft.com/fwlink/?LinkId=841361" - ;; - "win11${PLATFORM,,}-enterprise" | "win11${PLATFORM,,}-enterprise-eval") - edition="Enterprise" - name="Windows 11 Enterprise" - url="https://go.microsoft.com/fwlink?linkid=2156292" - ;; - "win10${PLATFORM,,}-enterprise" | "win10${PLATFORM,,}-enterprise-eval" ) - edition="Enterprise" - name="Windows 10 Enterprise" - url="https://go.microsoft.com/fwlink/?LinkId=841361" - ;; - esac - - case "${ret,,}" in - "url" ) echo "$url" ;; - "name" ) echo "$name" ;; - "edition" ) echo "$edition" ;; - *) echo "";; - esac - - return 0 -} - getMido() { local id="$1" - local ret="$2" + local lang="$2" + local ret="$3" local sum="" local size="" + [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0 + case "${id,,}" in - "win11${PLATFORM,,}" ) + "win11x64" ) size=6812706816 sum="36de5ecb7a0daa58dce68c03b9465a543ed0f5498aa8ae60ab45fb7c8c4ae402" ;; - "win11${PLATFORM,,}-enterprise-eval" ) + "win11x64-enterprise-eval" ) size=6209064960 sum="c8dbc96b61d04c8b01faf6ce0794fdf33965c7b350eaa3eb1e6697019902945c" ;; - "win10${PLATFORM,,}" ) + "win10x64" ) size=6140975104 sum="a6f470ca6d331eb353b815c043e327a347f594f37ff525f17764738fe812852e" ;; - "win10${PLATFORM,,}-enterprise-eval" ) + "win10x64-enterprise-eval" ) size=5550497792 sum="ef7312733a9f5d7d51cfa04ac497671995674ca5e1058d5164d6028f0938d668" ;; - "win10${PLATFORM,,}-enterprise-ltsc-eval" ) + "win10x64-enterprise-ltsc-eval" ) size=4898582528 sum="e4ab2e3535be5748252a8d5d57539a6e59be8d6726345ee10e7afd2cb89fefb5" ;; - "win81${PLATFORM,,}" ) + "win81x64" ) size=4320526336 sum="d8333cf427eb3318ff6ab755eb1dd9d433f0e2ae43745312c1cd23e83ca1ce51" ;; - "win81${PLATFORM,,}-enterprise-eval" ) + "win81x64-enterprise-eval" ) size=3961473024 sum="2dedd44c45646c74efc5a028f65336027e14a56f76686a4631cf94ffe37c72f2" ;; @@ -482,7 +679,7 @@ getMido() { *) echo "";; esac - return 1 + return 0 } getLink1() { @@ -490,109 +687,112 @@ getLink1() { # Fallbacks for users who cannot connect to the Microsoft servers local id="$1" - local ret="$2" + local lang="$2" + local ret="$3" local url="" local sum="" local size="" local host="https://dl.bobpony.com/windows" + [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0 + case "${id,,}" in - "win11${PLATFORM,,}" ) + "win11x64" ) size=5946128384 sum="5bb1459034f50766ee480d895d751af73a4af30814240ae32ebc5633546a5af7" - url="$host/11/en-us_windows_11_23h2_${PLATFORM,,}.iso" + url="11/en-us_windows_11_23h2_x64.iso" ;; - "win10${PLATFORM,,}" ) + "win10x64" ) size=4957009920 sum="6673e2ab6c6939a74eceff2c2bb4d36feb94ff8a6f71700adef0f0b998fdcaca" - url="$host/10/en-us_windows_10_22h2_${PLATFORM,,}.iso" + url="10/en-us_windows_10_22h2_x64.iso" ;; - "win10${PLATFORM,,}-iot" | "win10${PLATFORM,,}-enterprise-iot-eval" ) + "win10x64-iot" | "win10x64-enterprise-iot-eval" ) size=4851668992 sum="a0334f31ea7a3e6932b9ad7206608248f0bd40698bfb8fc65f14fc5e4976c160" - url="$host/10/en-us_windows_10_iot_enterprise_ltsc_2021_${PLATFORM,,}_dvd_257ad90f.iso" + url="10/en-us_windows_10_iot_enterprise_ltsc_2021_x64_dvd_257ad90f.iso" ;; - "win10${PLATFORM,,}-ltsc" | "win10${PLATFORM,,}-enterprise-ltsc-eval" ) + "win10x64-ltsc" | "win10x64-enterprise-ltsc-eval" ) size=4899461120 sum="c90a6df8997bf49e56b9673982f3e80745058723a707aef8f22998ae6479597d" - url="$host/10/en-us_windows_10_enterprise_ltsc_2021_${PLATFORM,,}_dvd_d289cf96.iso" + url="10/en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso" ;; - "win81${PLATFORM,,}" ) + "win81x64" ) size=4320526336 sum="d8333cf427eb3318ff6ab755eb1dd9d433f0e2ae43745312c1cd23e83ca1ce51" - url="$host/8.x/8.1/en_windows_8.1_with_update_${PLATFORM,,}_dvd_6051480.iso" + url="8.x/8.1/en_windows_8.1_with_update_x64_dvd_6051480.iso" ;; "win2022" | "win2022-eval" ) size=5365624832 sum="c3c57bb2cf723973a7dcfb1a21e97dfa035753a7f111e348ad918bb64b3114db" - url="$host/server/2022/en-us_windows_server_2022_updated_jan_2024_${PLATFORM,,}_dvd_2b7a0c9f.iso" + url="server/2022/en-us_windows_server_2022_updated_jan_2024_x64_dvd_2b7a0c9f.iso" ;; "win2019" | "win2019-eval" ) size=5575774208 sum="0067afe7fdc4e61f677bd8c35a209082aa917df9c117527fc4b2b52a447e89bb" - url="$host/server/2019/en-us_windows_server_2019_updated_aug_2021_${PLATFORM,,}_dvd_a6431a28.iso" + url="server/2019/en-us_windows_server_2019_updated_aug_2021_x64_dvd_a6431a28.iso" ;; "win2016" | "win2016-eval" ) size=6006587392 sum="af06e5483c786c023123e325cea4775050324d9e1366f46850b515ae43f764be" - url="$host/server/2016/en_windows_server_2016_updated_feb_2018_${PLATFORM,,}_dvd_11636692.iso" + url="server/2016/en_windows_server_2016_updated_feb_2018_x64_dvd_11636692.iso" ;; "win2012r2" | "win2012r2-eval" ) size=5397889024 sum="f351e89eb88a96af4626ceb3450248b8573e3ed5924a4e19ea891e6003b62e4e" - url="$host/server/2012r2/en_windows_server_2012_r2_with_update_${PLATFORM,,}_dvd_6052708-004.iso" + url="server/2012r2/en_windows_server_2012_r2_with_update_x64_dvd_6052708-004.iso" ;; "win2008r2" | "win2008r2-eval" ) size=3166584832 sum="dfd9890881b7e832a927c38310fb415b7ea62ac5a896671f2ce2a111998f0df8" - url="$host/server/2008r2/en_windows_server_2008_r2_with_sp1_${PLATFORM,,}_dvd_617601-018.iso" + url="server/2008r2/en_windows_server_2008_r2_with_sp1_x64_dvd_617601-018.iso" ;; - "win7${PLATFORM,,}" | "win7${PLATFORM,,}-enterprise" ) + "win7x64" | "win7x64-enterprise" ) size=3182604288 sum="ee69f3e9b86ff973f632db8e01700c5724ef78420b175d25bae6ead90f6805a7" - url="$host/7/en_windows_7_enterprise_with_sp1_${PLATFORM,,}_dvd_u_677651.iso" + url="7/en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso" ;; - "win7${PLATFORM,,}-ultimate" ) + "win7x64-ultimate" ) size=3320836096 sum="0b738b55a5ea388ad016535a5c8234daf2e5715a0638488ddd8a228a836055a1" - url="$host/7/en_windows_7_with_sp1_${PLATFORM,,}.iso" + url="7/en_windows_7_with_sp1_x64.iso" ;; "win7x86" | "win7x86-enterprise" ) size=2434502656 sum="8bdd46ff8cb8b8de9c4aba02706629c8983c45e87da110e64e13be17c8434dad" - url="$host/7/en_windows_7_enterprise_with_sp1_x86_dvd_u_677710.iso" + url="7/en_windows_7_enterprise_with_sp1_x86_dvd_u_677710.iso" ;; "win7x86-ultimate" ) size=2564411392 sum="99f3369c90160816be07093dbb0ac053e0a84e52d6ed1395c92ae208ccdf67e5" - url="$host/7/en_windows_7_with_sp1_x86.iso" + url="7/en_windows_7_with_sp1_x86.iso" ;; - "winvista${PLATFORM,,}-ultimate" ) + "winvistax64-ultimate" ) size=3861460992 sum="edf9f947c5791469fd7d2d40a5dcce663efa754f91847aa1d28ed7f585675b78" - url="$host/vista/en_windows_vista_sp2_${PLATFORM,,}_dvd_342267.iso" + url="vista/en_windows_vista_sp2_x64_dvd_342267.iso" ;; "winvistax86-ultimate" ) size=3243413504 sum="9c36fed4255bd05a8506b2da88f9aad73643395e155e609398aacd2b5276289c" - url="$host/vista/en_windows_vista_with_sp2_x86_dvd_342266.iso" + url="vista/en_windows_vista_with_sp2_x86_dvd_342266.iso" ;; "winxpx86" ) size=617756672 sum="62b6c91563bad6cd12a352aa018627c314cfc5162d8e9f8af0756a642e602a46" - url="$host/xp/professional/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso" + url="xp/professional/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso" ;; "winxpx64" ) size=614166528 sum="8fac68e1e56c64ad9a2aa0ad464560282e67fa4f4dd51d09a66f4e548eb0f2d6" - url="$host/xp/professional/en_win_xp_pro_${PLATFORM,,}_vl.iso" + url="xp/professional/en_win_xp_pro_x64_vl.iso" ;; esac case "${ret,,}" in "sum" ) echo "$sum" ;; "size" ) echo "$size" ;; - *) echo "$url";; + *) [ -n "$url" ] && echo "$host/$url";; esac return 0 @@ -601,89 +801,92 @@ getLink1() { getLink2() { local id="$1" - local ret="$2" + local lang="$2" + local ret="$3" local url="" local sum="" local size="" local host="https://files.dog/MSDN" + [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0 + case "${id,,}" in - "win81${PLATFORM,,}" ) + "win81x64" ) size=4320526336 sum="d8333cf427eb3318ff6ab755eb1dd9d433f0e2ae43745312c1cd23e83ca1ce51" - url="$host/Windows%208.1%20with%20Update/en_windows_8.1_with_update_${PLATFORM,,}_dvd_6051480.iso" + url="Windows%208.1%20with%20Update/en_windows_8.1_with_update_x64_dvd_6051480.iso" ;; - "win81${PLATFORM,,}-enterprise" | "win81${PLATFORM,,}-enterprise-eval" ) + "win81x64-enterprise" | "win81x64-enterprise-eval" ) size=4139163648 sum="c3c604c03677504e8905090a8ce5bb1dde76b6fd58e10f32e3a25bef21b2abe1" - url="$host/Windows%208.1%20with%20Update/en_windows_8.1_enterprise_with_update_${PLATFORM,,}_dvd_6054382.iso" + url="Windows%208.1%20with%20Update/en_windows_8.1_enterprise_with_update_x64_dvd_6054382.iso" ;; "win2012r2" | "win2012r2-eval" ) size=5397889024 sum="f351e89eb88a96af4626ceb3450248b8573e3ed5924a4e19ea891e6003b62e4e" - url="$host/Windows%20Server%202012%20R2%20with%20Update/en_windows_server_2012_r2_with_update_${PLATFORM,,}_dvd_6052708.iso" + url="Windows%20Server%202012%20R2%20with%20Update/en_windows_server_2012_r2_with_update_x64_dvd_6052708.iso" ;; "win2008r2" | "win2008r2-eval" ) size=3166584832 sum="dfd9890881b7e832a927c38310fb415b7ea62ac5a896671f2ce2a111998f0df8" - url="$host/Windows%20Server%202008%20R2/en_windows_server_2008_r2_with_sp1_${PLATFORM,,}_dvd_617601.iso" + url="Windows%20Server%202008%20R2/en_windows_server_2008_r2_with_sp1_x64_dvd_617601.iso" ;; - "win7${PLATFORM,,}" | "win7${PLATFORM,,}-enterprise" ) + "win7x64" | "win7x64-enterprise" ) size=3182604288 sum="ee69f3e9b86ff973f632db8e01700c5724ef78420b175d25bae6ead90f6805a7" - url="$host/Windows%207/en_windows_7_enterprise_with_sp1_${PLATFORM,,}_dvd_u_677651.iso" + url="Windows%207/en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso" ;; - "win7${PLATFORM,,}-ultimate" ) + "win7x64-ultimate" ) size=3320903680 sum="36f4fa2416d0982697ab106e3a72d2e120dbcdb6cc54fd3906d06120d0653808" - url="$host/Windows%207/en_windows_7_ultimate_with_sp1_${PLATFORM,,}_dvd_u_677332.iso" + url="Windows%207/en_windows_7_ultimate_with_sp1_x64_dvd_u_677332.iso" ;; "win7x86" | "win7x86-enterprise" ) size=2434502656 sum="8bdd46ff8cb8b8de9c4aba02706629c8983c45e87da110e64e13be17c8434dad" - url="$host/Windows%207/en_windows_7_enterprise_with_sp1_x86_dvd_u_677710.iso" + url="Windows%207/en_windows_7_enterprise_with_sp1_x86_dvd_u_677710.iso" ;; "win7x86-ultimate" ) size=2564476928 sum="e2c009a66d63a742941f5087acae1aa438dcbe87010bddd53884b1af6b22c940" - url="$host/Windows%207/en_windows_7_ultimate_with_sp1_x86_dvd_u_677460.iso" + url="Windows%207/en_windows_7_ultimate_with_sp1_x86_dvd_u_677460.iso" ;; - "winvista${PLATFORM,,}" | "winvista${PLATFORM,,}-enterprise" ) + "winvistax64" | "winvistax64-enterprise" ) size=3205953536 sum="0a0cd511b3eac95c6f081419c9c65b12317b9d6a8d9707f89d646c910e788016" - url="$host/Windows%20Vista/en_windows_vista_enterprise_sp2_${PLATFORM,,}_dvd_342332.iso" + url="Windows%20Vista/en_windows_vista_enterprise_sp2_x64_dvd_342332.iso" ;; - "winvista${PLATFORM,,}-ultimate" ) + "winvistax64-ultimate" ) size=3861460992 sum="edf9f947c5791469fd7d2d40a5dcce663efa754f91847aa1d28ed7f585675b78" - url="$host/Windows%20Vista/en_windows_vista_sp2_${PLATFORM,,}_dvd_342267.iso" + url="Windows%20Vista/en_windows_vista_sp2_x64_dvd_342267.iso" ;; "winvistax86" | "winvistax86-enterprise" ) size=2420981760 sum="54e2720004041e7db988a391543ea5228b0affc28efcf9303d2d0ff9402067f5" - url="$host/Windows%20Vista/en_windows_vista_enterprise_sp2_x86_dvd_342329.iso" + url="Windows%20Vista/en_windows_vista_enterprise_sp2_x86_dvd_342329.iso" ;; "winvistax86-ultimate" ) size=3243413504 sum="9c36fed4255bd05a8506b2da88f9aad73643395e155e609398aacd2b5276289c" - url="$host/Windows%20Vista/en_windows_vista_with_sp2_x86_dvd_342266.iso" + url="Windows%20Vista/en_windows_vista_with_sp2_x86_dvd_342266.iso" ;; "winxpx86" ) size=617756672 sum="62b6c91563bad6cd12a352aa018627c314cfc5162d8e9f8af0756a642e602a46" - url="$host/Windows%20XP/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso" + url="Windows%20XP/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso" ;; "winxpx64" ) size=614166528 sum="8fac68e1e56c64ad9a2aa0ad464560282e67fa4f4dd51d09a66f4e548eb0f2d6" - url="$host/Windows%20XP/en_win_xp_pro_${PLATFORM,,}_vl.iso" + url="Windows%20XP/en_win_xp_pro_x64_vl.iso" ;; esac case "${ret,,}" in "sum" ) echo "$sum" ;; "size" ) echo "$size" ;; - *) echo "$url";; + *) [ -n "$url" ] && echo "$host/$url";; esac return 0 @@ -692,34 +895,37 @@ getLink2() { getLink3() { local id="$1" - local ret="$2" + local lang="$2" + local ret="$3" local url="" local sum="" local size="" local host="https://file.cnxiaobai.com/Windows" + [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0 + case "${id,,}" in "core11" ) size=2159738880 sum="78f0f44444ff95b97125b43e560a72e0d6ce0a665cf9f5573bf268191e5510c1" - url="$host/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E5%8C%85/Tiny%2010_11/tiny11%20core%20${PLATFORM,,}%20beta%201.iso" + url="%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E5%8C%85/Tiny%2010_11/tiny11%20core%20x64%20beta%201.iso" ;; "tiny11" ) size=3788177408 sum="a028800a91addc35d8ae22dce7459b67330f7d69d2f11c70f53c0fdffa5b4280" - url="$host/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E5%8C%85/Tiny%2010_11/tiny11%202311%20${PLATFORM,,}.iso" + url="%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E5%8C%85/Tiny%2010_11/tiny11%202311%20x64.iso" ;; "tiny10" ) size=3839819776 sum="a11116c0645d892d6a5a7c585ecc1fa13aa66f8c7cc6b03bf1f27bd16860cc35" - url="$host/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E5%8C%85/Tiny%2010_11/tiny10%2023H2%20${PLATFORM,,}.iso" + url="%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E5%8C%85/Tiny%2010_11/tiny10%2023H2%20x64.iso" ;; esac case "${ret,,}" in "sum" ) echo "$sum" ;; "size" ) echo "$size" ;; - *) echo "$url";; + *) [ -n "$url" ] && echo "$host/$url";; esac return 0 @@ -730,124 +936,807 @@ getLink4() { # Fallbacks for users who cannot connect to the Microsoft servers local id="$1" - local ret="$2" + local lang="$2" + local ret="$3" local url="" local sum="" local size="" local host="https://drive.massgrave.dev" + culture=$(getLanguage "$lang" "culture") + case "${id,,}" in - "win11${PLATFORM,,}" ) - size=7004780544 - sum="a6c21313210182e0315054789a2b658b77394d5544b69b5341075492f89f51e5" - url="$host/en-us_windows_11_consumer_editions_version_23h2_updated_april_2024_${PLATFORM,,}_dvd_d986680b.iso" + "win11x64" ) + case "${culture,,}" in + "ar" | "ar-"* ) url="ar-sa_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "bg" | "bg-"* ) url="bg-bg_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "cs" | "cs-"* ) url="cs-cz_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "da" | "da-"* ) url="da-dk_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "de" | "de-"* ) url="de-de_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "el" | "el-"* ) url="el-gr_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "gb" | "en-gb" ) url="en-gb_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "en" | "en-"* ) + size=7004780544 + sum="a6c21313210182e0315054789a2b658b77394d5544b69b5341075492f89f51e5" + url="en-us_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "mx" | "es-mx" ) url="es-mx_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "es" | "es-"* ) url="es-es_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "et" | "et-"* ) url="et-ee_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "fi" | "fi-"* ) url="fi-fi_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "ca" | "fr-ca" ) url="fr-ca_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "fr" | "fr-"* ) url="fr-fr_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "he" | "he-"* ) url="he-il_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "hr" | "hr-"* ) url="hr-hr_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "hu" | "hu-"* ) url="hu-hu_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "it" | "it-"* ) url="it-it_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "ja" | "ja-"* ) url="ja-jp_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "ko" | "ko-"* ) url="ko-kr_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "lt" | "lt-"* ) url="lt-lt_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "lv" | "lv-"* ) url="lv-lv_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "nb" | "nb-"* ) url="nb-no_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "nl" | "nl-"* ) url="nl-nl_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "pl" | "pl-"* ) url="pl-pl_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "br" | "pt-br" ) url="pt-br_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "pt" | "pt-"* ) url="pt-pt_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "ro" | "ro-"* ) url="ro-ro_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "ru" | "ru-"* ) url="ru-ru_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "sk" | "sk-"* ) url="sk-sk_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "sl" | "sl-"* ) url="sl-si_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "sr" | "sr-"* ) url="sr-latn-rs_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "sv" | "sv-"* ) url="sv-se_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "th" | "th-"* ) url="th-th_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "tr" | "tr-"* ) url="tr-tr_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "uk" | "uk-"* ) url="uk-ua_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "zh-hk" | "zh-tw" ) url="zh-tw_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + "zh" | "zh-"* ) url="zh-cn_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso" ;; + esac ;; - "win11${PLATFORM,,}-enterprise" | "win11${PLATFORM,,}-enterprise-eval" ) - size=6879023104 - sum="3d4d388d6ffa371956304fa7401347b4535fd10e3137978a8f7750b790a43521" - url="$host/en-us_windows_11_business_editions_version_23h2_updated_april_2024_${PLATFORM,,}_dvd_349cd577.iso" + "win11x64-enterprise" | "win11x64-enterprise-eval" ) + case "${culture,,}" in + "ar" | "ar-"* ) url="ar-sa_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_7c2ed97c.iso" ;; + "bg" | "bg-"* ) url="bg-bg_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_b04d691c.iso" ;; + "cs" | "cs-"* ) url="cs-cz_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_a03b763a.iso" ;; + "da" | "da-"* ) url="da-dk_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_b7b16bf7.iso" ;; + "de" | "de-"* ) url="de-de_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_b8a95188.iso" ;; + "el" | "el-"* ) url="el-gr_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_c80dd818.iso" ;; + "gb" | "en-gb" ) url="en-gb_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_0716ab50.iso" ;; + "en" | "en-"* ) + size=6879023104 + sum="3d4d388d6ffa371956304fa7401347b4535fd10e3137978a8f7750b790a43521" + url="en-us_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_349cd577.iso" ;; + "mx" | "es-mx" ) url="es-mx_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_79352ef9.iso" ;; + "es" | "es-"* ) url="es-es_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_252a527a.iso" ;; + "et" | "et-"* ) url="et-ee_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_3952b855.iso" ;; + "fi" | "fi-"* ) url="fi-fi_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_a90c9768.iso" ;; + "ca" | "fr-ca" ) url="fr-ca_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_f4e143d8.iso" ;; + "fr" | "fr-"* ) url="fr-fr_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_9f143fd4.iso" ;; + "he" | "he-"* ) url="he-il_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_767966f8.iso" ;; + "hr" | "hr-"* ) url="hr-hr_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_dcc7bb81.iso" ;; + "hu" | "hu-"* ) url="hu-hu_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_305a2313.iso" ;; + "it" | "it-"* ) url="it-it_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_f0af2584.iso" ;; + "ja" | "ja-"* ) url="ja-jp_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_1b3949b3.iso" ;; + "ko" | "ko-"* ) url="ko-kr_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_b34a9c97.iso" ;; + "lt" | "lt-"* ) url="lt-lt_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_dbab7eb4.iso" ;; + "lv" | "lv-"* ) url="lv-lv_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_55d75975.iso" ;; + "nb" | "nb-"* ) url="nb-no_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_7baab32f.iso" ;; + "nl" | "nl-"* ) url="nl-nl_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_d223773d.iso" ;; + "pl" | "pl-"* ) url="pl-pl_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_55984e5b.iso" ;; + "br" | "pt-br" ) url="pt-br_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_151a4636.iso" ;; + "pt" | "pt-"* ) url="pt-pt_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_37cc9525.iso" ;; + "ro" | "ro-"* ) url="ro-ro_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_9a2982f1.iso" ;; + "ru" | "ru-"* ) url="ru-ru_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_a81ee700.iso" ;; + "sk" | "sk-"* ) url="sk-sk_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_e71e6779.iso" ;; + "sl" | "sl-"* ) url="sl-si_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_d48dc41a.iso" ;; + "sr" | "sr-"* ) url="sr-latn-rs_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_86a8483f.iso" ;; + "sv" | "sv-"* ) url="sv-se_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_96fc11d1.iso" ;; + "th" | "th-"* ) url="th-th_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_282dc814.iso" ;; + "tr" | "tr-"* ) url="tr-tr_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_26e6c580.iso" ;; + "uk" | "uk-"* ) url="uk-ua_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_b2d33085.iso" ;; + "zh-hk" | "zh-tw" ) url="zh-tw_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_6aa057e6.iso" ;; + "zh" | "zh-"* ) url="zh-cn_windows_11_business_editions_version_23h2_updated_april_2024_x64_dvd_3db5a62b.iso" ;; + esac ;; - "win11${PLATFORM,,}-iot" | "win11${PLATFORM,,}-enterprise-iot-eval" ) + "win10x64" ) + case "${culture,,}" in + "ar" | "ar-"* ) url="ar-sa_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "bg" | "bg-"* ) url="bg-bg_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "cs" | "cs-"* ) url="cs-cz_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "da" | "da-"* ) url="da-dk_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "de" | "de-"* ) url="de-de_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "el" | "el-"* ) url="el-gr_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "gb" | "en-gb" ) url="en-gb_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "en" | "en-"* ) + size=6605459456 + sum="b072627c9b8d9f62af280faf2a8b634376f91dc73ea1881c81943c151983aa4a" + url="en-us_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "mx" | "es-mx" ) url="es-mx_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "es" | "es-"* ) url="es-es_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "et" | "et-"* ) url="et-ee_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "fi" | "fi-"* ) url="fi-fi_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "ca" | "fr-ca" ) url="fr-ca_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "fr" | "fr-"* ) url="fr-fr_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "he" | "he-"* ) url="he-il_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "hr" | "hr-"* ) url="hr-hr_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "hu" | "hu-"* ) url="hu-hu_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "it" | "it-"* ) url="it-it_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "ja" | "ja-"* ) url="ja-jp_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "ko" | "ko-"* ) url="ko-kr_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "lt" | "lt-"* ) url="lt-lt_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "lv" | "lv-"* ) url="lv-lv_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "nb" | "nb-"* ) url="nb-no_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "nl" | "nl-"* ) url="nl-nl_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "pl" | "pl-"* ) url="pl-pl_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "br" | "pt-br" ) url="pt-br_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "pt" | "pt-"* ) url="pt-pt_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "ro" | "ro-"* ) url="ro-ro_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "ru" | "ru-"* ) url="ru-ru_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "sk" | "sk-"* ) url="sk-sk_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "sl" | "sl-"* ) url="sl-si_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "sr" | "sr-"* ) url="sr-latn-rs_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "sv" | "sv-"* ) url="sv-se_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "th" | "th-"* ) url="th-th_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "tr" | "tr-"* ) url="tr-tr_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "uk" | "uk-"* ) url="uk-ua_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "zh-hk" | "zh-tw" ) url="zh-tw_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + "zh" | "zh-"* ) url="zh-cn_windows_10_consumer_editions_version_22h2_updated_april_2024_x64_dvd_9a92dc89.iso" ;; + esac + ;; + "win10x64-enterprise" | "win10x64-enterprise-eval" ) + case "${culture,,}" in + "ar" | "ar-"* ) url="ar-sa_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_4453f818.iso" ;; + "bg" | "bg-"* ) url="bg-bg_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_1777c1d1.iso" ;; + "cs" | "cs-"* ) url="cs-cz_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_c57cc386.iso" ;; + "da" | "da-"* ) url="da-dk_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_45f3ae0c.iso" ;; + "de" | "de-"* ) url="de-de_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_8042d5ca.iso" ;; + "el" | "el-"* ) url="el-gr_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_60cc062b.iso" ;; + "gb" | "en-gb" ) url="en-gb_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_da84fbf3.iso" ;; + "en" | "en-"* ) + size=6428377088 + sum="05fe9de04c2626bd00fbe69ad19129b2dbb75a93a2fe030ebfb2256d937ceab8" + url="en-us_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_c00090a7.iso" ;; + "mx" | "es-mx" ) url="es-mx_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_87806b10.iso" ;; + "es" | "es-"* ) url="es-es_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_a464088d.iso" ;; + "et" | "et-"* ) url="et-ee_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_bd09a0ce.iso" ;; + "fi" | "fi-"* ) url="fi-fi_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_4d76cfbd.iso" ;; + "ca" | "fr-ca" ) url="fr-ca_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_40643c76.iso" ;; + "fr" | "fr-"* ) url="fr-fr_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_8ca89ac8.iso" ;; + "he" | "he-"* ) url="he-il_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_804bcaf0.iso" ;; + "hr" | "hr-"* ) url="hr-hr_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_4c4f5b26.iso" ;; + "hu" | "hu-"* ) url="hu-hu_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_43302dfb.iso" ;; + "it" | "it-"* ) url="it-it_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_73996e82.iso" ;; + "ja" | "ja-"* ) url="ja-jp_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_0aaece93.iso" ;; + "ko" | "ko-"* ) url="ko-kr_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_37654eaa.iso" ;; + "lt" | "lt-"* ) url="lt-lt_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_83c6a9b7.iso" ;; + "lv" | "lv-"* ) url="lv-lv_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_2b80cd3c.iso" ;; + "nb" | "nb-"* ) url="nb-no_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_2a274012.iso" ;; + "nl" | "nl-"* ) url="nl-nl_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_5eae56c5.iso" ;; + "pl" | "pl-"* ) url="pl-pl_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_6497a429.iso" ;; + "br" | "pt-br" ) url="pt-br_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_de63f2f7.iso" ;; + "pt" | "pt-"* ) url="pt-pt_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_a95933fb.iso" ;; + "ro" | "ro-"* ) url="ro-ro_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_d008e588.iso" ;; + "ru" | "ru-"* ) url="ru-ru_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_12b02d35.iso" ;; + "sk" | "sk-"* ) url="sk-sk_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_7caf6b4f.iso" ;; + "sl" | "sl-"* ) url="sl-si_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_e1e76668.iso" ;; + "sr" | "sr-"* ) url="sr-latn-rs_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_b72c40ce.iso" ;; + "sv" | "sv-"* ) url="sv-se_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_4800fcd8.iso" ;; + "th" | "th-"* ) url="th-th_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_5077fb45.iso" ;; + "tr" | "tr-"* ) url="tr-tr_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_7703a6c4.iso" ;; + "uk" | "uk-"* ) url="uk-ua_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_37caf402.iso" ;; + "zh-hk" | "zh-tw" ) url="zh-tw_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_35f0e5a7.iso" ;; + "zh" | "zh-"* ) url="zh-cn_windows_10_business_editions_version_22h2_updated_april_2024_x64_dvd_a2873093.iso" ;; + esac + ;; + "win10x64-ltsc" | "win10x64-enterprise-ltsc-eval" ) + case "${culture,,}" in + "ar" | "ar-"* ) url="ar-sa_windows_10_enterprise_ltsc_2021_x64_dvd_60bc2a7a.iso" ;; + "bg" | "bg-"* ) url="bg-bg_windows_10_enterprise_ltsc_2021_x64_dvd_b0887275.iso" ;; + "cs" | "cs-"* ) url="cs-cz_windows_10_enterprise_ltsc_2021_x64_dvd_d624c653.iso" ;; + "da" | "da-"* ) url="da-dk_windows_10_enterprise_ltsc_2021_x64_dvd_6ec511bb.iso" ;; + "de" | "de-"* ) url="de-de_windows_10_enterprise_ltsc_2021_x64_dvd_71796d33.iso" ;; + "el" | "el-"* ) url="el-gr_windows_10_enterprise_ltsc_2021_x64_dvd_c83eab34.iso" ;; + "gb" | "en-gb" ) url="en-gb_windows_10_enterprise_ltsc_2021_x64_dvd_7fe51fe8.iso" ;; + "en" | "en-"* ) + size=4899461120 + sum="c90a6df8997bf49e56b9673982f3e80745058723a707aef8f22998ae6479597d" + url="en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso" ;; + "mx" | "es-mx" ) url="es-mx_windows_10_enterprise_ltsc_2021_x64_dvd_f6aaf384.iso" ;; + "es" | "es-"* ) url="es-es_windows_10_enterprise_ltsc_2021_x64_dvd_51d721ea.iso" ;; + "et" | "et-"* ) url="et-ee_windows_10_enterprise_ltsc_2021_x64_dvd_012a5c50.iso" ;; + "fi" | "fi-"* ) url="fi-fi_windows_10_enterprise_ltsc_2021_x64_dvd_551582d9.iso" ;; + "ca" | "fr-ca" ) url="fr-ca_windows_10_enterprise_ltsc_2021_x64_dvd_2770e649.iso" ;; + "fr" | "fr-"* ) url="fr-fr_windows_10_enterprise_ltsc_2021_x64_dvd_bda01eb0.iso" ;; + "he" | "he-"* ) url="he-il_windows_10_enterprise_ltsc_2021_x64_dvd_3a55ecd6.iso" ;; + "hr" | "hr-"* ) url="hr-hr_windows_10_enterprise_ltsc_2021_x64_dvd_f5085b75.iso" ;; + "hu" | "hu-"* ) url="hu-hu_windows_10_enterprise_ltsc_2021_x64_dvd_d541ddb3.iso" ;; + "it" | "it-"* ) url="it-it_windows_10_enterprise_ltsc_2021_x64_dvd_0c1aa034.iso" ;; + "ja" | "ja-"* ) url="ja-jp_windows_10_enterprise_ltsc_2021_x64_dvd_ef58c6a1.iso" ;; + "ko" | "ko-"* ) url="ko-kr_windows_10_enterprise_ltsc_2021_x64_dvd_6d26f398.iso" ;; + "lt" | "lt-"* ) url="lt-lt_windows_10_enterprise_ltsc_2021_x64_dvd_9ffbbd5b.iso" ;; + "lv" | "lv-"* ) url="lv-lv_windows_10_enterprise_ltsc_2021_x64_dvd_6c89d2e0.iso" ;; + "nb" | "nb-"* ) url="nb-no_windows_10_enterprise_ltsc_2021_x64_dvd_c65c51a5.iso" ;; + "nl" | "nl-"* ) url="nl-nl_windows_10_enterprise_ltsc_2021_x64_dvd_88f53466.iso" ;; + "pl" | "pl-"* ) url="pl-pl_windows_10_enterprise_ltsc_2021_x64_dvd_eff40776.iso" ;; + "br" | "pt-br" ) url="pt-br_windows_10_enterprise_ltsc_2021_x64_dvd_f318268e.iso" ;; + "pt" | "pt-"* ) url="pt-pt_windows_10_enterprise_ltsc_2021_x64_dvd_f2e9b6a0.iso" ;; + "ro" | "ro-"* ) url="ro-ro_windows_10_enterprise_ltsc_2021_x64_dvd_ae2284d6.iso" ;; + "ru" | "ru-"* ) url="ru-ru_windows_10_enterprise_ltsc_2021_x64_dvd_5044a1e7.iso" ;; + "sk" | "sk-"* ) url="sk-sk_windows_10_enterprise_ltsc_2021_x64_dvd_d6c64c5f.iso" ;; + "sl" | "sl-"* ) url="sl-si_windows_10_enterprise_ltsc_2021_x64_dvd_ec090386.iso" ;; + "sr" | "sr-"* ) url="sr-latn-rs_windows_10_enterprise_ltsc_2021_x64_dvd_2d2f8815.iso" ;; + "sv" | "sv-"* ) url="sv-se_windows_10_enterprise_ltsc_2021_x64_dvd_9a28bb6b.iso" ;; + "th" | "th-"* ) url="th-th_windows_10_enterprise_ltsc_2021_x64_dvd_b7ed34d6.iso" ;; + "tr" | "tr-"* ) url="tr-tr_windows_10_enterprise_ltsc_2021_x64_dvd_e55b1896.iso" ;; + "uk" | "uk-"* ) url="uk-ua_windows_10_enterprise_ltsc_2021_x64_dvd_816da3c3.iso" ;; + "zh-hk" | "zh-tw" ) url="zh-tw_windows_10_enterprise_ltsc_2021_x64_dvd_80dba877.iso" ;; + "zh" | "zh-"* ) url="zh-cn_windows_10_enterprise_ltsc_2021_x64_dvd_033b7312.iso" ;; + esac + ;; + "win11x64-iot" | "win11x64-enterprise-iot-eval" ) + [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0 size=6248140800 sum="5d9b86ad467bc89f488d1651a6c5ad3656a7ea923f9f914510657a24c501bb86" - url="$host/en-us_windows_11_iot_enterprise_version_23h2_${PLATFORM,,}_dvd_fb37549c.iso" + url="en-us_windows_11_iot_enterprise_version_23h2_x64_dvd_fb37549c.iso" ;; - "win10${PLATFORM,,}" ) - size=6605459456 - sum="b072627c9b8d9f62af280faf2a8b634376f91dc73ea1881c81943c151983aa4a" - url="$host/en-us_windows_10_consumer_editions_version_22h2_updated_april_2024_${PLATFORM,,}_dvd_9a92dc89.iso" - ;; - "win10${PLATFORM,,}-enterprise" | "win10${PLATFORM,,}-enterprise-eval" ) - size=6428377088 - sum="05fe9de04c2626bd00fbe69ad19129b2dbb75a93a2fe030ebfb2256d937ceab8" - url="$host/en-us_windows_10_business_editions_version_22h2_updated_april_2024_${PLATFORM,,}_dvd_c00090a7.iso" - ;; - "win10${PLATFORM,,}-iot" | "win10${PLATFORM,,}-enterprise-iot-eval" ) + "win10x64-iot" | "win10x64-enterprise-iot-eval" ) + [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0 size=4851668992 sum="a0334f31ea7a3e6932b9ad7206608248f0bd40698bfb8fc65f14fc5e4976c160" - url="$host/en-us_windows_10_iot_enterprise_ltsc_2021_${PLATFORM,,}_dvd_257ad90f.iso" + url="en-us_windows_10_iot_enterprise_ltsc_2021_x64_dvd_257ad90f.iso" ;; - "win10${PLATFORM,,}-ltsc" | "win10${PLATFORM,,}-enterprise-ltsc-eval" ) - size=4899461120 - sum="c90a6df8997bf49e56b9673982f3e80745058723a707aef8f22998ae6479597d" - url="$host/en-us_windows_10_enterprise_ltsc_2021_${PLATFORM,,}_dvd_d289cf96.iso" - ;; - "win81${PLATFORM,,}-enterprise" | "win81${PLATFORM,,}-enterprise-eval" ) - size=4139163648 - sum="c3c604c03677504e8905090a8ce5bb1dde76b6fd58e10f32e3a25bef21b2abe1" - url="$host/en_windows_8.1_enterprise_with_update_${PLATFORM,,}_dvd_6054382.iso" + "win81x64-enterprise" | "win81x64-enterprise-eval" ) + case "${culture,,}" in + "ar" | "ar-"* ) url="ar_windows_8.1_enterprise_with_update_x64_dvd_6050360.iso" ;; + "bg" | "bg-"* ) url="bg_windows_8.1_enterprise_with_update_x64_dvd_6050367.iso" ;; + "cs" | "cs-"* ) url="cs_windows_8.1_enterprise_with_update_x64_dvd_6050393.iso" ;; + "da" | "da-"* ) url="da_windows_8.1_enterprise_with_update_x64_dvd_6050394.iso" ;; + "de" | "de-"* ) url="de_windows_8.1_enterprise_with_update_x64_dvd_6050501.iso" ;; + "el" | "el-"* ) url="el_windows_8.1_enterprise_with_update_x64_dvd_6050503.iso" ;; + "gb" | "en-gb" ) url="en-gb_windows_8.1_enterprise_with_update_x64_dvd_6054383.iso" ;; + "en" | "en-"* ) + size=4139163648 + sum="c3c604c03677504e8905090a8ce5bb1dde76b6fd58e10f32e3a25bef21b2abe1" + url="en_windows_8.1_enterprise_with_update_x64_dvd_6054382.iso" ;; + "es" | "es-"* ) url="es_windows_8.1_enterprise_with_update_x64_dvd_6050578.iso" ;; + "et" | "et-"* ) url="et_windows_8.1_enterprise_with_update_x64_dvd_6054384.iso" ;; + "fi" | "fi-"* ) url="fi_windows_8.1_enterprise_with_update_x64_dvd_6050497.iso" ;; + "fr" | "fr-"* ) url="fr_windows_8.1_enterprise_with_update_x64_dvd_6050499.iso" ;; + "he" | "he-"* ) url="he_windows_8.1_enterprise_with_update_x64_dvd_6050504.iso" ;; + "hr" | "hr-"* ) url="hr_windows_8.1_enterprise_with_update_x64_dvd_6050391.iso" ;; + "hu" | "hu-"* ) url="hu_windows_8.1_enterprise_with_update_x64_dvd_6050505.iso" ;; + "it" | "it-"* ) url="it_windows_8.1_enterprise_with_update_x64_dvd_6050507.iso" ;; + "ja" | "ja-"* ) url="ja_windows_8.1_enterprise_with_update_x64_dvd_6050508.iso" ;; + "ko" | "ko-"* ) url="ko_windows_8.1_enterprise_with_update_x64_dvd_6050509.iso" ;; + "lt" | "lt-"* ) url="lt_windows_8.1_enterprise_with_update_x64_dvd_6050511.iso" ;; + "lv" | "lv-"* ) url="lv_windows_8.1_enterprise_with_update_x64_dvd_6050510.iso" ;; + "nb" | "nb-"* ) url="nb_windows_8.1_enterprise_with_update_x64_dvd_6050512.iso" ;; + "nl" | "nl-"* ) url="nl_windows_8.1_enterprise_with_update_x64_dvd_6054381.iso" ;; + "pl" | "pl-"* ) url="pl_windows_8.1_enterprise_with_update_x64_dvd_6050515.iso" ;; + "br" | "pt-br" ) url="pt_windows_8.1_enterprise_with_update_x64_dvd_6050521.iso" ;; + "pt" | "pt-"* ) url="pp_windows_8.1_enterprise_with_update_x64_dvd_6050526.iso" ;; + "ro" | "ro-"* ) url="ro_windows_8.1_enterprise_with_update_x64_dvd_6050534.iso" ;; + "ru" | "ru-"* ) url="ru_windows_8.1_enterprise_with_update_x64_dvd_6050542.iso" ;; + "sk" | "sk-"* ) url="sk_windows_8.1_enterprise_with_update_x64_dvd_6050562.iso" ;; + "sl" | "sl-"* ) url="sl_windows_8.1_enterprise_with_update_x64_dvd_6050570.iso" ;; + "sr" | "sr-"* ) url="sr-latn_windows_8.1_enterprise_with_update_x64_dvd_6050553.iso" ;; + "sv" | "sv-"* ) url="sv_windows_8.1_enterprise_with_update_x64_dvd_6050590.iso" ;; + "th" | "th-"* ) url="th_windows_8.1_enterprise_with_update_x64_dvd_6050602.iso" ;; + "tr" | "tr-"* ) url="tr_windows_8.1_enterprise_with_update_x64_dvd_6050609.iso" ;; + "uk" | "uk-"* ) url="uk_windows_8.1_enterprise_with_update_x64_dvd_6050618.iso" ;; + "zh-hk" ) url="hk_windows_8.1_enterprise_with_update_x64_dvd_6050380.iso" ;; + "zh-tw" ) url="tw_windows_8.1_enterprise_with_update_x64_dvd_6050387.iso" ;; + "zh" | "zh-"* ) url="cn_windows_8.1_enterprise_with_update_x64_dvd_6050374.iso" ;; + esac ;; "win2022" | "win2022-eval" ) - size=5515755520 - sum="7f41d603224e8a0bf34ba957d3abf0a02437ab75000dd758b5ce3f050963e91f" - url="$host/en-us_windows_server_2022_updated_april_2024_${PLATFORM,,}_dvd_164349f3.iso" + case "${culture,,}" in + "cs" | "cs-"* ) url="cs-cz_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "de" | "de-"* ) url="de-de_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "en" | "en-"* ) + size=5515755520 + sum="7f41d603224e8a0bf34ba957d3abf0a02437ab75000dd758b5ce3f050963e91f" + url="en-us_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "es" | "es-"* ) url="es-es_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "fr" | "fr-"* ) url="fr-fr_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "hu" | "hu-"* ) url="hu-hu_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "it" | "it-"* ) url="it-it_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "ja" | "ja-"* ) url="ja-jp_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "ko" | "ko-"* ) url="ko-kr_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "nl" | "nl-"* ) url="nl-nl_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "pl" | "pl-"* ) url="pl-pl_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "br" | "pt-br" ) url="pt-br_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "pt" | "pt-"* ) url="pt-pt_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "ru" | "ru-"* ) url="ru-ru_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "sv" | "sv-"* ) url="sv-se_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "tr" | "tr-"* ) url="tr-tr_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "zh-hk" | "zh-tw" ) url="zh-tw_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + "zh" | "zh-"* ) url="zh-cn_windows_server_2022_updated_april_2024_x64_dvd_164349f3.iso" ;; + esac ;; "win2019" | "win2019-eval" ) - size=4843268096 - sum="4c5dd63efee50117986a2e38d4b3a3fbaf3c1c15e2e7ea1d23ef9d8af148dd2d" - url="$host/en_windows_server_2019_${PLATFORM,,}_dvd_4cb967d8.iso" + case "${culture,,}" in + "cs" | "cs-"* ) url="cs_windows_server_2019_x64_dvd_65383121.iso" ;; + "de" | "de-"* ) url="de_windows_server_2019_x64_dvd_17559a5b.iso" ;; + "en" | "en-"* ) + size=4843268096 + sum="4c5dd63efee50117986a2e38d4b3a3fbaf3c1c15e2e7ea1d23ef9d8af148dd2d" + url="en_windows_server_2019_x64_dvd_4cb967d8.iso" ;; + "es" | "es-"* ) url="es_windows_server_2019_x64_dvd_dd6b7747.iso" ;; + "fr" | "fr-"* ) url="fr_windows_server_2019_x64_dvd_d936fc7a.iso" ;; + "hu" | "hu-"* ) url="hu_windows_server_2019_x64_dvd_c8f2c460.iso" ;; + "it" | "it-"* ) url="it_windows_server_2019_x64_dvd_03c34df6.iso" ;; + "ja" | "ja-"* ) url="ja_windows_server_2019_x64_dvd_260a1d93.iso" ;; + "ko" | "ko-"* ) url="ko_windows_server_2019_x64_dvd_8778047d.iso" ;; + "nl" | "nl-"* ) url="nl_windows_server_2019_x64_dvd_82f9a152.iso" ;; + "pl" | "pl-"* ) url="pl_windows_server_2019_x64_dvd_2cd7adba.iso" ;; + "br" | "pt-br" ) url="pt_windows_server_2019_x64_dvd_e078dea6.iso" ;; + "pt" | "pt-"* ) url="pp_windows_server_2019_x64_dvd_e8fadd22.iso" ;; + "ru" | "ru-"* ) url="ru_windows_server_2019_x64_dvd_3411c84a.iso" ;; + "sv" | "sv-"* ) url="sv_windows_server_2019_x64_dvd_ce3d1a8d.iso" ;; + "tr" | "tr-"* ) url="tr_windows_server_2019_x64_dvd_475b2d44.iso" ;; + "zh-hk" | "zh-tw" ) url="ct_windows_server_2019_x64_dvd_b776f44b.iso" ;; + "zh" | "zh-"* ) url="cn_windows_server_2019_x64_dvd_4de40f33.iso" ;; + esac ;; "win2016" | "win2016-eval" ) - size=5653628928 - sum="4caeb24b661fcede81cd90661aec31aa69753bf49a5ac247253dd021bc1b5cbb" - url="$host/en_windows_server_2016_${PLATFORM,,}_dvd_9327751.iso" + case "${culture,,}" in + "cs" | "cs-"* ) url="cs_windows_server_2016_x64_dvd_9327749.iso" ;; + "de" | "de-"* ) url="de_windows_server_2016_x64_dvd_9327757.iso" ;; + "en" | "en-"* ) + size=5653628928 + sum="4caeb24b661fcede81cd90661aec31aa69753bf49a5ac247253dd021bc1b5cbb" + url="en_windows_server_2016_x64_dvd_9327751.iso" ;; + "es" | "es-"* ) url="es_windows_server_2016_x64_dvd_9327767.iso" ;; + "fr" | "fr-"* ) url="fr_windows_server_2016_x64_dvd_9327754.iso" ;; + "hu" | "hu-"* ) url="hu_windows_server_2016_x64_dvd_9327759.iso" ;; + "it" | "it-"* ) url="it_windows_server_2016_x64_dvd_9327760.iso" ;; + "ja" | "ja-"* ) url="ja_windows_server_2016_x64_dvd_9327761.iso" ;; + "ko" | "ko-"* ) url="ko_windows_server_2016_x64_dvd_9327762.iso" ;; + "nl" | "nl-"* ) url="nl_windows_server_2016_x64_dvd_9327750.iso" ;; + "pl" | "pl-"* ) url="pl_windows_server_2016_x64_dvd_9327763.iso" ;; + "br" | "pt-br" ) url="pt_windows_server_2016_x64_dvd_9327764.iso" ;; + "pt" | "pt-"* ) url="pp_windows_server_2016_x64_dvd_9327765.iso" ;; + "ru" | "ru-"* ) url="ru_windows_server_2016_x64_dvd_9327766.iso" ;; + "sv" | "sv-"* ) url="sv_windows_server_2016_x64_dvd_9327768.iso" ;; + "tr" | "tr-"* ) url="tr_windows_server_2016_x64_dvd_9327769.iso" ;; + "zh-hk" | "zh-tw" ) url="ct_windows_server_2016_x64_dvd_9327748.iso" ;; + "zh" | "zh-"* ) url="cn_windows_server_2016_x64_dvd_9327743.iso" ;; + esac ;; "win2012r2" | "win2012r2-eval" ) - size=5397889024 - sum="f351e89eb88a96af4626ceb3450248b8573e3ed5924a4e19ea891e6003b62e4e" - url="$host/en_windows_server_2012_r2_with_update_${PLATFORM,,}_dvd_6052708.iso" + case "${culture,,}" in + "cs" | "cs-"* ) url="cs_windows_server_2012_r2_with_update_x64_dvd_6052695.iso" ;; + "de" | "de-"* ) url="de_windows_server_2012_r2_with_update_x64_dvd_6052720.iso" ;; + "en" | "en-"* ) + size=5397889024 + sum="f351e89eb88a96af4626ceb3450248b8573e3ed5924a4e19ea891e6003b62e4e" + url="en_windows_server_2012_r2_with_update_x64_dvd_6052708.iso" ;; + "es" | "es-"* ) url="es_windows_server_2012_r2_with_update_x64_dvd_6052769.iso" ;; + "fr" | "fr-"* ) url="fr_windows_server_2012_r2_with_update_x64_dvd_6052713.iso" ;; + "hu" | "hu-"* ) url="hu_windows_server_2012_r2_with_update_x64_dvd_6052727.iso" ;; + "it" | "it-"* ) url="it_windows_server_2012_r2_with_update_x64_dvd_6052734.iso" ;; + "ja" | "ja-"* ) url="ja_windows_server_2012_r2_with_update_x64_dvd_6052738.iso" ;; + "ko" | "ko-"* ) url="ko_windows_server_2012_r2_with_update_x64_dvd_6052743.iso" ;; + "nl" | "nl-"* ) url="nl_windows_server_2012_r2_with_update_x64_dvd_6052701.iso" ;; + "pl" | "pl-"* ) url="pl_windows_server_2012_r2_with_update_x64_dvd_6052749.iso" ;; + "br" | "pt-br" ) url="pt_windows_server_2012_r2_with_update_x64_dvd_6052754.iso" ;; + "pt" | "pt-"* ) url="pp_windows_server_2012_r2_with_update_x64_dvd_6052758.iso" ;; + "ru" | "ru-"* ) url="ru_windows_server_2012_r2_with_update_x64_dvd_6052763.iso" ;; + "sv" | "sv-"* ) url="sv_windows_server_2012_r2_with_update_x64_dvd_6052773.iso" ;; + "tr" | "tr-"* ) url="tr_windows_server_2012_r2_with_update_x64_dvd_6052778.iso" ;; + "zh-hk" ) url="hk_windows_server_2012_r2_with_update_x64_dvd_6052731.iso" ;; + "zh-tw" ) url="tw_windows_server_2012_r2_with_update_x64_dvd_6052736.iso" ;; + "zh" | "zh-"* ) url="cn_windows_server_2012_r2_with_update_x64_dvd_6052725.iso" ;; + esac ;; "win2008r2" | "win2008r2-eval" ) - size=3166584832 - sum="dfd9890881b7e832a927c38310fb415b7ea62ac5a896671f2ce2a111998f0df8" - url="$host/en_windows_server_2008_r2_with_sp1_${PLATFORM,,}_dvd_617601.iso" + case "${culture,,}" in + "cs" | "cs-"* ) url="cs_windows_server_2008_r2_with_sp1_x64_dvd_617602.iso" ;; + "de" | "de-"* ) url="de_windows_server_2008_r2_with_sp1_x64_dvd_617380.iso" ;; + "en" | "en-"* ) + size=3166584832 + sum="dfd9890881b7e832a927c38310fb415b7ea62ac5a896671f2ce2a111998f0df8" + url="en_windows_server_2008_r2_with_sp1_x64_dvd_617601.iso" ;; + "es" | "es-"* ) url="es_windows_server_2008_r2_with_sp1_x64_dvd_617398.iso" ;; + "fr" | "fr-"* ) url="fr_windows_server_2008_r2_with_sp1_x64_dvd_617591.iso" ;; + "hu" | "hu-"* ) url="hu_windows_server_2008_r2_with_sp1_x64_dvd_617383.iso" ;; + "it" | "it-"* ) url="it_windows_server_2008_r2_with_sp1_x64_dvd_617391.iso" ;; + "ja" | "ja-"* ) url="ja_windows_server_2008_r2_with_sp1_x64_dvd_617387.iso" ;; + "ko" | "ko-"* ) url="ko_windows_server_2008_r2_with_sp1_x64_dvd_617385.iso" ;; + "nl" | "nl-"* ) url="nl_windows_server_2008_r2_with_sp1_x64_dvd_617597.iso" ;; + "pl" | "pl-"* ) url="pl_windows_server_2008_r2_with_sp1_x64_dvd_617388.iso" ;; + "br" | "pt-br" ) url="pt_windows_server_2008_r2_with_sp1_x64_dvd_617599.iso" ;; + "pt" | "pt-"* ) url="pp_windows_server_2008_r2_with_sp1_x64_dvd_617382.iso" ;; + "ru" | "ru-"* ) url="ru_windows_server_2008_r2_with_sp1_x64_dvd_617389.iso" ;; + "sv" | "sv-"* ) url="sv_windows_server_2008_r2_with_sp1_x64_dvd_617393.iso" ;; + "tr" | "tr-"* ) url="tr_windows_server_2008_r2_with_sp1_x64_dvd_617390.iso" ;; + "zh-hk" ) url="hk_windows_server_2008_r2_with_sp1_x64_dvd_617586.iso" ;; + "zh-tw" ) url="tw_windows_server_2008_r2_with_sp1_x64_dvd_617595.iso" ;; + "zh" | "zh-"* ) url="cn_windows_server_2008_r2_with_sp1_x64_dvd_617598.iso" ;; + esac ;; - "win7${PLATFORM,,}" | "win7${PLATFORM,,}-enterprise" ) - size=3182604288 - sum="ee69f3e9b86ff973f632db8e01700c5724ef78420b175d25bae6ead90f6805a7" - url="$host/en_windows_7_enterprise_with_sp1_${PLATFORM,,}_dvd_u_677651.iso" + "win7x64" | "win7x64-enterprise" ) + case "${culture,,}" in + "ar" | "ar-"* ) url="ar_windows_7_enterprise_with_sp1_x64_dvd_u_677643.iso" ;; + "bg" | "bg-"* ) url="bg_windows_7_enterprise_with_sp1_x64_dvd_u_677644.iso" ;; + "cs" | "cs-"* ) url="cs_windows_7_enterprise_with_sp1_x64_dvd_u_677646.iso" ;; + "da" | "da-"* ) url="da_windows_7_enterprise_with_sp1_x64_dvd_u_677648.iso" ;; + "de" | "de-"* ) url="de_windows_7_enterprise_with_sp1_x64_dvd_u_677649.iso" ;; + "el" | "el-"* ) url="el_windows_7_enterprise_with_sp1_x64_dvd_u_677650.iso" ;; + "en" | "en-"* ) + size=3182604288 + sum="ee69f3e9b86ff973f632db8e01700c5724ef78420b175d25bae6ead90f6805a7" + url="en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso" ;; + "es" | "es-"* ) url="es_windows_7_enterprise_with_sp1_x64_dvd_u_677652.iso" ;; + "et" | "et-"* ) url="et_windows_7_enterprise_with_sp1_x64_dvd_u_677653.iso" ;; + "fi" | "fi-"* ) url="fi_windows_7_enterprise_with_sp1_x64_dvd_u_677655.iso" ;; + "fr" | "fr-"* ) url="fr_windows_7_enterprise_with_sp1_x64_dvd_u_677656.iso" ;; + "he" | "he-"* ) url="he_windows_7_enterprise_with_sp1_x64_dvd_u_677657.iso" ;; + "hr" | "hr-"* ) url="hr_windows_7_enterprise_with_sp1_x64_dvd_u_677658.iso" ;; + "hu" | "hu-"* ) url="hu_windows_7_enterprise_with_sp1_x64_dvd_u_677659.iso" ;; + "it" | "it-"* ) url="it_windows_7_enterprise_with_sp1_x64_dvd_u_677660.iso" ;; + "ja" | "ja-"* ) url="ja_windows_7_enterprise_with_sp1_x64_dvd_u_677662.iso" ;; + "ko" | "ko-"* ) url="ko_windows_7_enterprise_k_with_sp1_x64_dvd_u_677728.iso" ;; + "lt" | "lt-"* ) url="lt_windows_7_enterprise_with_sp1_x64_dvd_u_677663.iso" ;; + "lv" | "lv-"* ) url="lv_windows_7_enterprise_with_sp1_x64_dvd_u_677664.iso" ;; + "nb" | "nb-"* ) url="no_windows_7_enterprise_with_sp1_x64_dvd_u_677665.iso" ;; + "nl" | "nl-"* ) url="nl_windows_7_enterprise_with_sp1_x64_dvd_u_677666.iso" ;; + "pl" | "pl-"* ) url="pl_windows_7_enterprise_with_sp1_x64_dvd_u_677667.iso" ;; + "br" | "pt-br" ) url="pt_windows_7_enterprise_with_sp1_x64_dvd_u_677668.iso" ;; + "pt" | "pt-"* ) url="pp_windows_7_enterprise_with_sp1_x64_dvd_u_677669.iso" ;; + "ro" | "ro-"* ) url="ro_windows_7_enterprise_with_sp1_x64_dvd_u_677670.iso" ;; + "ru" | "ru-"* ) url="ru_windows_7_enterprise_with_sp1_x64_dvd_u_677671.iso" ;; + "sk" | "sk-"* ) url="sk_windows_7_enterprise_with_sp1_x64_dvd_u_677673.iso" ;; + "sl" | "sl-"* ) url="sl_windows_7_enterprise_with_sp1_x64_dvd_u_677674.iso" ;; + "sr" | "sr-"* ) url="sr_windows_7_enterprise_with_sp1_x64_dvd_u_677675.iso" ;; + "sv" | "sv-"* ) url="sv_windows_7_enterprise_with_sp1_x64_dvd_u_677676.iso" ;; + "th" | "th-"* ) url="th_windows_7_enterprise_with_sp1_x64_dvd_u_677678.iso" ;; + "tr" | "tr-"* ) url="tr_windows_7_enterprise_with_sp1_x64_dvd_u_677681.iso" ;; + "uk" | "uk-"* ) url="uk_windows_7_enterprise_with_sp1_x64_dvd_u_677683.iso" ;; + "zh-hk" ) url="hk_windows_7_enterprise_with_sp1_x64_dvd_u_677687.iso" ;; + "zh-tw" ) url="tw_windows_7_enterprise_with_sp1_x64_dvd_u_677689.iso" ;; + "zh" | "zh-"* ) url="cn_windows_7_enterprise_with_sp1_x64_dvd_u_677685.iso" ;; + esac ;; - "win7${PLATFORM,,}-ultimate" ) - size=3320903680 - sum="36f4fa2416d0982697ab106e3a72d2e120dbcdb6cc54fd3906d06120d0653808" - url="$host/en_windows_7_ultimate_with_sp1_${PLATFORM,,}_dvd_u_677332.iso" + "win7x64-ultimate" ) + case "${culture,,}" in + "ar" | "ar-"* ) url="ar_windows_7_ultimate_with_sp1_x64_dvd_u_677345.iso" ;; + "bg" | "bg-"* ) url="bg_windows_7_ultimate_with_sp1_x64_dvd_u_677363.iso" ;; + "cs" | "cs-"* ) url="cs_windows_7_ultimate_with_sp1_x64_dvd_u_677376.iso" ;; + "da" | "da-"* ) url="da_windows_7_ultimate_with_sp1_x64_dvd_u_677294.iso" ;; + "de" | "de-"* ) url="de_windows_7_ultimate_with_sp1_x64_dvd_u_677306.iso" ;; + "el" | "el-"* ) url="el_windows_7_ultimate_with_sp1_x64_dvd_u_677318.iso" ;; + "en" | "en-"* ) + size=3320903680 + sum="36f4fa2416d0982697ab106e3a72d2e120dbcdb6cc54fd3906d06120d0653808" + url="en_windows_7_ultimate_with_sp1_x64_dvd_u_677332.iso" ;; + "es" | "es-"* ) url="es_windows_7_ultimate_with_sp1_x64_dvd_u_677350.iso" ;; + "et" | "et-"* ) url="et_windows_7_ultimate_with_sp1_x64_dvd_u_677368.iso" ;; + "fi" | "fi-"* ) url="fi_windows_7_ultimate_with_sp1_x64_dvd_u_677378.iso" ;; + "fr" | "fr-"* ) url="fr_windows_7_ultimate_with_sp1_x64_dvd_u_677299.iso" ;; + "he" | "he-"* ) url="he_windows_7_ultimate_with_sp1_x64_dvd_u_677312.iso" ;; + "hr" | "hr-"* ) url="hr_windows_7_ultimate_with_sp1_x64_dvd_u_677324.iso" ;; + "hu" | "hu-"* ) url="hu_windows_7_ultimate_with_sp1_x64_dvd_u_677338.iso" ;; + "it" | "it-"* ) url="it_windows_7_ultimate_with_sp1_x64_dvd_u_677356.iso" ;; + "ja" | "ja-"* ) url="ja_windows_7_ultimate_with_sp1_x64_dvd_u_677372.iso" ;; + "ko" | "ko-"* ) url="ko_windows_7_ultimate_k_with_sp1_x64_dvd_u_677502.iso" ;; + "lt" | "lt-"* ) url="lt_windows_7_ultimate_with_sp1_x64_dvd_u_677379.iso" ;; + "lv" | "lv-"* ) url="lv_windows_7_ultimate_with_sp1_x64_dvd_u_677302.iso" ;; + "nb" | "nb-"* ) url="no_windows_7_ultimate_with_sp1_x64_dvd_u_677314.iso" ;; + "nl" | "nl-"* ) url="nl_windows_7_ultimate_with_sp1_x64_dvd_u_677325.iso" ;; + "pl" | "pl-"* ) url="pl_windows_7_ultimate_with_sp1_x64_dvd_u_677341.iso" ;; + "br" | "pt-br" ) url="pt_windows_7_ultimate_with_sp1_x64_dvd_u_677358.iso" ;; + "pt" | "pt-"* ) url="pp_windows_7_ultimate_with_sp1_x64_dvd_u_677373.iso" ;; + "ro" | "ro-"* ) url="ro_windows_7_ultimate_with_sp1_x64_dvd_u_677380.iso" ;; + "ru" | "ru-"* ) url="ru_windows_7_ultimate_with_sp1_x64_dvd_u_677391.iso" ;; + "sk" | "sk-"* ) url="sk_windows_7_ultimate_with_sp1_x64_dvd_u_677393.iso" ;; + "sl" | "sl-"* ) url="sl_windows_7_ultimate_with_sp1_x64_dvd_u_677396.iso" ;; + "sr" | "sr-"* ) url="sr_windows_7_ultimate_with_sp1_x64_dvd_u_677398.iso" ;; + "sv" | "sv-"* ) url="sv_windows_7_ultimate_with_sp1_x64_dvd_u_677400.iso" ;; + "th" | "th-"* ) url="th_windows_7_ultimate_with_sp1_x64_dvd_u_677402.iso" ;; + "tr" | "tr-"* ) url="tr_windows_7_ultimate_with_sp1_x64_dvd_u_677404.iso" ;; + "uk" | "uk-"* ) url="uk_windows_7_ultimate_with_sp1_x64_dvd_u_677406.iso" ;; + "zh-hk" ) url="hk_windows_7_ultimate_with_sp1_x64_dvd_u_677411.iso" ;; + "zh-tw" ) url="tw_windows_7_ultimate_with_sp1_x64_dvd_u_677414.iso" ;; + "zh" | "zh-"* ) url="cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.iso" ;; + esac ;; "win7x86" | "win7x86-enterprise" ) - size=2434502656 - sum="8bdd46ff8cb8b8de9c4aba02706629c8983c45e87da110e64e13be17c8434dad" - url="$host/en_windows_7_enterprise_with_sp1_x86_dvd_u_677710.iso" + case "${culture,,}" in + "ar" | "ar-"* ) url="ar_windows_7_enterprise_with_sp1_x86_dvd_u_677691.iso" ;; + "bg" | "bg-"* ) url="bg_windows_7_enterprise_with_sp1_x86_dvd_u_677693.iso" ;; + "cs" | "cs-"* ) url="cs_windows_7_enterprise_with_sp1_x86_dvd_u_677695.iso" ;; + "da" | "da-"* ) url="da_windows_7_enterprise_with_sp1_x86_dvd_u_677698.iso" ;; + "de" | "de-"* ) url="de_windows_7_enterprise_with_sp1_x86_dvd_u_677702.iso" ;; + "el" | "el-"* ) url="el_windows_7_enterprise_with_sp1_x86_dvd_u_677706.iso" ;; + "en" | "en-"* ) + size=2434502656 + sum="8bdd46ff8cb8b8de9c4aba02706629c8983c45e87da110e64e13be17c8434dad" + url="en_windows_7_enterprise_with_sp1_x86_dvd_u_677710.iso" ;; + "es" | "es-"* ) url="es_windows_7_enterprise_with_sp1_x86_dvd_u_677714.iso" ;; + "et" | "et-"* ) url="et_windows_7_enterprise_with_sp1_x86_dvd_u_677718.iso" ;; + "fi" | "fi-"* ) url="fi_windows_7_enterprise_with_sp1_x86_dvd_u_677722.iso" ;; + "fr" | "fr-"* ) url="fr_windows_7_enterprise_with_sp1_x86_dvd_u_677727.iso" ;; + "he" | "he-"* ) url="he_windows_7_enterprise_with_sp1_x86_dvd_u_677733.iso" ;; + "hr" | "hr-"* ) url="hr_windows_7_enterprise_with_sp1_x86_dvd_u_677739.iso" ;; + "hu" | "hu-"* ) url="hu_windows_7_enterprise_with_sp1_x86_dvd_u_677744.iso" ;; + "it" | "it-"* ) url="it_windows_7_enterprise_with_sp1_x86_dvd_u_677749.iso" ;; + "ja" | "ja-"* ) url="ja_windows_7_enterprise_with_sp1_x86_dvd_u_677757.iso" ;; + "ko" | "ko-"* ) url="ko_windows_7_enterprise_k_with_sp1_x86_dvd_u_677732.iso" ;; + "lt" | "lt-"* ) url="lt_windows_7_enterprise_with_sp1_x86_dvd_u_677764.iso" ;; + "lv" | "lv-"* ) url="lv_windows_7_enterprise_with_sp1_x86_dvd_u_677677.iso" ;; + "nb" | "nb-"* ) url="no_windows_7_enterprise_with_sp1_x86_dvd_u_677679.iso" ;; + "nl" | "nl-"* ) url="nl_windows_7_enterprise_with_sp1_x86_dvd_u_677682.iso" ;; + "pl" | "pl-"* ) url="pl_windows_7_enterprise_with_sp1_x86_dvd_u_677684.iso" ;; + "br" | "pt-br" ) url="pt_windows_7_enterprise_with_sp1_x86_dvd_u_677686.iso" ;; + "pt" | "pt-"* ) url="pp_windows_7_enterprise_with_sp1_x86_dvd_u_677688.iso" ;; + "ro" | "ro-"* ) url="ro_windows_7_enterprise_with_sp1_x86_dvd_u_677690.iso" ;; + "ru" | "ru-"* ) url="ru_windows_7_enterprise_with_sp1_x86_dvd_u_677692.iso" ;; + "sk" | "sk-"* ) url="sk_windows_7_enterprise_with_sp1_x86_dvd_u_677694.iso" ;; + "sl" | "sl-"* ) url="sl_windows_7_enterprise_with_sp1_x86_dvd_u_677696.iso" ;; + "sr" | "sr-"* ) url="sr_windows_7_enterprise_with_sp1_x86_dvd_u_677699.iso" ;; + "sv" | "sv-"* ) url="sv_windows_7_enterprise_with_sp1_x86_dvd_u_677701.iso" ;; + "th" | "th-"* ) url="th_windows_7_enterprise_with_sp1_x86_dvd_u_677705.iso" ;; + "tr" | "tr-"* ) url="tr_windows_7_enterprise_with_sp1_x86_dvd_u_677708.iso" ;; + "uk" | "uk-"* ) url="uk_windows_7_enterprise_with_sp1_x86_dvd_u_677712.iso" ;; + "zh-hk" ) url="hk_windows_7_enterprise_with_sp1_x86_dvd_u_677720.iso" ;; + "zh-tw" ) url="tw_windows_7_enterprise_with_sp1_x86_dvd_u_677723.iso" ;; + "zh" | "zh-"* ) url="cn_windows_7_enterprise_with_sp1_x86_dvd_u_677716.iso" ;; + esac ;; "win7x86-ultimate" ) - size=2564476928 - sum="e2c009a66d63a742941f5087acae1aa438dcbe87010bddd53884b1af6b22c940" - url="$host/en_windows_7_ultimate_with_sp1_x86_dvd_u_677460.iso" + case "${culture,,}" in + "ar" | "ar-"* ) url="ar_windows_7_ultimate_with_sp1_x86_dvd_u_677448.iso" ;; + "bg" | "bg-"* ) url="bg_windows_7_ultimate_with_sp1_x86_dvd_u_677450.iso" ;; + "cs" | "cs-"* ) url="cs_windows_7_ultimate_with_sp1_x86_dvd_u_677452.iso" ;; + "da" | "da-"* ) url="da_windows_7_ultimate_with_sp1_x86_dvd_u_677454.iso" ;; + "de" | "de-"* ) url="de_windows_7_ultimate_with_sp1_x86_dvd_u_677456.iso" ;; + "el" | "el-"* ) url="el_windows_7_ultimate_with_sp1_x86_dvd_u_677458.iso" ;; + "en" | "en-"* ) + size=2564476928 + sum="e2c009a66d63a742941f5087acae1aa438dcbe87010bddd53884b1af6b22c940" + url="en_windows_7_ultimate_with_sp1_x86_dvd_u_677460.iso" ;; + "es" | "es-"* ) url="es_windows_7_ultimate_with_sp1_x86_dvd_u_677462.iso" ;; + "et" | "et-"* ) url="et_windows_7_ultimate_with_sp1_x86_dvd_u_677464.iso" ;; + "fi" | "fi-"* ) url="fi_windows_7_ultimate_with_sp1_x86_dvd_u_677466.iso" ;; + "fr" | "fr-"* ) url="fr_windows_7_ultimate_with_sp1_x86_dvd_u_677434.iso" ;; + "he" | "he-"* ) url="he_windows_7_ultimate_with_sp1_x86_dvd_u_677436.iso" ;; + "hr" | "hr-"* ) url="hr_windows_7_ultimate_with_sp1_x86_dvd_u_677438.iso" ;; + "hu" | "hu-"* ) url="hu_windows_7_ultimate_with_sp1_x86_dvd_u_677441.iso" ;; + "it" | "it-"* ) url="it_windows_7_ultimate_with_sp1_x86_dvd_u_677443.iso" ;; + "ja" | "ja-"* ) url="ja_windows_7_ultimate_with_sp1_x86_dvd_u_677445.iso" ;; + "ko" | "ko-"* ) url="ko_windows_7_ultimate_k_with_sp1_x86_dvd_u_677508.iso" ;; + "lt" | "lt-"* ) url="lt_windows_7_ultimate_with_sp1_x86_dvd_u_677447.iso" ;; + "lv" | "lv-"* ) url="lv_windows_7_ultimate_with_sp1_x86_dvd_u_677449.iso" ;; + "nb" | "nb-"* ) url="no_windows_7_ultimate_with_sp1_x86_dvd_u_677451.iso" ;; + "nl" | "nl-"* ) url="nl_windows_7_ultimate_with_sp1_x86_dvd_u_677453.iso" ;; + "pl" | "pl-"* ) url="pl_windows_7_ultimate_with_sp1_x86_dvd_u_677455.iso" ;; + "br" | "pt-br" ) url="pt_windows_7_ultimate_with_sp1_x86_dvd_u_677457.iso" ;; + "pt" | "pt-"* ) url="pp_windows_7_ultimate_with_sp1_x86_dvd_u_677459.iso" ;; + "ro" | "ro-"* ) url="ro_windows_7_ultimate_with_sp1_x86_dvd_u_677461.iso" ;; + "ru" | "ru-"* ) url="ru_windows_7_ultimate_with_sp1_x86_dvd_u_677463.iso" ;; + "sk" | "sk-"* ) url="sk_windows_7_ultimate_with_sp1_x86_dvd_u_677465.iso" ;; + "sl" | "sl-"* ) url="sl_windows_7_ultimate_with_sp1_x86_dvd_u_677467.iso" ;; + "sr" | "sr-"* ) url="sr_windows_7_ultimate_with_sp1_x86_dvd_u_677468.iso" ;; + "sv" | "sv-"* ) url="sv_windows_7_ultimate_with_sp1_x86_dvd_u_677482.iso" ;; + "th" | "th-"* ) url="th_windows_7_ultimate_with_sp1_x86_dvd_u_677483.iso" ;; + "tr" | "tr-"* ) url="tr_windows_7_ultimate_with_sp1_x86_dvd_u_677484.iso" ;; + "uk" | "uk-"* ) url="uk_windows_7_ultimate_with_sp1_x86_dvd_u_677485.iso" ;; + "zh-hk" ) url="hk_windows_7_ultimate_with_sp1_x86_dvd_u_677487.iso" ;; + "zh-tw" ) url="tw_windows_7_ultimate_with_sp1_x86_dvd_u_677488.iso" ;; + "zh" | "zh-"* ) url="cn_windows_7_ultimate_with_sp1_x86_dvd_u_677486.iso" ;; + esac ;; - "winvista${PLATFORM,,}" | "winvista${PLATFORM,,}-enterprise" ) - size=3205953536 - sum="0a0cd511b3eac95c6f081419c9c65b12317b9d6a8d9707f89d646c910e788016" - url="$host/en_windows_vista_enterprise_sp2_${PLATFORM,,}_dvd_342332.iso" + "winvistax64" | "winvistax64-enterprise" ) + case "${culture,,}" in + "ar" | "ar-"* ) url="ar_windows_vista_enterprise_with_sp2_x64_dvd_x15-40408.iso" ;; + "bg" | "bg-"* ) url="bg_windows_vista_enterprise_with_sp2_x64_dvd_x15-40410.iso" ;; + "cs" | "cs-"* ) url="cs_windows_vista_enterprise_with_sp2_x64_dvd_x15-40412.iso" ;; + "da" | "da-"* ) url="da_windows_vista_enterprise_with_sp2_x64_dvd_x15-40416.iso" ;; + "de" | "de-"* ) url="de_windows_vista_enterprise_sp2_x64_dvd_342376.iso" ;; + "el" | "el-"* ) url="el_windows_vista_enterprise_with_sp2_x64_dvd_x15-40423.iso" ;; + "en" | "en-"* ) + size=3205953536 + sum="0a0cd511b3eac95c6f081419c9c65b12317b9d6a8d9707f89d646c910e788016" + url="en_windows_vista_enterprise_sp2_x64_dvd_342332.iso" ;; + "es" | "es-"* ) url="es_windows_vista_enterprise_sp2_x64_dvd_342415.iso" ;; + "et" | "et-"* ) url="et_windows_vista_enterprise_with_sp2_x64_dvd_x15-40437.iso" ;; + "fi" | "fi-"* ) url="fi_windows_vista_enterprise_with_sp2_x64_dvd_x15-40451.iso" ;; + "fr" | "fr-"* ) url="fr_windows_vista_enterprise_sp2_x64_dvd_342355.iso" ;; + "he" | "he-"* ) url="he_windows_vista_enterprise_with_sp2_x64_dvd_x15-40425.iso" ;; + "hr" | "hr-"* ) url="hr_windows_vista_enterprise_with_sp2_x64_dvd_x15-40396.iso" ;; + "hu" | "hu-"* ) url="hu_windows_vista_enterprise_with_sp2_x64_dvd_x15-40427.iso" ;; + "it" | "it-"* ) url="it_windows_vista_enterprise_with_sp2_x64_dvd_x15-40429.iso" ;; + "ja" | "ja-"* ) url="ja_windows_vista_enterprise_sp2_x64_dvd_342393.iso" ;; + "ko" | "ko-"* ) url="ko_windows_vista_enterprise_k_with_sp2_x64_dvd_x15-40433.iso" ;; + "lt" | "lt-"* ) url="lt_windows_vista_enterprise_with_sp2_x64_dvd_x15-40394.iso" ;; + "lv" | "lv-"* ) url="lv_windows_vista_enterprise_with_sp2_x64_dvd_x15-40392.iso" ;; + "nb" | "nb-"* ) url="no_windows_vista_enterprise_with_sp2_x64_dvd_x15-40439.iso" ;; + "nl" | "nl-"* ) url="nl_windows_vista_enterprise_with_sp2_x64_dvd_x15-40441.iso" ;; + "pl" | "pl-"* ) url="pl_windows_vista_enterprise_with_sp2_x64_dvd_x15-40445.iso" ;; + "br" | "pt-br" ) url="pt_windows_vista_enterprise_with_sp2_x64_dvd_x15-40400.iso" ;; + "pt" | "pt-"* ) url="pp_windows_vista_enterprise_with_sp2_x64_dvd_x15-40443.iso" ;; + "ro" | "ro-"* ) url="ro_windows_vista_enterprise_with_sp2_x64_dvd_x15-40447.iso" ;; + "ru" | "ru-"* ) url="ru_windows_vista_enterprise_with_sp2_x64_dvd_x15-40455.iso" ;; + "sk" | "sk-"* ) url="sk_windows_vista_enterprise_with_sp2_x64_dvd_x15-40453.iso" ;; + "sl" | "sl-"* ) url="sl_windows_vista_enterprise_with_sp2_x64_dvd_x15-40435.iso" ;; + "sr" | "sr-"* ) url="sr_windows_vista_enterprise_with_sp2_x64_dvd_x15-40406.iso" ;; + "sv" | "sv-"* ) url="sv_windows_vista_enterprise_with_sp2_x64_dvd_x15-40449.iso" ;; + "th" | "th-"* ) url="th_windows_vista_enterprise_with_sp2_x64_dvd_x15-40457.iso" ;; + "tr" | "tr-"* ) url="tr_windows_vista_enterprise_with_sp2_x64_dvd_x15-40459.iso" ;; + "uk" | "uk-"* ) url="uk_windows_vista_enterprise_with_sp2_x64_dvd_x15-40398.iso" ;; + "zh-hk" ) url="hk_windows_vista_enterprise_with_sp2_x64_dvd_x15-40463.iso" ;; + "zh-tw" ) url="tw_windows_vista_enterprise_with_sp2_x64_dvd_x15-40461.iso" ;; + "zh" | "zh-"* ) url="cn_windows_vista_enterprise_with_sp2_x64_dvd_x15-40402.iso" ;; + esac ;; - "winvista${PLATFORM,,}-ultimate" ) - size=3861460992 - sum="edf9f947c5791469fd7d2d40a5dcce663efa754f91847aa1d28ed7f585675b78" - url="$host/en_windows_vista_sp2_${PLATFORM,,}_dvd_342267.iso" + "winvistax64-ultimate" ) + case "${culture,,}" in + "ar" | "ar-"* ) url="ar_windows_vista_with_sp2_x64_dvd_x15-36318.iso" ;; + "bg" | "bg-"* ) url="bg_windows_vista_with_sp2_x64_dvd_x15-36321.iso" ;; + "cs" | "cs-"* ) url="cs_windows_vista_with_sp2_x64_dvd_x15-36327.iso" ;; + "da" | "da-"* ) url="da_windows_vista_with_sp2_x64_dvd_x15-36329.iso" ;; + "de" | "de-"* ) url="de_windows_vista_sp2_x64_dvd_342287.iso" ;; + "el" | "el-"* ) url="el_windows_vista_with_sp2_x64_dvd_x15-36343.iso" ;; + "en" | "en-"* ) + size=3861460992 + sum="edf9f947c5791469fd7d2d40a5dcce663efa754f91847aa1d28ed7f585675b78" + url="en_windows_vista_sp2_x64_dvd_342267.iso" ;; + "es" | "es-"* ) url="es_windows_vista_sp2_x64_dvd_342309.iso" ;; + "et" | "et-"* ) url="et_windows_vista_with_sp2_x64_dvd_x15-36335.iso" ;; + "fi" | "fi-"* ) url="fi_windows_vista_with_sp2_x64_dvd_x15-36337.iso" ;; + "fr" | "fr-"* ) url="fr_windows_vista_sp2_x64_dvd_342277.iso" ;; + "he" | "he-"* ) url="he_windows_vista_with_sp2_x64_dvd_x15-36344.iso" ;; + "hr" | "hr-"* ) url="hr_windows_vista_with_sp2_x64_dvd_x15-36325.iso" ;; + "hu" | "hu-"* ) url="hu_windows_vista_with_sp2_x64_dvd_x15-36346.iso" ;; + "it" | "it-"* ) url="it_windows_vista_with_sp2_x64_dvd_x15-36348.iso" ;; + "ja" | "ja-"* ) url="ja_windows_vista_sp2_x64_dvd_342298.iso" ;; + "ko" | "ko-"* ) url="ko_windows_vista_k_and_kn_with_sp2_x86_dvd_x15-36302.iso" ;; + "lt" | "lt-"* ) url="lt_windows_vista_with_sp2_x64_dvd_x15-36355.iso" ;; + "lv" | "lv-"* ) url="lv_windows_vista_with_sp2_x64_dvd_x15-36353.iso" ;; + "nb" | "nb-"* ) url="no_windows_vista_with_sp2_x64_dvd_x15-36357.iso" ;; + "nl" | "nl-"* ) url="nl_windows_vista_with_sp2_x64_dvd_x15-36331.iso" ;; + "pl" | "pl-"* ) url="pl_windows_vista_with_sp2_x64_dvd_x15-36359.iso" ;; + "br" | "pt-br" ) url="pt_windows_vista_with_sp2_x64_dvd_x15-36319.iso" ;; + "pt" | "pt-"* ) url="pp_windows_vista_with_sp2_x64_dvd_x15-36361.iso" ;; + "ro" | "ro-"* ) url="ro_windows_vista_with_sp2_x64_dvd_x15-36363.iso" ;; + "ru" | "ru-"* ) url="ru_windows_vista_with_sp2_x64_dvd_x15-36364.iso" ;; + "sk" | "sk-"* ) url="sk_windows_vista_with_sp2_x64_dvd_x15-36367.iso" ;; + "sl" | "sl-"* ) url="sl_windows_vista_with_sp2_x64_dvd_x15-36369.iso" ;; + "sr" | "sr-"* ) url="sr_windows_vista_with_sp2_x64_dvd_x15-36365.iso" ;; + "sv" | "sv-"* ) url="sv_windows_vista_with_sp2_x64_dvd_x15-36373.iso" ;; + "th" | "th-"* ) url="th_windows_vista_with_sp2_x64_dvd_x15-36374.iso" ;; + "tr" | "tr-"* ) url="tr_windows_vista_with_sp2_x64_dvd_x15-36375.iso" ;; + "uk" | "uk-"* ) url="uk_windows_vista_with_sp2_x64_dvd_x15-36376.iso" ;; + "zh-hk" ) url="hk_windows_vista_with_sp2_x64_dvd_x15-36324.iso" ;; + "zh-tw" ) url="tw_windows_vista_with_sp2_x64_dvd_x15-36323.iso" ;; + "zh" | "zh-"* ) url="cn_windows_vista_with_sp2_x64_dvd_x15-36322.iso" ;; + esac ;; "winvistax86" | "winvistax86-enterprise" ) - size=2420981760 - sum="54e2720004041e7db988a391543ea5228b0affc28efcf9303d2d0ff9402067f5" - url="$host/en_windows_vista_enterprise_sp2_x86_dvd_342329.iso" + case "${culture,,}" in + "ar" | "ar-"* ) url="ar_windows_vista_enterprise_with_sp2_x86_dvd_x15-40263.iso" ;; + "bg" | "bg-"* ) url="bg_windows_vista_enterprise_with_sp2_x86_dvd_x15-40265.iso" ;; + "cs" | "cs-"* ) url="cs_windows_vista_enterprise_with_sp2_x86_dvd_x15-40267.iso" ;; + "da" | "da-"* ) url="da_windows_vista_enterprise_with_sp2_x86_dvd_x15-40271.iso" ;; + "de" | "de-"* ) url="de_windows_vista_enterprise_sp2_x86_dvd_342373.iso" ;; + "el" | "el-"* ) url="el_windows_vista_enterprise_with_sp2_x86_dvd_x15-40277.iso" ;; + "en" | "en-"* ) + size=2420981760 + sum="54e2720004041e7db988a391543ea5228b0affc28efcf9303d2d0ff9402067f5" + url="en_windows_vista_enterprise_sp2_x86_dvd_342329.iso" ;; + "es" | "es-"* ) url="es_windows_vista_enterprise_sp2_x86_dvd_342413.iso" ;; + "et" | "et-"* ) url="et_windows_vista_enterprise_with_sp2_x86_dvd_x15-40291.iso" ;; + "fi" | "fi-"* ) url="fi_windows_vista_enterprise_with_sp2_x86_dvd_x15-40305.iso" ;; + "fr" | "fr-"* ) url="fr_windows_vista_enterprise_sp2_x86_dvd_342352.iso" ;; + "he" | "he-"* ) url="he_windows_vista_enterprise_with_sp2_x86_dvd_x15-40279.iso" ;; + "hr" | "hr-"* ) url="hr_windows_vista_enterprise_with_sp2_x86_dvd_x15-40251.iso" ;; + "hu" | "hu-"* ) url="hu_windows_vista_enterprise_with_sp2_x86_dvd_x15-40281.iso" ;; + "it" | "it-"* ) url="it_windows_vista_enterprise_with_sp2_x86_dvd_x15-40283.iso" ;; + "ja" | "ja-"* ) url="ja_windows_vista_enterprise_sp2_x86_dvd_342391.iso" ;; + "ko" | "ko-"* ) url="ko_windows_vista_enterprise_k_with_sp2_x86_dvd_x15-40287.iso" ;; + "lt" | "lt-"* ) url="lt_windows_vista_enterprise_with_sp2_x86_dvd_x15-40249.iso" ;; + "lv" | "lv-"* ) url="lv_windows_vista_enterprise_with_sp2_x86_dvd_x15-40247.iso" ;; + "nb" | "nb-"* ) url="no_windows_vista_enterprise_with_sp2_x86_dvd_x15-40293.iso" ;; + "nl" | "nl-"* ) url="nl_windows_vista_enterprise_with_sp2_x86_dvd_x15-40295.iso" ;; + "pl" | "pl-"* ) url="pl_windows_vista_enterprise_with_sp2_x86_dvd_x15-40299.iso" ;; + "br" | "pt-br" ) url="pt_windows_vista_enterprise_with_sp2_x86_dvd_x15-40255.iso" ;; + "pt" | "pt-"* ) url="pp_windows_vista_enterprise_with_sp2_x86_dvd_x15-40297.iso" ;; + "ro" | "ro-"* ) url="ro_windows_vista_enterprise_with_sp2_x86_dvd_x15-40301.iso" ;; + "ru" | "ru-"* ) url="ru_windows_vista_enterprise_with_sp2_x86_dvd_x15-40309.iso" ;; + "sk" | "sk-"* ) url="sk_windows_vista_enterprise_with_sp2_x86_dvd_x15-40307.iso" ;; + "sl" | "sl-"* ) url="sl_windows_vista_enterprise_with_sp2_x86_dvd_x15-40289.iso" ;; + "sr" | "sr-"* ) url="sr_windows_vista_enterprise_with_sp2_x86_dvd_x15-40261.iso" ;; + "sv" | "sv-"* ) url="sv_windows_vista_enterprise_with_sp2_x86_dvd_x15-40303.iso" ;; + "th" | "th-"* ) url="th_windows_vista_enterprise_with_sp2_x86_dvd_x15-40311.iso" ;; + "tr" | "tr-"* ) url="tr_windows_vista_enterprise_with_sp2_x86_dvd_x15-40313.iso" ;; + "uk" | "uk-"* ) url="uk_windows_vista_enterprise_with_sp2_x86_dvd_x15-40253.iso" ;; + "zh-hk" ) url="hk_windows_vista_enterprise_with_sp2_x86_dvd_x15-40317.iso" ;; + "zh-tw" ) url="tw_windows_vista_enterprise_with_sp2_x86_dvd_x15-40315.iso" ;; + "zh" | "zh-"* ) url="cn_windows_vista_enterprise_with_sp2_x86_dvd_x15-40257.iso" ;; + esac ;; "winvistax86-ultimate" ) - size=3243413504 - sum="9c36fed4255bd05a8506b2da88f9aad73643395e155e609398aacd2b5276289c" - url="$host/en_windows_vista_with_sp2_x86_dvd_342266.iso" + case "${culture,,}" in + "ar" | "ar-"* ) url="ar_windows_vista_with_sp2_x86_dvd_x15-36282.iso" ;; + "bg" | "bg-"* ) url="bg_windows_vista_with_sp2_x86_dvd_x15-36284.iso" ;; + "hr" | "hr-"* ) url="hr_windows_vista_with_sp2_x86_dvd_x15-36288.iso" ;; + "cs" | "cs-"* ) url="cs_windows_vista_with_sp2_x86_dvd_x15-36289.iso" ;; + "da" | "da-"* ) url="da_windows_vista_with_sp2_x86_dvd_x15-36290.iso" ;; + "de" | "de-"* ) url="de_windows_vista_sp2_x86_dvd_342286.iso" ;; + "el" | "el-"* ) url="el_windows_vista_with_sp2_x86_dvd_x15-36297.iso" ;; + "en" | "en-"* ) + size=3243413504 + sum="9c36fed4255bd05a8506b2da88f9aad73643395e155e609398aacd2b5276289c" + url="en_windows_vista_with_sp2_x86_dvd_342266.iso" ;; + "es" | "es-"* ) url="es_windows_vista_sp2_x86_dvd_342308.iso" ;; + "et" | "et-"* ) url="et_windows_vista_with_sp2_x86_dvd_x15-36293.iso" ;; + "fi" | "fi-"* ) url="fi_windows_vista_with_sp2_x86_dvd_x15-36294.iso" ;; + "fr" | "fr-"* ) url="fr_windows_vista_sp2_x86_dvd_342276.iso" ;; + "he" | "he-"* ) url="he_windows_vista_with_sp2_x86_dvd_x15-36298.iso" ;; + "hu" | "hu-"* ) url="hu_windows_vista_with_sp2_x86_dvd_x15-36299.iso" ;; + "it" | "it-"* ) url="it_windows_vista_with_sp2_x86_dvd_x15-36300.iso" ;; + "ja" | "ja-"* ) url="ja_windows_vista_sp2_x86_dvd_342296.iso" ;; + "ko" | "ko-"* ) url="ko_windows_vista_k_with_sp2_x64_dvd_x15-36350.iso" ;; + "lt" | "lt-"* ) url="lt_windows_vista_with_sp2_x86_dvd_x15-36304.iso" ;; + "lv" | "lv-"* ) url="lv_windows_vista_with_sp2_x86_dvd_x15-36303.iso" ;; + "nb" | "nb-"* ) url="no_windows_vista_with_sp2_x86_dvd_x15-36305.iso" ;; + "nl" | "nl-"* ) url="nl_windows_vista_with_sp2_x86_dvd_x15-36291.iso" ;; + "pl" | "pl-"* ) url="pl_windows_vista_with_sp2_x86_dvd_x15-36306.iso" ;; + "br" | "pt-br" ) url="pt_windows_vista_with_sp2_x86_dvd_x15-36283.iso" ;; + "pt" | "pt-"* ) url="pp_windows_vista_with_sp2_x86_dvd_x15-36307.iso" ;; + "ro" | "ro-"* ) url="ro_windows_vista_with_sp2_x86_dvd_x15-36308.iso" ;; + "ru" | "ru-"* ) url="ru_windows_vista_with_sp2_x86_dvd_x15-36309.iso" ;; + "sk" | "sk-"* ) url="sk_windows_vista_with_sp2_x86_dvd_x15-36311.iso" ;; + "sl" | "sl-"* ) url="sl_windows_vista_with_sp2_x86_dvd_x15-36312.iso" ;; + "sr" | "sr-"* ) url="sr_windows_vista_with_sp2_x86_dvd_x15-36310.iso" ;; + "sv" | "sv-"* ) url="sv_windows_vista_with_sp2_x86_dvd_x15-36314.iso" ;; + "th" | "th-"* ) url="th_windows_vista_with_sp2_x86_dvd_x15-36315.iso" ;; + "tr" | "tr-"* ) url="tr_windows_vista_with_sp2_x86_dvd_x15-36316.iso" ;; + "uk" | "uk-"* ) url="uk_windows_vista_with_sp2_x86_dvd_x15-36317.iso" ;; + "zh-hk" ) url="hk_windows_vista_with_sp2_x86_dvd_x15-36287.iso" ;; + "zh-tw" ) url="tw_windows_vista_with_sp2_x86_dvd_x15-36286.iso" ;; + "zh" | "zh-"* ) url="cn_windows_vista_with_sp2_x86_dvd_x15-36285.iso" ;; + esac + ;; + "winxpx86" ) + case "${culture,,}" in + "ar" | "ar-"* ) url="ar_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74065.iso" ;; + "cs" | "cs-"* ) url="cs_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73965.iso" ;; + "da" | "da-"* ) url="da_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73968.iso" ;; + "de" | "de-"* ) url="de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985.iso" ;; + "el" | "el-"* ) url="el_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73988.iso" ;; + "es" | "es-"* ) url="es_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74009.iso" ;; + "fi" | "fi-"* ) url="fi_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73979.iso" ;; + "fr" | "fr-"* ) url="fr_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73982.iso" ;; + "he" | "he-"* ) url="he_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74143.iso" ;; + "hu" | "hu-"* ) url="hu_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73991.iso" ;; + "it" | "it-"* ) url="it_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73994.iso" ;; + "ja" | "ja-"* ) url="ja_windows_xp_professional_with_service_pack_3_x86_dvd_vl_x14-74058.iso" ;; + "nb" | "nb-"* ) url="no_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74000.iso" ;; + "nl" | "nl-"* ) url="nl_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73971.iso" ;; + "pl" | "pl-"* ) url="pl_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74003.iso" ;; + "br" | "pt-br" ) url="pt-br_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74137.iso" ;; + "pt" | "pt-"* ) url="pt-pt_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74006.iso" ;; + "ru" | "ru-"* ) url="ru_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74146.iso" ;; + "sv" | "sv-"* ) url="sv_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74012.iso" ;; + "tr" | "tr-"* ) url="tr_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74085.iso" ;; + "zh-hk" ) url="zh-hk_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74075.iso" ;; + "zh-tw" ) url="zh-tw_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74140.iso" ;; + "zh" | "zh-"* ) url="zh-hans_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74070.iso" ;; + esac + ;; + "winxpx64" ) + [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0 + size=628168704 + sum="b641514c2265ba6c0a9ddbcfa4a6daaac6539db8d1ce704366cdfe5a516e0495" + url="en_win_xp_pro_x64_with_sp2_vl_x13-41611.iso" ;; esac case "${ret,,}" in "sum" ) echo "$sum" ;; "size" ) echo "$size" ;; - *) echo "$url";; + *) [ -n "$url" ] && echo "$host/$url";; esac return 0 @@ -856,39 +1745,42 @@ getLink4() { getLink5() { local id="$1" - local ret="$2" + local lang="$2" + local ret="$3" local url="" local sum="" local size="" local host="https://archive.org/download" + [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0 + case "${id,,}" in "core11" ) size=2159738880 sum="78f0f44444ff95b97125b43e560a72e0d6ce0a665cf9f5573bf268191e5510c1" - url="$host/tiny-11-core-x-64-beta-1/tiny11%20core%20${PLATFORM,,}%20beta%201.iso" + url="tiny-11-core-x-64-beta-1/tiny11%20core%20x64%20beta%201.iso" ;; "tiny11" ) size=3788177408 sum="a028800a91addc35d8ae22dce7459b67330f7d69d2f11c70f53c0fdffa5b4280" - url="$host/tiny11-2311/tiny11%202311%20${PLATFORM,,}.iso" + url="tiny11-2311/tiny11%202311%20x64.iso" ;; "tiny10" ) size=3839819776 sum="a11116c0645d892d6a5a7c585ecc1fa13aa66f8c7cc6b03bf1f27bd16860cc35" - url="$host/tiny-10-23-h2/tiny10%20${PLATFORM,,}%2023h2.iso" + url="tiny-10-23-h2/tiny10%20x64%2023h2.iso" ;; "winxpx86" ) size=617756672 sum="62b6c91563bad6cd12a352aa018627c314cfc5162d8e9f8af0756a642e602a46" - url="$host/XPPRO_SP3_ENU/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso" + url="XPPRO_SP3_ENU/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso" ;; esac case "${ret,,}" in "sum" ) echo "$sum" ;; "size" ) echo "$size" ;; - *) echo "$url";; + *) [ -n "$url" ] && echo "$host/$url";; esac return 0 @@ -897,12 +1789,13 @@ getLink5() { getValue() { local val="" - local id="$3" - local type="$2" + local id="$2" + local lang="$3" + local type="$4" local func="getLink$1" if [ "$1" -gt 0 ] && [ "$1" -le "$MIRRORS" ]; then - val=$($func "$id" "$type") + val=$($func "$id" "$lang" "$type") fi echo "$val" @@ -911,8 +1804,8 @@ getValue() { getLink() { - local url="" - url=$(getValue "$1" "" "$2") + local url + url=$(getValue "$1" "$2" "$3" "") echo "$url" return 0 @@ -920,8 +1813,8 @@ getLink() { getHash() { - local sum="" - sum=$(getValue "$1" "sum" "$2") + local sum + sum=$(getValue "$1" "$2" "$3" "sum") echo "$sum" return 0 @@ -929,8 +1822,8 @@ getHash() { getSize() { - local size="" - size=$(getValue "$1" "size" "$2") + local size + size=$(getValue "$1" "$2" "$3" "size") echo "$size" return 0 @@ -939,9 +1832,10 @@ getSize() { isMido() { local id="$1" + local lang="$2" local sum - sum=$(getMido "$id" "sum") + sum=$(getMido "$id" "en" "sum") [ -n "$sum" ] && return 0 return 1 @@ -950,10 +1844,19 @@ isMido() { isESD() { local id="$1" - local url + local lang="$2" - url=$(getCatalog "$id" "url") - [ -n "$url" ] && return 0 + case "${id,,}" in + "win11${PLATFORM,,}" | "win10${PLATFORM,,}" ) + return 0 + ;; + "win11${PLATFORM,,}-enterprise" | "win11${PLATFORM,,}-enterprise-eval") + return 0 + ;; + "win10${PLATFORM,,}-enterprise" | "win10${PLATFORM,,}-enterprise-eval" ) + return 0 + ;; + esac return 1 } @@ -961,14 +1864,15 @@ isESD() { validVersion() { local id="$1" + local lang="$2" local url - isESD "$id" && return 0 - isMido "$id" && return 0 + isESD "$id" "$lang" && return 0 + isMido "$id" "$lang" && return 0 for ((i=1;i<=MIRRORS;i++)); do - url=$(getLink "$i" "$id") + url=$(getLink "$i" "$id" "$lang") [ -n "$url" ] && return 0 done @@ -984,12 +1888,12 @@ migrateFiles() { [ -f "$base" ] && return 0 - [[ "${version,,}" == "tiny10" ]] && file="tiny10_${PLATFORM,,}_23h2.iso" - [[ "${version,,}" == "tiny11" ]] && file="tiny11_2311_${PLATFORM,,}.iso" - [[ "${version,,}" == "core11" ]] && file="tiny11_core_${PLATFORM,,}_beta_1.iso" + [[ "${version,,}" == "tiny10" ]] && file="tiny10_x64_23h2.iso" + [[ "${version,,}" == "tiny11" ]] && file="tiny11_2311_x64.iso" + [[ "${version,,}" == "core11" ]] && file="tiny11_core_x64_beta_1.iso" [[ "${version,,}" == "winxpx86" ]] && file="en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso" - [[ "${version,,}" == "winvista${PLATFORM,,}" ]] && file="en_windows_vista_sp2_${PLATFORM,,}_dvd_342267.iso" - [[ "${version,,}" == "win7${PLATFORM,,}" ]] && file="en_windows_7_enterprise_with_sp1_${PLATFORM,,}_dvd_u_677651.iso" + [[ "${version,,}" == "winvistax64" ]] && file="en_windows_vista_sp2_x64_dvd_342267.iso" + [[ "${version,,}" == "win7x64" ]] && file="en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso" [ ! -f "$STORAGE/$file" ] && return 0 ! mv -f "$STORAGE/$file" "$base" && return 1 diff --git a/src/entry.sh b/src/entry.sh index 8893716..20ec453 100644 --- a/src/entry.sh +++ b/src/entry.sh @@ -10,6 +10,7 @@ cd /run . reset.sh # Initialize system . define.sh # Define versions +. mido.sh # Download code . install.sh # Run installation . disk.sh # Initialize disks . display.sh # Initialize graphics diff --git a/src/install.sh b/src/install.sh index 47e4327..93a225c 100644 --- a/src/install.sh +++ b/src/install.sh @@ -73,6 +73,16 @@ startInstall() { : "${file//+/ }"; printf -v file '%b' "${_//%/\\x}" file=$(echo "$file" | sed -e 's/[^A-Za-z0-9._-]/_/g') + else + + local language + language=$(getLanguage "$LANGUAGE" "culture") + language="${language%%-*}" + + if [ -n "$language" ] && [[ "${language,,}" != "en" ]]; then + file="${VERSION/\//}_${language,,}.iso" + fi + fi BOOT="$STORAGE/$file" @@ -209,273 +219,6 @@ detectCustom() { return 0 } -getESD() { - - local dir="$1" - local version="$2" - local editionName - local winCatalog size - - if ! isESD "${version,,}"; then - error "Invalid VERSION specified, value \"$version\" is not recognized!" && return 1 - fi - - winCatalog=$(getCatalog "$version" "url") - editionName=$(getCatalog "$version" "edition") - - local msg="Downloading product information from Microsoft..." - info "$msg" && html "$msg" - - rm -rf "$dir" - mkdir -p "$dir" - - local wFile="catalog.cab" - local xFile="products.xml" - local eFile="esd_edition.xml" - local fFile="products_filter.xml" - - { wget "$winCatalog" -O "$dir/$wFile" -q --timeout=10; rc=$?; } || : - (( rc != 0 )) && error "Failed to download $winCatalog , reason: $rc" && return 1 - - cd "$dir" - - if ! cabextract "$wFile" > /dev/null; then - cd /run - error "Failed to extract $wFile!" && return 1 - fi - - cd /run - - if [ ! -s "$dir/$xFile" ]; then - error "Failed to find $xFile in $wFile!" && return 1 - fi - - local esdLang="en-us" - local edQuery='//File[Architecture="'${PLATFORM}'"][Edition="'${editionName}'"]' - - echo -e '' > "$dir/$fFile" - xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" >> "$dir/$fFile" 2>/dev/null - echo -e ''>> "$dir/$fFile" - xmllint --nonet --xpath '//File[LanguageCode="'${esdLang}'"]' "$dir/$fFile" >"$dir/$eFile" - - size=$(stat -c%s "$dir/$eFile") - if ((size<20)); then - error "Failed to find Windows product in $eFile!" && return 1 - fi - - local tag="FilePath" - ESD=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g") - - if [ -z "$ESD" ]; then - error "Failed to find ESD URL in $eFile!" && return 1 - fi - - tag="Sha1" - ESD_SUM=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g") - tag="Size" - ESD_SIZE=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g") - - rm -rf "$dir" - return 0 -} - -verifyFile() { - - local iso="$1" - local size="$2" - local total="$3" - local check="$4" - - if [ -n "$size" ] && [[ "$total" != "$size" ]] && [[ "$size" != "0" ]]; then - warn "The downloaded file has an unexpected size: $total bytes, while expected value was: $size bytes. Please report this at $SUPPORT/issues" - fi - - local hash="" - local algo="SHA256" - - [ -z "$check" ] && return 0 - [[ "$VERIFY" != [Yy1]* ]] && return 0 - [[ "${#check}" == "40" ]] && algo="SHA1" - - local msg="Verifying downloaded ISO..." - info "$msg" && html "$msg" - - if [[ "${algo,,}" != "sha256" ]]; then - hash=$(sha1sum "$iso" | cut -f1 -d' ') - else - hash=$(sha256sum "$iso" | cut -f1 -d' ') - fi - - if [[ "$hash" == "$check" ]]; then - info "Succesfully verified ISO!" && return 0 - fi - - error "The downloaded file has an invalid $algo checksum: $hash , while expected value was: $check. Please report this at $SUPPORT/issues" - - rm -f "$iso" - return 1 -} - -doMido() { - - local iso="$1" - local version="$2" - local desc="$3" - local rc sum size total - - rm -f "$iso" - rm -f "$iso.PART" - - size=$(getMido "$version" "size") - sum=$(getMido "$version" "sum") - - local msg="Downloading $desc..." - info "$msg" && html "$msg" - /run/progress.sh "$iso.PART" "$size" "Downloading $desc ([P])..." & - - cd "$TMP" - { /run/mido.sh "${version,,}"; rc=$?; } || : - cd /run - - fKill "progress.sh" - - if (( rc == 0 )) && [ -f "$iso" ]; then - total=$(stat -c%s "$iso") - if [ "$total" -gt 100000000 ]; then - ! verifyFile "$iso" "$size" "$total" "$sum" && return 1 - html "Download finished successfully..." && return 0 - fi - fi - - rm -f "$iso" - rm -f "$iso.PART" - - return 1 -} - -downloadFile() { - - local iso="$1" - local url="$2" - local sum="$3" - local size="$4" - local desc="$5" - local rc total progress domain dots - - rm -f "$iso" - - # Check if running with interactive TTY or redirected to docker log - if [ -t 1 ]; then - progress="--progress=bar:noscroll" - else - progress="--progress=dot:giga" - fi - - local msg="Downloading $desc..." - html "$msg" - - domain=$(echo "$url" | awk -F/ '{print $3}') - dots=$(echo "$domain" | tr -cd '.' | wc -c) - (( dots > 1 )) && domain=$(expr "$domain" : '.*\.\(.*\..*\)') - - if [ -n "$domain" ] && [[ "${domain,,}" != *"microsoft.com" ]]; then - msg="Downloading $desc from $domain..." - fi - - info "$msg" - /run/progress.sh "$iso" "$size" "Downloading $desc ([P])..." & - - { wget "$url" -O "$iso" -q --timeout=10 --show-progress "$progress"; rc=$?; } || : - - fKill "progress.sh" - - if (( rc == 0 )) && [ -f "$iso" ]; then - total=$(stat -c%s "$iso") - if [ "$total" -gt 100000000 ]; then - ! verifyFile "$iso" "$size" "$total" "$sum" && return 1 - html "Download finished successfully..." && return 0 - fi - fi - - error "Failed to download $url , reason: $rc" - - rm -f "$iso" - return 1 -} - -downloadImage() { - - local iso="$1" - local version="$2" - local tried="n" - local url sum size base desc - - if [[ "${version,,}" == "http"* ]]; then - base=$(basename "$iso") - desc=$(fromFile "$base") - downloadFile "$iso" "$version" "" "" "$desc" && return 0 - return 1 - fi - - if ! validVersion "$version"; then - error "Invalid VERSION specified, value \"$version\" is not recognized!" && return 1 - fi - - desc=$(printVersion "$version" "") - - if isMido "$version"; then - tried="y" - doMido "$iso" "$version" "$desc" && return 0 - fi - - switchEdition "$version" - - if isESD "$version"; then - - if [[ "$tried" != "n" ]]; then - info "Failed to download $desc using Mido, will try a diferent method now..." - fi - - tried="y" - - if getESD "$TMP/esd" "$version"; then - ISO="${ISO%.*}.esd" - downloadFile "$ISO" "$ESD" "$ESD_SUM" "$ESD_SIZE" "$desc" && return 0 - ISO="$iso" - fi - - fi - - for ((i=1;i<=MIRRORS;i++)); do - - url=$(getLink "$i" "$version") - - if [ -n "$url" ]; then - if [[ "$tried" != "n" ]]; then - info "Failed to download $desc, will try another mirror now..." - fi - tried="y" - size=$(getSize "$i" "$version") - sum=$(getHash "$i" "$version") - downloadFile "$iso" "$url" "$sum" "$size" "$desc" && return 0 - fi - - done - - return 1 -} - -removeDownload() { - - local iso="$1" - - [ ! -f "$iso" ] && return 0 - [ -n "$CUSTOM" ] && return 0 - ! rm -f "$iso" 2> /dev/null && warn "failed to remove $iso !" - - return 0 -} - extractESD() { local iso="$1" @@ -609,19 +352,6 @@ extractImage() { return 0 } -setXML() { - - local file="/custom.xml" - [ ! -f "$file" ] || [ ! -s "$file" ] && file="$STORAGE/custom.xml" - [ ! -f "$file" ] || [ ! -s "$file" ] && file="/run/assets/custom.xml" - [ ! -f "$file" ] || [ ! -s "$file" ] && file="$1" - [ ! -f "$file" ] || [ ! -s "$file" ] && file="/run/assets/$DETECTED.xml" - [ ! -f "$file" ] || [ ! -s "$file" ] && return 1 - - XML="$file" - return 0 -} - getPlatform() { local xml="$1" @@ -641,6 +371,26 @@ getPlatform() { return 0 } +checkPlatform() { + + local xml="$1" + local platform compat + + platform=$(getPlatform "$xml") + + case "${platform,,}" in + "x86" ) compat="x64" ;; + "x64" ) compat="$platform" ;; + "arm64" ) compat="$platform" ;; + * ) compat="${PLATFORM,,}" ;; + esac + + [[ "${compat,,}" == "${PLATFORM,,}" ]] && return 0 + + error "You cannot boot ${platform^^} images on a $PLATFORM CPU!" + return 1 +} + hasVersion() { local id="$1" @@ -686,26 +436,6 @@ selectVersion() { return 0 } -checkPlatform() { - - local xml="$1" - local platform compat - - platform=$(getPlatform "$xml") - - case "${platform,,}" in - "x86" ) compat="x64" ;; - "x64" ) compat="$platform" ;; - "arm64" ) compat="$platform" ;; - * ) compat="${PLATFORM,,}" ;; - esac - - [[ "${compat,,}" == "${PLATFORM,,}" ]] && return 0 - - error "You cannot boot ${platform^^} images on a $PLATFORM CPU!" - return 1 -} - detectVersion() { local xml="$1" @@ -720,11 +450,51 @@ detectVersion() { return 0 } +detectLanguage() { + + local xml="$1" + local lang="" + + if [[ "$xml" == *"LANGUAGE>"* ]]; then + lang="${xml#*LANGUAGE>}" + lang="${lang%%<*}" + else + if [[ "$xml" == *"FALLBACK>"* ]]; then + lang="${xml#*FALLBACK>}" + lang="${lang%%<*}" + fi + fi + + if [ -z "$lang" ]; then + warn "Language could not be detected from ISO!" && return 0 + fi + + local culture + culture=$(getLanguage "$lang" "culture") + [ -n "$culture" ] && LANGUAGE="$lang" && return 0 + + warn "Invalid language detected: \"$lang\"" + return 0 +} + +setXML() { + + local file="/custom.xml" + [ ! -f "$file" ] || [ ! -s "$file" ] && file="$STORAGE/custom.xml" + [ ! -f "$file" ] || [ ! -s "$file" ] && file="/run/assets/custom.xml" + [ ! -f "$file" ] || [ ! -s "$file" ] && file="$1" + [ ! -f "$file" ] || [ ! -s "$file" ] && file="/run/assets/$DETECTED.xml" + [ ! -f "$file" ] || [ ! -s "$file" ] && return 1 + + XML="$file" + return 0 +} + detectImage() { local dir="$1" local version="$2" - local desc msg + local desc msg language XML="" @@ -787,6 +557,12 @@ detectImage() { fi desc=$(printEdition "$DETECTED" "$DETECTED") + detectLanguage "$info" + + if [[ "${LANGUAGE,,}" != "en" ]] && [[ "${LANGUAGE,,}" != "en-"* ]]; then + language=$(getLanguage "$LANGUAGE" "desc") + desc="$desc ($language)" + fi info "Detected: $desc" setXML "" && return 0 @@ -844,10 +620,55 @@ prepareImage() { return 1 } +updateXML() { + + local asset="$1" + local language="$2" + local culture region keyboard + + culture=$(getLanguage "$language" "culture") + + if [ -n "$culture" ] && [[ "${culture,,}" != "en-us" ]]; then + sed -i "s/en-US<\/UILanguage>/$culture<\/UILanguage>/g" "$asset" + fi + + region="$REGION" + [ -z "$region" ] && region="$culture" + + if [ -n "$region" ] && [[ "${region,,}" != "en-us" ]]; then + sed -i "s/en-US<\/UserLocale>/$region<\/UserLocale>/g" "$asset" + sed -i "s/en-US<\/SystemLocale>/$region<\/SystemLocale>/g" "$asset" + fi + + keyboard="$KEYBOARD" + [ -z "$keyboard" ] && keyboard="$culture" + + if [ -n "$keyboard" ] && [[ "${keyboard,,}" != "en-us" ]]; then + sed -i "s/en-US<\/InputLocale>/$keyboard<\/InputLocale>/g" "$asset" + sed -i "s/0409:00000409<\/InputLocale>/$keyboard<\/InputLocale>/g" "$asset" + fi + + if [ -n "$USERNAME" ]; then + sed -i "s/where name=\"Docker\"/where name=\"$USERNAME\"/g" "$asset" + sed -i "s/Docker<\/Name>/$USERNAME<\/Name>/g" "$asset" + sed -i "s/Docker<\/FullName>/$USERNAME<\/FullName>/g" "$asset" + sed -i "s/Docker<\/Username>/$USERNAME<\/Username>/g" "$asset" + fi + + if [ -n "$PASSWORD" ]; then + sed -i "s/password<\/Value>/$PASSWORD<\/Value>/g" "$asset" + sed -z "s/.........../\n $PASSWORD<\/Value>/g" -i "$asset" + sed -z "s/.............../\n $PASSWORD<\/Value>/g" -i "$asset" + fi + + return 0 +} + updateImage() { local dir="$1" local asset="$2" + local language="$3" local file="autounattend.xml" local org="${file/.xml/.org}" local dat="${file/.xml/.dat}" @@ -903,13 +724,19 @@ updateImage() { xml=$(basename "$asset") info "Adding $xml for automatic installation..." - if ! wimlib-imagex update "$loc" "$index" --command "add $asset /$file" > /dev/null; then + local answer="$TMP/$xml" + cp "$asset" "$answer" + updateXML "$answer" "$language" + + if ! wimlib-imagex update "$loc" "$index" --command "add $answer /$file" > /dev/null; then MANUAL="Y" warn "failed to add answer file ($xml) to ISO image, $FB" else - wimlib-imagex update "$loc" "$index" --command "add $asset /$dat" > /dev/null || true + wimlib-imagex update "$loc" "$index" --command "add $answer /$dat" > /dev/null || true fi + rm -f "$answer" + fi if [[ "$MANUAL" == [Yy1]* ]]; then @@ -920,9 +747,10 @@ updateImage() { if ! wimlib-imagex update "$loc" "$index" --command "add $TMP/$org /$file" > /dev/null; then warn "failed to restore original answer file ($org)." fi - rm -f "$TMP/$org" fi + rm -f "$TMP/$org" + fi local find="$file" @@ -940,6 +768,17 @@ updateImage() { return 0 } +removeDownload() { + + local iso="$1" + + [ ! -f "$iso" ] && return 0 + [ -n "$CUSTOM" ] && return 0 + ! rm -f "$iso" 2> /dev/null && warn "failed to remove $iso !" + + return 0 +} + copyOEM() { local dir="$1" @@ -1105,6 +944,7 @@ bootWindows() { ###################################### ! parseVersion && exit 58 +! parseLanguage && exit 56 ! detectCustom && exit 59 if ! startInstall; then @@ -1113,7 +953,7 @@ if ! startInstall; then fi if [ ! -s "$ISO" ] || [ ! -f "$ISO" ]; then - if ! downloadImage "$ISO" "$VERSION"; then + if ! downloadImage "$ISO" "$VERSION" "$LANGUAGE"; then rm -f "$ISO" 2> /dev/null || true exit 61 fi @@ -1134,7 +974,7 @@ if ! prepareImage "$ISO" "$DIR"; then exit 60 fi -if ! updateImage "$DIR" "$XML"; then +if ! updateImage "$DIR" "$XML" "$LANGUAGE"; then abortInstall "$ISO" && return 0 exit 60 fi diff --git a/src/mido.sh b/src/mido.sh index abafce4..59ceae7 100644 --- a/src/mido.sh +++ b/src/mido.sh @@ -1,761 +1,576 @@ -#!/bin/sh - -# Copyright (C) 2024 Elliot Killick -# Licensed under the MIT License. See LICENSE file for details. - -# Prefer Dash shell for greater security if available -if [ "$BASH" ] && command -v dash > /dev/null; then - exec dash "$0" "$@" -fi - -# Test for 4-bit color (16 colors) -# Operand "colors" is undefined by POSIX -# If the operand doesn't exist, the terminal probably doesn't support color and the program will continue normally without it -if [ "0$(tput colors 2> /dev/null)" -ge 16 ]; then - RED='\033[0;31m' - BLUE='\033[0;34m' - GREEN='\033[0;32m' - NC='\033[0m' -fi - -# Avoid printing messages as potential terminal escape sequences -echo_ok() { printf "%b%s%b" "${GREEN}[+]${NC} " "$1" "\n" >&2; } -echo_info() { printf "%b%s%b" "${BLUE}[i]${NC} " "$1" "\n" >&2; } -echo_err() { printf "%b%s%b" "${RED}[!]${NC} " "$1" "\n" >&2; } - -# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/fold.html -format() { fold -s; } - -word_count() { echo $#; } - -usage() { - echo "Mido - The Secure Microsoft Windows Downloader" - echo "" - echo "Usage: $0 ..." - echo "" - echo "Download specified list of Windows media." - echo "" - echo "Specify \"all\", or one or more of the following Windows media:" - echo " win7x64-ultimate" - echo " win81x64" - echo " win10x64" - echo " win11x64" - echo " win81x64-enterprise-eval" - echo " win10x64-enterprise-eval" - echo " win11x64-enterprise-eval" - echo " win10x64-enterprise-ltsc-eval (most secure)" - echo " win2008r2" - echo " win2012r2-eval" - echo " win2016-eval" - echo " win2019-eval" - echo " win2022-eval" - echo "" - echo "Each ISO download takes between 3 - 7 GiBs (average: 5 GiBs)." - echo "" - echo "Updates" - echo "-------" - echo "All the downloads provided here are the most up-to-date releases that Microsoft provides. This is ensured by programmatically checking Microsoft's official download pages to get the latest download link. In other cases, the Windows version in question is no longer supported by Microsoft meaning a direct download link (stored in Mido) will always point to the most up-to-date release." | format - echo "" - echo "Remember to update Windows to the latest patch level after installation." - echo "" - echo "Overuse" - echo "-------" - echo "Newer consumer versions of Windows including win81x64, win10x64, and win11x64 are downloaded through Microsoft's gated download web interface. Do not overuse this interface. Microsoft may be quick to do ~24 hour IP address bans after only a few download requests (especially if they are done in quick succession). Being temporarily banned from one of these downloads (e.g. win11x64) doesn't cause you to be banned from any of the other downloads provided through this interface." | format - echo "" - echo "Privacy Preserving Technologies" - echo "-------------------------------" - echo "The aforementioned Microsoft gated download web interface is currently blocking Tor (and similar technologies). They say this is to prevent people in restricted regions from downloading certain Windows media they shouldn't have access to. This is fine by most standards because Tor is too slow for large downloads anyway and we have checksum verification for security." | format - echo "" - echo "Language" - echo "--------" - echo "All the downloads provided here are for English (United States). This helps to great simplify maintenance and minimize the user's fingerprint. If another language is desired then that can easily be configured in Windows once it's installed." | format - echo "" - echo "Architecture" - echo "------------" - echo "All the downloads provided here are for x86-64 (x64). This is the only architecture Microsoft ships Windows Server in.$([ -d /run/qubes ] && echo ' Also, the only architecture Qubes OS supports.')" | format -} - -# Media naming scheme info: -# Windows Server has no architecture because Microsoft only supports amd64 for this version of Windows (the last version to support x86 was Windows Server 2008 without the R2) -# "eval" is short for "evaluation", it's simply the license type included with the Windows installation (only exists on enterprise/server) and must be specified in the associated answer file -# "win7x64" has the "ultimate" edition appended to it because it isn't "multi-edition" like the other Windows ISOs (for multi-edition ISOs the edition is specified in the associated answer file) - -readonly win7x64_ultimate="win7x64-ultimate.iso" -readonly win81x64="win81x64.iso" -readonly win10x64="win10x64.iso" -readonly win11x64="win11x64.iso" -readonly win81x64_enterprise_eval="win81x64-enterprise-eval.iso" -readonly win10x64_enterprise_eval="win10x64-enterprise-eval.iso" -readonly win11x64_enterprise_eval="win11x64-enterprise-eval.iso" -readonly win10x64_enterprise_ltsc_eval="win10x64-enterprise-ltsc-eval.iso" -readonly win2008r2="win2008r2.iso" -readonly win2012r2_eval="win2012r2-eval.iso" -readonly win2016_eval="win2016-eval.iso" -readonly win2019_eval="win2019-eval.iso" -readonly win2022_eval="win2022-eval.iso" - -parse_args() { - for arg in "$@"; do - if [ "$arg" = "-h" ] || [ "$arg" = "--help" ]; then - usage - exit - fi - done - - if [ $# -lt 1 ]; then - usage >&2 - exit 1 - fi - - # Append to media_list so media is downloaded in the order they're passed in - for arg in "$@"; do - case "$arg" in - win7x64-ultimate) - media_list="$media_list $win7x64_ultimate" - ;; - win81x64) - media_list="$media_list $win81x64" - ;; - win10x64) - media_list="$media_list $win10x64" - ;; - win11x64) - media_list="$media_list $win11x64" - ;; - win81x64-enterprise-eval) - media_list="$media_list $win81x64_enterprise_eval" - ;; - win10x64-enterprise-eval) - media_list="$media_list $win10x64_enterprise_eval" - ;; - win11x64-enterprise-eval) - media_list="$media_list $win11x64_enterprise_eval" - ;; - win10x64-enterprise-ltsc-eval) - media_list="$media_list $win10x64_enterprise_ltsc_eval" - ;; - win2008r2) - media_list="$media_list $win2008r2" - ;; - win2012r2-eval) - media_list="$media_list $win2012r2_eval" - ;; - win2016-eval) - media_list="$media_list $win2016_eval" - ;; - win2019-eval) - media_list="$media_list $win2019_eval" - ;; - win2022-eval) - media_list="$media_list $win2022_eval" - ;; - all) - media_list="$win7x64_ultimate $win81x64 $win10x64 $win11x64 $win81x64_enterprise_eval $win10x64_enterprise_eval $win11x64_enterprise_eval $win10x64_enterprise_ltsc_eval $win2008r2 $win2012r2_eval $win2016_eval $win2019_eval $win2022_eval" - break - ;; - *) - echo_err "Invalid Windows media specified: $arg" - exit 1 - ;; - esac - done -} +#!/usr/bin/env bash +set -Eeuo pipefail handle_curl_error() { - error_code="$1" - fatal_error_action=2 - - case "$error_code" in - 6) - echo_err "Failed to resolve Microsoft servers! Is there an Internet connection? Exiting..." - return "$fatal_error_action" - ;; - 7) - echo_err "Failed to contact Microsoft servers! Is there an Internet connection or is the server down?" - ;; - 8) - echo_err "Microsoft servers returned a malformed HTTP response!" - ;; - 22) - echo_err "Microsoft servers returned a failing HTTP status code!" - ;; - 23) - echo_err "Failed at writing Windows media to disk! Out of disk space or permission error? Exiting..." - return "$fatal_error_action" - ;; - 26) - echo_err "Ran out of memory during download! Exiting..." - return "$fatal_error_action" - ;; - 36) - echo_err "Failed to continue earlier download!" - ;; - 63) - echo_err "Microsoft servers returned an unexpectedly large response!" - ;; - # POSIX defines exit statuses 1-125 as usable by us - # https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_02 - $((error_code <= 125))) - # Must be some other server or network error (possibly with this specific request/file) - # This is when accounting for all possible errors in the curl manual assuming a correctly formed curl command and an HTTP(S) request, using only the curl features we're using, and a sane build - echo_err "Miscellaneous server or network error!" - ;; - 126 | 127) - echo_err "Curl command not found! Please install curl and try again. Exiting..." - return "$fatal_error_action" - ;; - # Exit statuses are undefined by POSIX beyond this point - *) - case "$(kill -l "$error_code")" in - # Signals defined to exist by POSIX: - # https://pubs.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html - INT) - echo_err "Curl was interrupted!" - ;; - # There could be other signals but these are most common - SEGV | ABRT) - echo_err "Curl crashed! Failed exploitation attempt? Please report any core dumps to curl developers. Exiting..." - return "$fatal_error_action" - ;; - *) - echo_err "Curl terminated due to a fatal signal!" - ;; - esac - esac - - return 1 -} - -part_ext=".PART" -unverified_ext=".UNVERIFIED" - -scurl_file() { - out_file="$1" - tls_version="$2" - url="$3" - - part_file="${out_file}${part_ext}" - - # --location: Microsoft likes to change which endpoint these downloads are stored on but is usually kind enough to add redirects - # --fail: Return an error on server errors where the HTTP response code is 400 or greater - curl --progress-bar --location --output "$part_file" --continue-at - --max-filesize 10G --fail --proto =https "--tlsv$tls_version" --http1.1 -- "$url" || { - error_code=$? - handle_curl_error "$error_code" - error_action=$? - - # Clean up and make sure a future resume doesn't happen from a bad download resume file - if [ -f "$out_file" ]; then - # If file is empty, bad HTTP code, or bad download resume file - if [ ! -s "$out_file" ] || [ "$error_code" = 22 ] || [ "$error_code" = 36 ]; then - echo_info "Deleting failed download..." - rm -f "$out_file" - fi - fi - - return "$error_action" - } - - # Full downloaded succeeded, ready for verification check - mv "$part_file" "${out_file}" -} - -manual_verification() { - media_verification_failed_list="$1" - checksum_verification_failed_list="$2" - - echo_info "Manual verification instructions" - echo " 1. Get checksum (may already be done for you):" >&2 - echo " sha256sum " >&2 - echo "" >&2 - echo " 2. Verify media:" >&2 - echo " Web search: https://duckduckgo.com/?q=%22CHECKSUM_HERE%22" >&2 - echo " Onion search: https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/?q=%22CHECKSUM_HERE%22" >&2 - echo " \"No results found\" or unexpected results indicates the media has been modified and should not be used." >&2 - echo "" >&2 - echo " 3. Remove the $unverified_ext extension from the file after performing or deciding to skip verification (not recommended):" >&2 - echo " mv $unverified_ext " >&2 - echo "" >&2 - - for media in $media_verification_failed_list; do - # Read current checksum in list and then read remaining checksums back into the list (effectively running "shift" on the variable) - # POSIX sh doesn't support indexing so do this instead to iterate both lists at once - # POSIX sh doesn't support here-strings (<<<). We could also use the "cut" program but that's not a builtin - IFS=' ' read -r checksum checksum_verification_failed_list << EOF -$checksum_verification_failed_list -EOF - - echo " ${media}${unverified_ext} = $checksum" >&2 - echo " Web search: https://duckduckgo.com/?q=%22$checksum%22" >&2 - echo " Onion search: https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/?q=%22$checksum%22" >&2 - echo " mv ${media}${unverified_ext} $media" >&2 - echo "" >&2 - done - - echo " Theses searches can be performed in a web/Tor browser or more securely using" >&2 - echo " ddgr (Debian/Fedora packages available) terminal search tool if preferred." >&2 - echo " Once validated, consider updating the checksums in Mido by submitting a pull request on GitHub." >&2 - - # If you're looking for a single secondary source to cross-reference checksums then try here: https://files.rg-adguard.net/search - # This site is recommended by the creator of Rufus in the Fido README and has worked well for me -} - -consumer_download() { - # Copyright (C) 2024 Elliot Killick - # Licensed under the MIT License. See LICENSE file for details. - # - # This function is from the Mido project: - # https://github.com/ElliotKillick/Mido - - # Download newer consumer Windows versions from behind gated Microsoft API - - out_file="$1" - # Either 8, 10, or 11 - windows_version="$2" - - url="https://www.microsoft.com/en-us/software-download/windows$windows_version" - case "$windows_version" in - 8 | 10) url="${url}ISO" ;; - esac - - user_agent="Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" - # uuidgen: For MacOS (installed by default) and other systems (e.g. with no /proc) that don't have a kernel interface for generating random UUIDs - session_id="$(cat /proc/sys/kernel/random/uuid 2> /dev/null || uuidgen --random)" - - # Get product edition ID for latest release of given Windows version - # Product edition ID: This specifies both the Windows release (e.g. 22H2) and edition ("multi-edition" is default, either Home/Pro/Edu/etc., we select "Pro" in the answer files) in one number - # This is a request we make that Fido doesn't. Fido manually maintains a list of all the Windows release/edition product edition IDs in its script (see: $WindowsVersions array). This is helpful for downloading older releases (e.g. Windows 10 1909, 21H1, etc.) but we always want to get the newest release which is why we get this value dynamically - # Also, keeping a "$WindowsVersions" array like Fido does would be way too much of a maintenance burden - # Remove "Accept" header that curl sends by default (match Fido requests) - iso_download_page_html="$(curl -sS --user-agent "$user_agent" --header "Accept:" --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url")" || { - handle_curl_error $? - return $? - } - - # tr: Filter for only numerics to prevent HTTP parameter injection - # head -c was recently added to POSIX: https://austingroupbugs.net/view.php?id=407 - product_edition_id="$(echo "$iso_download_page_html" | grep -Eo '