DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (5b81998bb7ab)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
# vim:set ts=8 sw=8 sts=8 noet:
# 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/.

DEPTH     = @DEPTH@
topsrcdir = @top_srcdir@
srcdir    = @srcdir@
VPATH     = @srcdir@

include $(DEPTH)/config/autoconf.mk

CPPSRCS = \
  updater.cpp \
  bspatch.cpp \
  archivereader.cpp \
  $(NULL)

ifeq ($(OS_ARCH),WINNT)
CPPSRCS += \
  loaddlls.cpp \
  $(NULL)
endif

PROGRAM = updater$(BIN_SUFFIX)

# Don't link the updater against libmozglue. See bug 687139
MOZ_GLUE_LDFLAGS =
MOZ_GLUE_PROGRAM_LDFLAGS =

LOCAL_INCLUDES += \
  -I$(srcdir)/../common \
  $(NULL)

LIBS += \
  ../common/$(LIB_PREFIX)updatecommon.$(LIB_SUFFIX) \
  $(DEPTH)/modules/libmar/src/$(LIB_PREFIX)mar.$(LIB_SUFFIX) \
  $(MOZ_BZ2_LIBS) \
  $(NULL)

ifeq ($(OS_ARCH),WINNT)
LIBS += $(DEPTH)/modules/libmar/verify/$(LIB_PREFIX)verifymar.$(LIB_SUFFIX)
USE_STATIC_LIBS = 1
HAVE_PROGRESSUI = 1
RCINCLUDE = updater.rc
CPPSRCS += \
  progressui_win.cpp \
  win_dirent.cpp \
  $(NULL)
OS_LIBS += $(call EXPAND_LIBNAME,delayimp comctl32 ws2_32 shell32 shlwapi)
DEFINES += -DUNICODE -D_UNICODE
ifndef GNU_CC
RCFLAGS += -I$(srcdir)
else
RCFLAGS += --include-dir $(srcdir)
endif

endif

ifneq ($(MOZ_ENABLE_GTK2),)
HAVE_PROGRESSUI = 1
CPPSRCS += \
  progressui_gtk.cpp \
  $(NULL)
OS_CXXFLAGS += $(TK_CFLAGS)
OS_LIBS += $(TK_LIBS)
endif

ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
HAVE_PROGRESSUI = 1
CMMSRCS += progressui_osx.mm launchchild_osx.mm
OS_LIBS += -framework Cocoa
endif

ifeq (gonk,$(MOZ_WIDGET_TOOLKIT)) #{
HAVE_PROGRESSUI = 1
STL_FLAGS =
CPPSRCS += progressui_gonk.cpp automounter_gonk.cpp
OS_LIBS += -lcutils -lsysutils
# clear out all the --wrap flags and remove dependency on mozglue for Gonk
WRAP_LDFLAGS :=
endif #}

ifndef HAVE_PROGRESSUI
CPPSRCS += progressui_null.cpp
endif

ifndef MOZ_WINCONSOLE
ifdef MOZ_DEBUG
MOZ_WINCONSOLE = 1
else
MOZ_WINCONSOLE = 0
endif
endif

include $(topsrcdir)/config/rules.mk

DEFINES += -DNS_NO_XPCOM \
  -DMAR_CHANNEL_ID='"$(MAR_CHANNEL_ID)"' \
  -DMOZ_APP_VERSION='"$(MOZ_APP_VERSION)"' \
  $(NULL)

ifdef _MSC_VER
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
WIN32_EXE_LDFLAGS += -DELAYLOAD:wsock32.dll -DELAYLOAD:crypt32.dll
endif

ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
libs:: updater.png
	$(NSINSTALL) -D $(DIST)/bin/icons
	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/icons
endif

ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
libs::
	$(NSINSTALL) -D $(DIST)/bin/updater.app
	rsync -a -C --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app 
	sed -e "s/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \
	  iconv -f UTF-8 -t UTF-16 > $(DIST)/bin/updater.app/Contents/Resources/English.lproj/InfoPlist.strings
	$(NSINSTALL) -D $(DIST)/bin/updater.app/Contents/MacOS
	$(NSINSTALL) $(DIST)/bin/updater $(DIST)/bin/updater.app/Contents/MacOS
	rm -f $(DIST)/bin/updater
endif

ifeq (,$(filter-out WINNT,$(OS_ARCH)))
# Pick up nsWindowsRestart.cpp
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
endif

ifeq ($(OS_ARCH),WINNT)
EXTRA_LIBS += $(call EXPAND_LIBNAME,crypt32)
EXTRA_LIBS += $(call EXPAND_LIBNAME,advapi32)
endif

CXXFLAGS += $(MOZ_BZ2_CFLAGS)

ifneq (,$(filter beta release esr,$(MOZ_UPDATE_CHANNEL)))
RCFLAGS += -DMAR_SIGNING_RELEASE_BETA=1
else
ifneq (,$(filter nightly aurora nightly-elm nightly-profiling nightly-oak,$(MOZ_UPDATE_CHANNEL)))
RCFLAGS += -DMAR_SIGNING_AURORA_NIGHTLY=1
endif
endif