1
# ***** BEGIN LICENSE BLOCK *****
2
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
# The contents of this file are subject to the Mozilla Public License Version
5
# 1.1 (the "License"); you may not use this file except in compliance with
6
# the License. You may obtain a copy of the License at
7
# http://www.mozilla.org/MPL/
9
# Software distributed under the License is distributed on an "AS IS" basis,
10
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11
# for the specific language governing rights and limitations under the
14
# The Original Code is Mozilla Firefox build scripts.
16
# The Initial Developer of the Original Code is
17
# the Mozilla Foundation <http://www.mozilla.org>.
18
# Portions created by the Initial Developer are Copyright (C) 2006
19
# the Initial Developer. All Rights Reserved.
22
# Robert Strong <rstrong@mozilla.com> - Initial perl scripts (install_sub.pl)
23
# Benjamin Smedberg <benjamin@smedbergs.us> - Makefile-izing
24
# Ehsan Akhgari <ehsan.akhgari@gmail.com> - Unicode installer support
26
# Alternatively, the contents of this file may be used under the terms of
27
# either the GNU General Public License Version 2 or later (the "GPL"), or
28
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29
# in which case the provisions of the GPL or the LGPL are applicable instead
30
# of those above. If you wish to allow use of your version of this file only
31
# under the terms of either the GPL or the LGPL, and not to allow others to
32
# use your version of this file under the terms of the MPL, indicate your
33
# decision by deleting the provisions above and replace them with the notice
34
# and other provisions required by the GPL or the LGPL. If you do not delete
35
# the provisions above, a recipient may use your version of this file under
36
# the terms of any one of the MPL, the GPL or the LGPL.
38
# ***** END LICENSE BLOCK *****
41
$(error CONFIG_DIR must be set before including makensis.mk)
44
ABS_CONFIG_DIR := $(shell pwd)/$(CONFIG_DIR)
46
SFX_MODULE ?= $(error SFX_MODULE is not defined)
48
TOOLKIT_NSIS_FILES = \
56
CUSTOM_NSIS_PLUGINS = \
65
$(CONFIG_DIR)/setup.exe::
66
$(INSTALL) $(addprefix $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/,$(TOOLKIT_NSIS_FILES)) $(CONFIG_DIR)
67
$(INSTALL) $(addprefix $(MOZILLA_DIR)/other-licenses/nsis/Plugins/,$(CUSTOM_NSIS_PLUGINS)) $(CONFIG_DIR)
68
cd $(CONFIG_DIR) && $(MAKENSISU) installer.nsi
69
# Support for building the uninstaller when repackaging locales
70
ifeq ($(CONFIG_DIR),l10ngen)
71
cd $(CONFIG_DIR) && $(MAKENSISU) uninstaller.nsi
74
$(CONFIG_DIR)/7zSD.sfx:
75
$(CYGWIN_WRAPPER) upx --best -o $(CONFIG_DIR)/7zSD.sfx $(SFX_MODULE)
78
$(INSTALL) $(CONFIG_DIR)/setup.exe $(DEPTH)/installer-stage
79
cd $(DEPTH)/installer-stage && $(CYGWIN_WRAPPER) 7z a -r -t7z $(ABS_CONFIG_DIR)/app.7z -mx -m0=BCJ2 -m1=LZMA:d24 -m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3
80
$(MAKE) $(CONFIG_DIR)/7zSD.sfx
81
$(NSINSTALL) -D $(DIST)/$(PKG_INST_PATH)
82
cat $(CONFIG_DIR)/7zSD.sfx $(CONFIG_DIR)/app.tag $(CONFIG_DIR)/app.7z > "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
83
chmod 0755 "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
85
# For building the uninstaller during the application build so it can be
86
# included for mar file generation.
88
$(INSTALL) $(addprefix $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/,$(TOOLKIT_NSIS_FILES)) $(CONFIG_DIR)
89
$(INSTALL) $(addprefix $(MOZILLA_DIR)/other-licenses/nsis/Plugins/,$(CUSTOM_NSIS_PLUGINS)) $(CONFIG_DIR)
90
cd $(CONFIG_DIR) && $(MAKENSISU) uninstaller.nsi
91
$(NSINSTALL) -D $(DIST)/bin/uninstall
92
cp $(CONFIG_DIR)/helper.exe $(DIST)/bin/uninstall