2013-04-01 18:36:59 +00:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 21:19:09 +00:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2014-09-03 05:10:54 +00:00
|
|
|
Program('updater')
|
2013-05-01 18:05:40 +00:00
|
|
|
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'archivereader.cpp',
|
|
|
|
'bspatch.cpp',
|
|
|
|
'updater.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
have_progressui = 0
|
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
have_progressui = 1
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'loaddlls.cpp',
|
|
|
|
'progressui_win.cpp',
|
|
|
|
'win_dirent.cpp',
|
|
|
|
]
|
2014-03-04 22:19:24 +00:00
|
|
|
RCINCLUDE = 'updater.rc'
|
2013-11-27 13:55:07 +00:00
|
|
|
DEFINES['UNICODE'] = True
|
|
|
|
DEFINES['_UNICODE'] = True
|
2014-06-25 09:30:05 +00:00
|
|
|
DEFINES['NOMINMAX'] = True
|
2014-02-11 14:12:33 +00:00
|
|
|
USE_STATIC_LIBS = True
|
2013-04-23 21:54:15 +00:00
|
|
|
|
2014-02-15 20:25:20 +00:00
|
|
|
# Pick up nsWindowsRestart.cpp
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'/toolkit/xre',
|
|
|
|
]
|
2014-07-23 04:30:52 +00:00
|
|
|
USE_LIBS += [
|
|
|
|
'updatecommon-standalone',
|
|
|
|
'verifymar',
|
|
|
|
]
|
2014-08-05 22:25:33 +00:00
|
|
|
OS_LIBS += [
|
|
|
|
'comctl32',
|
|
|
|
'ws2_32',
|
|
|
|
'shell32',
|
|
|
|
'shlwapi',
|
|
|
|
'crypt32',
|
|
|
|
'advapi32',
|
|
|
|
]
|
2014-07-23 04:30:52 +00:00
|
|
|
else:
|
|
|
|
USE_LIBS += [
|
|
|
|
'updatecommon',
|
|
|
|
]
|
|
|
|
|
|
|
|
USE_LIBS += [
|
|
|
|
'mar',
|
|
|
|
]
|
|
|
|
|
2014-08-05 22:25:33 +00:00
|
|
|
if CONFIG['MOZ_NATIVE_BZ2']:
|
|
|
|
OS_LIBS += CONFIG['MOZ_BZ2_LIBS']
|
|
|
|
else:
|
2014-07-23 04:30:52 +00:00
|
|
|
USE_LIBS += [
|
|
|
|
'bz2',
|
|
|
|
]
|
2014-02-15 20:25:20 +00:00
|
|
|
|
2013-06-10 12:36:26 +00:00
|
|
|
if CONFIG['MOZ_ENABLE_GTK']:
|
2013-04-23 21:54:15 +00:00
|
|
|
have_progressui = 1
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'progressui_gtk.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
|
|
have_progressui = 1
|
2014-03-11 00:18:33 +00:00
|
|
|
SOURCES += [
|
|
|
|
'launchchild_osx.mm',
|
|
|
|
'progressui_osx.mm',
|
|
|
|
]
|
2014-08-05 22:25:33 +00:00
|
|
|
OS_LIBS += ['-framework Cocoa']
|
2013-04-23 21:54:15 +00:00
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|
|
|
have_progressui = 1
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'automounter_gonk.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'progressui_gonk.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
2014-03-05 00:39:06 +00:00
|
|
|
DISABLE_STL_WRAPPING = True
|
2014-08-05 22:25:33 +00:00
|
|
|
OS_LIBS += [
|
|
|
|
'cutils',
|
|
|
|
'sysutils',
|
|
|
|
]
|
2013-04-23 21:54:15 +00:00
|
|
|
|
|
|
|
if have_progressui == 0:
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'progressui_null.cpp',
|
|
|
|
]
|
2013-06-07 15:43:39 +00:00
|
|
|
|
2013-11-27 13:55:07 +00:00
|
|
|
DEFINES['NS_NO_XPCOM'] = True
|
2014-06-25 09:30:05 +00:00
|
|
|
DISABLE_STL_WRAPPING = True
|
2013-11-27 13:55:07 +00:00
|
|
|
for var in ('MAR_CHANNEL_ID', 'MOZ_APP_VERSION'):
|
|
|
|
DEFINES[var] = '"%s"' % CONFIG[var]
|
2014-02-06 19:17:44 +00:00
|
|
|
|
2014-02-15 20:24:59 +00:00
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'../common',
|
|
|
|
'/xpcom/glue',
|
|
|
|
]
|
|
|
|
|
2014-02-06 19:17:44 +00:00
|
|
|
DELAYLOAD_DLLS += [
|
|
|
|
'crypt32.dll',
|
|
|
|
'userenv.dll',
|
|
|
|
'wsock32.dll',
|
|
|
|
]
|
2014-02-24 13:30:25 +00:00
|
|
|
|
|
|
|
if CONFIG['_MSC_VER']:
|
|
|
|
WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
|
2014-06-25 09:30:05 +00:00
|
|
|
elif CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
WIN32_EXE_LDFLAGS += ['-municode']
|
2014-02-26 14:12:49 +00:00
|
|
|
|
|
|
|
if CONFIG['MOZ_UPDATE_CHANNEL'] in ('beta', 'release', 'esr'):
|
|
|
|
DEFINES['MAR_SIGNING_RELEASE_BETA'] = '1'
|
2014-04-14 13:56:58 +00:00
|
|
|
elif CONFIG['MOZ_UPDATE_CHANNEL'] in ('nightly', 'aurora', 'nightly-elm', 'nightly-profiling', 'nightly-oak', 'nightly-ux'):
|
2014-02-26 14:12:49 +00:00
|
|
|
DEFINES['MAR_SIGNING_AURORA_NIGHTLY'] = '1'
|
2014-07-24 15:55:33 +00:00
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_GTK']:
|
|
|
|
CXXFLAGS += CONFIG['TK_CFLAGS']
|
2014-08-05 22:25:33 +00:00
|
|
|
OS_LIBS += CONFIG['TK_LIBS']
|