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