mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Add Windows 11 support to quickget
This commit is contained in:
		
							parent
							
								
									86e634b2bd
								
							
						
					
					
						commit
						aa2c8d0913
					
				
					 2 changed files with 24 additions and 10 deletions
				
			
		|  | @ -201,10 +201,11 @@ There are some considerations when running macOS via Quickemu. | ||||||
|     * USB pass-through via SPICE is not available. |     * USB pass-through via SPICE is not available. | ||||||
|     * Smartcard pass-through is not available. |     * Smartcard pass-through is not available. | ||||||
| 
 | 
 | ||||||
| ## Windows 10 Guest | ## Windows 10 & 11 Guests | ||||||
| 
 | 
 | ||||||
| `quickget` automatically downloads [Windows 10](https://www.microsoft.com/en-gb/software-download/windows10ISO), | `quickget` can automatically download [Windows 10](https://www.microsoft.com/en-gb/software-download/windows10ISO) | ||||||
| the [VirtIO drivers for Windows](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/) | and [Windows 11](https://www.microsoft.com/en-gb/software-download/windows11) | ||||||
|  | along with the [VirtIO drivers for Windows](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/) | ||||||
| and creates a virtual machine configuration. | and creates a virtual machine configuration. | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
|  |  | ||||||
							
								
								
									
										27
									
								
								quickget
									
										
									
									
									
								
							
							
						
						
									
										27
									
								
								quickget
									
										
									
									
									
								
							|  | @ -293,11 +293,13 @@ function get_ubuntu() { | ||||||
| 
 | 
 | ||||||
| # Adapted from https://gist.github.com/hongkongkiwi/15a5bf16437315df256c118c163607cb | # Adapted from https://gist.github.com/hongkongkiwi/15a5bf16437315df256c118c163607cb | ||||||
| function get_windows() { | function get_windows() { | ||||||
|     if [ "${RELEASE}" != "10" ]; then |     case ${RELEASE} in | ||||||
|         echo "ERROR! Unknown release: ${RELEASE}" |       10|11) true;; | ||||||
|         releases_windows |       *) echo "ERROR! Windows ${RELEASE} is not supported." | ||||||
|         exit 1 |          releases_windows | ||||||
|     fi |          exit 1 | ||||||
|  |          ;; | ||||||
|  |     esac | ||||||
| 
 | 
 | ||||||
|     local ARCH="x64" |     local ARCH="x64" | ||||||
|     local LANG_CODE="en" |     local LANG_CODE="en" | ||||||
|  | @ -313,10 +315,21 @@ function get_windows() { | ||||||
|     local DOWNLOAD_URL="" |     local DOWNLOAD_URL="" | ||||||
| 
 | 
 | ||||||
|     echo "Getting Windows ${RELEASE} URL..." |     echo "Getting Windows ${RELEASE} URL..." | ||||||
|     LATEST_WINDOWS_VERSION=$(wget -q -O- "https://tb.rg-adguard.net/php/get_version.php?type_id=1" | jq '.versions | sort_by(-(.version_id | tonumber))[0]') |     WINDOWS_VERSIONS=$(wget -q -O- "https://tb.rg-adguard.net/php/get_version.php?type_id=1" | jq '.versions | sort_by(-(.version_id | tonumber))') | ||||||
|  | 
 | ||||||
|  |     case ${RELEASE} in | ||||||
|  |         10) LATEST_WINDOWS_VERSION=$(echo "${WINDOWS_VERSIONS}" | jq -c 'map(select(.name | contains("Windows 10")))[0]');; | ||||||
|  |         11) LATEST_WINDOWS_VERSION=$(echo "${WINDOWS_VERSIONS}" | jq -c 'map(select(.name | contains("Windows 11")))[0]');; | ||||||
|  |     esac | ||||||
|  | 
 | ||||||
|     WINDOWS_NAME=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .name) |     WINDOWS_NAME=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .name) | ||||||
|     VERSION_ID=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .version_id) |     VERSION_ID=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .version_id) | ||||||
|     EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows 10").edition_id') | 
 | ||||||
|  |     case ${RELEASE} in | ||||||
|  |         10) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows 10").edition_id');; | ||||||
|  |         11) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows 11").edition_id');; | ||||||
|  |     esac | ||||||
|  | 
 | ||||||
|     LANGUAGE_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_language.php?edition_id=${EDITION_ID}&lang=name_${LANG_CODE}" | jq -r '.languages[] | select(.name_'${LANG_CODE}'=="'"${LANG_NAME}"'").language_id') |     LANGUAGE_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_language.php?edition_id=${EDITION_ID}&lang=name_${LANG_CODE}" | jq -r '.languages[] | select(.name_'${LANG_CODE}'=="'"${LANG_NAME}"'").language_id') | ||||||
|     ARCH_INFO=$(wget -q -O- "https://tb.rg-adguard.net/php/get_arch.php?language_id=${LANGUAGE_ID}") |     ARCH_INFO=$(wget -q -O- "https://tb.rg-adguard.net/php/get_arch.php?language_id=${LANGUAGE_ID}") | ||||||
|     FILE_NAME=$(echo "${ARCH_INFO}" | jq -r '.archs[] | select(.name | contains("'${ARCH}'")).name') |     FILE_NAME=$(echo "${ARCH_INFO}" | jq -r '.archs[] | select(.name | contains("'${ARCH}'")).name') | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue