From 3623bac7edc626bc0207a0fcec53204d1e18d9f0 Mon Sep 17 00:00:00 2001 From: oltolm Date: Thu, 1 May 2025 00:50:53 +0200 Subject: [PATCH] build/win32: fix mkvenv wheel path and C++ header include order Fix Windows build issues in both Python env setup and UI C++ headers. - Use a plain path for pip --find-links in python/scripts/mkvenv.py instead of a file:// URL, which is unreliable on Windows paths. - Move qemu/osdep.h outside extern "C" blocks in ui/xemu-snapshots.h and ui/xui/common.hh so C++ compilation sees expected declarations/types without C-linkage wrapping side effects. --- python/scripts/mkvenv.py | 2 +- ui/xemu-snapshots.h | 3 ++- ui/xui/common.hh | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py index a064709e6c..e15a19081e 100644 --- a/python/scripts/mkvenv.py +++ b/python/scripts/mkvenv.py @@ -683,7 +683,7 @@ def pip_install( if not online: full_args += ["--no-index"] if wheels_dir: - full_args += ["--find-links", f"file://{str(wheels_dir)}"] + full_args += ["--find-links", f"{wheels_dir}"] full_args += list(args) subprocess.run( full_args, diff --git a/ui/xemu-snapshots.h b/ui/xemu-snapshots.h index a9809117a2..9d793f0ced 100644 --- a/ui/xemu-snapshots.h +++ b/ui/xemu-snapshots.h @@ -20,11 +20,12 @@ #ifndef XEMU_SNAPSHOTS_H #define XEMU_SNAPSHOTS_H +#include "qemu/osdep.h" + #ifdef __cplusplus extern "C" { #endif -#include "qemu/osdep.h" #include "block/snapshot.h" #include diff --git a/ui/xui/common.hh b/ui/xui/common.hh index 77a00e69e0..7d0bbf338a 100644 --- a/ui/xui/common.hh +++ b/ui/xui/common.hh @@ -31,9 +31,10 @@ #include #include +#include "qemu/osdep.h" + extern "C" { // Include necessary QEMU headers -#include "qemu/osdep.h" #include "qapi/error.h" #include "system/runstate.h" #include "hw/xbox/mcpx/apu/apu_debug.h"