mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Prompt the user to download the Windows iso manually. Closes #612
This commit is contained in:
parent
4286405639
commit
8d3cf4c1a7
1 changed files with 72 additions and 48 deletions
26
quickget
26
quickget
|
@ -1907,12 +1907,19 @@ function dbg_windows() {
|
||||||
|
|
||||||
# Adapted from https://gist.github.com/hongkongkiwi/15a5bf16437315df256c118c163607cb
|
# Adapted from https://gist.github.com/hongkongkiwi/15a5bf16437315df256c118c163607cb
|
||||||
function get_windows() {
|
function get_windows() {
|
||||||
|
# Use the API to automatically download a Windows .iso image
|
||||||
|
# The API we were using is unmaintained and not currently functional
|
||||||
|
# 0 : Prompt for a manual ISO download
|
||||||
|
# 1 : Use the API for automated download
|
||||||
|
local API_GUIDED_DOWNLOAD=0
|
||||||
|
|
||||||
local ARCH="x64"
|
local ARCH="x64"
|
||||||
local INDEX=0
|
local INDEX=0
|
||||||
local LANG_CODE="en"
|
local LANG_CODE="en"
|
||||||
local LANG_EDITION="${1}"
|
local LANG_EDITION="${1}"
|
||||||
local LATEST_WINDOWS_VERSION=""
|
local LATEST_WINDOWS_VERSION=""
|
||||||
local WINDOWS_NAME=""
|
local WINDOWS_NAME=""
|
||||||
|
local WINDOWS_ISO_URL=""
|
||||||
local VERSION_ID=""
|
local VERSION_ID=""
|
||||||
local EDITION_ID=""
|
local EDITION_ID=""
|
||||||
local LANGUAGE_ID=""
|
local LANGUAGE_ID=""
|
||||||
|
@ -1922,6 +1929,7 @@ function get_windows() {
|
||||||
local DOWNLOAD_ID=""
|
local DOWNLOAD_ID=""
|
||||||
local DOWNLOAD_URL=""
|
local DOWNLOAD_URL=""
|
||||||
|
|
||||||
|
if [ ${API_GUIDED_DOWNLOAD} -eq 1 ]; then
|
||||||
# Ignore the most recent Windows 10 release for now.
|
# Ignore the most recent Windows 10 release for now.
|
||||||
case ${RELEASE} in
|
case ${RELEASE} in
|
||||||
10) INDEX=0;;
|
10) INDEX=0;;
|
||||||
|
@ -1976,6 +1984,18 @@ function get_windows() {
|
||||||
if [ -n "${DOWNLOAD_SHA1}" ]; then
|
if [ -n "${DOWNLOAD_SHA1}" ]; then
|
||||||
check_hash "${FILE_NAME}" "${DOWNLOAD_SHA1}"
|
check_hash "${FILE_NAME}" "${DOWNLOAD_SHA1}"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
case ${RELEASE} in
|
||||||
|
10) WINDOWS_ISO_URL="https://www.microsoft.com/software-download/windows10";;
|
||||||
|
11) WINDOWS_ISO_URL="https://www.microsoft.com/software-download/windows11";;
|
||||||
|
esac
|
||||||
|
echo "######################################################################"
|
||||||
|
echo "# Download a Windows ${RELEASE} .iso image from:"
|
||||||
|
echo "# - ${WINDOWS_ISO_URL}"
|
||||||
|
echo "# Put the .iso image in the ${VM_PATH} directory and rename"
|
||||||
|
echo "# it to windows-${RELEASE}.iso."
|
||||||
|
echo "######################################################################"
|
||||||
|
fi
|
||||||
|
|
||||||
web_get "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" "${VM_PATH}"
|
web_get "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" "${VM_PATH}"
|
||||||
|
|
||||||
|
@ -1991,7 +2011,11 @@ function get_windows() {
|
||||||
mkisofs -quiet -l -o "${VM_PATH}/unattended.iso" "${VM_PATH}/unattended/"
|
mkisofs -quiet -l -o "${VM_PATH}/unattended.iso" "${VM_PATH}/unattended/"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
make_vm_config "${FILE_NAME}" "virtio-win.iso"
|
|
||||||
|
case "${API_GUIDED_DOWNLOAD}" in
|
||||||
|
0) make_vm_config "windows-${RELEASE}.iso" "virtio-win.iso";;
|
||||||
|
1) make_vm_config "${FILE_NAME}" "virtio-win.iso";;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
create_vm() {
|
create_vm() {
|
||||||
|
|
Loading…
Reference in a new issue