mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +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
Notes:
sideshowbarker
2024-07-17 10:42:00 +09:00
Author: https://github.com/nathanbw Commit: https://github.com/SerenityOS/serenity/commit/0c0a760aad Pull-request: https://github.com/SerenityOS/serenity/pull/13776 Reviewed-by: https://github.com/BertalanD ✅ Reviewed-by: https://github.com/timschumi Reviewed-by: https://github.com/trflynn89
2 changed files with 13 additions and 7 deletions
|
@ -31,10 +31,12 @@ Now on Ubuntu or Debian you can install gcc-11 with apt like this:
|
|||
sudo apt install gcc-11 g++-11
|
||||
```
|
||||
|
||||
#### QEMU 5 or later
|
||||
#### QEMU 6.2 or later
|
||||
|
||||
QEMU version 5 is available in Ubuntu 20.10, but it is recommended to build Qemu as provided by the toolchain by running `Toolchain/BuildQemu.sh`.
|
||||
Note that you might need additional dev packages:
|
||||
Version 6.2 of QEMU is available in Ubuntu 22.04. On earlier versions of Ubuntu,
|
||||
you can build the recommended version of QEMU as provided by the toolchain by running
|
||||
`Toolchain/BuildQemu.sh`.
|
||||
Note that you might need additional dev packages in order to build QEMU on your machine:
|
||||
|
||||
```console
|
||||
sudo apt install libgtk-3-dev libpixman-1-dev libsdl2-dev libspice-server-dev
|
||||
|
|
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…
Reference in a new issue