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