690f109ffda4c5db6a1e2b02197e7cf2badb6344
[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 !IF ("$(CPU)" == "i386")
17 BINMSIFILE = $(MEDIADIR)\openafs-32bit-tools-$(LANG).msi
18 !ENDIF
19
20 WIXINCLUDES = \
21         config.wxi \
22         feature.wxi \
23         files.wxi \
24         language_config.wxi \
25         property.wxi \
26         registry.wxi \
27         lang\$(LANG)\ui.wxi
28
29 WIXOBJ = $(OUT)\openafs-$(LANG).wixobj
30 !IF ("$(CPU)" == "i386")
31 BINWIXOBJ  = $(OUT)\openafs-32bit-tools-$(LANG).wixobj
32 !ENDIF
33
34 LANGUAGES=en_US de_DE es_ES ja_JP ko_KR pt_BR zh_CN zh_TW
35
36 languages:
37 # Don't bother with non en_US for now.  The other builds comprise of either
38 # verbatim copies of en_US files, partial translations or doesn't build 
39 # (no languages resources). Someday when OpenAFS 8.1029828419 comes out we'll 
40 # get someone to translate.
41 #       for %l in ( $(LANGUAGES ) do (
42 #       $(MAKE) /f NTMakefile /nologo LANG=%l lang
43 #       )
44         $(MAKE) /f NTMakefile /nologo LANG=en_US lang
45
46
47 lang:: lang_clean $(MSIFILE) $(BINMSIFILE)
48
49 uninst: 
50         $(CD) uninstall
51         $(MAKE) /f NTMakefile /nologo install
52         $(CD) ..
53
54 customactions:
55         $(CD) custom
56         $(MAKE) /f NTMakefile /nologo install
57         $(CD) ..
58
59 install: uninst customactions languages
60
61 $(MSIFILE): $(WIXOBJ)
62         light -nologo -out $(MSIFILE) \
63                 -loc lang\$(LANG)\strings.wxl \
64                 $(WIXOBJ)
65         dir $(MSIFILE)
66
67 $(WIXOBJ): openafs.wxs $(WIXINCLUDES)
68         candle -nologo -out $@  \
69                 "-dCellName=$(CELLNAME_DEFAULT)" \
70                 -dLanguage=$(LANG) \
71                 -dNumericVersion=$(AFSPRODUCT_VERSION)  \
72                 -dVersionMajor=$(AFSPRODUCT_VER_MAJOR)  \
73                 -dVersionMinor=$(AFSPRODUCT_VER_MINOR)  \
74                 -dVersionPatch=$(AFSPRODUCT_VER_PATCH)  \
75                 "-dDestDir=$(DESTDIR)\\" \
76                 -dCellDbFile=CellServDB \
77                 -v0 \
78                 -w0 \
79         $(AFSDEV_AUXWIXDEFINES) openafs.wxs
80
81 !IF ("$(CPU)" == "i386")
82 $(BINWIXOBJ): oafwbins.wxs $(WIXINCLUDES)
83         candle -nologo -out $@  \
84                 "-dCellName=$(CELLNAME_DEFAULT)" \
85                 -dLanguage=$(LANG) \
86                 -dNumericVersion=$(AFSPRODUCT_VERSION)  \
87                 -dVersionMajor=$(AFSPRODUCT_VER_MAJOR)  \
88                 -dVersionMinor=$(AFSPRODUCT_VER_MINOR)  \
89                 -dVersionPatch=$(AFSPRODUCT_VER_PATCH)  \
90                 "-dDestDir=$(DESTDIR)\\" \
91                 -dCellDbFile=CellServDB \
92                 -v0 \
93                 -w0 \
94         $(AFSDEV_AUXWIXDEFINES) oafwbins.wxs
95
96 $(BINMSIFILE): $(BINWIXOBJ)
97         light -nologo -out $(BINMSIFILE) \
98                 -loc lang\en_US\strings.wxl \
99                 $(BINWIXOBJ)
100         dir $(BINMSIFILE)
101 !ENDIF
102
103 # Cleanup
104 clean::
105         for %l in ( $(LANGUAGES) ) do \
106                 $(MAKE) /f NTMakefile /nologo LANG=%l lang_clean
107         $(CD) custom
108         $(MAKE) /f NTMakefile /nologo clean
109         $(CD) ..
110         $(CD) uninstall
111         $(MAKE) /f NTMakefile /nologo clean
112         $(CD) ..
113
114 lang_clean:
115         -$(DEL) $(WIXOBJ)
116         -$(DEL) $(MSIFILE)
117 !IF ("$(CPU)" == "i386")
118         -$(DEL) $(BINWIXOBJ)
119         -$(DEL) $(BINMSIFILE)
120 !ENDIF