mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30: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() {
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user