mirror of
				https://github.com/dockur/windows.git
				synced 2025-11-03 22:04:29 +00:00 
			
		
		
		
	fix: Windows Enterprise download was broken (#1387)
	
		
			
	
		
	
	
		
	
		
			Some checks are pending
		
		
	
	
		
			
				
	
				Update / dockerHubDescription (push) Waiting to run
				
			
		
		
	
	
				
					
				
			
		
			Some checks are pending
		
		
	
	Update / dockerHubDescription (push) Waiting to run
				
			This commit is contained in:
		
							parent
							
								
									22235bf48e
								
							
						
					
					
						commit
						2983b2b677
					
				@ -95,7 +95,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
 | 
				
			|||||||
  |---|---|---|
 | 
					  |---|---|---|
 | 
				
			||||||
  | `11`   | Windows 11 Pro            | 5.4 GB   |
 | 
					  | `11`   | Windows 11 Pro            | 5.4 GB   |
 | 
				
			||||||
  | `11l`  | Windows 11 LTSC           | 4.7 GB   |
 | 
					  | `11l`  | Windows 11 LTSC           | 4.7 GB   |
 | 
				
			||||||
  | `11e`  | Windows 11 Enterprise     | 4.0 GB   |
 | 
					  | `11e`  | Windows 11 Enterprise     | 5.3 GB   |
 | 
				
			||||||
  ||||
 | 
					  ||||
 | 
				
			||||||
  | `10`   | Windows 10 Pro            | 5.7 GB   |
 | 
					  | `10`   | Windows 10 Pro            | 5.7 GB   |
 | 
				
			||||||
  | `10l`  | Windows 10 LTSC           | 4.6 GB   |
 | 
					  | `10l`  | Windows 10 LTSC           | 4.6 GB   |
 | 
				
			||||||
 | 
				
			|||||||
@ -734,8 +734,8 @@ getMido() {
 | 
				
			|||||||
      sum="b56b911bf18a2ceaeb3904d87e7c770bdf92d3099599d61ac2497b91bf190b11"
 | 
					      sum="b56b911bf18a2ceaeb3904d87e7c770bdf92d3099599d61ac2497b91bf190b11"
 | 
				
			||||||
      ;;
 | 
					      ;;
 | 
				
			||||||
    "win11x64-enterprise-eval" )
 | 
					    "win11x64-enterprise-eval" )
 | 
				
			||||||
      size=4295096320
 | 
					      size=5387960320
 | 
				
			||||||
      sum="dad633276073f14f3e0373ef7e787569e216d54942ce522b39451c8f2d38ad43"
 | 
					      sum="755a90d43e826a74b9e1932a34788b898e028272439b777e5593dee8d53622ae"
 | 
				
			||||||
      url="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_CLIENTENTERPRISEEVAL_OEMRET_A64FRE_en-us.iso"
 | 
					      url="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_CLIENTENTERPRISEEVAL_OEMRET_A64FRE_en-us.iso"
 | 
				
			||||||
      ;;
 | 
					      ;;
 | 
				
			||||||
    "win11x64-enterprise-iot-eval" | "win11x64-enterprise-ltsc-eval" )
 | 
					    "win11x64-enterprise-iot-eval" | "win11x64-enterprise-ltsc-eval" )
 | 
				
			||||||
