1 2# Build language 3LANG=1033 4 5# Program macros 6CANDLE=candle -nologo 7 8LIGHT=light -nologo 9 10CD=cd 11 12RM=del 13 14MAKE=nmake -nologo 15 16 17# Targets 18 19OUTPATH=. 20 21OBJFILE=$(OUTPATH)\kfw.wixobj 22 23MSIFILE=$(OUTPATH)\kfw.msi 24 25WIXINCLUDES= \ 26 config.wxi \ 27 features.wxi \ 28 files.wxi \ 29 property.wxi \ 30 runtime.wxi \ 31 site-local.wxi \ 32 lang\strings_$(LANG).wxl \ 33 lang\ui_$(LANG).wxi \ 34 lang\config_$(LANG).wxi 35 36CUSTOMDLL=custom\custom.dll 37 38!if !defined(CPU) || "$(CPU)" == "" 39CPU=$(PROCESSOR_ARCHITECTURE) 40!endif # CPU 41 42!if ( "$(CPU)" == "X86" ) || ( "$(CPU)" == "x86" ) || ( "$(CPU)" == "i386" ) 43WIXARCH = x86 44!elseif ( "$(CPU)" == "AMD64" ) 45WIXARCH = x64 46!else 47!error "Architecture $(CPU) not supported by installer" 48!endif 49 50all: $(MSIFILE) 51 52$(OBJFILE): kfw.wxs $(WIXINCLUDES) 53 $(CANDLE) -arch $(WIXARCH) -out $@ kfw.wxs \ 54 "-dDate=%DATE%" \ 55 "-dTime=%TIME%" \ 56 -dBuildLang=$(LANG) 57 58$(MSIFILE): $(OBJFILE) $(CUSTOMDLL) 59 $(LIGHT) -out $@ $(OBJFILE) \ 60 -loc lang\strings_$(LANG).wxl -ext WixUtilExtension.dll 61 62$(CUSTOMDLL): custom\custom.cpp 63 $(CD) custom 64 $(MAKE) -f custom.cpp 65 $(CD) .. 66 67clean: 68 $(RM) $(OBJFILE) 69 $(RM) $(MSIFILE) 70 $(CD) custom 71 $(MAKE) -f custom.cpp clean 72 $(CD) .. 73