Windows: Include version and build type in installer name
authorAsanka C. Herath <asanka@secure-endpoints.com>
Mon, 4 Oct 2010 22:35:28 +0000 (18:35 -0400)
committerAsanka C. Herath <asanka@secure-endpoints.com>
Wed, 24 Nov 2010 20:32:26 +0000 (15:32 -0500)
packages/windows/installer/NTMakefile

index 9d077cd7db90c2fa9e34d46067f0f9dfdc23dbe3..a635f6a15eeddd93a5a2d4cbf6bf592e187d3829 100644 (file)
@@ -43,6 +43,15 @@ PLATFORM=x64
 PLATFORM=x86
 !endif
 
+!if "$(BUILD)"=="rel"
+DEBUGOPT=
+!else
+DEBUGOPT=-$(BUILD)
+!endif
+
+######################################################################
+# Heimdal Merge Modules
+
 MERGEMOD=$(INSTDIR)\Heimdal.msm
 
 $(MERGEMOD): $(OBJ)\heimdal-assemblies.wixobj
@@ -62,14 +71,48 @@ all:: $(MERGEMOD) $(SDKREDISTDIR)\Heimdal.msm
 clean::
        -$(RM) $(MERGEMOD)
 
+######################################################################
+# Runtime modules
+
+VCVER=VC90
+
+!if "$(CPU)"=="AMD64"
+CPUSUFFIX=_x64
+!else
+CPUSUFFIX=
+!endif
+
+!if "$(BUILD)"=="rel"
+CRTNAME=CRT
+!else
+CRTNAME=DebugCRT
+!endif
+
+MMDIR=$(ProgramFiles)\Common Files\Merge Modules
+!if !exist($(MMDIR))
+MMDIR=$(SystemDrive)\Program Files (x86)\Common Files\Merge Modules
+!endif
+
+!if exist("$(MMDIR)")
+
+RUNTIMEMODULE="$(MMDIR)\Microsoft_$(VCVER)_$(CRTNAME)_x86$(CPUSUFFIX).msm"
+
+!else
+
+RUNTIMEMODULE="$(MSSDK)\Redist\VC\microsoft.vcxx.crt.$(PLATFORM)_msm.msm"
+
+!endif
+
+
+######################################################################
+# Heimdal installer
+
 !if exist($(SRC)\thirdparty)
 THIRDPARTYOBJS=$(INSTDIR)\apicache.wixobj $(INSTDIR)\lsacache.wixobj
 THIRDPARTYOPT=-dApiCache=1 -dLsaCache=1
 !endif
 
-INSTALLER=$(INSTDIR)\Heimdal.msi
-
-RUNTIMEMODULE="$(MSSDK)\Redist\VC\microsoft.vcxx.crt.$(PLATFORM)_msm.msm"
+INSTALLER=$(INSTDIR)\Heimdal-$(CPU)$(DEBUGOPT)-$(VERSIOND).msi
 
 $(INSTALLER): $(OBJ)\heimdal-installer.wixobj $(MERGEMOD) $(THIRDPARTYOBJS)    \
                $(THIRDPARTYDEPS) lang\en-us.wxl