1 ########################################################################
3 # Copyright (c) 2010, Secure Endpoints Inc.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
10 # - Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
13 # - Redistributions in binary form must reproduce the above copyright
14 # notice, this list of conditions and the following disclaimer in
15 # the documentation and/or other materials provided with the
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 # POSSIBILITY OF SUCH DAMAGE.
32 RELDIR=packages\windows\installer
34 !include ../../../windows/NTMakefile.w32
36 !ifdef BUILD_INSTALLERS
38 VERSIOND=$(VER_PRODUCT_MAJOR)-$(VER_PRODUCT_MINOR)-$(VER_PRODUCT_AUX)-$(VER_PRODUCT_PATCH)
39 VERSION=$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR).$(VER_PRODUCT_AUX).$(VER_PRODUCT_PATCH)
40 POLPREFIX=policy.$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR)
54 ######################################################################
55 # Heimdal Merge Modules
57 ASSEMBLYMODULE=$(INSTDIR)\Heimdal.msm
59 $(ASSEMBLYMODULE): $(OBJ)\heimdal-assemblies.wixobj
62 $(OBJ)\heimdal-assemblies.wixobj: heimdal-assemblies.wxs
63 $(CANDLE) -arch $(PLATFORM) -o $@ $** \
64 -dVersion=$(VERSION) \
66 -dPlatform=$(PLATFORM)
68 $(SDKREDISTDIR)\Heimdal.msm: $(ASSEMBLYMODULE)
71 POLICYMODULE=$(INSTDIR)\Heimdal.Policy.msm
73 $(POLICYMODULE): $(OBJ)\heimdal-policy.wixobj
76 $(OBJ)\heimdal-policy.wixobj: heimdal-policy.wxs
77 $(CANDLE) -arch $(PLATFORM) -o $@ $** \
78 -dVersion=$(VERSION) \
80 -dPlatform=$(PLATFORM) \
81 -dPolPrefix=$(POLPREFIX)
83 $(SDKREDISTDIR)\Heimdal.Policy.msm: $(POLICYMODULE)
86 all:: $(ASSEMBLYMODULE) $(SDKREDISTDIR)\Heimdal.msm
88 all:: $(POLICYMODULE) $(SDKREDISTDIR)\Heimdal.Policy.msm
91 -$(RM) $(ASSEMBLYMODULE)
92 -$(RM) $(POLICYMODULE)
93 -$(RM) $(SDKREDISTDIR)\Heimdal.msm
94 -$(RM) $(SDKREDISTDIR)\Heimdal.Policy.msm
96 ######################################################################
99 !if [ $(PERL) $(SRC)\cf\w32-detect-vc-version.pl $(CC) ]==15
101 !elseif [ $(PERL) $(SRC)\cf\w32-detect-vc-version.pl $(CC) ]==14
104 ! error Cant determine Visual C compiler version
107 !if "$(BUILD)"=="rel"
114 MMDIR=$(ProgramFiles)\Common Files\Merge Modules
116 MMDIR=$(SystemDrive)\Program Files (x86)\Common Files\Merge Modules
120 !if exist("$(MMDIR)")
122 RUNTIMEMODULE32="$(MMDIR)\Microsoft_$(VCVER)_$(CRTNAME)_x86.msm"
123 RUNTIMEMODULE64="$(MMDIR)\Microsoft_$(VCVER)_$(CRTNAME)_x86_x64.msm"
127 RUNTIMEMODULE32="$(MSSDK)\Redist\VC\microsoft.vcxx.crt.x86_msm.msm"
128 RUNTIMEMODULE64="$(MSSDK)\Redist\VC\microsoft.vcxx.crt.x64_msm.msm"
133 ######################################################################
137 -dVersion=$(VERSION) \
141 -dPlatform=$(PLATFORM) \
142 -dPolPrefix=$(POLPREFIX) \
144 !if "$(CPU)"=="AMD64"
146 INSTDIR32=$(INSTDIR:AMD64=i386)
148 CANDLEOPTS=$(CANDLEOPTS) -dTarget64 \
149 -dInstDir32=$(INSTDIR32) \
150 -dInstDir64=$(INSTDIR) \
151 -dRuntimeModule32=$(RUNTIMEMODULE32) \
152 -dRuntimeModule64=$(RUNTIMEMODULE64) \
154 !ifdef MULTIPLATFORM_INSTALLER
155 CANDLEOPTS=$(CANDLEOPTS) -dTarget32
158 ! message Excluding 32-bit components from installer
162 INSTDEPS=$(INSTDIR32)\Heimdal.msm \
163 $(INSTDIR32)\Heimdal.Policy.msm \
164 $(ASSEMBLYMODULE) $(POLICYMODULE)
168 CANDLEOPTS=$(CANDLEOPTS) -dTarget32 \
169 -dInstDir32=$(INSTDIR) \
170 -dRuntimeModule32=$(RUNTIMEMODULE32) \
174 !if exist($(SRC)\thirdparty)
175 THIRDPARTYOBJS=$(INSTDIR)\apicache.wixobj $(INSTDIR)\lsacache.wixobj
176 THIRDPARTYOPTS=-dApiCache=1 -dLsaCache=1
178 !if "$(CPU)"=="AMD64"
179 THIRDPARTYOBJS=$(THIRDPARTYOBJS) $(INSTDIR32)\apicache.wixobj $(INSTDIR32)\lsacache.wixobj
183 !if exist($(SRC)\thirdparty\MKShim)
184 THIRDPARTYOBJS=$(THIRDPARTYOBJS) $(INSTDIR)\MKShim.wixlib
185 THIRDPARTYOPTS=$(THIRDPARTYOPTS) -dMKShim=1
187 !if "$(CPU)"=="AMD64"
188 THIRDPARTYOBJS=$(THIRDPARTYOBJS) $(INSTDIR32)\MKShim.wixlib
192 INSTALLER=$(INSTDIR)\Heimdal-$(CPU)$(DEBUGOPT)$(TYPEOPT)-$(VERSIOND).msi
193 WIXOBJ=$(OBJ)\heimdal-installer$(TYPEOPT).wixobj
195 $(INSTALLER): $(WIXOBJ) $(THIRDPARTYOBJS) $(INSTDEPS) lang\en-us.wxl
196 $(LIGHT) -out $@ $(WIXOBJ) $(THIRDPARTYOBJS) \
197 -sval -cultures:en-us -loc lang\en-us.wxl \
198 -dWixUILicenseRtf=lang\license-en-us.rtf \
202 $(WIXOBJ): heimdal-installer.wxs
203 $(CANDLE) -arch $(PLATFORM) -o $@ heimdal-installer.wxs \
204 $(CANDLEOPTS) $(THIRDPARTYOPTS)
211 !endif # BUILD_INSTALLERS