mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 23:00:42 -07:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user