windows-installer-updates-20050612
[openafs.git] / src / WINNT / install / wix / NTMakefile
1 # Copyright 2004, OpenAFS.ORG and others.
2 # All Rights Reserved.
3 #
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 RELDIR=WINNT\install\wix
9 !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME)
10 !INCLUDE ..\..\..\config\NTMakefile.version
11
12 MEDIADIR = $(DESTDIR)\WinInstall
13 MEDIABINDIR = $(MEDIADIR)\Dll
14
15 MSIFILE = $(MEDIADIR)\openafs-$(LANG).msi
16
17 WIXINCLUDES = \
18         config.wxi \
19         feature.wxi \
20         files.wxi \
21         language_config.wxi \
22         property.wxi \
23         registry.wxi \
24         lang\$(LANG)\ui.wxi
25
26 WIXOBJ = $(OUT)\openafs-$(LANG).wixobj
27
28 LANGUAGES=en_US de_DE es_ES ja_JP ko_KR pt_BR zh_CN zh_TW
29
30 languages:
31 # Don't bother with non en_US for now.  The other builds comprise of either
32 # verbatim copies of en_US files, partial translations or doesn't build 
33 # (no languages resources). Someday when OpenAFS 8.1029828419 comes out we'll 
34 # get someone to translate.
35 #       for %l in ( $(LANGUAGES ) do (
36 #       $(MAKE) /f NTMakefile /nologo LANG=%l lang
37 #       )
38         $(MAKE) /f NTMakefile /nologo LANG=en_US lang
39
40 lang:: lang_clean $(MSIFILE)
41
42 uninst: 
43         $(CD) uninstall
44         $(MAKE) /f NTMakefile /nologo install
45         $(CD) ..
46
47 customactions:
48         $(CD) custom
49         $(MAKE) /f NTMakefile /nologo install
50         $(CD) ..
51
52 install: uninst customactions languages 
53
54 $(MSIFILE): $(WIXOBJ)
55         light -nologo -out $(MSIFILE) \
56                 -loc lang\$(LANG)\strings.wxl \
57                 $(WIXOBJ)
58         dir $(MSIFILE)
59
60 $(WIXOBJ): openafs.wxs $(WIXINCLUDES)
61         candle -nologo -out $@  \
62                 "-dCellName=$(CELLNAME_DEFAULT)" \
63                 -dLanguage=$(LANG) \
64                 -dNumericVersion=$(AFSPRODUCT_VERSION)  \
65                 -dVersionMajor=$(AFSPRODUCT_VER_MAJOR)  \
66                 -dVersionMinor=$(AFSPRODUCT_VER_MINOR)  \
67                 -dVersionPatch=$(AFSPRODUCT_VER_PATCH)  \
68                 -dProductCode=$(AFSPRODUCT_VER_GUID)    \
69                 "-dDestDir=$(DESTDIR)\\" \
70                 -dCellDbFile=CellServDB \
71                 -v0 \
72                 -w0 \
73         $(AFSDEV_AUXWIXDEFINES) openafs.wxs
74
75 # Cleanup
76 clean::
77         for %l in ( $(LANGUAGES) ) do \
78                 $(MAKE) /f NTMakefile /nologo LANG=%l lang_clean
79         $(CD) custom
80         $(MAKE) /f NTMakefile /nologo clean
81         $(CD) ..
82         $(CD) uninstall
83         $(MAKE) /f NTMakefile /nologo clean
84         $(CD) ..
85         
86 lang_clean:
87         -$(DEL) $(WIXOBJ)
88         -$(DEL) $(MSIFILE)