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
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
37 # ***** END LICENSE BLOCK *****
40 $(error CONFIG_DIR must be set before including makensis.mk
)
43 ABS_CONFIG_DIR
:= $(shell pwd
)/$(CONFIG_DIR
)
45 SFX_MODULE ?
= $(error SFX_MODULE is not defined
)
47 TOOLKIT_NSIS_FILES
= \
58 $(CONFIG_DIR
)/setup.exe
::
59 $(INSTALL
) $(addprefix $(MOZILLA_DIR
)/toolkit
/mozapps
/installer
/windows
/nsis
/,$(TOOLKIT_NSIS_FILES
)) $(CONFIG_DIR
)
60 $(INSTALL
) $(MOZILLA_DIR
)/toolkit
/mozapps
/installer
/windows
/nsis
/setup.ico
$(CONFIG_DIR
)
61 cd
$(CONFIG_DIR
) && makensis.exe installer.nsi
62 # Support for building the uninstaller when repackaging locales
63 ifeq ($(CONFIG_DIR
),l10ngen
)
64 cd
$(CONFIG_DIR
) && makensis.exe uninstaller.nsi
67 $(CONFIG_DIR
)/7zSD.sfx
:
68 $(CYGWIN_WRAPPER
) upx
--best
-o
$(CONFIG_DIR
)/7zSD.sfx
$(SFX_MODULE
)
71 $(INSTALL
) $(CONFIG_DIR
)/removed-files.log
$(CONFIG_DIR
)/setup.exe
$(DEPTH
)/installer-stage
72 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
73 $(MAKE
) $(CONFIG_DIR
)/7zSD.sfx
74 $(NSINSTALL
) -D
$(DIST
)/$(PKG_INST_PATH
)
75 cat
$(CONFIG_DIR
)/7zSD.sfx
$(CONFIG_DIR
)/app.tag
$(CONFIG_DIR
)/app
.7z
> "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
76 chmod
0755 "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
78 # For building the uninstaller during the application build so it can be
79 # included for mar file generation.
81 $(INSTALL
) $(addprefix $(MOZILLA_DIR
)/toolkit
/mozapps
/installer
/windows
/nsis
/,$(TOOLKIT_NSIS_FILES
)) $(CONFIG_DIR
)
82 $(INSTALL
) $(MOZILLA_DIR
)/toolkit
/mozapps
/installer
/windows
/nsis
/setup.ico
$(CONFIG_DIR
)
83 cd
$(CONFIG_DIR
) && makensis.exe uninstaller.nsi
84 $(NSINSTALL
) -D
$(DIST
)/bin
/uninstall
85 cp
$(CONFIG_DIR
)/helper.exe
$(DIST
)/bin
/uninstall