@ -1313,6 +1313,8 @@ isMido() {
 | 
				
			|||||||
  local lang="$2"
 | 
					  local lang="$2"
 | 
				
			||||||
  local sum
 | 
					  local sum
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  [[ "${MIDO:-}" == [Nn]* ]] && return 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  sum=$(getMido "$id" "en" "sum")
 | 
					  sum=$(getMido "$id" "en" "sum")
 | 
				
			||||||
  [ -n "$sum" ] && return 0
 | 
					  [ -n "$sum" ] && return 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1324,6 +1326,8 @@ isESD() {
 | 
				
			|||||||
  local id="$1"
 | 
					  local id="$1"
 | 
				
			||||||
  local lang="$2"
 | 
					  local lang="$2"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  [[ "${ESD:-}" == [Nn]* ]] && return 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  case "${id,,}" in
 | 
					  case "${id,,}" in
 | 
				
			||||||
    "win11${PLATFORM,,}" | "win10${PLATFORM,,}" )
 | 
					    "win11${PLATFORM,,}" | "win10${PLATFORM,,}" )
 | 
				
			||||||
      return 0
 | 
					      return 0
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										89
									
								
								src/mido.sh
									
									
									
									
									
								
							
							
						
						
									
										89
									
								
								src/mido.sh
									
									
									
									
									
								
							@ -264,23 +264,34 @@ download_windows_eval() {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  case "$enterprise_type" in
 | 
					  case "$enterprise_type" in
 | 
				
			||||||
 | 
					    "iot" | "ltsc" )
 | 
				
			||||||
 | 
					      case "${PLATFORM,,}" in
 | 
				
			||||||
 | 
					        "x64" )
 | 
				
			||||||
 | 
					          if [[ "$windows_version" != "windows-10"* ]]; then
 | 
				
			||||||
 | 
					            iso_download_link=$(echo "$iso_download_links" | head -n 1)
 | 
				
			||||||
 | 
					          else
 | 
				
			||||||
 | 
					            iso_download_link=$(echo "$iso_download_links" | head -n 4 | tail -n 1)
 | 
				
			||||||
 | 
					          fi ;;
 | 
				
			||||||
 | 
					        "arm64" )
 | 
				
			||||||
 | 
					          iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1) ;;
 | 
				
			||||||
 | 
					        * )
 | 
				
			||||||
 | 
					          error "Invalid platform specified, value \"$PLATFORM\" is not recognized!" && return 1 ;;
 | 
				
			||||||
 | 
					      esac ;;
 | 
				
			||||||
    "enterprise" )
 | 
					    "enterprise" )
 | 
				
			||||||
      iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1)
 | 
					      case "${PLATFORM,,}" in
 | 
				
			||||||
      ;;
 | 
					        "x64" )
 | 
				
			||||||
    "iot" )
 | 
					          if [[ "$windows_version" != "windows-10"* ]]; then
 | 
				
			||||||
      if [[ "${PLATFORM,,}" == "x64" ]]; then
 | 
					            iso_download_link=$(echo "$iso_download_links" | head -n 1)
 | 
				
			||||||
        iso_download_link=$(echo "$iso_download_links" | head -n 1)
 | 
					          else
 | 
				
			||||||
      fi
 | 
					            iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1)
 | 
				
			||||||
      if [[ "${PLATFORM,,}" == "arm64" ]]; then
 | 
					          fi ;;
 | 
				
			||||||
        iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1)
 | 
					        "arm64" )
 | 
				
			||||||
      fi
 | 
					          iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1) ;;
 | 
				
			||||||
      ;;
 | 
					        * )
 | 
				
			||||||
    "ltsc" )
 | 
					          error "Invalid platform specified, value \"$PLATFORM\" is not recognized!" && return 1 ;;
 | 
				
			||||||
      iso_download_link=$(echo "$iso_download_links" | head -n 4 | tail -n 1)
 | 
					      esac ;;
 | 
				
			||||||
      ;;
 | 
					 | 
				
			||||||
    "server" )
 | 
					    "server" )
 | 
				
			||||||
      iso_download_link=$(echo "$iso_download_links" | head -n 1)
 | 
					      iso_download_link=$(echo "$iso_download_links" | head -n 1) ;;
 | 
				
			||||||
      ;;
 | 
					 | 
				
			||||||
    * )
 | 
					    * )
 | 
				
			||||||
      error "Invalid type specified, value \"$enterprise_type\" is not recognized!" && return 1 ;;
 | 
					      error "Invalid type specified, value \"$enterprise_type\" is not recognized!" && return 1 ;;
 | 
				
			||||||
  esac
 | 
					  esac
 | 
				
			||||||
@ -323,8 +334,7 @@ getWindows() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  case "${version,,}" in
 | 
					  case "${version,,}" in
 | 
				
			||||||
    "win11${PLATFORM,,}" ) ;;
 | 
					    "win11${PLATFORM,,}" ) ;;
 | 
				
			||||||
    "win11${PLATFORM,,}-enterprise-iot"* ) ;;
 | 
					    "win11${PLATFORM,,}-enterprise"* ) ;;
 | 
				
			||||||
    "win11${PLATFORM,,}-enterprise-ltsc"* ) ;;
 | 
					 | 
				
			||||||
    * )
 | 
					    * )
 | 
				
			||||||
      if [[ "${PLATFORM,,}" != "x64" ]]; then
 | 
					      if [[ "${PLATFORM,,}" != "x64" ]]; then
 | 
				
			||||||
        error "No download for the ${PLATFORM^^} platform available for $edition!"
 | 
					        error "No download for the ${PLATFORM^^} platform available for $edition!"
 | 
				
			||||||
