|
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 PROGRAM = 'updater' |
|
8 |
|
9 SOURCES += [ |
|
10 'archivereader.cpp', |
|
11 'bspatch.cpp', |
|
12 'updater.cpp', |
|
13 ] |
|
14 |
|
15 have_progressui = 0 |
|
16 if CONFIG['OS_ARCH'] == 'WINNT': |
|
17 have_progressui = 1 |
|
18 SOURCES += [ |
|
19 'loaddlls.cpp', |
|
20 'progressui_win.cpp', |
|
21 'win_dirent.cpp', |
|
22 ] |
|
23 RCINCLUDE = 'updater.rc' |
|
24 DEFINES['UNICODE'] = True |
|
25 DEFINES['_UNICODE'] = True |
|
26 DEFINES['NOMINMAX'] = True |
|
27 USE_STATIC_LIBS = True |
|
28 |
|
29 # Pick up nsWindowsRestart.cpp |
|
30 LOCAL_INCLUDES += [ |
|
31 '/toolkit/xre', |
|
32 ] |
|
33 |
|
34 if CONFIG['MOZ_ENABLE_GTK']: |
|
35 have_progressui = 1 |
|
36 SOURCES += [ |
|
37 'progressui_gtk.cpp', |
|
38 ] |
|
39 |
|
40 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
|
41 have_progressui = 1 |
|
42 SOURCES += [ |
|
43 'launchchild_osx.mm', |
|
44 'progressui_osx.mm', |
|
45 ] |
|
46 LDFLAGS += ['-framework Cocoa'] |
|
47 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': |
|
48 have_progressui = 1 |
|
49 SOURCES += [ |
|
50 'automounter_gonk.cpp', |
|
51 'progressui_gonk.cpp', |
|
52 ] |
|
53 DISABLE_STL_WRAPPING = True |
|
54 |
|
55 if have_progressui == 0: |
|
56 SOURCES += [ |
|
57 'progressui_null.cpp', |
|
58 ] |
|
59 |
|
60 DEFINES['NS_NO_XPCOM'] = True |
|
61 DISABLE_STL_WRAPPING = True |
|
62 for var in ('MAR_CHANNEL_ID', 'MOZ_APP_VERSION'): |
|
63 DEFINES[var] = '"%s"' % CONFIG[var] |
|
64 |
|
65 LOCAL_INCLUDES += [ |
|
66 '../common', |
|
67 '/xpcom/glue', |
|
68 ] |
|
69 |
|
70 DELAYLOAD_DLLS += [ |
|
71 'crypt32.dll', |
|
72 'userenv.dll', |
|
73 'wsock32.dll', |
|
74 ] |
|
75 |
|
76 if CONFIG['_MSC_VER']: |
|
77 WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup'] |
|
78 elif CONFIG['OS_ARCH'] == 'WINNT': |
|
79 WIN32_EXE_LDFLAGS += ['-municode'] |
|
80 |
|
81 if CONFIG['MOZ_UPDATE_CHANNEL'] in ('beta', 'release', 'esr'): |
|
82 DEFINES['MAR_SIGNING_RELEASE_BETA'] = '1' |
|
83 elif CONFIG['MOZ_UPDATE_CHANNEL'] in ('nightly', 'aurora', 'nightly-elm', 'nightly-profiling', 'nightly-oak', 'nightly-ux'): |
|
84 DEFINES['MAR_SIGNING_AURORA_NIGHTLY'] = '1' |