Bug 340864 - ditch the xpinstaller (for Firefox), r=robstrong

This commit is contained in:
benjamin%smedbergs.us 2006-06-09 12:58:39 +00:00
Родитель 3e2d6ab54c
Коммит 3820bfc1bc
2 изменённых файлов: 80 добавлений и 43 удалений

Просмотреть файл

@ -45,9 +45,8 @@ include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
CONFIG_DIR=$(shell cygpath -a instgen)
OBJ_DIR=$(shell cygpath -a $(DEPTH))
SRC_DIR=$(shell cygpath -a $(topsrcdir))
CONFIG_DIR := $(shell pwd)/instgen
SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/firefox/7zSD.sfx
PP_LOCALIZED_FILES = \
packages-static \
@ -55,24 +54,14 @@ PP_LOCALIZED_FILES = \
$(NULL)
INSTALLER_FILES = \
config.it \
abe.jst \
adt.jst \
chatzilla.jst \
editor.jst \
inspector.jst \
psm.jst \
talkback.jst \
venkman.jst \
xpcom.jst \
redirect.it \
app.tag \
7zip.bat \
nsis/instfiles-extra.nsi \
nsis/SetProgramAccess.nsi \
$(NULL)
NSIS_FILES = \
instfiles-extra.nsi \
SetProgramAccess.nsi \
BRANDING_FILES = \
wizHeader.bmp \
wizWatermark.bmp \
$(NULL)
DEFINES += \
@ -85,42 +74,24 @@ DEFINES += \
include $(topsrcdir)/config/config.mk
include $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/installer/windows/charset.mk
installer:
installer::
$(MAKE) -C .. installer-stage
$(NSINSTALL) -D instgen
$(PERL) $(topsrcdir)/toolkit/mozapps/installer/make-installjsremoves.pl ../removed-files > instgen/removed-files.js
$(RM) -rf instgen && mkdir instgen
$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) instgen
iconv -f UTF-8 -t $(WIN_INSTALLER_CHARSET) $(call EXPAND_LOCALE_SRCDIR,browser/locales)/installer/installer.inc > instgen/installer.inc
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) \
-Iinstgen/removed-files.js \
$(srcdir)/browser.jst > instgen/browser.jst
$(INSTALL) $(call EXPAND_LOCALE_SRCDIR,browser/locales)/installer/appLocale.nsi instgen
$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) instgen
cp $(topsrcdir)/browser/EULA instgen/license.txt
$(EXIT_ON_ERROR) \
for i in $(PP_LOCALIZED_FILES); do \
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) -Iinstgen/installer.inc $(srcdir)/$$i > instgen/$$i; \
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > instgen/$$i; \
done
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) \
-I$(call EXPAND_LOCALE_SRCDIR,browser/locales)/defines.inc \
$(srcdir)/ab-CD.jst > instgen/$(AB_CD).jst
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) \
-Iinstgen/installer.inc \
-I$(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/installer/windows/install.it \
$(srcdir)/install.it > instgen/install.it
$(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/make-installremoves.pl \
../removed-files > instgen/removed-files.log
$(PERL) $(topsrcdir)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
$(srcdir)/nsis/defines.nsi.in > instgen/defines.nsi
cp $(topsrcdir)/browser/locales/$(AB_CD)/installer/appLocale.nsi instgen/appLocale.nsi
$(INSTALL) $(addprefix $(srcdir)/nsis/,$(NSIS_FILES)) instgen
cd $(topsrcdir)/toolkit/mozapps/installer && \
perl build_static.pl -config "$(CONFIG_DIR)" -srcDir "$(SRC_DIR)" \
-objDir "$(OBJ_DIR)"
cd $(topsrcdir)/toolkit/mozapps/installer/windows/msi && \
perl make-msi.pl -config "$(CONFIG_DIR)" -srcDir "$(SRC_DIR)" \
-objDir "$(OBJ_DIR)" -project firefox
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/makensis.mk
export::
ifndef MOZ_BRANDING_DIRECTORY

Просмотреть файл

@ -0,0 +1,66 @@
# ***** 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 Firefox build scripts.
#
# The Initial Developer of the Original Code is
# the Mozilla Foundation <http://www.mozilla.org>.
#
# Portions created by the Initial Developer are Copyright (C) 2006
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Robert Strong <rstrong@mozilla.com> - Initial perl scripts (install_sub.pl)
# Benjamin Smedberg <benjamin@smedbergs.us> - Makefile-izing
#
# 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 *****
ifndef CONFIG_DIR
$(error CONFIG_DIR must be set before including makensis.mk)
endif
ifndef SFX_MODULE
$(error SFX_MODULE must be set before including makensis.mk)
endif
TOOLKIT_NSIS_FILES = \
common.nsh \
installer.nsi \
options.ini \
shortcuts.ini \
ShellLink.dll \
version.nsh \
$(NULL)
installer::
$(INSTALL) $(addprefix $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/,$(TOOLKIT_NSIS_FILES)) $(CONFIG_DIR)
$(INSTALL) $(topsrcdir)/toolkit/mozapps/installer/windows/wizard/setuprsc/setup.ico $(CONFIG_DIR)
$(INSTALL) $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/installer/windows/commonLocale.nsh $(CONFIG_DIR)
cd $(CONFIG_DIR) && makensis.exe installer.nsi
$(INSTALL) $(CONFIG_DIR)/removed-files.log $(CONFIG_DIR)/setup.exe $(DEPTH)/installer-stage
cd $(DEPTH)/installer-stage && $(CYGWIN_WRAPPER) 7z a -t7z $(CONFIG_DIR)/app.7z -mx -m0=BCJ2 -m1=LZMA:d24 -m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3
$(CYGWIN_WRAPPER) upx --best -o $(CONFIG_DIR)/7zSD.sfx $(SFX_MODULE)
$(NSINSTALL) -D $(DIST)/install/sea
cat $(CONFIG_DIR)/7zSD.sfx $(CONFIG_DIR)/app.tag $(CONFIG_DIR)/app.7z > $(DIST)/install/sea/$(PKG_BASENAME).installer.exe
chmod 0755 $(DIST)/install/sea/$(PKG_BASENAME).installer.exe