|
1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- |
|
2 # vim: set filetype=python: |
|
3 # This Source Code Form is subject to the terms of the Mozilla Public |
|
4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
6 |
|
7 TEST_DIRS += ['tests'] |
|
8 |
|
9 XPIDL_SOURCES += [ |
|
10 'nsCExternalHandlerService.idl', |
|
11 'nsIContentDispatchChooser.idl', |
|
12 'nsIExternalHelperAppService.idl', |
|
13 'nsIExternalProtocolService.idl', |
|
14 'nsIExternalSharingAppService.idl', |
|
15 'nsIExternalURLHandlerService.idl', |
|
16 'nsIHandlerService.idl', |
|
17 'nsIHelperAppLauncherDialog.idl', |
|
18 ] |
|
19 |
|
20 XPIDL_MODULE = 'exthandler' |
|
21 |
|
22 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': |
|
23 osdir = 'win' |
|
24 LOCAL_INCLUDES += ['win'] |
|
25 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
|
26 osdir = 'win' |
|
27 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': |
|
28 osdir = 'android' |
|
29 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': |
|
30 osdir = 'gonk' |
|
31 else: |
|
32 osdir = 'unix' |
|
33 |
|
34 EXPORTS += [ |
|
35 osdir + '/nsOSHelperAppService.h' |
|
36 ] |
|
37 |
|
38 EXPORTS += [ |
|
39 'nsExternalHelperAppService.h', |
|
40 ] |
|
41 |
|
42 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': |
|
43 EXPORTS += [ '%s/%s' % (osdir, f) for f in [ |
|
44 'nsExternalSharingAppService.h', |
|
45 'nsExternalURLHandlerService.h', |
|
46 ]] |
|
47 |
|
48 if CONFIG['MOZ_ENABLE_MEEGOTOUCHSHARE']: |
|
49 EXPORTS += [ |
|
50 osdir + '/nsExternalSharingAppService.h', |
|
51 ] |
|
52 |
|
53 EXPORTS.mozilla.dom += [ |
|
54 'ExternalHelperAppChild.h', |
|
55 'ExternalHelperAppParent.h', |
|
56 ] |
|
57 |
|
58 UNIFIED_SOURCES += [ |
|
59 'ExternalHelperAppParent.cpp', |
|
60 'nsLocalHandlerApp.cpp', |
|
61 'nsMIMEInfoImpl.cpp', |
|
62 ] |
|
63 |
|
64 # These files can't be built in unified mode because they force NSPR logging. |
|
65 SOURCES += [ |
|
66 'ExternalHelperAppChild.cpp', |
|
67 'nsExternalHelperAppService.cpp', |
|
68 'nsExternalProtocolHandler.cpp', |
|
69 ] |
|
70 |
|
71 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
|
72 UNIFIED_SOURCES += [ |
|
73 'mac/nsLocalHandlerAppMac.mm', |
|
74 'mac/nsMIMEInfoMac.mm', |
|
75 ] |
|
76 # These files can't be built in unified mode because they force NSPR logging. |
|
77 SOURCES += [ |
|
78 'mac/nsOSHelperAppService.mm', |
|
79 ] |
|
80 else: |
|
81 # These files can't be built in unified mode because they force NSPR logging. |
|
82 SOURCES += [ |
|
83 osdir + '/nsOSHelperAppService.cpp', |
|
84 ] |
|
85 |
|
86 if CONFIG['MOZ_ENABLE_GTK']: |
|
87 UNIFIED_SOURCES += [ |
|
88 'unix/nsGNOMERegistry.cpp', |
|
89 'unix/nsMIMEInfoUnix.cpp', |
|
90 ] |
|
91 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': |
|
92 UNIFIED_SOURCES += [ |
|
93 'android/nsAndroidHandlerApp.cpp', |
|
94 'android/nsExternalSharingAppService.cpp', |
|
95 'android/nsExternalURLHandlerService.cpp', |
|
96 'android/nsMIMEInfoAndroid.cpp', |
|
97 ] |
|
98 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt': |
|
99 UNIFIED_SOURCES += [ |
|
100 'unix/nsGNOMERegistry.cpp', |
|
101 'unix/nsMIMEInfoUnix.cpp', |
|
102 ] |
|
103 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': |
|
104 # These files can't be built in unified mode because they force NSPR logging. |
|
105 SOURCES += [ |
|
106 'win/nsMIMEInfoWin.cpp', |
|
107 ] |
|
108 |
|
109 if CONFIG['MOZ_ENABLE_DBUS']: |
|
110 UNIFIED_SOURCES += [ |
|
111 'nsDBusHandlerApp.cpp', |
|
112 ] |
|
113 |
|
114 if CONFIG['MOZ_ENABLE_MEEGOTOUCHSHARE']: |
|
115 UNIFIED_SOURCES += [ |
|
116 'unix/nsMeegoExternalSharingAppService.cpp', |
|
117 ] |
|
118 |
|
119 if CONFIG['MOZ_ENABLE_CONTENTACTION']: |
|
120 UNIFIED_SOURCES += [ |
|
121 'nsContentHandlerApp.cpp', |
|
122 ] |
|
123 |
|
124 EXTRA_COMPONENTS += [ |
|
125 'nsHandlerService.js', |
|
126 'nsHandlerService.manifest', |
|
127 'nsWebHandlerApp.js', |
|
128 'nsWebHandlerApp.manifest', |
|
129 ] |
|
130 |
|
131 IPDL_SOURCES += [ |
|
132 'PExternalHelperApp.ipdl', |
|
133 ] |
|
134 |
|
135 FAIL_ON_WARNINGS = True |
|
136 |
|
137 include('/ipc/chromium/chromium-config.mozbuild') |
|
138 |
|
139 FINAL_LIBRARY = 'xul' |
|
140 |
|
141 LOCAL_INCLUDES += [ |
|
142 '/content/base/src', |
|
143 '/dom/base', |
|
144 '/dom/ipc', |
|
145 '/netwerk/base/src', |
|
146 '/netwerk/protocol/http', |
|
147 ] |
|
148 |