~extension-hackers/globalmenu-extension/3.5

« back to all changes in this revision

Viewing changes to toolkit/mozapps/installer/windows/nsis/makensis.mk

  • Committer: Chris Coulson
  • Date: 2011-01-12 23:59:38 UTC
  • Revision ID: chrisccoulson@ubuntu.com-20110112235938-55ewz4b5fcostv1k
* Refresh build system from build-system.tar.gz provided by xulrunner-dev 2.0~b9+build1+nobinonly-0ubuntu2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ***** BEGIN LICENSE BLOCK *****
 
2
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
3
#
 
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/
 
8
#
 
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
 
12
# License.
 
13
#
 
14
# The Original Code is Mozilla Firefox build scripts.
 
15
#
 
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.
 
20
#
 
21
# Contributor(s):
 
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
 
25
#
 
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.
 
37
#
 
38
# ***** END LICENSE BLOCK *****
 
39
 
 
40
ifndef CONFIG_DIR
 
41
$(error CONFIG_DIR must be set before including makensis.mk)
 
42
endif
 
43
 
 
44
ABS_CONFIG_DIR := $(shell pwd)/$(CONFIG_DIR)
 
45
 
 
46
SFX_MODULE ?= $(error SFX_MODULE is not defined)
 
47
 
 
48
TOOLKIT_NSIS_FILES = \
 
49
        common.nsh \
 
50
        locales.nsi \
 
51
        overrides.nsh \
 
52
        setup.ico \
 
53
        version.nsh \
 
54
        $(NULL)
 
55
 
 
56
CUSTOM_NSIS_PLUGINS = \
 
57
        AccessControl.dll \
 
58
        AppAssocReg.dll \
 
59
        ApplicationID.dll \
 
60
        nsProcess.dll \
 
61
        ShellLink.dll \
 
62
        UAC.dll \
 
63
        $(NULL)
 
64
 
 
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
 
72
endif
 
73
 
 
74
$(CONFIG_DIR)/7zSD.sfx:
 
75
        $(CYGWIN_WRAPPER) upx --best -o $(CONFIG_DIR)/7zSD.sfx $(SFX_MODULE)
 
76
 
 
77
installer::
 
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"
 
84
 
 
85
# For building the uninstaller during the application build so it can be
 
86
# included for mar file generation.
 
87
uninstaller::
 
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