mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:47:34 +00:00
Meta+Documentation: Bump required QEMU version
This commit bumps the required QEMU version to 6.2 and updates the version checking logic in Meta/run.sh to support checking against major and minor version numbers instead of checking against the major version only
This commit is contained in:
parent
2f1029e7c4
commit
0c0a760aad
2 changed files with 13 additions and 7 deletions
12
Meta/run.sh
12
Meta/run.sh
|
@ -104,15 +104,19 @@ fi
|
|||
fi
|
||||
}
|
||||
|
||||
SERENITY_QEMU_MIN_REQ_MAJOR_VERSION=6
|
||||
SERENITY_QEMU_MIN_REQ_MINOR_VERSION=2
|
||||
SERENITY_QEMU_MIN_REQ_VERSION="$SERENITY_QEMU_MIN_REQ_MAJOR_VERSION.$SERENITY_QEMU_MIN_REQ_MINOR_VERSION"
|
||||
if ! command -v "$SERENITY_QEMU_BIN" >/dev/null 2>&1 ; then
|
||||
die "Please install QEMU version 5.0 or newer or use the Toolchain/BuildQemu.sh script."
|
||||
die "Please install QEMU version $SERENITY_QEMU_MIN_REQ_VERSION or newer or use the Toolchain/BuildQemu.sh script."
|
||||
fi
|
||||
|
||||
SERENITY_QEMU_MIN_REQ_VERSION=5
|
||||
installed_major_version=$("$SERENITY_QEMU_BIN" -version | head -n 1 | sed -E 's/QEMU emulator version ([1-9][0-9]*|0).*/\1/')
|
||||
installed_minor_version=$("$SERENITY_QEMU_BIN" -version | head -n 1 | sed -E 's/QEMU emulator version [0-9]+\.([1-9][0-9]*|0).*/\1/')
|
||||
if [ "$installed_major_version" -lt "$SERENITY_QEMU_MIN_REQ_VERSION" ]; then
|
||||
echo "Required QEMU >= 5.0! Found $($SERENITY_QEMU_BIN -version | head -n 1)"
|
||||
if [ "$installed_major_version" -lt "$SERENITY_QEMU_MIN_REQ_MAJOR_VERSION" ] ||
|
||||
{ [ "$installed_major_version" -eq "$SERENITY_QEMU_MIN_REQ_MAJOR_VERSION" ] &&
|
||||
[ "$installed_minor_version" -lt "$SERENITY_QEMU_MIN_REQ_MINOR_VERSION" ]; }; then
|
||||
echo "Required QEMU >= $SERENITY_QEMU_MIN_REQ_VERSION! Found $($SERENITY_QEMU_BIN -version | head -n 1)"
|
||||
echo "Please install a newer version of QEMU or use the Toolchain/BuildQemu.sh script."
|
||||
die
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue