This commit is contained in:
Phil Clifford 2023-06-21 11:18:29 -05:00 committed by GitHub
commit 9191dcb5c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 89 additions and 14 deletions

View File

@ -471,7 +471,7 @@ function vm_boot() {
# Make any OS specific adjustments # Make any OS specific adjustments
case ${guest_os} in case ${guest_os} in
batocera|*bsd|freedos|haiku|linux|*solaris) icaros|batocera|*bsd|freedos|haiku|linux|*solaris)
CPU="-cpu host,kvm=on" CPU="-cpu host,kvm=on"
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
CPU="${CPU},topoext" CPU="${CPU},topoext"
@ -479,7 +479,7 @@ function vm_boot() {
if [ "${guest_os}" == "freebsd" ] || [ "${guest_os}" == "ghostbsd" ]; then if [ "${guest_os}" == "freebsd" ] || [ "${guest_os}" == "ghostbsd" ]; then
MOUSE="usb" MOUSE="usb"
elif [ "${guest_os}" == "batocera" ] || [ "${guest_os}" == "freedos" ] || [ "${guest_os}" == "haiku" ]; then elif [ "${guest_os}" == "icaros" ] || [ "${guest_os}" == "batocera" ] || [ "${guest_os}" == "freedos" ] || [ "${guest_os}" == "haiku" ]; then
MACHINE_TYPE="pc" MACHINE_TYPE="pc"
NET_DEVICE="rtl8139" NET_DEVICE="rtl8139"
fi fi
@ -1103,6 +1103,12 @@ function vm_boot() {
args+=(-device ahci,id=ahci args+=(-device ahci,id=ahci
-device ide-hd,bus=ahci.0,drive=SystemDisk -device ide-hd,bus=ahci.0,drive=SystemDisk
-drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO}) -drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
elif [ "${guest_os}" == "icaros" ]; then
# shellcheck disable=SC2054,SC2206
args+=(-device ahci,id=ahci
-device ide-hd,bus=ahci.0,drive=SystemDisk
-drive id=SystemDisk,if=none,index=1,format=qcow2,file="${disk_img}" ${STATUS_QUO}
-boot order=d,menu=on)
elif [ "${guest_os}" == "batocera" ] ; then elif [ "${guest_os}" == "batocera" ] ; then
# shellcheck disable=SC2054,SC2206 # shellcheck disable=SC2054,SC2206

View File

@ -36,6 +36,7 @@ function pretty_name() {
archlinux) PRETTY_NAME="Arch Linux";; archlinux) PRETTY_NAME="Arch Linux";;
archcraft) PRETTY_NAME="Archcraft";; archcraft) PRETTY_NAME="Archcraft";;
arcolinux) PRETTY_NAME="Arco Linux";; arcolinux) PRETTY_NAME="Arco Linux";;
icaros) PRETTY_NAME="icaros desktop";;
blendos) PRETTY_NAME="BlendOS";; blendos) PRETTY_NAME="BlendOS";;
cachyos) PRETTY_NAME="CachyOS";; cachyos) PRETTY_NAME="CachyOS";;
centos-stream) PRETTY_NAME="CentOS Stream";; centos-stream) PRETTY_NAME="CentOS Stream";;
@ -200,6 +201,7 @@ function os_support() {
gentoo \ gentoo \
ghostbsd \ ghostbsd \
haiku \ haiku \
icaros \
kali \ kali \
kdeneon \ kdeneon \
kolibrios \ kolibrios \
@ -281,6 +283,12 @@ function releases_arcolinux() {
function editions_arcolinux() { function editions_arcolinux() {
echo large small echo large small
} }
function editions_icaros() {
echo live light
}
function releases_icaros() {
echo 2.3.0 2.2.8 2.2.7 2.2.6 2.2.5
}
function releases_blendos() { function releases_blendos() {
local RLIST local RLIST
@ -752,19 +760,19 @@ function web_get() {
exit 1 exit 1
fi fi
if command -v aria2c &>/dev/null; then if command -v aria2c &>/dev/null; then
if ! aria2c --stderr -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" --dir "${DIR}" -o "${FILE}"; then if ! aria2c --stderr -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" --dir "${DIR}" -o "${FILE}"; then
echo #Necessary as aria2c in suppressed mode does not have new lines
echo "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again."
exit 1
fi
echo #Necessary as aria2c in suppressed mode does not have new lines echo #Necessary as aria2c in suppressed mode does not have new lines
echo "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again." else
exit 1 if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
fi echo "ERROR! Failed to download ${URL} with wget. Try running 'quickget' again."
echo #Necessary as aria2c in suppressed mode does not have new lines exit 1
else fi
if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then fi
echo "ERROR! Failed to download ${URL} with wget. Try running 'quickget' again."
exit 1
fi
fi
} }
function zsync_get() { function zsync_get() {
@ -815,6 +823,9 @@ function make_vm_config() {
IMAGE_FILE="${1}" IMAGE_FILE="${1}"
ISO_FILE="${2}" ISO_FILE="${2}"
case "${OS}" in case "${OS}" in
icaros)
GUEST="icaros"
IMAGE_TYPE="iso";;
batocera) batocera)
GUEST="batocera" GUEST="batocera"
IMAGE_TYPE="img";; IMAGE_TYPE="img";;
@ -935,6 +946,9 @@ EOF
echo "disk_size=\"12G\"" >> "${CONF_FILE}" echo "disk_size=\"12G\"" >> "${CONF_FILE}"
echo "ram=\"2048M\"" >> "${CONF_FILE}" echo "ram=\"2048M\"" >> "${CONF_FILE}"
;; ;;
arosone|icaros)
echo "boot=\"legacy\"" >> "${CONF_FILE}"
;;
macos) macos)
echo "macos_release=\"${RELEASE}\"" >> "${CONF_FILE}" echo "macos_release=\"${RELEASE}\"" >> "${CONF_FILE}"
# https://github.com/quickemu-project/quickemu/issues/438 # https://github.com/quickemu-project/quickemu/issues/438
@ -1042,6 +1056,56 @@ function get_arcolinux() {
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
function get_icaros() {
local EDITION="${1:-}"
local ISO="Icaros${EDITION^}_${RELEASE//./_}.zip"
local URL="http://www.icarosdesktop.com/icarosfiles/"
local HASH=""
case ${EDITION} in
Live|live)
case ${RELEASE} in
2.3.0)
HASH="f2e4fdbc71f48e35dccfe6c26ae07a8f" #
;;
2.2.8)
HASH="abb77ec6968f3a0823ba527bc0f73ce2"
;;
2.2.7)
HASH="d75c1fdc3a3ec6813c0ae768ea43eb47"
;;
2.2.6)
HASH="a518574abd6fcbb846f9fd6ae7fa36ec"
;;
2.2.5)
HASH="a89ec32c30a10bd4c551bee3b902740d"
;;
esac
;;
Light|light)
case ${RELEASE} in
2.3.0)
HASH="a469a92982842303bbe904efe1d09ea6"
;;
2.2.8)
HASH="d8a626c732a6ab3be256ab0007d72b94"
;;
2.2.7)
HASH="50a2dc2c544b38c48e44f865c84d7824"
;;
2.2.6)
HASH="57366ac7a629f8dbe8da999f9b84eb91"
;;
2.2.5)
HASH="e4f5817ec32086b698948c6fc899aec3"
;;
esac
;;
esac
echo "${URL}"/"${ISO}" "${HASH}"
}
function get_blendos() { function get_blendos() {
local EDITION="${1:-}" local EDITION="${1:-}"
local HASH="" local HASH=""
@ -2226,6 +2290,11 @@ create_vm() {
ISO=$(ls ${VM_PATH} | grep -i '.iso' | grep -v '.zip') ISO=$(ls ${VM_PATH} | grep -i '.iso' | grep -v '.zip')
fi fi
if [ ${OS} == "icaros" ] && [[ $ISO =~ ".zip" ]]; then
unzip -j ${VM_PATH}/${ISO} -d ${VM_PATH}
ISO=$(ls ${VM_PATH} | grep -i '.iso' | grep -v '.zip')
fi
make_vm_config "${ISO}" make_vm_config "${ISO}"
} }