1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 01:18:00 +00:00

Windows: inhibit all default application manifests.

In 0.81 and before, we put an application manifest (XML-formatted
Windows resource) into all the GUI tools on purpose, and the CLI tools
like Plink didn't have one. But in 0.82, the CLI tools do have one,
and it's a small default one we didn't write ourselves, inserted by
some combination of cmake and clang-imitating-MSVC (I haven't checked
which of those is the cause).

This appears to have happened as a side effect of a build-tools
update, not on purpose. And its effect is that Windows XP now objects
to our plink.exe, because it's very picky about manifest format (we
have an old 'xp-wont-run' bug record about that).

Since it seemed to work fine to not have a manifest at all in 0.81,
let's go back to that. We were already passing /manifest:no to inhibit
the default manifest in the GUI tools, to stop it fighting with our
custom one; now I've moved /manifest:no into the global linker flags,
so it's applied to _all_ binaries, whether we're putting our own
manifest in or not.
This commit is contained in:
Simon Tatham 2024-12-16 18:44:47 +00:00
parent 363debc7f0
commit 27550b02e2
2 changed files with 6 additions and 18 deletions

View File

@ -101,14 +101,12 @@ endif()
if(WINELIB)
enable_language(RC)
set(LFLAG_MANIFEST_NO "")
elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC" OR
CMAKE_C_COMPILER_FRONTEND_VARIANT MATCHES "MSVC")
set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} /nologo /C1252")
set(LFLAG_MANIFEST_NO "/manifest:no")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /manifest:no")
else()
set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -c1252")
set(LFLAG_MANIFEST_NO "")
endif()
if(STRICT)

View File

@ -83,9 +83,7 @@ add_dependencies(pageant generated_licence_h)
target_link_libraries(pageant
guimisc eventloop agent network crypto utils
${platform_libraries})
set_target_properties(pageant PROPERTIES
WIN32_EXECUTABLE ON
LINK_FLAGS "${LFLAG_MANIFEST_NO}")
set_target_properties(pageant PROPERTIES WIN32_EXECUTABLE ON)
installed_program(pageant)
add_sources_from_current_dir(plink no-jump-list.c nohelp.c plink.rc)
@ -111,9 +109,7 @@ target_link_libraries(putty
guiterminal guimisc eventloop sshclient otherbackends settings network crypto
utils
${platform_libraries})
set_target_properties(putty PROPERTIES
WIN32_EXECUTABLE ON
LINK_FLAGS "${LFLAG_MANIFEST_NO}")
set_target_properties(putty PROPERTIES WIN32_EXECUTABLE ON)
installed_program(putty)
add_executable(puttytel
@ -132,9 +128,7 @@ add_dependencies(puttytel generated_licence_h)
target_link_libraries(puttytel
guiterminal guimisc eventloop otherbackends settings network utils
${platform_libraries})
set_target_properties(puttytel PROPERTIES
WIN32_EXECUTABLE ON
LINK_FLAGS "${LFLAG_MANIFEST_NO}")
set_target_properties(puttytel PROPERTIES WIN32_EXECUTABLE ON)
installed_program(puttytel)
add_executable(puttygen
@ -152,9 +146,7 @@ add_dependencies(puttygen generated_licence_h)
target_link_libraries(puttygen
keygen guimisc crypto utils
${platform_libraries})
set_target_properties(puttygen PROPERTIES
WIN32_EXECUTABLE ON
LINK_FLAGS "${LFLAG_MANIFEST_NO}")
set_target_properties(puttygen PROPERTIES WIN32_EXECUTABLE ON)
installed_program(puttygen)
if(HAVE_CONPTY)
@ -174,9 +166,7 @@ if(HAVE_CONPTY)
target_link_libraries(pterm
guiterminal guimisc eventloop settings network utils
${platform_libraries})
set_target_properties(pterm PROPERTIES
WIN32_EXECUTABLE ON
LINK_FLAGS "${LFLAG_MANIFEST_NO}")
set_target_properties(pterm PROPERTIES WIN32_EXECUTABLE ON)
installed_program(pterm)
else()
message("ConPTY not available; cannot build Windows pterm")