mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Meta: Automatically use WSL paths on Windows
This commit is contained in:
parent
9026dbbfd6
commit
ee7e9f05a8
Notes:
sideshowbarker
2024-07-18 09:22:52 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/ee7e9f05a8a Pull-request: https://github.com/SerenityOS/serenity/pull/8594 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/awesomekling ✅ Reviewed-by: https://github.com/nico
2 changed files with 7 additions and 7 deletions
|
@ -27,17 +27,10 @@ By default this will be located at `/mnt/c/Program Files/qemu/qemu-system-i386.e
|
||||||
- Set the `SERENITY_QEMU_BIN` environment variable to the location above. For example: \
|
- Set the `SERENITY_QEMU_BIN` environment variable to the location above. For example: \
|
||||||
`export SERENITY_QEMU_BIN='/mnt/c/Program Files/qemu/qemu-system-i386.exe'`
|
`export SERENITY_QEMU_BIN='/mnt/c/Program Files/qemu/qemu-system-i386.exe'`
|
||||||
|
|
||||||
- Locate the _Windows_ path to the SerenityOS disk image, as native QEMU will be accessing it via the Windows filesystem.
|
|
||||||
If your build tree is located in the WSL2 partition, this will be accessible under the `\\wsl$` network file share
|
|
||||||
(see [notes below](#note-on-filesystems)).
|
|
||||||
|
|
||||||
- Set the `SERENITY_KERNEL_CMDLINE` environment variable to disable VirtIO support (Because it is currently broken on
|
- Set the `SERENITY_KERNEL_CMDLINE` environment variable to disable VirtIO support (Because it is currently broken on
|
||||||
native windows QEMU):
|
native windows QEMU):
|
||||||
`export SERENITY_KERNEL_CMDLINE="disable_virtio"`
|
`export SERENITY_KERNEL_CMDLINE="disable_virtio"`
|
||||||
|
|
||||||
- Set the `SERENITY_DISK_IMAGE` environment variable to the full path of the SerenityOS disk image file from above.
|
|
||||||
For example: `export SERENITY_DISK_IMAGE='\\wsl$\Ubuntu-20.04\home\username\serenity\Build\i686\_disk_image'`
|
|
||||||
|
|
||||||
- `ninja run` as usual.
|
- `ninja run` as usual.
|
||||||
|
|
||||||
### Hardware acceleration
|
### Hardware acceleration
|
||||||
|
|
|
@ -57,6 +57,13 @@ fi
|
||||||
else
|
else
|
||||||
SERENITY_DISK_IMAGE="_disk_image"
|
SERENITY_DISK_IMAGE="_disk_image"
|
||||||
fi
|
fi
|
||||||
|
if command -v wslpath >/dev/null; then
|
||||||
|
case "$SERENITY_QEMU_BIN" in
|
||||||
|
/mnt/c/*)
|
||||||
|
SERENITY_DISK_IMAGE=$(wslpath -w "$SERENITY_DISK_IMAGE")
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! command -v "$SERENITY_QEMU_BIN" >/dev/null 2>&1 ; then
|
if ! command -v "$SERENITY_QEMU_BIN" >/dev/null 2>&1 ; then
|
||||||
|
|
Loading…
Reference in a new issue