cb643d5049746d6587ed2caa86c36b998ba2f847
[obnox/wireshark/wip.git] / packaging / nsis / Makefile.nmake
1 #
2 # $Id$
3 #
4 # NSIS is a free packager/installer/uninstaller program for Win32.
5 # It was originally written for the Winamp package, but various
6 # freeware and non-freeware packages are using it, too.
7 #
8 # http://www.nullsoft.com/free/nsis/
9
10 include ../../config.nmake
11 # Contains a list of custom plugins(default empty)
12 include Custom.nmake
13
14
15 EXE=../../tshark.exe ../../editcap.exe \
16 !IFDEF GTK_DIR
17         ../../wireshark.exe \
18 !ENDIF
19         ../../text2pcap.exe ../../mergecap.exe ../../capinfos.exe WinPcap_4_1_1.exe
20 DLL=../../wiretap/wiretap-$(WTAP_VERSION).dll ../../wsutil/libwsutil.dll
21 DOC=../../doc/ws.css                            \
22         ../../doc/capinfos.html                 \
23         ../../doc/dumpcap.html                  \
24         ../../doc/editcap.html                  \
25         ../../doc/idl2wrs.html                  \
26         ../../doc/mergecap.html                 \
27         ../../doc/rawshark.html                 \
28         ../../doc/text2pcap.html                \
29         ../../doc/rawshark.html                 \
30         ../../doc/tshark.html                   \
31         ../../doc/wireshark-filter.html         \
32         ../../doc/wireshark.html                \
33         ../../$(INSTALL_DIR)/COPYING.txt        \
34         ../../$(INSTALL_DIR)/NEWS.txt           \
35         ../../$(INSTALL_DIR)/README.txt         \
36         ../../$(INSTALL_DIR)/README.windows.txt
37
38 GPL=../../COPYING
39 HELP=../../$(INSTALL_DIR)/help/capture_filters.txt \
40         ../../$(INSTALL_DIR)/help/capturing.txt \
41         ../../$(INSTALL_DIR)/help/display_filters.txt \
42         ../../$(INSTALL_DIR)/help/faq.txt \
43         ../../$(INSTALL_DIR)/help/getting_started.txt \
44         ../../$(INSTALL_DIR)/help/overview.txt \
45         ../../$(INSTALL_DIR)/help/toc
46
47 PLUGINS= \
48         ../../plugins/asn1/asn1.dll \
49         ../../plugins/docsis/docsis.dll \
50         ../../plugins/ethercat/ethercat.dll \
51         ../../plugins/giop/coseventcomm.dll \
52         ../../plugins/giop/cosnaming.dll \
53         ../../plugins/giop/parlay.dll \
54         ../../plugins/giop/tango.dll \
55         ../../plugins/gryphon/gryphon.dll \
56         ../../plugins/interlink/interlink.dll \
57         ../../plugins/irda/irda.dll \
58         ../../plugins/m2m/m2m.dll \
59         ../../plugins/mate/mate.dll \
60         ../../plugins/opcua/opcua.dll \
61         ../../plugins/profinet/profinet.dll \
62         ../../plugins/sercosiii/sercosiii.dll \
63         ../../plugins/stats_tree/stats_tree.dll \
64         ../../plugins/unistim/unistim.dll \
65         ../../plugins/wimax/wimax.dll \
66         ../../plugins/wimaxasncp/wimaxasncp.dll \
67         $(CUSTOM_PLUGINS)
68
69 NSI=wireshark.nsi \
70         GetWindowsVersion.nsh \
71         servicelib.nsh \
72         AdditionalTasksPage.ini \
73         WinPcapPage.ini
74
75 DELIVERABLES=$(EXE) $(DLL) $(DOC) $(DOC_dos) $(GPL) $(HELP) $(PLUGINS)
76
77 !IFDEF MAKENSIS
78 all: wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe
79 !ELSE
80 all: _FORCE_
81         @echo ? NSIS not available (MAKENSIS not defined in config.nmake)
82         @echo.
83         @exit 1
84 !ENDIF
85
86 # fetch the latest available user-guide.chm version
87 user-guide.chm::
88         if exist ..\..\docbook\user-guide.chm xcopy ..\..\docbook\user-guide.chm . /Y /D
89         if exist $(WIRESHARK_LIBS)\user-guide\user-guide.chm xcopy $(WIRESHARK_LIBS)\user-guide\user-guide.chm . /Y /D
90
91 wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe : user-guide.chm $(NSI) $(DELIVERABLES) Makefile.nmake
92         $(MAKENSIS) \
93         /DWIRESHARK_TARGET_PLATFORM=$(WIRESHARK_TARGET_PLATFORM) \
94         /DMSVC_VARIANT=$(MSVC_VARIANT) \
95         /DWIRESHARK_LIBS=$(WIRESHARK_LIBS) \
96 !IFDEF MSVCR_DLL
97         /DMSVCR_DLL="$(MSVCR_DLL)" \
98 !ENDIF
99 !IFDEF VCREDIST_EXE
100         /DVCREDIST_EXE="$(VCREDIST_EXE)" \
101 !ENDIF
102 !IF "$(ENABLE_LIBWIRESHARK)" != ""
103         /DENABLE_LIBWIRESHARK=$(ENABLE_LIBWIRESHARK) \
104 !ENDIF
105 !IFDEF GTK_DIR
106         /DGTK_DIR=$(GTK_DIR) \
107         /DGTK_LIB_DIR=$(GTK_LIB_DIR) \
108         /DPANGO_LIB_DIR=$(PANGO_LIB_DIR) \
109 !IFDEF NEED_LIBPNG_DLL
110         /DNEED_LIBPNG_DLL=$(NEED_LIBPNG_DLL) \
111         /DPNG_DLL=$(PNG_DLL) \
112 !ENDIF
113 !IFDEF NEED_LIBJPEG_DLL
114         /DNEED_LIBJPEG_DLL=$(NEED_LIBJPEG_DLL) \
115         /DJPEG_DLL=$(JPEG_DLL) \
116 !ENDIF
117 !IFDEF NEED_LIBTIFF_DLL
118         /DNEED_LIBTIFF_DLL=$(NEED_LIBTIFF_DLL) \
119         /DTIFF_DLL=$(TIFF_DLL) \
120 !ENDIF
121 !IFDEF NEED_FREETYPE_DLL
122         /DNEED_FREETYPE_DLL=$(NEED_FREETYPE_DLL) \
123         /DFREETYPE_DLL=$(FREETYPE_DLL) \
124 !ENDIF
125 !IFDEF NEED_FONTCONFIG_DLL
126         /DNEED_FONTCONFIG_DLL=$(NEED_FONTCONFIG_DLL) \
127         /DFONTCONFIG_DLL=$(FONTCONFIG_DLL) \
128 !ENDIF
129 !IFDEF NEED_EXPAT_DLL
130         /DNEED_EXPAT_DLL=$(NEED_EXPAT_DLL) \
131         /DEXPAT_DLL=$(EXPAT_DLL) \
132 !ENDIF
133 !IFDEF NEED_CAIRO_DLL
134         /DNEED_CAIRO_DLL=$(NEED_CAIRO_DLL) \
135 !ENDIF
136 !ENDIF
137         /DGTK_WIMP_DLLDST_DIR=$(GTK_WIMP_DLLDST_DIR) \
138         /DGTK_WIMP_DLLSRC_DIR=$(GTK_WIMP_DLLSRC_DIR) \
139         /DGTK_WIMP_RCDST_DIR=$(GTK_WIMP_RCDST_DIR) \
140         /DGTK_WIMP_RCSRC_DIR=$(GTK_WIMP_RCSRC_DIR) \
141         /DINTL_DLL=$(INTL_DLL) \
142         /DVERSION=$(VERSION) \
143         /DWTAP_VERSION=$(WTAP_VERSION) \
144 !IF "$(C_ARES_DIR)" != ""
145         /DC_ARES_DIR=$(C_ARES_DIR) \
146 !ENDIF
147 !IF "$(ADNS_DIR)" != ""
148         /DADNS_DIR=$(ADNS_DIR) \
149 !ENDIF
150 !IF "$(KFW_DIR)" != ""
151         /DKFW_DIR=$(KFW_DIR) \
152         /DKFW_PATH=$(KFW_PATH) \
153 !ENDIF
154 !IF "$(GNUTLS_DIR)" != ""
155         /DGNUTLS_DIR=$(GNUTLS_DIR) \
156 !ENDIF
157 !IF "$(PCRE_DIR)" != ""
158         /DPCRE_DIR=$(PCRE_DIR) \
159 !ENDIF
160 !IF "$(ZLIB_DIR)" != ""
161         /DZLIB_DIR=$(ZLIB_DIR) \
162 !ENDIF
163 !IFDEF LUA_DIR
164         /DLUA_DIR=$(LUA_DIR) \
165 !ENDIF
166 !IFDEF SMI_DIR
167         /DSMI_DIR=$(SMI_DIR) \
168 !ENDIF
169 !IFDEF HHC_DIR
170         /DHHC_DIR="$(HHC_DIR)" \
171 !ENDIF
172         wireshark.nsi
173
174 clean:
175         rm -f wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe
176         rm -f NEWS.txt
177         rm -f user-guide.chm
178
179 distclean: clean
180         rm -f wireshark-$(WIRESHARK_TARGET_PLATFORM)-*.exe
181
182 maintainer-clean: distclean
183
184 $(DOC):
185         cd ../../doc
186         $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
187         cd ../packaging/nsis
188
189 $(EXE) $(DLL):
190         cd ../..
191         $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
192         cd packaging/nsis
193
194 ####
195 _FORCE_:  ## Assumption: no file named _FORCE_ exists in the current directory
196