Meta: Prefer to use the 64-bit QEMU binary if that's available

Some users might not have qemu-system-i386 installed.
This commit is contained in:
Gunnar Beutner 2021-08-03 14:53:29 +02:00 committed by Linus Groh
parent b082488e94
commit 31655c9486

View file

@ -38,9 +38,12 @@ PATH="$SCRIPT_DIR/../Toolchain/Local/i686/bin:$PATH"
SERENITY_RUN="${SERENITY_RUN:-$1}"
if [ -z "$SERENITY_QEMU_BIN" ]; then
if [ "$SERENITY_ARCH" = "x86_64" ]; then
if command -v qemu-system-x86_64 >/dev/null; then
SERENITY_QEMU_BIN="qemu-system-x86_64"
else
if [ "$SERENITY_ARCH" = "x86_64" ]; then
die "Please install the 64-bit QEMU system emulator (qemu-system-x86_64)."
fi
SERENITY_QEMU_BIN="qemu-system-i386"
fi
fi