@ -396,10 +406,11 @@ getESD() {
 | 
				
			|||||||
  local version="$2"
 | 
					  local version="$2"
 | 
				
			||||||
  local lang="$3"
 | 
					  local lang="$3"
 | 
				
			||||||
  local desc="$4"
 | 
					  local desc="$4"
 | 
				
			||||||
 | 
					  local result
 | 
				
			||||||
  local culture
 | 
					  local culture
 | 
				
			||||||
  local language
 | 
					  local language
 | 
				
			||||||
  local editionName
 | 
					  local editionName
 | 
				
			||||||
  local winCatalog size
 | 
					  local winCatalog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  culture=$(getLanguage "$lang" "culture")
 | 
					  culture=$(getLanguage "$lang" "culture")
 | 
				
			||||||
  winCatalog=$(getCatalog "$version" "url")
 | 
					  winCatalog=$(getCatalog "$version" "url")
 | 
				
			||||||
@ -441,32 +452,57 @@ getESD() {
 | 
				
			|||||||
    error "Failed to find $xFile in $wFile!" && return 1
 | 
					    error "Failed to find $xFile in $wFile!" && return 1
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  local edQuery='//File[Architecture="'${PLATFORM}'"][Edition="'${editionName}'"]'
 | 
					  local edQuery='//File[Architecture="'${PLATFORM,,}'"][Edition="'${editionName}'"]'
 | 
				
			||||||
 | 
					  result=$(xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" 2>/dev/null)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if [ -z "$result" ]; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    edQuery='//File[Architecture="'${PLATFORM^^}'"][Edition="'${editionName}'"]'
 | 
				
			||||||
 | 
					    result=$(xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" 2>/dev/null)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if [ -z "$result" ]; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      desc=$(printEdition "$version" "$desc")
 | 
				
			||||||
 | 
					      language=$(getLanguage "$lang" "desc")
 | 
				
			||||||
 | 
					      error "No download link available for $desc!" && return 1
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  echo -e '<Catalog>' > "$dir/$fFile"
 | 
					  echo -e '<Catalog>' > "$dir/$fFile"
 | 
				
			||||||
  xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" >> "$dir/$fFile" 2>/dev/null
 | 
					  echo "$result" >> "$dir/$fFile"
 | 
				
			||||||
  echo -e '</Catalog>'>> "$dir/$fFile"
 | 
					  echo -e '</Catalog>'>> "$dir/$fFile"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  xmllint --nonet --xpath "//File[LanguageCode=\"${culture,,}\"]" "$dir/$fFile" >"$dir/$eFile"
 | 
					  result=$(xmllint --nonet --xpath "//File[LanguageCode=\"${culture,,}\"]" "$dir/$fFile" 2>/dev/null)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  size=$(stat -c%s "$dir/$eFile")
 | 
					  if [ -z "$result" ]; then
 | 
				
			||||||
  if ((size<20)); then
 | 
					 | 
				
			||||||
    desc=$(printEdition "$version" "$desc")
 | 
					    desc=$(printEdition "$version" "$desc")
 | 
				
			||||||
    language=$(getLanguage "$lang" "desc")
 | 
					    language=$(getLanguage "$lang" "desc")
 | 
				
			||||||
    error "No download in the $language language available for $desc!" && return 1
 | 
					    error "No download in the $language language available for $desc!" && return 1
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  echo "$result" > "$dir/$eFile"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  local tag="FilePath"
 | 
					  local tag="FilePath"
 | 
				
			||||||
  ESD=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g")
 | 
					  ESD=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g" 2>/dev/null)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if [ -z "$ESD" ]; then
 | 
					  if [ -z "$ESD" ]; then
 | 
				
			||||||
    error "Failed to find ESD URL in $eFile!" && return 1
 | 
					    error "Failed to find ESD URL in $eFile!" && return 1
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  tag="Sha1"
 | 
					  tag="Sha1"
 | 
				
			||||||
  ESD_SUM=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g")
 | 
					  ESD_SUM=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g" 2>/dev/null)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if [ -z "$ESD_SUM" ]; then
 | 
				
			||||||
 | 
					    error "Failed to find ESD checksum in $eFile!" && return 1
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  tag="Size"
 | 
					  tag="Size"
 | 
				
			||||||
  ESD_SIZE=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g")
 | 
					  ESD_SIZE=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g" 2>/dev/null)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if [ -z "$ESD_SIZE" ]; then
 | 
				
			||||||
 | 
					    error "Failed to find ESD filesize in $eFile!" && return 1
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  rm -rf "$dir"
 | 
					  rm -rf "$dir"
 | 
				
			||||||
  return 0
 | 
					  return 0
 | 
				
			||||||
@ -561,6 +597,7 @@ downloadFile() {
 | 
				
			|||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  info "$msg..."
 | 
					  info "$msg..."
 | 
				
			||||||
 | 
					  [[ "$DEBUG" == [Yy1]* ]] && echo "Downloading $url"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  { wget "$url" -O "$iso" -q --timeout=30 --no-http-keep-alive --user-agent "$agent" --show-progress "$progress"; rc=$?; } || :
 | 
					  { wget "$url" -O "$iso" -q --timeout=30 --no-http-keep-alive --user-agent "$agent" --show-progress "$progress"; rc=$?; } || :
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user