Fix PNaCl debug commandline flags, and use the pexe with debug info in test.
[chromium-blink-merge.git] / remoting / remoting_host_mac.gypi
blob79a93bbb3ed439973aca9b1011fa0753195c7e72
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'variables': {
7     'remoting_host_installer_mac_roots': [
8       'host/installer/mac/',
9       '<(DEPTH)/chrome/installer/mac/',
10     ],
11     'remoting_host_installer_mac_files': [
12       'host/installer/mac/do_signing.sh',
13       'host/installer/mac/do_signing.props',
14       'host/installer/mac/ChromotingHost.pkgproj',
15       'host/installer/mac/ChromotingHostService.pkgproj',
16       'host/installer/mac/ChromotingHostUninstaller.pkgproj',
17       'host/installer/mac/LaunchAgents/org.chromium.chromoting.plist',
18       'host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh',
19       'host/installer/mac/Config/org.chromium.chromoting.conf',
20       'host/installer/mac/Scripts/keystone_install.sh',
21       'host/installer/mac/Scripts/remoting_postflight.sh',
22       'host/installer/mac/Scripts/remoting_preflight.sh',
23       'host/installer/mac/Keystone/GoogleSoftwareUpdate.pkg',
24       '<(DEPTH)/chrome/installer/mac/pkg-dmg',
25     ],
26   },
28   'conditions': [
29     ['OS=="mac"', {
30       'targets': [
31         {
32           'target_name': 'remoting_host_uninstaller',
33           'type': 'executable',
34           'mac_bundle': 1,
35           'variables': {
36             'bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_BUNDLE_ID@")',
37           },
38           'dependencies': [
39             '<(DEPTH)/base/base.gyp:base',
40             'remoting_infoplist_strings',
41           ],
42           'sources': [
43             'host/constants_mac.cc',
44             'host/constants_mac.h',
45             'host/installer/mac/uninstaller/remoting_uninstaller.h',
46             'host/installer/mac/uninstaller/remoting_uninstaller.mm',
47             'host/installer/mac/uninstaller/remoting_uninstaller_app.h',
48             'host/installer/mac/uninstaller/remoting_uninstaller_app.mm',
49           ],
50           'xcode_settings': {
51             'INFOPLIST_FILE': 'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
52             'INFOPLIST_PREPROCESS': 'YES',
53             'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(bundle_id)"',
54           },
55           'mac_bundle_resources': [
56             'host/installer/mac/uninstaller/remoting_uninstaller.icns',
57             'host/installer/mac/uninstaller/remoting_uninstaller.xib',
58             'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
60             # Localized strings for 'Info.plist'
61             '<!@pymod_do_main(remoting_localize --locale_output '
62                 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_uninstaller-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
63                 '--print_only <(remoting_locales))',
64           ],
65           'mac_bundle_resources!': [
66             'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
67           ],
68         },  # end of target 'remoting_host_uninstaller'
70         # This packages up the files needed for the remoting host installer so
71         # they can be sent off to be signed.
72         # We don't build an installer here because we don't have signed binaries.
73         {
74           'target_name': 'remoting_me2me_host_archive',
75           'type': 'none',
76           'dependencies': [
77             'remoting_host_prefpane',
78             'remoting_host_uninstaller',
79             'remoting_me2me_host',
80             'remoting_me2me_native_messaging_host',
81             'remoting_it2me_native_messaging_host',
82             'remoting_native_messaging_manifests',
83           ],
84           'variables': {
85             'host_name': '<!(python <(version_py_path) -f <(branding_path) -t "@HOST_PLUGIN_FILE_NAME@")',
86             'host_service_name': '<!(python <(version_py_path) -f <(branding_path) -t "@DAEMON_FILE_NAME@")',
87             'host_uninstaller_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_NAME@")',
88             'bundle_prefix': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_BUNDLE_PREFIX@")',
89           },
90           'actions': [
91             {
92               'action_name': 'Zip installer files for signing',
93               'temp_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting-me2me-host',
94               'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
95               'variables': {
96                 'host_name_nospace': '<!(echo <(host_name) | sed "s/ //g")',
97                 'host_service_name_nospace': '<!(echo <(host_service_name) | sed "s/ //g")',
98                 'host_uninstaller_name_nospace': '<!(echo <(host_uninstaller_name) | sed "s/ //g")',
99               },
100               'generated_files': [
101                 '<(PRODUCT_DIR)/remoting_host_prefpane.prefPane',
102                 '<(PRODUCT_DIR)/remoting_me2me_host.app',
103                 '<(PRODUCT_DIR)/remoting_native_messaging_host',
104                 '<(PRODUCT_DIR)/remoting_it2me_native_messaging_host',
105                 '<(PRODUCT_DIR)/remoting_host_uninstaller.app',
106                 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json',
107                 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json',
108               ],
109               'generated_files_dst': [
110                 'PreferencePanes/org.chromium.chromoting.prefPane',
112                 # TODO(sergeyu): Rename org.chromium.chromoting.me2me_host. e.g.
113                 # to com.google.chrome.remote-desktop .
114                 'PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app',
115                 'PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/native_messaging_host',
116                 'PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app/Contents/MacOS/remote_assistance_host',
117                 'Applications/<(host_uninstaller_name).app',
118                 'Config/com.google.chrome.remote_desktop.json',
119                 'Config/com.google.chrome.remote_assistance.json',
120               ],
121               'source_files': [
122                 '<@(remoting_host_installer_mac_files)',
123               ],
124               'defs': [
125                 'VERSION=<(version_full)',
126                 'VERSION_SHORT=<(version_short)',
127                 'VERSION_MAJOR=<(version_major)',
128                 'VERSION_MINOR=<(version_minor)',
129                 'HOST_NAME=<(host_name)',
130                 'HOST_SERVICE_NAME=<(host_service_name)',
131                 'HOST_UNINSTALLER_NAME=<(host_uninstaller_name)',
132                 'HOST_PKG=<(host_name)',
133                 'HOST_SERVICE_PKG=<(host_service_name_nospace)',
134                 'HOST_UNINSTALLER_PKG=<(host_uninstaller_name_nospace)',
135                 'BUNDLE_ID_HOST=<(bundle_prefix).<(host_name_nospace)',
136                 'BUNDLE_ID_HOST_SERVICE=<(bundle_prefix).<(host_service_name_nospace)',
137                 'BUNDLE_ID_HOST_UNINSTALLER=<(bundle_prefix).<(host_uninstaller_name_nospace)',
138                 'DMG_VOLUME_NAME=<(host_name) <(version_full)',
139                 'DMG_FILE_NAME=<!(echo <(host_name) | sed "s/ //g")-<(version_full)',
140               ],
141               'inputs': [
142                 'host/installer/build-installer-archive.py',
143                 '<@(_source_files)',
144               ],
145               'outputs': [
146                 '<(_zip_path)',
147               ],
148               'action': [
149                 'python', 'host/installer/build-installer-archive.py',
150                 '<(_temp_dir)',
151                 '<(_zip_path)',
152                 '--source-file-roots', '<@(remoting_host_installer_mac_roots)',
153                 '--source-files', '<@(_source_files)',
154                 '--generated-files', '<@(_generated_files)',
155                 '--generated-files-dst', '<@(_generated_files_dst)',
156                 '--defs', '<@(_defs)',
157               ],
158             },
159           ],  # actions
160         }, # end of target 'remoting_me2me_host_archive'
162         {
163           'target_name': 'remoting_host_prefpane',
164           'type': 'loadable_module',
165           'mac_bundle': 1,
166           'product_extension': 'prefPane',
167           'defines': [
168             'JSON_USE_EXCEPTION=0',
169           ],
170           'dependencies': [
171             'remoting_infoplist_strings',
172           ],
173           'include_dirs': [
174             '../third_party/jsoncpp/overrides/include/',
175             '../third_party/jsoncpp/source/include/',
176             '../third_party/jsoncpp/source/src/lib_json/',
177           ],
179           # These source files are included directly, instead of adding target
180           # dependencies, because the targets are not yet built for 64-bit on
181           # Mac OS X - http://crbug.com/125116.
182           #
183           # TODO(lambroslambrou): Fix this when Chrome supports building for
184           # Mac OS X 64-bit - http://crbug.com/128122.
185           'sources': [
186             '../third_party/jsoncpp/source/src/lib_json/json_reader.cpp',
187             '../third_party/jsoncpp/overrides/src/lib_json/json_value.cpp',
188             '../third_party/jsoncpp/source/src/lib_json/json_writer.cpp',
189             '../third_party/modp_b64/modp_b64.cc',
190             'host/constants_mac.cc',
191             'host/constants_mac.h',
192             'host/host_config.cc',
193             'host/mac/me2me_preference_pane.h',
194             'host/mac/me2me_preference_pane.mm',
195             'host/mac/me2me_preference_pane_confirm_pin.h',
196             'host/mac/me2me_preference_pane_confirm_pin.mm',
197             'host/mac/me2me_preference_pane_disable.h',
198             'host/mac/me2me_preference_pane_disable.mm',
199           ],
200           'link_settings': {
201             'libraries': [
202               '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
203               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
204               '$(SDKROOT)/System/Library/Frameworks/PreferencePanes.framework',
205               '$(SDKROOT)/System/Library/Frameworks/Security.framework',
206             ],
207           },
208           'variables': {
209             'bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_ID@")',
210           },
211           'xcode_settings': {
212             'ARCHS': ['i386', 'x86_64'],
213             'GCC_ENABLE_OBJC_GC': 'supported',
214             'INFOPLIST_FILE': 'host/mac/me2me_preference_pane-Info.plist',
215             'INFOPLIST_PREPROCESS': 'YES',
216             'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(bundle_id)"',
217           },
218           'mac_bundle_resources': [
219             'host/mac/me2me_preference_pane.xib',
220             'host/mac/me2me_preference_pane_confirm_pin.xib',
221             'host/mac/me2me_preference_pane_disable.xib',
222             'host/mac/me2me_preference_pane-Info.plist',
223             'resources/chromoting128.png',
225             # Localized strings for 'Info.plist'
226             '<!@pymod_do_main(remoting_localize --locale_output '
227                 '"<(SHARED_INTERMEDIATE_DIR)/remoting/me2me_preference_pane-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
228                 '--print_only <(remoting_locales))',
229           ],
230           'mac_bundle_resources!': [
231             'host/mac/me2me_preference_pane-Info.plist',
232           ],
233           'conditions': [
234             ['mac_breakpad==1', {
235               'variables': {
236                 # A real .dSYM is needed for dump_syms to operate on.
237                 'mac_real_dsym': 1,
238               },
239             }],  # 'mac_breakpad==1'
240           ],  # conditions
241         },  # end of target 'remoting_host_prefpane'
242       ],  # end of 'targets'
243     }],  # 'OS=="mac"'
245   ],  # end of 'conditions'