1 1.1 elric ######################################################################## 2 1.1 elric # 3 1.1.1.3 christos # Copyright (c) 2010-2013, Secure Endpoints Inc. 4 1.1 elric # All rights reserved. 5 1.1 elric # 6 1.1 elric # Redistribution and use in source and binary forms, with or without 7 1.1 elric # modification, are permitted provided that the following conditions 8 1.1 elric # are met: 9 1.1 elric # 10 1.1 elric # - Redistributions of source code must retain the above copyright 11 1.1 elric # notice, this list of conditions and the following disclaimer. 12 1.1 elric # 13 1.1 elric # - Redistributions in binary form must reproduce the above copyright 14 1.1 elric # notice, this list of conditions and the following disclaimer in 15 1.1 elric # the documentation and/or other materials provided with the 16 1.1 elric # distribution. 17 1.1 elric # 18 1.1 elric # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 1.1 elric # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 1.1 elric # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 1.1 elric # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 1.1 elric # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 1.1 elric # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 24 1.1 elric # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 1.1 elric # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 1.1 elric # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 1.1 elric # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 28 1.1 elric # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 1.1 elric # POSSIBILITY OF SUCH DAMAGE. 30 1.1 elric # 31 1.1 elric 32 1.1 elric RELDIR=packages\windows\installer 33 1.1 elric 34 1.1.1.3 christos !include ..\..\..\windows/NTMakefile.w32 35 1.1 elric 36 1.1 elric !ifdef BUILD_INSTALLERS 37 1.1 elric 38 1.1 elric VERSIOND=$(VER_PRODUCT_MAJOR)-$(VER_PRODUCT_MINOR)-$(VER_PRODUCT_AUX)-$(VER_PRODUCT_PATCH) 39 1.1 elric VERSION=$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR).$(VER_PRODUCT_AUX).$(VER_PRODUCT_PATCH) 40 1.1 elric POLPREFIX=policy.$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR) 41 1.1 elric 42 1.1 elric !if "$(CPU)"=="AMD64" 43 1.1 elric PLATFORM=x64 44 1.1 elric !else 45 1.1 elric PLATFORM=x86 46 1.1 elric !endif 47 1.1 elric 48 1.1 elric !if "$(BUILD)"=="rel" 49 1.1 elric DEBUGOPT= 50 1.1 elric !else 51 1.1 elric DEBUGOPT=-$(BUILD) 52 1.1 elric !endif 53 1.1 elric 54 1.1 elric ###################################################################### 55 1.1 elric # Heimdal Merge Modules 56 1.1 elric 57 1.1.1.3 christos !if exist(..\..\..\thirdparty\installer\heimdal-assemblies.wxs) 58 1.1.1.3 christos ASM_WXS=..\..\..\thirdparty\installer\heimdal-assemblies.wxs 59 1.1.1.3 christos !else 60 1.1.1.3 christos ASM_WXS=heimdal-assemblies.wxs 61 1.1.1.3 christos !endif 62 1.1.1.3 christos 63 1.1 elric ASSEMBLYMODULE=$(INSTDIR)\Heimdal.msm 64 1.1 elric 65 1.1 elric $(ASSEMBLYMODULE): $(OBJ)\heimdal-assemblies.wixobj 66 1.1 elric $(LIGHT) -out $@ $** 67 1.1 elric 68 1.1.1.3 christos $(OBJ)\heimdal-assemblies.wixobj: $(ASM_WXS) 69 1.1 elric $(CANDLE) -arch $(PLATFORM) -o $@ $** \ 70 1.1 elric -dVersion=$(VERSION) \ 71 1.1 elric -dBinDir=$(BINDIR) \ 72 1.1.1.3 christos -dAsmKrbName=$(ASMKRBNAME) \ 73 1.1 elric -dPlatform=$(PLATFORM) 74 1.1 elric 75 1.1 elric $(SDKREDISTDIR)\Heimdal.msm: $(ASSEMBLYMODULE) 76 1.1 elric $(CP) $** $@ 77 1.1 elric 78 1.1.1.3 christos !if exist(..\..\..\thirdparty\installer\heimdal-policy.wxs) 79 1.1.1.3 christos POLICY_WXS=..\..\..\thirdparty\installer\heimdal-policy.wxs 80 1.1.1.3 christos !else 81 1.1.1.3 christos POLICY_WXS=heimdal-policy.wxs 82 1.1.1.3 christos !endif 83 1.1.1.3 christos 84 1.1 elric POLICYMODULE=$(INSTDIR)\Heimdal.Policy.msm 85 1.1 elric 86 1.1 elric $(POLICYMODULE): $(OBJ)\heimdal-policy.wixobj 87 1.1 elric $(LIGHT) -out $@ $** 88 1.1 elric 89 1.1.1.3 christos $(OBJ)\heimdal-policy.wixobj: $(POLICY_WXS) 90 1.1 elric $(CANDLE) -arch $(PLATFORM) -o $@ $** \ 91 1.1 elric -dVersion=$(VERSION) \ 92 1.1 elric -dBinDir=$(BINDIR) \ 93 1.1.1.3 christos -dAsmKrbName=$(ASMKRBNAME) \ 94 1.1 elric -dPlatform=$(PLATFORM) \ 95 1.1 elric -dPolPrefix=$(POLPREFIX) 96 1.1 elric 97 1.1.1.3 christos COMMANDMODULE=$(INSTDIR)\Heimdal.Command.msm 98 1.1.1.3 christos 99 1.1.1.3 christos $(COMMANDMODULE): $(OBJ)\heimdal-command.wixobj 100 1.1.1.3 christos $(LIGHT) -out $@ $** 101 1.1.1.3 christos 102 1.1.1.3 christos # OBJECT COMPILED BELOW 103 1.1.1.3 christos 104 1.1.1.3 christos $(SDKREDISTDIR)\Heimdal.Command.msm: $(COMMANDMODULE) 105 1.1 elric $(CP) $** $@ 106 1.1 elric 107 1.1.1.3 christos GSSMODULE=$(INSTDIR)\Heimdal.GSS.msm 108 1.1.1.3 christos 109 1.1.1.3 christos $(GSSMODULE): $(OBJ)\heimdal-gss.wixobj 110 1.1.1.3 christos $(LIGHT) -out $@ $** 111 1.1.1.3 christos 112 1.1.1.3 christos # OBJECT COMPILED BELOW 113 1.1.1.3 christos 114 1.1 elric all:: $(ASSEMBLYMODULE) $(SDKREDISTDIR)\Heimdal.msm 115 1.1 elric 116 1.1.1.3 christos all:: $(POLICYMODULE) 117 1.1.1.3 christos 118 1.1.1.3 christos all:: $(COMMANDMODULE) $(SDKREDISTDIR)\Heimdal.Command.msm 119 1.1.1.3 christos 120 1.1.1.3 christos all:: $(GSSMODULE) 121 1.1 elric 122 1.1 elric clean:: 123 1.1 elric -$(RM) $(ASSEMBLYMODULE) 124 1.1 elric -$(RM) $(POLICYMODULE) 125 1.1.1.3 christos -$(RM) $(COMMANDMODULE) 126 1.1.1.3 christos -$(RM) $(GSSMODULE) 127 1.1.1.3 christos -$(RM) $(SDKREDISTDIR)\*.* 128 1.1 elric 129 1.1 elric ###################################################################### 130 1.1 elric # Runtime modules 131 1.1 elric 132 1.1.1.4 christos !if [ $(PERL) $(SRC)\cf\w32-detect-vc-version.pl $(CC) ]==19 133 1.1.1.4 christos VCVER=VC2019 134 1.1.1.4 christos !elseif [ $(PERL) $(SRC)\cf\w32-detect-vc-version.pl $(CC) ]==18 135 1.1.1.4 christos VCVER=VC2018 136 1.1.1.4 christos !elseif [ $(PERL) $(SRC)\cf\w32-detect-vc-version.pl $(CC) ]==17 137 1.1.1.4 christos VCVER=VC2017 138 1.1.1.4 christos !elseif [ $(PERL) $(SRC)\cf\w32-detect-vc-version.pl $(CC) ]==16 139 1.1.1.3 christos VCVER=VC100 140 1.1.1.3 christos !elseif [ $(PERL) $(SRC)\cf\w32-detect-vc-version.pl $(CC) ]==15 141 1.1 elric VCVER=VC90 142 1.1 elric !elseif [ $(PERL) $(SRC)\cf\w32-detect-vc-version.pl $(CC) ]==14 143 1.1 elric VCVER=VC80 144 1.1 elric !else 145 1.1 elric ! error Cant determine Visual C compiler version 146 1.1 elric !endif 147 1.1 elric 148 1.1.1.3 christos $(SDKREDISTDIR)\heimdal-version.mak: 149 1.1.1.3 christos @echo HEIMDAL_VCVER=$(VCVER) > $@ 150 1.1.1.3 christos !if "$(BUILD)"!="rel" 151 1.1.1.3 christos @echo HEIMDAL_CRT_DEBUG=yes >> $@ 152 1.1.1.3 christos !endif 153 1.1.1.3 christos 154 1.1.1.3 christos all:: $(SDKREDISTDIR)\heimdal-version.mak 155 1.1.1.3 christos 156 1.1 elric !if "$(BUILD)"=="rel" 157 1.1 elric CRTNAME=CRT 158 1.1 elric !else 159 1.1 elric CRTNAME=DebugCRT 160 1.1 elric !endif 161 1.1 elric 162 1.1.1.2 pettai !if "$(MMDIR)"=="" 163 1.1 elric MMDIR=$(ProgramFiles)\Common Files\Merge Modules 164 1.1 elric !if !exist($(MMDIR)) 165 1.1 elric MMDIR=$(SystemDrive)\Program Files (x86)\Common Files\Merge Modules 166 1.1 elric !endif 167 1.1.1.2 pettai !endif 168 1.1 elric 169 1.1.1.4 christos # 170 1.1.1.4 christos # Don't specify a runtime module when the Universal C Runtime 171 1.1.1.4 christos # is available. 172 1.1.1.4 christos # 173 1.1.1.4 christos !if "$(APPVER)"=="10.0" 174 1.1.1.4 christos RUNTIMEMODULE32="" 175 1.1.1.4 christos RUNTIMEMODULE64="" 176 1.1.1.3 christos !else 177 1.1.1.4 christos ! if exist("$(MMDIR)") 178 1.1.1.4 christos RUNTIMEMODULE32="$(MMDIR)\Microsoft_$(VCVER)_$(CRTNAME)_x86.msm" 179 1.1.1.4 christos ! if "$(VCVER)"=="VC90" || "$(VCVER)"=="VC80" 180 1.1 elric RUNTIMEMODULE64="$(MMDIR)\Microsoft_$(VCVER)_$(CRTNAME)_x86_x64.msm" 181 1.1.1.4 christos ! else 182 1.1.1.4 christos RUNTIMEMODULE64="$(MMDIR)\Microsoft_$(VCVER)_$(CRTNAME)_x64.msm" 183 1.1.1.4 christos ! endif 184 1.1.1.4 christos ! else 185 1.1 elric RUNTIMEMODULE32="$(MSSDK)\Redist\VC\microsoft.vcxx.crt.x86_msm.msm" 186 1.1 elric RUNTIMEMODULE64="$(MSSDK)\Redist\VC\microsoft.vcxx.crt.x64_msm.msm" 187 1.1.1.4 christos ! endif 188 1.1 elric !endif 189 1.1 elric 190 1.1 elric ###################################################################### 191 1.1 elric # Heimdal installer 192 1.1 elric 193 1.1 elric CANDLEOPTS= \ 194 1.1 elric -dVersion=$(VERSION) \ 195 1.1 elric -dBinDir=$(BINDIR) \ 196 1.1 elric -dDocDir=$(DOCDIR) \ 197 1.1 elric -dSrcDir=$(SRC) \ 198 1.1 elric -dPlatform=$(PLATFORM) \ 199 1.1.1.3 christos -dAsmKrbName=$(ASMKRBNAME) \ 200 1.1.1.3 christos -dPolPrefix=$(POLPREFIX) 201 1.1 elric 202 1.1 elric !if "$(CPU)"=="AMD64" 203 1.1 elric 204 1.1 elric INSTDIR32=$(INSTDIR:AMD64=i386) 205 1.1 elric 206 1.1 elric CANDLEOPTS=$(CANDLEOPTS) -dTarget64 \ 207 1.1 elric -dInstDir32=$(INSTDIR32) \ 208 1.1 elric -dInstDir64=$(INSTDIR) \ 209 1.1 elric -dRuntimeModule32=$(RUNTIMEMODULE32) \ 210 1.1.1.3 christos -dRuntimeModule64=$(RUNTIMEMODULE64) 211 1.1 elric 212 1.1 elric !ifdef MULTIPLATFORM_INSTALLER 213 1.1.1.3 christos CANDLEOPTS_MULTI= -dTarget32 214 1.1.1.2 pettai TYPEOPT=-full 215 1.1.1.3 christos 216 1.1.1.3 christos INSTDEPS= \ 217 1.1.1.3 christos $(INSTDIR32)\Heimdal.msm \ 218 1.1.1.3 christos $(INSTDIR32)\Heimdal.GSS.msm \ 219 1.1.1.3 christos $(INSTDIR32)\Heimdal.Policy.msm \ 220 1.1.1.3 christos $(ASSEMBLYMODULE) $(GSSMODULE) $(POLICYMODULE) 221 1.1 elric !else 222 1.1 elric ! message Excluding 32-bit components from installer 223 1.1.1.2 pettai TYPEOPT= 224 1.1.1.3 christos 225 1.1.1.3 christos INSTDEPS= \ 226 1.1.1.3 christos $(ASSEMBLYMODULE) $(GSSMODULE) $(POLICYMODULE) 227 1.1 elric !endif 228 1.1 elric 229 1.1 elric 230 1.1 elric !else 231 1.1 elric 232 1.1 elric CANDLEOPTS=$(CANDLEOPTS) -dTarget32 \ 233 1.1 elric -dInstDir32=$(INSTDIR) \ 234 1.1 elric -dRuntimeModule32=$(RUNTIMEMODULE32) \ 235 1.1 elric 236 1.1.1.3 christos INSTDEPS= \ 237 1.1.1.3 christos $(ASSEMBLYMODULE) $(GSSMODULE) $(POLICYMODULE) 238 1.1 elric !endif 239 1.1 elric 240 1.1 elric !if exist($(SRC)\thirdparty\MKShim) 241 1.1 elric THIRDPARTYOBJS=$(THIRDPARTYOBJS) $(INSTDIR)\MKShim.wixlib 242 1.1 elric THIRDPARTYOPTS=$(THIRDPARTYOPTS) -dMKShim=1 243 1.1 elric 244 1.1 elric !if "$(CPU)"=="AMD64" 245 1.1 elric THIRDPARTYOBJS=$(THIRDPARTYOBJS) $(INSTDIR32)\MKShim.wixlib 246 1.1 elric !endif 247 1.1 elric !endif 248 1.1 elric 249 1.1.1.2 pettai INSTALLER=$(INSTDIR)\Heimdal-$(CPU)$(DEBUGOPT)$(TYPEOPT)-$(VERSIOND).msi 250 1.1.1.2 pettai WIXOBJ=$(OBJ)\heimdal-installer$(TYPEOPT).wixobj 251 1.1 elric 252 1.1.1.2 pettai $(INSTALLER): $(WIXOBJ) $(THIRDPARTYOBJS) $(INSTDEPS) lang\en-us.wxl 253 1.1.1.2 pettai $(LIGHT) -out $@ $(WIXOBJ) $(THIRDPARTYOBJS) \ 254 1.1 elric -sval -cultures:en-us -loc lang\en-us.wxl \ 255 1.1 elric -dWixUILicenseRtf=lang\license-en-us.rtf \ 256 1.1 elric -ext WixUIExtension 257 1.1 elric $(_CODESIGN) 258 1.1 elric 259 1.1.1.2 pettai $(WIXOBJ): heimdal-installer.wxs 260 1.1 elric $(CANDLE) -arch $(PLATFORM) -o $@ heimdal-installer.wxs \ 261 1.1.1.3 christos $(CANDLEOPTS) $(CANDLEOPTS_MULTI) $(THIRDPARTYOPTS) 262 1.1.1.3 christos 263 1.1.1.3 christos !if exist(thirdparty\installer\heimdal-command.wxs) 264 1.1.1.3 christos CMD_WXS=thirdparty\installer\heimdal-command.wxs 265 1.1.1.3 christos !else 266 1.1.1.3 christos CMD_WXS=heimdal-command.wxs 267 1.1.1.3 christos !endif 268 1.1.1.3 christos 269 1.1.1.3 christos $(OBJ)\heimdal-command.wixobj: $(CMD_WXS) 270 1.1.1.3 christos $(CANDLE) -arch $(PLATFORM) -o $@ $(CMD_WXS) \ 271 1.1.1.3 christos $(CANDLEOPTS) $(THIRDPARTYOPTS) 272 1.1.1.3 christos 273 1.1.1.3 christos !if exist(thirdparty\installer\heimdal-gss.wxs) 274 1.1.1.3 christos GSS_WXS=thirdparty\installer\heimdal-gss.wxs 275 1.1.1.3 christos !else 276 1.1.1.3 christos GSS_WXS=heimdal-gss.wxs 277 1.1.1.3 christos !endif 278 1.1.1.3 christos 279 1.1.1.3 christos $(OBJ)\heimdal-gss.wixobj: $(GSS_WXS) 280 1.1.1.3 christos $(CANDLE) -arch $(PLATFORM) -o $@ $(GSS_WXS) \ 281 1.1 elric $(CANDLEOPTS) $(THIRDPARTYOPTS) 282 1.1 elric 283 1.1 elric all:: $(INSTALLER) 284 1.1 elric 285 1.1 elric clean:: 286 1.1 elric -$(RM) $(INSTALLER) 287 1.1 elric 288 1.1 elric !endif # BUILD_INSTALLERS 289