diff --git a/README.md b/README.md index ac97e9c89c..06d090ac75 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,9 @@ We have a Discord for this project: See this (old) video where I explain some of my motivations for creating Quickemu. -[![Replace VirtualBox with Bash & -QEMU](https://img.youtube.com/vi/AOTYWEgw0hI/0.jpg)](https://www.youtube.com/watch?v=AOTYWEgw0hI) + + Replace VirtualBox with Bash & QEMU + ## Requirements @@ -476,7 +477,7 @@ quickemu --vm windows-11-22H2.conf - Complete the installation as you normally would. - All relevant drivers and services should be installed automatically. -- A local adminstrator user account is automatically created, with +- A local administrator user account is automatically created, with these credentials: - Username: `Quickemu` - Password: `quickemu` @@ -838,7 +839,7 @@ which Quickemu sizes to 2048x1152. Without the `--screen` option, Quickemu would have used the 1920x1080 monitor which results in a window size of 1664x936. -The '--screenpct' is an optional interger value between 25 \<= pct \< +The '--screenpct' is an optional integer value between 25 \<= pct \< 100 which will override system default screen sizes. The VM size will be 'pct' of the chosen screen. **If --fullscreen is chosen screen will be fullsize instead of being scaled down by --screenpct value.** diff --git a/docs/quickemu.1 b/docs/quickemu.1 index a9d71d50c3..4140485056 100644 --- a/docs/quickemu.1 +++ b/docs/quickemu.1 @@ -715,7 +715,7 @@ Complete the installation as you normally would. .IP \[bu] 2 All relevant drivers and services should be installed automatically. .IP \[bu] 2 -A local adminstrator user account is automatically created, with these +A local administrator user account is automatically created, with these credentials: .RS 2 .IP \[bu] 2 @@ -854,7 +854,7 @@ which Quickemu sizes to 2048x1152. Without the \f[V]--screen\f[R] option, Quickemu would have used the 1920x1080 monitor which results in a window size of 1664x936. .PP -The `\[en]screenpct' is an optional interger value between 25 <= pct < +The `\[en]screenpct' is an optional integer value between 25 <= pct < 100 which will override system default screen sizes. The VM size will be `pct' of the chosen screen. \f[B]If \[en]fullscreen is chosen screen will be fullsize instead of diff --git a/docs/quickemu.1.md b/docs/quickemu.1.md index f21b88485c..d5139b6f89 100644 --- a/docs/quickemu.1.md +++ b/docs/quickemu.1.md @@ -506,7 +506,7 @@ quickemu --vm windows-11-22H2.conf - Complete the installation as you normally would. - All relevant drivers and services should be installed automatically. -- A local adminstrator user account is automatically created, with +- A local administrator user account is automatically created, with these credentials: - Username: `Quickemu` - Password: `quickemu` @@ -623,7 +623,7 @@ which Quickemu sizes to 2048x1152. Without the `--screen` option, Quickemu would have used the 1920x1080 monitor which results in a window size of 1664x936. -The '--screenpct' is an optional interger value between 25 \<= pct \< +The '--screenpct' is an optional integer value between 25 \<= pct \< 100 which will override system default screen sizes. The VM size will be 'pct' of the chosen screen. **If --fullscreen is chosen screen will be fullsize instead of being scaled down by --screenpct value.** diff --git a/docs/quickget.1 b/docs/quickget.1 index 5365530c66..6515dc879b 100644 --- a/docs/quickget.1 +++ b/docs/quickget.1 @@ -498,7 +498,7 @@ Complete the installation as you normally would. .IP \[bu] 2 All relevant drivers and services should be installed automatically. .IP \[bu] 2 -A local adminstrator user account is automatically created, with these +A local administrator user account is automatically created, with these credentials: .RS 2 .IP \[bu] 2 diff --git a/docs/quickget.1.md b/docs/quickget.1.md index de59e7c9f8..92903e0a30 100644 --- a/docs/quickget.1.md +++ b/docs/quickget.1.md @@ -338,7 +338,7 @@ quickemu --vm windows-11-22H2.conf - Complete the installation as you normally would. - All relevant drivers and services should be installed automatically. -- A local adminstrator user account is automatically created, with +- A local administrator user account is automatically created, with these credentials: - Username: `Quickemu` - Password: `quickemu` diff --git a/quickemu b/quickemu index 4f4d6025a9..56315980c7 100755 --- a/quickemu +++ b/quickemu @@ -31,7 +31,7 @@ function ignore_msrs_alert() { echo echo " If you are unable to run macOS or Windows VMs then run the above 👆" echo " This will enable ignoring of unhandled MSRs until you reboot the host." - echo " You can make this change permenant by running: 'quickemu --ignore-msrs-always'" + echo " You can make this change permanent by running: 'quickemu --ignore-msrs-always'" fi fi } @@ -235,6 +235,7 @@ function vm_boot() { local MAC_DISK_DEV="${MAC_DISK_DEV:-ide-hd,bus=ahci.2}" local NET_DEVICE="${NET_DEVICE:-virtio-net}" local OSK="" + local SOUND="" local SMM="${SMM:-off}" local USB_HOST_PASSTHROUGH_CONTROLLER="qemu-xhci" local VGA="" @@ -487,11 +488,13 @@ function vm_boot() { if [ "${guest_os}" == "freedos" ] ; then # fix for #382 SMM="on" + SOUND_CARD="sb16" fi if [[ "${guest_os}" == *"solaris" ]]; then MACHINE_TYPE="pc" USB_CONTROLLER="xhci" + SOUND_CARD="ac97" fi if [ -z "${disk_size}" ]; then @@ -792,6 +795,16 @@ function vm_boot() { # Add fullscreen options VIDEO="${VGA} ${VIDEO} ${FULLSCREEN}" + # Build the sound hardware configuration + if [ "${SOUND_CARD}" == "intel-hda" ]; then + SOUND="-device intel-hda -device hda-duplex,audiodev=audio0" + elif [ "${SOUND_CARD}" == "ac97" ] || [ "${SOUND_CARD}" == "es1370" ] || [ "${SOUND_CARD}" == "sb16" ]; then + SOUND="-device ${SOUND_CARD},audiodev=audio0" + elif [ "${SOUND_CARD}" == "none" ]; then + SOUND="" + fi + echo " - Sound: ${SOUND_CARD}" + # Set the hostname of the VM local NET="user,hostname=${VMNAME}" @@ -920,7 +933,7 @@ function vm_boot() { -m ${RAM_VM} ${BALLOON} ${VIDEO} -display ${DISPLAY_RENDER} -audiodev ${AUDIO_DEV} - -device intel-hda -device hda-duplex,audiodev=audio0 + ${SOUND} -rtc base=localtime,clock=host,driftfix=slew) # Only enable SPICE is using SPICE display @@ -1013,7 +1026,7 @@ function vm_boot() { fi if [ "${network}" == "none" ]; then - # Disbale all networking + # Disable all networking echo " - Network: Disabled" args+=(-nic none) elif [ "${network}" == "restrict" ]; then @@ -1330,7 +1343,7 @@ function usage() { echo " --viewer : Choose an alternative viewer. @Options: 'spicy' (default), 'remote-viewer', 'none'" echo " --ssh-port : Set ssh-port manually" echo " --spice-port : Set spice-port manually" - echo " --public-dir : expose share directory. @Options: '' (default: xdg-user-dir PUBLICSHARE), '', 'none'" + echo " --public-dir : Expose share directory. @Options: '' (default: xdg-user-dir PUBLICSHARE), '', 'none'" echo " --monitor : Set monitor connection type. @Options: 'socket' (default), 'telnet', 'none'" echo " --monitor-telnet-host : Set telnet host for monitor. (default: 'localhost')" echo " --monitor-telnet-port : Set telnet port for monitor. (default: '4440')" @@ -1342,6 +1355,7 @@ function usage() { echo " --keyboard_layout : Set keyboard layout." echo " --mouse : Set mouse. @Options: 'tablet' (default), 'ps2', 'usb', 'virtio'" echo " --usb-controller : Set usb-controller. @Options: 'ehci' (default), 'xhci', 'none'" + echo " --sound-card : Set sound card. @Options: 'intel-hda' (default), 'ac97', 'es1370', 'sb16', 'none'" echo " --extra_args : Pass additional arguments to qemu" echo " --version : Print version" exit 1 @@ -1354,6 +1368,13 @@ function display_param_check() { fi } +function sound_card_param_check() { + if [ "${SOUND_CARD}" != "intel-hda" ] && [ "${SOUND_CARD}" != "ac97" ] && [ "${SOUND_CARD}" != "es1370" ] && [ "${SOUND_CARD}" != "sb16" ] && [ "${SOUND_CARD}" != "none" ]; then + echo "ERROR! Requested sound card '${SOUND_CARD}' is not recognised." + exit 1 + fi +} + function viewer_param_check() { if [ "${VIEWER}" != "none" ] && [ "${VIEWER}" != "spicy" ] && [ "${VIEWER}" != "remote-viewer" ]; then echo "ERROR! Requested viewer '${VIEWER}' is not recognised." @@ -1474,6 +1495,8 @@ keyboard="usb" keyboard_layout="en-us" # options: ps2, usb, tablet, virtio mouse="tablet" +# options: intel-hda, ac97, es1370, sb16, none +sound_card="intel-hda" BRAILLE="" DELETE_DISK=0 @@ -1512,6 +1535,7 @@ KEYBOARD_LAYOUT="" MOUSE="" USB_CONTROLLER="" EXTRA_ARGS="" +SOUND_CARD="" # shellcheck disable=SC2155 readonly LAUNCHER=$(basename "${0}") @@ -1665,6 +1689,10 @@ else EXTRA_ARGS="${2}" shift; shift;; + -sound-card|--sound-card) + SOUND_CARD="${2}" + shift; + shift;; -version|--version) echo "${VERSION}" exit;; @@ -1767,6 +1795,11 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then exit 1 fi + if [ -z "${SOUND_CARD}" ]; then + SOUND_CARD="${sound_card}" + fi + sound_card_param_check + # Check if vm is already run VM_PID=0 VM_UP=0 diff --git a/quickfzf b/quickfzf new file mode 100755 index 0000000000..5ccae2a768 --- /dev/null +++ b/quickfzf @@ -0,0 +1,102 @@ +#!/usr/bin/bash + +# Author: zenobit +# Description: Uses fzf to provide a simple TUI for quickemu and quickget +# License MIT + +# Define variables +progname="${progname:="${0##*/}"}" +version="0.22" +vms=(*.conf) + +# Set traps to catch the signals and exit gracefully +trap "exit" INT +trap "exit" EXIT + +# Dependency check: check if fzf is installed and can be executed +if ! command -v fzf >/dev/null 2>&1; then + echo "You are missing fzf..." && exit 255 +fi + +if ! command -v quickemu >/dev/null 2>&1; then + echo "You are missing quickemu..." && exit 255 +fi + +QUICKGET=$(command -v quickget) || exit 255 + +# Display version and prepared VMs +#printf " $progname: $version\n quickemu: $(quickemu --version)\n\n Prepared VMs:\n-------------\n" +printf '%s: v.%s\nquickemu: v.%s\n\n Workdir: %s\n\n Prepared VMs:\n-------------\n' "$progname" "$version" "$(quickemu --version)" "$(pwd)" +# Check if there are any VMs +if [ ${#vms[@]} -eq 0 ]; then + echo "No VMs found." + exit 1 +fi + +# Print the names of the available VMs +printf "%s\n" "${vms[@]%.*}" +echo "-------------" + +# Action prompt +printf " Do you want to create a new VM? (c) + or run an existing one? (press anything)\n" +read -rn 1 -s start +case $start in + c ) + todo="create" + ;; +esac + +# If the user chose to create a new VM +if [ "$todo" = "create" ]; then + os=$(quickget | sed 1d | cut -d':' -f2 | grep -o '[^ ]*' | fzf --cycle --header='Choose OS to download + or CTRL-c or ESC to quit') + # If the OS is Windows + if [ "$os" = windows ]; then + answer=$(echo "Default English +Choose other language" | fzf --cycle) + # If the user wants another windows language + if [ "$answer" = "Choose other language" ]; then + wrelease=$(echo "8 +10 +11" | fzf --cycle) + # get window language list + wlend=$(($(cat $QUICKGET | sed '/Arabic/,$!d' | grep -n '}' | cut -d':' -f1 | head -n 1) - 1)) + # get windows language + wlang=$(cat $QUICKGET | sed '/Arabic/,$!d' | head -n $wlend | cut -d'=' -f2 | tail -c +2 | head -c -2 | sed 's/^[ \t]*//' | fzf --cycle --header='Choose Language + or CTRL-c or ESC to quit') + # downloading windows + printf '\n Trying to download Windows %s %s...\n\n' "$wrelease" "$wlang" + quickget "windows" "$wrelease" "$wlang" + fi + fi + # Get the release and edition to download, if necessary + choices=$(quickget "$os" | sed 1d) + if [ "$(echo "$choices" | wc -l)" = 1 ]; then + # get release + release=$(echo "$choices" | grep 'Releases' | cut -d':' -f2 | grep -o '[^ ]*' | fzf --cycle --header='Choose Release + or CTRL-c or ESC to quit') + # downloading + printf '\n Trying to download %s %s...\n\n' "$os" "$release" + quickget "$os" "$release" + else + # get release + release=$(echo "$choices" | grep 'Releases' | cut -d':' -f2 | grep -o '[^ ]*' | fzf --cycle --header='Choose Release + or CTRL-c or ESC to quit') + # get edition + edition=$(echo "$choices" | grep 'Editions' | cut -d':' -f2 | grep -o '[^ ]*' | fzf --cycle --header='Choose Edition + or CTRL-c or ESC to quit') + # downloading + printf '\n Trying to download %s %s %s...\n\n' "$os" "$release" "$edition" + quickget "$os" "$release" "$edition" + fi +fi +# choose VM to run +chosen=$(echo "$(ls *.conf 2>/dev/null | sed 's/\.conf$//')" | fzf --cycle --header='Choose VM to run + or CTRL-c or ESC to quit') + +# Run chosen VM +printf '\n Starting %s...\n\n' "$chosen" +quickemu -vm "$chosen.conf" + +exit 0 diff --git a/quickget b/quickget index dcc4c95edc..c55b90db35 100755 --- a/quickget +++ b/quickget @@ -30,23 +30,30 @@ function pretty_name() { local PRETTY_NAME="" SIMPLE_NAME="${1}" case ${SIMPLE_NAME} in + agarimos) PRETTY_NAME="AgarimOS";; alma) PRETTY_NAME="Alma Linux";; alpine) PRETTY_NAME="Alpine Linux";; android) PRETTY_NAME="Android x86";; archlinux) PRETTY_NAME="Arch Linux";; archcraft) PRETTY_NAME="Archcraft";; arcolinux) PRETTY_NAME="Arco Linux";; + biglinux) PRETTY_NAME="BigLinux";; blendos) PRETTY_NAME="BlendOS";; cachyos) PRETTY_NAME="CachyOS";; centos-stream) PRETTY_NAME="CentOS Stream";; + cereus) PRETTY_NAME="Cereus Linux";; + dietpi) PRETTY_NAME="DietPi";; dragonflybsd) PRETTY_NAME="DragonFlyBSD";; elementary) PRETTY_NAME="elementary OS";; endeavouros) PRETTY_NAME="EndeavourOS";; endless) PRETTY_NAME="Endless OS";; freebsd) PRETTY_NAME="FreeBSD";; freedos) PRETTY_NAME="FreeDOS";; + fvoid) PRETTY_NAME="F-Void";; + gabeeos) PRETTY_NAME="gabeeOS Linux";; garuda) PRETTY_NAME="Garuda Linux";; ghostbsd) PRETTY_NAME="GhostBSD";; + holoiso) PRETTY_NAME="HoloISO";; kdeneon) PRETTY_NAME="KDE Neon";; kolibrios) PRETTY_NAME="KolibriOS";; linuxmint) PRETTY_NAME="Linux Mint";; @@ -65,7 +72,7 @@ function pretty_name() { reactos) PRETTY_NAME="ReactOS";; rebornos) PRETTY_NAME="RebornOS";; rockylinux) PRETTY_NAME="Rocky Linux";; - holoiso) PRETTY_NAME="HoloISO";; + slitaz) PRETTY_NAME="SliTaz GNU/Linux";; tuxedoos) PRETTY_NAME="TuxedoOS";; truenas-core) PRETTY_NAME="TrueNAS Core";; truenas-scale) PRETTY_NAME="TrueNAS Scale";; @@ -78,6 +85,7 @@ function pretty_name() { ubuntu-unity) PRETTY_NAME="Ubuntu Unity";; vanillaos) PRETTY_NAME="Vanilla OS";; void) PRETTY_NAME="Void Linux";; + voidpup) PRETTY_NAME="Void Puppy";; vxlinux) PRETTY_NAME="VX Linux";; xerolinux) PRETTY_NAME="XeroLinux";; zorin) PRETTY_NAME="Zorin OS";; @@ -177,19 +185,23 @@ function list_csv() { } function os_support() { - echo alma \ + echo agarimos \ + alma \ alpine \ android \ archlinux \ archcraft \ arcolinux \ batocera \ + biglinux \ blendos \ cachyos \ centos-stream \ + cereus \ debian \ deepin \ devuan \ + dietpi \ dragonflybsd \ elementary \ endeavouros \ @@ -197,10 +209,13 @@ function os_support() { fedora \ freebsd \ freedos \ + fvoid \ + gabeeos \ garuda \ gentoo \ ghostbsd \ haiku \ + holoiso \ kali \ kdeneon \ kolibrios \ @@ -225,8 +240,8 @@ function os_support() { rockylinux \ siduction \ slackware \ + slitaz \ solus \ - holoiso \ tails \ tuxedoos \ truenas-core \ @@ -241,6 +256,7 @@ function os_support() { ubuntu-unity \ vanillaos \ void \ + voidpup \ vxlinux \ windows \ xerolinux \ @@ -248,6 +264,10 @@ function os_support() { zorin } +function releases_agarimos() { + echo 20230305 20230303 20230225 20230216 +} + function releases_alma() { echo 8.6 8.7 9.0 9.1 } @@ -284,6 +304,10 @@ function editions_arcolinux() { echo large small } +function releases_biglinux() { + echo kde +} + function releases_blendos() { local RLIST RLIST=$(curl -s https://api.github.com/repos/blend-os/blendOS/releases |grep tag_name | grep -o -E '[[:digit:]]+\.[[:digit:]]+' | tr ' \r\n' ' ') @@ -311,6 +335,14 @@ function editions_centos-stream() { echo dvd1 boot } +function releases_cereus() { + echo latest +} + +function editions_cereus() { + echo base lxqt xfce +} + function releases_debian() { DEBCURRENT=$(wget -q https://cdimage.debian.org/debian-cd/ -O- |grep '\.[0-9]/'|cut -d\> -f9|cut -d\/ -f1) local DEBOLD=$(wget -q https://cdimage.debian.org/cdimage/archive/ -O- |grep -e '>[1-9][0-9]\.'|grep -v 'live' | cut -d\> -f9|cut -d\/ -f1 ) @@ -330,6 +362,14 @@ function releases_devuan() { echo beowulf chimaera } +function releases_dietpi() { + echo bios uefi +} + +function editions_dietpi() { + echo bookworm bookworm-installer bullseye bullseye-installer +} + function releases_dragonflybsd() { # If you remove "".bz2" from the end of the searched URL, you will get only the current release - currently 6.4.0 # We could add a variable so this behaviour is optional/switchable (maybe from option or env) @@ -398,6 +438,14 @@ function releases_freedos() { echo 1.2 1.3 } +function releases_fvoid() { + echo latest +} + +function releases_gabeeos() { + echo latest +} + function releases_garuda() { echo latest } @@ -471,6 +519,10 @@ function editions_mxlinux(){ echo Xfce KDE Fluxbox } +function editions_manjaro(){ + echo full minimal +} + function releases_macos() { echo high-sierra mojave catalina big-sur monterey ventura } @@ -478,11 +530,12 @@ function releases_macos() { function releases_manjaro() { echo xfce \ gnome \ - kde \ + plasma \ budgie \ cinnamon \ i3 \ - mate + mate \ + sway } function releases_netboot() { @@ -561,10 +614,22 @@ function editions_siduction() { echo kde lxqt nox xfce xorg } +function releases_siduction() { + echo latest +} + +function editions_siduction() { + echo kde lxqt nox xfce xorg +} + function releases_slackware() { echo 14.2 15.0 } +function releases_slitaz() { + echo preferred core core64 loram core-5in1 preinit +} + function releases_solus() { echo 4.3 } @@ -574,7 +639,7 @@ function editions_solus() { } function releases_holoiso() { - echo 4.0 + echo 4.5 } function releases_tails() { @@ -602,7 +667,7 @@ function releases_truenas-scale() { function releases_ubuntu() { local LTS_SUPPORT="14.04 16.04 18.04 20.04 22.04" - local INTERIM_SUPPORT="22.10 23.04" + local INTERIM_SUPPORT="23.04" case "${OS}" in kubuntu|lubuntu|ubuntukylin|\ @@ -618,7 +683,7 @@ function releases_ubuntu() { INTERIM_SUPPORT="${INTERIM_SUPPORT}" ;; ubuntucinnamon) - INTERIM_SUPPORT="${INTERIM_SUPPORT/22.10 /}" + INTERIM_SUPPORT="${INTERIM_SUPPORT}" ;; esac @@ -671,13 +736,14 @@ function releases_ubuntu() { eol-20.10 \ eol-21.04 \ eol-21.10 \ + eol-22.10 \ ; fi } function releases_ubuntu-server() { local LTS_SUPPORT="18.04 20.04 22.04" - local INTERIM_SUPPORT="22.10 23.04" + local INTERIM_SUPPORT="23.04" echo ${LTS_SUPPORT} \ ${INTERIM_SUPPORT} \ daily-live @@ -688,15 +754,27 @@ function releases_vanillaos() { } function releases_void() { - echo current + echo current 20221001 20210316 20210930 20210218 20191109 20190526 20190217 20181111 20171007 20170825 20170220 } function editions_void() { - echo glibc musl xfce-glibc xfce-musl + echo base base-musl cinnamon cinnamon-musl enlightenment enlightenment-musl gnome gnome-musl lxde lxde-musl lxqt lxqt-musl mate mate-musl xfce xfce-musl +} + +function releases_voidpup() { + echo latest +} + +function releases_vxlinux() { + echo 6.1 5.0 4.2 4.1 4.0 } function releases_vxlinux() { - echo 6.1.2 6.1 5.0 4.2 4.1 4.0 + echo 6.1.2 6.1 5.0 4.2 4.1 4.0. +} + +function releases_vxlinux() { + echo 5.5 } function releases_windows() { @@ -707,6 +785,10 @@ function releases_xerolinux() { echo kde } +function releases_xerolinux() { + echo kde +} + function releases_zorin() { echo 16 } @@ -894,6 +976,11 @@ EOF echo "disk_size=\"32G\"" >> "${CONF_FILE}";; batocera) echo "disk_size=\"8G\"" >> "${CONF_FILE}";; + dietpi) + if [ "${RELEASE}" == "bios" ]; then + echo "boot=\"legacy\"" >> "${CONF_FILE}" + fi + ;; dragonflybsd|haiku|openbsd|netbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}";; deepin) @@ -910,6 +997,11 @@ EOF echo "disk_size=\"2G\"" >> "${CONF_FILE}" echo "ram=\"128M\"" >> "${CONF_FILE}" ;; + slitaz) + echo "boot=\"legacy\"" >> "${CONF_FILE}" + echo "disk_size=\"4G\"" >> "${CONF_FILE}" + echo "ram=\"512M\"" >> "${CONF_FILE}" + ;; truenas-scale|truenas-core) echo "boot=\"legacy\"" >> "${CONF_FILE}" # the rest is non-functional @@ -927,7 +1019,7 @@ EOF fi ;; vanillaos) - ## Minimum 50G for abroot + ## Minimum is 50G for abroot, but a 64GB is allocated to give some headroom echo "disk_size=\"64G\"" >> "${CONF_FILE}" ;; zorin) @@ -951,7 +1043,7 @@ EOF esac if [ "${OS}" == "ubuntu" ] && [[ ${RELEASE} == *"daily"* ]]; then - # wont install lobster testing with less than 18GB + # Minimum to install lobster testing is 18GB but 32GB are allocated for headroom echo "disk_size=\"32G\"" >> "${CONF_FILE}" fi # Enable TPM for Windows 11 @@ -973,6 +1065,34 @@ EOF exit 0 } +function get_agarimos() { + local EDITION="${1:-}" + local HASH="" + local ISO="" + local URL="" + case ${RELEASE} in + 20230305) + URL="https://sourceforge.net/projects/agarimos/files/Gnome" + ISO="AgarimOS-Gnome-Catppuccin-Live-x86_64-6.1.14_1-20230305.iso" + ;; + 20230303) + URL="https://sourceforge.net/projects/agarimos/files/Plasma" + ISO="AgarimOS-Plasma-Dracula-Live-x86_64-6.1.14_1-20230303.iso" + ;; + 20230225) + URL="https://sourceforge.net/projects/agarimos/files/XFCE4" + ISO="AgarimOS-XFCE4-Catppuccin-Live-x86_64-6.1.12_1-20230216.iso" + ;; + 20230216) + URL="https://sourceforge.net/projects/agarimos/files/XFCE4" + ISO="AgarimOS-XFCE4-Catppuccin-Live-6.1.13_1-20230225.iso" + ;; + esac + + HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1) + echo "${URL}/${ISO} ${HASH}" +} + function get_alma() { local EDITION="${1:-}" local HASH="" @@ -1048,6 +1168,15 @@ function get_arcolinux() { echo "${URL}/${ISO} ${HASH}" } +function get_biglinux() { + local HASH="" + local ISO="" + local URL="https://iso.biglinux.com.br/" + ISO=$(grep -Eo 'biglinux_[0-9]{4}(-[0-9]{2}){2}_k[0-9]{2,3}.iso' <(wget -q -O- ${URL}) | sort -u | tail -n2 | head -n1) + HASH=$(curl -s ${URL}${ISO}.md5 | grep -Eo '[[:alnum:]]{32}') + echo "${URL}${ISO} ${HASH}" +} + function get_blendos() { local EDITION="${1:-}" local HASH="" @@ -1136,6 +1265,30 @@ function get_centos-stream() { echo "${URL}/${ISO} ${HASH}" } +function get_cereus() { + local HASH="" + local ISO="" + local URL="" + case ${EDITION} in + base) + ISO="cereus-beta-live-x86_64-xfce-2023.02.17.iso" + URL="https://sourceforge.net/projects/cereus-linux/files/isos/beta/latest/base" + HASH=$(wget -q -O- ${URL}/SHA256 | grep "${ISO}" | cut -d' ' -f2) + ;; + lxqt) + ISO="cereus-beta-live-x86_64-lxqt-2023.02.17.iso" + URL="https://sourceforge.net/projects/cereus-linux/files/isos/beta/latest/lxqt" + HASH=$(wget -q -O- ${URL}/SHA256 | grep "${ISO}" | cut -d' ' -f4) + ;; + xfce) + ISO="cereus-beta-live-x86_64-xfce-2023.02.17.iso" + URL="https://sourceforge.net/projects/cereus-linux/files/isos/beta/latest/xfce" + HASH=$(wget -q -O- ${URL}/SHA256 | grep "${ISO}" | cut -d' ' -f4) + ;; + esac + echo "${URL}/${ISO} ${HASH}" +} + function get_debian() { local EDITION="${1:-}" local HASH="" @@ -1195,6 +1348,42 @@ function get_devuan() { echo "${URL}/${ISO} ${HASH}" } +function get_dietpi() { + local HASH="" + local ISO="" + local URL="https://dietpi.com/downloads/images" + case ${RELEASE} in + bios) + case ${EDITION} in + bookworm) + local ISO="DietPi_NativePC-BIOS-x86_64-Bookworm.7z" + ;; + bullseye) + local ISO="DietPi_NativePC-BIOS-x86_64-Bullseye.7z" + ;; + bookworm-installer) + local ISO="DietPi_NativePC-BIOS-x86_64-Bookworm_Installer.7z" + ;; + bullseye-installer) + local ISO="DietPi_NativePC-BIOS-x86_64-Bullseye_Installer.7z" + ;; + esac + ;; + uefi) + case ${EDITION} in + bookworm-installer) + local ISO="DietPi_NativePC-UEFI-x86_64-Bookworm_Installer.7z" + ;; + bullseye-installer) + local ISO="DietPi_NativePC-UEFI-x86_64-Bullseye_Installer.7z" + ;; + esac + ;; + esac + HASH=$(wget -q -O- "${URL}/SHASUMS.txt" | grep "${ISO}" | cut -d' ' -f1) + echo "${URL}/${ISO} ${HASH}" +} + function get_dragonflybsd() { local HASH="" local ISO="dfly-x86_64-${RELEASE}_REL.iso.bz2" @@ -1304,6 +1493,26 @@ function get_freedos() { echo "${URL}/${ISO} ${HASH}" } +function get_fvoid() { + local HASH="" + local URL="" + local TMPURL="" + + TMPURL=$(wget -q -S -O- --max-redirect=0 "https://sourceforge.net/projects/f-void/files/latest/download" 2>&1 | grep -i Location | cut -d' ' -f4) + URL=${TMPURL%\?*} + echo "${URL} ${HASH}" +} + +function get_gabeeos() { + local HASH="" + local URL="" + local TMPURL="" + + TMPURL=$(wget -q -S -O- --max-redirect=0 "https://sourceforge.net/projects/gabeeos/files/latest/download" 2>&1 | grep -i Location | cut -d' ' -f4) + URL=${TMPURL%\?*} + echo "${URL} ${HASH}" +} + function get_garuda() { local EDITION="${1:-}" local HASH="" @@ -1494,18 +1703,30 @@ function get_mageia() { } function get_manjaro() { + local EDITION="${1:-}" local HASH="" local ISO="" - local MANIFESTURL="" + local MANIFEST="" local URL="" + local TYPE="" case ${RELEASE} in - gnome|kde|xfce) MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/official/${RELEASE}.md";; - budgie|cinnamon|deepin|i3|mate) MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/community/${RELEASE}.md";; + sway) MANIFEST="$( wget -qO- https://mirror.manjaro-sway.download/manjaro-sway/release.json )";; + gnome|xfce|plasma) TYPE="official";; + *) TYPE="community";; esac - URL="$(wget -qO- "${MANIFESTURL}" | grep "Download_x64 =" | cut -d'"' -f2)" - HASH=$(wget -qO- "${MANIFESTURL}" | grep "Download_x64_Checksum =" | cut -d'"' -f2) + [[ ${RELEASE} != "sway" ]] && MANIFEST="$(wget -qO- https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)" + + [[ ${EDITION} == "minimal" && ${TYPE} != "sway" ]] && EDITION=".minimal" || EDITION="" + + if [[ ${RELEASE} != "sway" ]]; then + URL="$(echo ${MANIFEST} | jq -r .${TYPE}.${RELEASE}${EDITION}.image)" + else + URL="echo ${MANIFEST} | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | select(.name|contains("unstable")|not) | .url'" + fi + + HASH=$(wget -qO- "${URL}.sha512" | cut -d' ' -f1) echo "${URL} ${HASH}" } @@ -1646,10 +1867,10 @@ function get_siduction() { local HASH="" local DATE="" local ISO="" - local URL="https://mirrors.dotsrc.org/siduction/iso/Masters_of_War/${EDITION}" + local URL="https://mirrors.dotsrc.org/siduction/iso/Standing_on_the_Shoulders_of_Giants/${EDITION}" DATE=$(wget -q -O- "${URL}"| grep .iso.md5 | cut -d'-' -f6 | cut -d'.' -f1) HASH=$(wget -q -O- "${URL}/${ISO}.md5" | cut -d' ' -f1) - ISO="siduction-22.1.1-Masters_of_War-${EDITION}-amd64-${DATE}.iso" + ISO="siduction-2023.1.1-Standing_on_the_Shoulders_of_Giants-${EDITION}-amd64-${DATE}.iso" echo "${URL}/${ISO} ${HASH}" } @@ -1661,6 +1882,20 @@ function get_slackware() { echo "${URL}/${ISO} ${HASH}" } +function get_slitaz() { + local HASH="" + local ISO="slitaz-rolling-${RELEASE}" + local URL="http://mirror.slitaz.org/iso/rolling" + + case ${RELEASE} in + preferred) ISO="slitaz-rolling";; + *) ISO="slitaz-rolling-${RELEASE}";; + esac + + HASH=$(wget -q -O- "${URL}/${ISO}.md5" | cut -d' ' -f1) + echo "${URL}/${ISO}.iso ${HASH}" +} + function get_solus() { local EDITION="${1:-}" local HASH="" @@ -1673,8 +1908,7 @@ function get_solus() { function get_holoiso() { local HASH="" - local DATE="20221211" - local ISO="HoloISO_${RELEASE}_OfflineInstaller-${DATE}_1636-x86_64.iso" + local ISO="HoloISO_${RELEASE}_ux_changes-20230626_66f7c74061_bootchoice_fixes-1-x86_64.iso" local URL="http://holoiso.itsvixano.me" HASH=$(wget -q -O- "${URL}/${ISO}.sha256sum" | cut -d' ' -f1) @@ -1809,19 +2043,42 @@ function get_void() { local EDITION="${1:-}" local HASH="" local ISO="" - local URL="https://alpha.de.repo.voidlinux.org/live/current" - - DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4) - case ${EDITION} in - glibc) ISO="void-live-x86_64-${DATE}-base.iso";; - musl) ISO="void-live-x86_64-musl-${DATE}-base.iso";; - xfce-glibc) ISO="void-live-x86_64-${DATE}-xfce.iso";; - xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";; - esac + local URL="https://alpha.de.repo.voidlinux.org/live/${RELEASE}" + if [[ "${RELEASE}" == "current" ]]; then + DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4) + case ${EDITION} in + base) ISO="void-live-x86_64-${DATE}-base.iso";; + base-musl) ISO="void-live-x86_64-musl-${DATE}-base.iso";; + xfce) ISO="void-live-x86_64-${DATE}-xfce.iso";; + xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";; + esac + fi HASH="$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)" echo "${URL}/${ISO} ${HASH}" } +function get_voidpup() { + local HASH="" + local URL="" + local TMPURL="" + + TMPURL=$(wget -q -S -O- --max-redirect=0 "https://sourceforge.net/projects/vpup/files/latest/download" 2>&1 | grep -i Location | cut -d' ' -f4) + URL=${TMPURL%\?*} + echo "${URL} ${HASH}" +} + +function get_vxlinux() { + local HASH="" + local ISO="" + local URL="https://github.com/dessington/vx-linux/releases/download/${RELEASE}" + + if [ "$RELEASE" == "4.0" ]; then + ISO="vx-linux-4.0-qt.iso" + else + ISO="vx-linux-${RELEASE}.iso" + fi + echo "${URL}/${ISO} ${HASH}" +} function get_xerolinux() { local HASH="" @@ -2225,6 +2482,7 @@ create_vm() { unzip ${VM_PATH}/${ISO} -d ${VM_PATH} ISO=$(ls ${VM_PATH} | grep -i '.iso') fi + if [[ ${OS} == "batocera" ]] && [[ ${ISO} =~ ".gz" ]]; then gzip -d "${VM_PATH}/${ISO}" ISO="${ISO/.gz/}" @@ -2236,6 +2494,11 @@ create_vm() { bzip2 -d "${VM_PATH}/${ISO}" ISO="${ISO/.bz2/}" fi + + if [ ${OS} == "dietpi" ] && [[ $ISO =~ ".7z" ]]; then + 7zip x -o${VM_PATH} ${VM_PATH}/${ISO} + ISO=$(ls ${VM_PATH} | grep -i '.iso') + fi if [ ${OS} == "reactos" ] && [[ $ISO =~ ".zip" ]]; then unzip ${VM_PATH}/${ISO} -d ${VM_PATH} @@ -2306,6 +2569,23 @@ if [ -n "${2}" ]; then fi fi + # Handle odd missing dietpi cominations + if [[ $OS == dietpi ]] ; then + if [[ ${RELEASE} = "uefi" && ${EDITION} = "bookworm" ]] || [[ ${RELEASE} = "uefi" && ${EDITION} = "bullseye" ]] ; then + echo "ERROR! Unsupported combination" + echo "Only installers are supported for uefi, please choose another Release or Edition" + exit 1; + fi + fi + + # Handle missing Manjaro Sway minimal + if [[ $OS == manjaro ]] ; then + if [[ ${RELEASE} == "sway" && ${EDITION} == "minimal" ]] ; then + echo "ERROR! Unsupported combination" + echo " Manjaro Sway does not have a minimal edition" + exit 1; + fi + fi VM_PATH="${OS}-${RELEASE}-${EDITION}" validate_release "releases_${OS}"