~ubuntu-branches/ubuntu/quantal/enigmail/quantal-security

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2013-09-13 16:02:15 UTC
  • mfrom: (0.12.16)
  • Revision ID: package-import@ubuntu.com-20130913160215-u3g8nmwa0pdwagwc
Tags: 2:1.5.2-0ubuntu0.12.10.1
* New upstream release v1.5.2 for Thunderbird 24

* Build enigmail using a stripped down Thunderbird 17 build system, as it's
  now quite difficult to build the way we were doing previously, with the
  latest Firefox build system
* Add debian/patches/no_libxpcom.patch - Don't link against libxpcom, as it
  doesn't exist anymore (but exists in the build system)
* Add debian/patches/use_sdk.patch - Use the SDK version of xpt.py and
  friends
* Drop debian/patches/ipc-pipe_rename.diff (not needed anymore)
* Drop debian/patches/makefile_depth.diff (not needed anymore)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This Source Code Form is subject to the terms of the Mozilla Public
 
2
# License, v. 2.0. If a copy of the MPL was not distributed with this
 
3
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
4
 
 
5
ifndef CONFIG_DIR
 
6
$(error CONFIG_DIR must be set before including makensis.mk)
 
7
endif
 
8
 
 
9
include $(MOZILLA_DIR)/toolkit/mozapps/installer/signing.mk
 
10
 
 
11
ABS_CONFIG_DIR := $(shell pwd)/$(CONFIG_DIR)
 
12
 
 
13
SFX_MODULE ?= $(error SFX_MODULE is not defined)
 
14
 
 
15
TOOLKIT_NSIS_FILES = \
 
16
        common.nsh \
 
17
        locales.nsi \
 
18
        overrides.nsh \
 
19
        setup.ico \
 
20
        version.nsh \
 
21
        $(NULL)
 
22
 
 
23
CUSTOM_NSIS_PLUGINS = \
 
24
        AccessControl.dll \
 
25
        AppAssocReg.dll \
 
26
        ApplicationID.dll \
 
27
        CityHash.dll \
 
28
        InvokeShellVerb.dll \
 
29
        ShellLink.dll \
 
30
        UAC.dll \
 
31
        ServicesHelper.dll \
 
32
        $(NULL)
 
33
 
 
34
$(CONFIG_DIR)/setup.exe::
 
35
        $(INSTALL) $(addprefix $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/,$(TOOLKIT_NSIS_FILES)) $(CONFIG_DIR)
 
36
        $(INSTALL) $(addprefix $(MOZILLA_DIR)/other-licenses/nsis/Plugins/,$(CUSTOM_NSIS_PLUGINS)) $(CONFIG_DIR)
 
37
        cd $(CONFIG_DIR) && $(MAKENSISU) installer.nsi
 
38
# Support for building the uninstaller when repackaging locales
 
39
ifeq ($(CONFIG_DIR),l10ngen)
 
40
        cd $(CONFIG_DIR) && $(MAKENSISU) uninstaller.nsi
 
41
endif
 
42
ifdef MOZ_EXTERNAL_SIGNING_FORMAT
 
43
        $(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f)) "$@"
 
44
endif
 
45
 
 
46
$(CONFIG_DIR)/7zSD.sfx:
 
47
        $(CYGWIN_WRAPPER) upx --best -o $(CONFIG_DIR)/7zSD.sfx $(SFX_MODULE)
 
48
 
 
49
installer::
 
50
        $(INSTALL) $(CONFIG_DIR)/setup.exe $(DEPTH)/installer-stage
 
51
        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
 
52
        $(MAKE) $(CONFIG_DIR)/7zSD.sfx
 
53
        $(NSINSTALL) -D $(DIST)/$(PKG_INST_PATH)
 
54
        cat $(CONFIG_DIR)/7zSD.sfx $(CONFIG_DIR)/app.tag $(CONFIG_DIR)/app.7z > "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
 
55
        chmod 0755 "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
 
56
ifdef MOZ_EXTERNAL_SIGNING_FORMAT
 
57
        $(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f)) "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
 
58
endif
 
59
 
 
60
# For building the uninstaller during the application build so it can be
 
61
# included for mar file generation.
 
62
uninstaller::
 
63
        $(INSTALL) $(addprefix $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/,$(TOOLKIT_NSIS_FILES)) $(CONFIG_DIR)
 
64
        $(INSTALL) $(addprefix $(MOZILLA_DIR)/other-licenses/nsis/Plugins/,$(CUSTOM_NSIS_PLUGINS)) $(CONFIG_DIR)
 
65
        cd $(CONFIG_DIR) && $(MAKENSISU) uninstaller.nsi
 
66
        $(NSINSTALL) -D $(DIST)/bin/uninstall
 
67
        cp $(CONFIG_DIR)/helper.exe $(DIST)/bin/uninstall
 
68
 
 
69
ifdef MOZ_MAINTENANCE_SERVICE
 
70
maintenanceservice_installer::
 
71
        cd $(CONFIG_DIR) && $(MAKENSISU) maintenanceservice_installer.nsi
 
72
        $(NSINSTALL) -D $(DIST)/bin/
 
73
        cp $(CONFIG_DIR)/maintenanceservice_installer.exe $(DIST)/bin
 
74
endif
 
75
 
 
76
ifdef MOZ_WEBAPP_RUNTIME
 
77
webapp_uninstaller::
 
78
        $(INSTALL) $(addprefix $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/,$(TOOLKIT_NSIS_FILES)) $(CONFIG_DIR)
 
79
        $(INSTALL) $(addprefix $(MOZILLA_DIR)/other-licenses/nsis/Plugins/,$(CUSTOM_NSIS_PLUGINS)) $(CONFIG_DIR)
 
80
        cd $(CONFIG_DIR) && $(MAKENSISU) webapp-uninstaller.nsi
 
81
        $(NSINSTALL) -D $(FINAL_TARGET)
 
82
        cp $(CONFIG_DIR)/webapp-uninstaller.exe $(FINAL_TARGET)
 
83
endif