diff options
author | kleines Filmröllchen <malu.bertsch@gmail.com> | 2021-08-27 01:46:20 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-08-27 21:24:25 +0100 |
commit | 2dc614127e4d75c3a447a474fe1241beba34e881 (patch) | |
tree | de7f098c0be997bc221cd2dbc27b472852af28e9 | |
parent | 7d7d310df6f9a09f0e8025ff16b760f07a3aed1e (diff) | |
download | serenity-2dc614127e4d75c3a447a474fe1241beba34e881.zip |
Meta: Add System32 to the PATH so that reg.exe is always found
On my machine (c), /mnt/c/Windows/System32 is not on the PATH by
default. This causes reg.exe to fail, which is responsible for detecting
the presence of QEMU. By putting this path on the PATH on WSL, it will
always work regardless of the specific PATH configuration, and QEMU is
always detected.
-rwxr-xr-x | Meta/run.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Meta/run.sh b/Meta/run.sh index 1e8a00a2be..95f935de89 100755 --- a/Meta/run.sh +++ b/Meta/run.sh @@ -44,6 +44,8 @@ SERENITY_RUN="${SERENITY_RUN:-$1}" if [ -z "$SERENITY_QEMU_BIN" ]; then if command -v wslpath >/dev/null; then + # Some Windows systems don't have reg.exe's directory on the PATH by default. + PATH=$PATH:/mnt/c/Windows/System32 QEMU_INSTALL_DIR=$(reg.exe query 'HKLM\Software\QEMU' /v Install_Dir /t REG_SZ | grep '^ Install_Dir' | sed 's/ / /g' | cut -f4- -d' ') if [ -z "$QEMU_INSTALL_DIR" ]; then if [ "$KVM_SUPPORT" -eq "0" ]; then |