2007-03-22 10:30:00 -07:00
|
|
|
# vim:set ts=8 sw=8 sts=8 noet:
|
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
# http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
# for the specific language governing rights and limitations under the
|
|
|
|
# License.
|
|
|
|
#
|
|
|
|
# The Original Code is Mozilla Toolkit Application Update.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# Benjamin Smedberg <benjamin@smedbergs.us>
|
|
|
|
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 2005
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
# of those above. If you wish to allow use of your version of this file only
|
|
|
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
# use your version of this file under the terms of the MPL, indicate your
|
|
|
|
# decision by deleting the provisions above and replace them with the notice
|
|
|
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
# the provisions above, a recipient may use your version of this file under
|
|
|
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
#
|
|
|
|
# ***** END LICENSE BLOCK *****
|
|
|
|
|
2010-01-26 04:11:00 -08:00
|
|
|
DEPTH = ../../../..
|
|
|
|
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
|
|
|
|
|
|
|
PROGRAM = updater$(BIN_SUFFIX)
|
|
|
|
|
2010-01-26 04:11:00 -08:00
|
|
|
LOCAL_INCLUDES += -I$(srcdir)/../../readstrings
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
LIBS += \
|
2010-01-26 04:11:00 -08:00
|
|
|
$(DEPTH)/modules/libmar/src/$(LIB_PREFIX)mar.$(LIB_SUFFIX) \
|
|
|
|
../../readstrings/$(LIB_PREFIX)readstrings.$(LIB_SUFFIX) \
|
|
|
|
$(BZ2_LIBS) \
|
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
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 \
|
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,comctl32 ws2_32 shell32)
|
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
|
|
|
|
|
2009-07-16 15:21:09 -07:00
|
|
|
ifeq ($(OS_ARCH),WINCE)
|
2009-08-20 19:58:47 -07:00
|
|
|
export NO_SHUNT = 1
|
2009-07-16 15:21:09 -07:00
|
|
|
USE_STATIC_LIBS = 1
|
2009-08-13 13:53:56 -07:00
|
|
|
HAVE_PROGRESSUI = 1
|
|
|
|
CPPSRCS += \
|
2010-01-26 04:11:00 -08:00
|
|
|
updater_wince.cpp \
|
|
|
|
progressui_win.cpp \
|
|
|
|
$(NULL)
|
2009-08-13 13:53:56 -07:00
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,commctrl ws2)
|
2009-08-20 19:58:17 -07:00
|
|
|
ifdef WINCE_WINDOWS_MOBILE
|
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,aygshell)
|
|
|
|
RCINCLUDE = updater_winmo.rc
|
|
|
|
else
|
|
|
|
RCINCLUDE = updater_wince.rc
|
|
|
|
endif
|
2009-08-20 19:58:47 -07:00
|
|
|
DEFINES += -DUNICODE -D_UNICODE -DWINCE_SKIP_SHUNT_INCLUDE
|
2009-07-16 15:21:09 -07:00
|
|
|
RCFLAGS += -I$(srcdir)
|
2009-08-20 19:58:47 -07:00
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/build/wince/shunt/include \
|
|
|
|
-I$(topsrcdir)/build/wince/shunt
|
2009-07-16 15:21:09 -07:00
|
|
|
endif
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2007-12-31 07:15:43 -08:00
|
|
|
DEFINES += -DNS_NO_XPCOM
|
|
|
|
|
|
|
|
ifdef _MSC_VER
|
2008-09-30 14:34:55 -07:00
|
|
|
ifdef WINCE
|
|
|
|
WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
|
|
|
|
else
|
2008-03-11 15:12:52 -07:00
|
|
|
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
2007-12-31 07:15:43 -08:00
|
|
|
endif
|
2008-09-30 14:34:55 -07:00
|
|
|
endif
|
2007-12-31 07:15:43 -08:00
|
|
|
|
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
|
|
|
|
|
2009-07-16 15:21:09 -07:00
|
|
|
ifeq (,$(filter-out WINCE 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
|
|
|
|
|
|
|
CXXFLAGS += $(BZ2_CFLAGS)
|