Embed manifest in test executable built with MinGW

The tests create long paths when they see that the Registry value for long path support is set, and the manifest is supposed to advertise that the executable supports long paths. However, when the Registry value is set, the tests fail whether the manifest is embedded or not.

I'm not sure if that's an issue with Wine, MinGW or what I've done.
This commit is contained in:
Oliver Hamlet
2026-02-03 08:53:42 +00:00
parent 05c1c03e88
commit 061894647b
2 changed files with 15 additions and 0 deletions
+2
View File
@@ -68,6 +68,8 @@ set(LIBLOOT_INTERFACE_TESTS_ALL_SOURCES
if(MSVC)
list(APPEND LIBLOOT_INTERFACE_TESTS_ALL_SOURCES "${PROJECT_SOURCE_DIR}/src/tests/libloot_tests.manifest")
elseif(MINGW)
list(APPEND LIBLOOT_INTERFACE_TESTS_ALL_SOURCES "${PROJECT_SOURCE_DIR}/src/tests/resource.rc")
endif()
##############################
+13
View File
@@ -0,0 +1,13 @@
#ifdef _WIN32
#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#endif
#ifndef RT_MANIFEST
#define RT_MANIFEST 24
#endif
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "tests/libloot_tests.manifest"
#endif