2007-03-22 10:30:00 -07:00
|
|
|
# vim:set ts=8 sw=8 sts=8 noet:
|
2012-05-21 04:12:37 -07:00
|
|
|
# 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/.
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-04 11:26:44 -07:00
|
|
|
DEPTH = @DEPTH@
|
2010-01-26 04:11:00 -08:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
|
|
|
CPPSRCS = \
|
2010-01-26 04:11:00 -08:00
|
|
|
updater.cpp \
|
|
|
|
bspatch.cpp \
|
|
|
|
archivereader.cpp \
|
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-05-05 06:21:53 -07:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
CPPSRCS += \
|
|
|
|
loaddlls.cpp \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
PROGRAM = updater$(BIN_SUFFIX)
|
|
|
|
|
2011-12-27 23:24:02 -08:00
|
|
|
# Don't link the updater against libmozglue. See bug 687139
|
|
|
|
MOZ_GLUE_LDFLAGS =
|
|
|
|
MOZ_GLUE_PROGRAM_LDFLAGS =
|
2011-09-16 23:55:45 -07:00
|
|
|
|
2012-03-05 12:47:46 -08:00
|
|
|
LOCAL_INCLUDES += \
|
|
|
|
-I$(srcdir)/../common \
|
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
LIBS += \
|
2012-01-04 20:19:14 -08:00
|
|
|
../common/$(LIB_PREFIX)updatecommon.$(LIB_SUFFIX) \
|
2010-01-26 04:11:00 -08:00
|
|
|
$(DEPTH)/modules/libmar/src/$(LIB_PREFIX)mar.$(LIB_SUFFIX) \
|
2012-06-20 00:00:48 -07:00
|
|
|
$(MOZ_BZ2_LIBS) \
|
2010-01-26 04:11:00 -08:00
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2012-02-24 13:29:41 -08:00
|
|
|
LIBS += $(DEPTH)/modules/libmar/verify/$(LIB_PREFIX)verifymar.$(LIB_SUFFIX)
|
2007-03-22 10:30:00 -07:00
|
|
|
USE_STATIC_LIBS = 1
|
|
|
|
HAVE_PROGRESSUI = 1
|
|
|
|
RCINCLUDE = updater.rc
|
2009-01-08 22:25:49 -08:00
|
|
|
CPPSRCS += \
|
2010-01-26 04:11:00 -08:00
|
|
|
progressui_win.cpp \
|
2012-05-22 07:50:04 -07:00
|
|
|
win_dirent.cpp \
|
2010-01-26 04:11:00 -08:00
|
|
|
$(NULL)
|
2012-05-22 07:50:04 -07:00
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,delayimp comctl32 ws2_32 shell32 shlwapi)
|
2007-12-31 07:15:43 -08:00
|
|
|
DEFINES += -DUNICODE -D_UNICODE
|
2007-03-22 10:30:00 -07:00
|
|
|
ifndef GNU_CC
|
|
|
|
RCFLAGS += -I$(srcdir)
|
|
|
|
else
|
|
|
|
RCFLAGS += --include-dir $(srcdir)
|
|
|
|
endif
|
2009-05-18 11:15:05 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(MOZ_ENABLE_GTK2),)
|
|
|
|
HAVE_PROGRESSUI = 1
|
|
|
|
CPPSRCS += \
|
2010-01-26 04:11:00 -08:00
|
|
|
progressui_gtk.cpp \
|
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
OS_CXXFLAGS += $(TK_CFLAGS)
|
|
|
|
OS_LIBS += $(TK_LIBS)
|
|
|
|
endif
|
|
|
|
|
2009-09-18 19:59:53 -07:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2007-03-22 10:30:00 -07:00
|
|
|
HAVE_PROGRESSUI = 1
|
|
|
|
CMMSRCS += progressui_osx.mm launchchild_osx.mm
|
|
|
|
OS_LIBS += -framework Cocoa
|
|
|
|
endif
|
|
|
|
|
2012-03-21 15:50:53 -07:00
|
|
|
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT)) #{
|
|
|
|
HAVE_PROGRESSUI = 1
|
|
|
|
STL_FLAGS =
|
2012-08-27 08:27:14 -07:00
|
|
|
CPPSRCS += progressui_gonk.cpp automounter_gonk.cpp
|
|
|
|
OS_LIBS += -lcutils -lsysutils
|
2012-08-27 08:23:09 -07:00
|
|
|
# clear out all the --wrap flags and remove dependency on mozglue for Gonk
|
|
|
|
WRAP_LDFLAGS :=
|
2012-03-21 15:50:53 -07:00
|
|
|
endif #}
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
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
|
|
|
|
|
2012-02-24 13:29:41 -08:00
|
|
|
DEFINES += -DNS_NO_XPCOM \
|
|
|
|
-DMAR_CHANNEL_ID='"$(MAR_CHANNEL_ID)"' \
|
|
|
|
-DMOZ_APP_VERSION='"$(MOZ_APP_VERSION)"' \
|
|
|
|
$(NULL)
|
2007-12-31 07:15:43 -08:00
|
|
|
|
|
|
|
ifdef _MSC_VER
|
2008-03-11 15:12:52 -07:00
|
|
|
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
2012-05-05 06:21:53 -07:00
|
|
|
WIN32_EXE_LDFLAGS += -DELAYLOAD:wsock32.dll -DELAYLOAD:crypt32.dll
|
2007-12-31 07:15:43 -08:00
|
|
|
endif
|
|
|
|
|
2009-02-24 08:53:36 -08:00
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
|
|
|
libs:: updater.png
|
2009-04-16 18:32:31 -07:00
|
|
|
$(NSINSTALL) -D $(DIST)/bin/icons
|
2009-02-24 08:53:36 -08:00
|
|
|
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/icons
|
|
|
|
endif
|
|
|
|
|
2009-09-18 19:59:53 -07:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2007-03-22 10:30:00 -07:00
|
|
|
libs::
|
2007-04-25 07:26:42 -07:00
|
|
|
$(NSINSTALL) -D $(DIST)/bin/updater.app
|
|
|
|
rsync -a -C --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app
|
2008-02-06 13:55:03 -08:00
|
|
|
sed -e "s/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \
|
2007-03-22 10:30:00 -07:00
|
|
|
iconv -f UTF-8 -t UTF-16 > $(DIST)/bin/updater.app/Contents/Resources/English.lproj/InfoPlist.strings
|
2007-04-25 07:26:42 -07:00
|
|
|
$(NSINSTALL) -D $(DIST)/bin/updater.app/Contents/MacOS
|
|
|
|
$(NSINSTALL) $(DIST)/bin/updater $(DIST)/bin/updater.app/Contents/MacOS
|
2007-03-22 10:30:00 -07:00
|
|
|
rm -f $(DIST)/bin/updater
|
|
|
|
endif
|
|
|
|
|
2011-04-11 21:23:44 -07:00
|
|
|
ifeq (,$(filter-out WINNT,$(OS_ARCH)))
|
2007-03-22 10:30:00 -07:00
|
|
|
# Pick up nsWindowsRestart.cpp
|
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
|
|
|
|
endif
|
2008-03-12 04:13:09 -07:00
|
|
|
|
2012-02-24 13:29:41 -08:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
EXTRA_LIBS += $(call EXPAND_LIBNAME,crypt32)
|
|
|
|
EXTRA_LIBS += $(call EXPAND_LIBNAME,advapi32)
|
|
|
|
endif
|
|
|
|
|
2012-06-20 00:00:48 -07:00
|
|
|
CXXFLAGS += $(MOZ_BZ2_CFLAGS)
|
2012-02-24 13:29:41 -08:00
|
|
|
|
|
|
|
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
|
|
|
|
|