build: produce shared objects for spice.exe / spice_laa.exe, disable 64-bit winxp builds (#744)

to speed up clean builds. GitHub CI time went from 20 minutes -> 10
minutes.
This commit is contained in:
bicarus
2026-06-08 17:42:41 -07:00
committed by GitHub
parent 1c6929dd84
commit 0a7ecf82a9
5 changed files with 95 additions and 32 deletions
+18
View File
@@ -589,6 +589,24 @@ namespace sysutils {
(void**)&EnumDisplayDevicesA_orig);
}
bool is_large_address_aware() {
auto image_base = reinterpret_cast<const uint8_t *>(GetModuleHandleW(nullptr));
if (image_base == nullptr) {
return false;
}
auto dos_header = reinterpret_cast<const IMAGE_DOS_HEADER *>(image_base);
if (dos_header->e_magic != IMAGE_DOS_SIGNATURE) {
return false;
}
auto nt_headers = reinterpret_cast<const IMAGE_NT_HEADERS *>(
image_base + dos_header->e_lfanew);
if (nt_headers->Signature != IMAGE_NT_SIGNATURE) {
return false;
}
return (nt_headers->FileHeader.Characteristics
& IMAGE_FILE_LARGE_ADDRESS_AWARE) != 0;
}
#if !SPICE_XP
bool is_running_as_admin() {
+4
View File
@@ -20,6 +20,10 @@ namespace sysutils {
const std::vector<MonitorEntry> &enumerate_monitors();
// reads the running module's PE header to determine whether the
// IMAGE_FILE_LARGE_ADDRESS_AWARE bit is set (i.e. spice_laa.exe)
bool is_large_address_aware();
extern std::string SECOND_MONITOR_OVERRIDE;
void hook_EnumDisplayDevicesA();