From d6adbef5e7f6791969e7bcd3af8b25d2dd913b79 Mon Sep 17 00:00:00 2001 From: "torne@chromium.org" Date: Wed, 17 Jul 2013 11:19:23 +0000 Subject: [PATCH] Revert 211968 "Embed manifests using 'EmbedManifest' setting in ..." This appears to have broken the main win clobber builder (which doesn't use ninja?) > Embed manifests using 'EmbedManifest' setting in GYP. > > GYP supports 'EmbedManifest' and UAC settings for ninja since https://code.google.com/p/gyp/source/detail?r=1675. This CL starts using the GYP settings instead of the custom xxx_manifest targets. > > Review URL: https://chromiumcodereview.appspot.com/19376005 TBR=alexeypa@chromium.org Review URL: https://codereview.chromium.org/19533005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212013 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/host/win/comctl32_v6.manifest | 8 + remoting/host/win/require_administrator.manifest | 10 + remoting/remoting.gyp | 233 ++++++++++++++++++----- 3 files changed, 202 insertions(+), 49 deletions(-) create mode 100644 remoting/host/win/comctl32_v6.manifest create mode 100644 remoting/host/win/require_administrator.manifest diff --git a/remoting/host/win/comctl32_v6.manifest b/remoting/host/win/comctl32_v6.manifest new file mode 100644 index 000000000000..d3517547db9e --- /dev/null +++ b/remoting/host/win/comctl32_v6.manifest @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/remoting/host/win/require_administrator.manifest b/remoting/host/win/require_administrator.manifest new file mode 100644 index 000000000000..e1327935643b --- /dev/null +++ b/remoting/host/win/require_administrator.manifest @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index e21f778e0fba..c514033bbeed 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -710,20 +710,6 @@ 'sources': [ 'host/plugin/host_plugin.def', ], - 'msvs_settings': { - 'VCManifestTool': { - 'EmbedManifest': 'true', - }, - 'VCLinkerTool': { - 'AdditionalOptions': [ - "\"/manifestdependency:type='win32' " - "name='Microsoft.Windows.Common-Controls' " - "version='6.0.0.0' " - "processorArchitecture='*' " - "publicKeyToken='6595b64144ccf1df' language='*'\"", - ], - }, - }, }], ], }, # end of target 'remoting_host_plugin' @@ -1350,10 +1336,6 @@ 'host/win/entry_point.cc', ], 'msvs_settings': { - 'VCManifestTool': { - 'AdditionalManifestFiles': 'host/win/dpi_aware.manifest', - 'EmbedManifest': 'true', - }, 'VCLinkerTool': { 'EntryPointSymbol': 'HostEntryPoint', 'IgnoreAllDefaultLibraries': 'true', @@ -1362,6 +1344,39 @@ }, }, # end of target 'remoting_console' { + 'target_name': 'remoting_console_manifest', + 'type': 'none', + 'dependencies': [ + 'remoting_console', + ], + 'hard_dependency': '1', + 'msvs_cygwin_shell': 0, + 'actions': [ + { + 'action_name': 'Embedding manifest into remoting_console.exe', + 'binary': '<(PRODUCT_DIR)/remoting_console.exe', + 'manifests': [ + 'host/win/dpi_aware.manifest', + ], + 'inputs': [ + '<(_binary)', + '<@(_manifests)', + ], + 'outputs': [ + '<(_binary).embedded.manifest', + ], + 'action': [ + 'mt', + '-nologo', + '-manifest', + '<@(_manifests)', + '-outputresource:<(_binary);#1', + '-out:<(_binary).embedded.manifest', + ], + }, + ], # actions + }, # end of target 'remoting_console_manifest' + { 'target_name': 'remoting_core', 'type': 'shared_library', 'variables': { 'enable_wexit_time_destructors': 1, }, @@ -1453,9 +1468,6 @@ 'host/worker_process_ipc_delegate.h', ], 'msvs_settings': { - 'VCManifestTool': { - 'EmbedManifest': 'true', - }, 'VCLinkerTool': { 'AdditionalDependencies': [ 'comctl32.lib', @@ -1464,16 +1476,10 @@ 'uuid.lib', 'wtsapi32.lib', ], + # Export the proxy/stub entry points. Note that the generated + # routines have 'Ps' prefix to avoid conflicts with our own + # DllMain(). 'AdditionalOptions': [ - "\"/manifestdependency:type='win32' " - "name='Microsoft.Windows.Common-Controls' " - "version='6.0.0.0' " - "processorArchitecture='*' " - "publicKeyToken='6595b64144ccf1df' language='*'\"", - - # Export the proxy/stub entry points. Note that the generated - # routines have 'Ps' prefix to avoid conflicts with our own - # DllMain(). '/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE', '/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE', '/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE', @@ -1483,6 +1489,39 @@ }, }, # end of target 'remoting_core' { + 'target_name': 'remoting_core_manifest', + 'type': 'none', + 'dependencies': [ + 'remoting_core', + ], + 'hard_dependency': '1', + 'msvs_cygwin_shell': 0, + 'actions': [ + { + 'action_name': 'Embedding manifest into remoting_core.dll', + 'binary': '<(PRODUCT_DIR)/remoting_core.dll', + 'manifests': [ + 'host/win/comctl32_v6.manifest', + ], + 'inputs': [ + '<(_binary)', + '<@(_manifests)', + ], + 'outputs': [ + '<(_binary).embedded.manifest', + ], + 'action': [ + 'mt', + '-nologo', + '-manifest', + '<@(_manifests)', + '-outputresource:<(_binary);#2', + '-out:<(_binary).embedded.manifest', + ], + }, + ], # actions + }, # end of target 'remoting_core_manifest' + { 'target_name': 'remoting_core_resources', 'type': 'none', 'dependencies': [ @@ -1532,27 +1571,56 @@ 'host/win/entry_point.cc', ], 'msvs_settings': { - 'VCManifestTool': { - 'AdditionalManifestFiles': 'host/win/dpi_aware.manifest', - 'EmbedManifest': 'true', - }, 'VCLinkerTool': { - 'EnableUAC': 'true', + 'EntryPointSymbol': 'HostEntryPoint', + 'IgnoreAllDefaultLibraries': 'true', + 'SubSystem': '2', # /SUBSYSTEM:WINDOWS + }, + }, + }, # end of target 'remoting_desktop' + { + 'target_name': 'remoting_desktop_manifest', + 'type': 'none', + 'dependencies': [ + 'remoting_desktop', + ], + 'hard_dependency': '1', + 'msvs_cygwin_shell': 0, + 'actions': [ + { + 'action_name': 'Embedding manifest into remoting_desktop.exe', + 'binary': '<(PRODUCT_DIR)/remoting_desktop.exe', + 'manifests': [ + 'host/win/dpi_aware.manifest', + ], # Add 'level="requireAdministrator" uiAccess="true"' to # the manifest only for the official builds because it requires # the binary to be signed to work. 'conditions': [ ['buildtype == "Official"', { - 'UACExecutionLevel': 2, - 'UACUIAccess': 'true', + 'manifests': [ + 'host/win/require_administrator.manifest', + ], }], ], - 'EntryPointSymbol': 'HostEntryPoint', - 'IgnoreAllDefaultLibraries': 'true', - 'SubSystem': '2', # /SUBSYSTEM:WINDOWS + 'inputs': [ + '<(_binary)', + '<@(_manifests)', + ], + 'outputs': [ + '<(_binary).embedded.manifest', + ], + 'action': [ + 'mt', + '-nologo', + '-manifest', + '<@(_manifests)', + '-outputresource:<(_binary);#1', + '-out:<(_binary).embedded.manifest', + ], }, - }, - }, # end of target 'remoting_desktop' + ], # actions + }, # end of target 'remoting_desktop_manifest' { 'target_name': 'remoting_host_exe', 'product_name': 'remoting_host', @@ -1570,10 +1638,6 @@ 'host/win/entry_point.cc', ], 'msvs_settings': { - 'VCManifestTool': { - 'AdditionalManifestFiles': 'host/win/dpi_aware.manifest', - 'EmbedManifest': 'true', - }, 'VCLinkerTool': { 'EntryPointSymbol': 'HostEntryPoint', 'IgnoreAllDefaultLibraries': 'true', @@ -1584,6 +1648,39 @@ }, }, # end of target 'remoting_host_exe' { + 'target_name': 'remoting_host_manifest', + 'type': 'none', + 'dependencies': [ + 'remoting_host_exe', + ], + 'hard_dependency': '1', + 'msvs_cygwin_shell': 0, + 'actions': [ + { + 'action_name': 'Embedding manifest into remoting_host.exe', + 'binary': '<(PRODUCT_DIR)/remoting_host.exe', + 'manifests': [ + 'host/win/dpi_aware.manifest', + ], + 'inputs': [ + '<(_binary)', + '<@(_manifests)', + ], + 'outputs': [ + '<(_binary).embedded.manifest', + ], + 'action': [ + 'mt', + '-nologo', + '-manifest', + '<@(_manifests)', + '-outputresource:<(_binary);#1', + '-out:<(_binary).embedded.manifest', + ], + }, + ], # actions + }, # end of target 'remoting_host_manifest' + { 'target_name': 'remoting_host_messages', 'type': 'none', 'dependencies': [ @@ -1617,6 +1714,39 @@ }, ], }, # end of target 'remoting_host_messages' + { + 'target_name': 'remoting_host_plugin_manifest', + 'type': 'none', + 'dependencies': [ + 'remoting_host_plugin', + ], + 'hard_dependency': '1', + 'msvs_cygwin_shell': 0, + 'actions': [ + { + 'action_name': 'Embedding manifest into remoting_host_plugin.dll', + 'binary': '<(PRODUCT_DIR)/remoting_host_plugin.dll', + 'manifests': [ + 'host/win/comctl32_v6.manifest', + ], + 'inputs': [ + '<(_binary)', + '<@(_manifests)', + ], + 'outputs': [ + '<(_binary).embedded.manifest', + ], + 'action': [ + 'mt', + '-nologo', + '-manifest', + '<@(_manifests)', + '-outputresource:<(_binary);#2', + '-out:<(_binary).embedded.manifest', + ], + }, + ], # actions + }, # end of target 'remoting_host_plugin_manifest' # Generates localized the version information resources for the Windows # binaries. @@ -1744,9 +1874,9 @@ 'target_name': 'remoting_me2me_host_archive', 'type': 'none', 'dependencies': [ - 'remoting_core', - 'remoting_desktop', - 'remoting_host', + 'remoting_core_manifest', + 'remoting_desktop_manifest', + 'remoting_host_manifest', ], 'compiled_inputs': [ '<(PRODUCT_DIR)/remoting_core.dll', @@ -1998,6 +2128,11 @@ 'remoting_host_plugin', ], }], + ['OS=="win"', { + 'dependencies': [ + 'remoting_host_plugin_manifest', + ], + }], ], 'actions': [ { -- 2.11.4.GIT