mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:33:42 +03:00
windows: drop code and curl manifest targeting W2K and older
curl requires Windows XP since 2023. Drop version detection code using `GetVersionEx()` aimed to support earlier Windows versions. With that call deleted, the embedded manifest in `curl.rc` becomes unnecessary. Delete it too, along with the enabler logic in build systems. This allows to stop forcing `/MANIFEST:NO` for MSVC builds. Dropping it fixes VS2008 shared builds, that require an auto-generated SxS (side-by-side assembly) manifest to find their CRT DLLs. This was the issue that prevented VS2008 `curl.exe` launching on AppVeyor CI: ``` src/curl.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory ``` Ref: https://ci.appveyor.com/project/curlorg/curl/builds/51577006/job/eitypvwlb1rxr11d#L261 FWIW the `curl.rc` embedded manifest wasn't ever enabled for VS2008 CI builds either, because CMake did not pass our custom macro via `CMAKE_RC_FLAGS` to `rc.exe`. For reasons I could not figure out. After this patch the curl build no longer inject its own manifest, and lets the default be applied by linkers and toolchains. It fixes VS2008 shared builds. curl continues to detect the real Windows version via `RtlVerifyVersionInfo()` from `ntdll`. Follow-up to960d601481#12225 Follow-up to5044909ca2#7810 Follow-up toebd213270a#1221 Ref: #15972 Cherry-picked from #16394 Closes #16453
This commit is contained in:
parent
3585796049
commit
9b0467b169
6 changed files with 7 additions and 145 deletions
|
|
@ -213,7 +213,7 @@ listhelp:
|
|||
|
||||
if HAVE_WINDRES
|
||||
.rc.o:
|
||||
$(RC) -I$(top_srcdir)/include -DCURL_EMBED_MANIFEST $(RCFLAGS) -i $< -o $@
|
||||
$(RC) -I$(top_srcdir)/include $(RCFLAGS) -i $< -o $@
|
||||
endif
|
||||
|
||||
dist-hook:
|
||||
|
|
|
|||
48
src/curl.rc
48
src/curl.rc
|
|
@ -63,51 +63,3 @@ BEGIN
|
|||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
/* Manifest */
|
||||
|
||||
#if defined(CURL_EMBED_MANIFEST)
|
||||
|
||||
/* String escaping rules:
|
||||
https://msdn.microsoft.com/library/aa381050
|
||||
Application Manifest doc, including the list of 'supportedOS Id's:
|
||||
https://msdn.microsoft.com/library/aa374191 */
|
||||
|
||||
#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID
|
||||
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
|
||||
#endif
|
||||
#ifndef RT_MANIFEST
|
||||
#define RT_MANIFEST 24
|
||||
#endif
|
||||
|
||||
#define _STR(macro) _STR_(macro)
|
||||
#define _STR_(macro) #macro
|
||||
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST
|
||||
BEGIN
|
||||
"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>"
|
||||
"<assembly xmlns=""urn:schemas-microsoft-com:asm.v1"" manifestVersion=""1.0"">"
|
||||
"<assemblyIdentity name=""The curl executable"" version="""
|
||||
_STR(LIBCURL_VERSION_MAJOR) "."
|
||||
_STR(LIBCURL_VERSION_MINOR) "."
|
||||
_STR(LIBCURL_VERSION_PATCH) ".0"" type=""win32""/>"
|
||||
"<compatibility xmlns=""urn:schemas-microsoft-com:compatibility.v1"">"
|
||||
"<application>"
|
||||
"<supportedOS Id=""{e2011457-1546-43c5-a5fe-008deee3d3f0}""/>" /* Vista / Server 2008 */
|
||||
"<supportedOS Id=""{35138b9a-5d96-4fbd-8e2d-a2440225f93a}""/>" /* 7 / Server 2008 R2 */
|
||||
"<supportedOS Id=""{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}""/>" /* 8 / Server 2012 */
|
||||
"<supportedOS Id=""{1f676c76-80e1-4239-95bb-83d0f6d0da78}""/>" /* 8.1 / Server 2012 R2 */
|
||||
"<supportedOS Id=""{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}""/>" /* 10 / Server 2016 */
|
||||
"</application>"
|
||||
"</compatibility>"
|
||||
"<trustInfo xmlns=""urn:schemas-microsoft-com:asm.v3"">"
|
||||
"<security>"
|
||||
"<requestedPrivileges>"
|
||||
"<requestedExecutionLevel level=""asInvoker"" uiAccess=""false""/>"
|
||||
"</requestedPrivileges>"
|
||||
"</security>"
|
||||
"</trustInfo>"
|
||||
"</assembly>"
|
||||
END
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue