1 | # $Id: Makefile.kmk 31634 2010-08-13 11:17:20Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Windows Guest Additions Installer.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2007 Oracle Corporation
|
---|
8 | #
|
---|
9 | # Oracle Corporation confidential
|
---|
10 | # All rights reserved
|
---|
11 | #
|
---|
12 |
|
---|
13 | SUB_DEPTH = ../../../../..
|
---|
14 | include $(KBUILD_PATH)/subheader.kmk
|
---|
15 |
|
---|
16 | # Include Sub-Makefiles.
|
---|
17 | include $(PATH_SUB_CURRENT)/Loader/Makefile.kmk
|
---|
18 |
|
---|
19 | # Globals
|
---|
20 | VBOX_PATH_WIN_ADD_INS_SRC := $(PATH_SUB_CURRENT)
|
---|
21 | VBOX_PATH_ADDITIONS.win.x86 := $(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/bin/additions
|
---|
22 |
|
---|
23 | ## @todo VBOX_WIN_ADD_INS_OUT_DIR := $(PATH_TARGET)/Additions/Installer/win
|
---|
24 |
|
---|
25 | DLLS += VBCoInst
|
---|
26 | VBCoInst_TEMPLATE = VBOXGUESTR3DLL
|
---|
27 | ifdef VBOX_SIGN_ADDITIONS # (See the parent makefile.)
|
---|
28 | VBCoInst_NOINST = true
|
---|
29 | endif
|
---|
30 | VBCoInst_DEFS = _WIN32_WINNT=0x0400 WIN32_LEAN_AND_MEAN=1 UNICODE
|
---|
31 | VBCoInst_LDFLAGS = /subsystem:console,4.10
|
---|
32 | VBCoInst_SOURCES = \
|
---|
33 | VBCoInst.cpp \
|
---|
34 | VBCoInst.def \
|
---|
35 | VBCoInst.rc
|
---|
36 |
|
---|
37 | PROGRAMS += VBoxDrvInst
|
---|
38 | VBoxDrvInst_TEMPLATE= VBOXGUESTR3EXE
|
---|
39 | VBoxDrvInst_DEFS = _WIN32_WINNT=0x0400 _UNICODE UNICODE
|
---|
40 | VBoxDrvInst_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
41 | VBoxDrvInst_DEPS = $(VBOX_SVN_REV_KMK)
|
---|
42 | VBoxDrvInst_SDKS = WINPSDK W2K3DDK
|
---|
43 | VBoxDrvInst_LIBS = \
|
---|
44 | $(PATH_SDK_W2K3DDK_LIB)/setupapi.lib \
|
---|
45 | $(PATH_SDK_W2K3DDK_LIB)/newdev.lib
|
---|
46 | VBoxDrvInst_SOURCES = \
|
---|
47 | VBoxDrvInst.cpp \
|
---|
48 | VBoxDrvInst.rc
|
---|
49 |
|
---|
50 | PROGRAMS += VBoxGuestDrvInst
|
---|
51 | VBoxGuestDrvInst_TEMPLATE= VBOXGUESTR3EXE
|
---|
52 | VBoxGuestDrvInst_DEFS = _WIN32_WINNT=0x0400 UNICODE
|
---|
53 | VBoxGuestDrvInst_SOURCES = \
|
---|
54 | VBoxGuestDrvInst.cpp \
|
---|
55 | VBoxGuestDrvInst.rc
|
---|
56 |
|
---|
57 | PROGRAMS += RegCleanup
|
---|
58 | RegCleanup_TEMPLATE = VBOXGUESTR3EXE
|
---|
59 | RegCleanup_DEFS = _WIN32_WINNT=0x0400 UNICODE
|
---|
60 | RegCleanup_SOURCES = \
|
---|
61 | RegCleanup.cpp \
|
---|
62 | RegCleanup.rc
|
---|
63 |
|
---|
64 |
|
---|
65 | #
|
---|
66 | # The installer.
|
---|
67 | #
|
---|
68 | PACKING += $(PATH_BIN)/additions/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH).exe
|
---|
69 | OTHER_CLEAN += \
|
---|
70 | $(PATH_BIN)/additions/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH).exe \
|
---|
71 | $(PATH_BIN)/additions/VBoxWHQLFake.exe
|
---|
72 |
|
---|
73 | DRIVER_FILES := \
|
---|
74 | $(PATH_BIN)/additions/VBoxGuestDrvInst.exe \
|
---|
75 | $(PATH_BIN)/additions/RegCleanup.exe \
|
---|
76 | $(PATH_BIN)/additions/VBoxMouse.sys \
|
---|
77 | $(PATH_BIN)/additions/VBoxGuest.sys \
|
---|
78 | $(PATH_BIN)/additions/VBoxVideo.sys \
|
---|
79 | $(PATH_BIN)/additions/VBoxDisp.dll \
|
---|
80 | $(PATH_BIN)/additions/VBoxSF.sys \
|
---|
81 | $(PATH_BIN)/additions/VBoxMRXNP.dll \
|
---|
82 | $(PATH_BIN)/additions/VBoxTray.exe \
|
---|
83 | $(PATH_BIN)/additions/VBoxControl.exe \
|
---|
84 | $(PATH_BIN)/additions/VBoxWHQLFake.exe \
|
---|
85 | $(PATH_BIN)/additions/VBoxService.exe
|
---|
86 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
87 | DRIVER_FILES += \
|
---|
88 | $(PATH_BIN)/additions/VBoxMouseNT.sys \
|
---|
89 | $(PATH_BIN)/additions/VBoxGuestNT.sys
|
---|
90 | endif
|
---|
91 | DRIVER_FILES += \
|
---|
92 | $(PATH_BIN)/additions/VBoxVideo.inf \
|
---|
93 | $(PATH_BIN)/additions/VBoxGuest.inf
|
---|
94 | ifdef VBOX_SIGN_ADDITIONS
|
---|
95 | DRIVER_FILES += \
|
---|
96 | $(PATH_BIN)/additions/VBoxVideo.cat \
|
---|
97 | $(PATH_BIN)/additions/VBoxGuest.cat
|
---|
98 | endif
|
---|
99 | ifdef VBOX_WITH_CROGL
|
---|
100 | DRIVER_FILES += \
|
---|
101 | $(PATH_BIN)/additions/VBoxOGLarrayspu.dll \
|
---|
102 | $(PATH_BIN)/additions/VBoxOGLcrutil.dll \
|
---|
103 | $(PATH_BIN)/additions/VBoxOGLerrorspu.dll \
|
---|
104 | $(PATH_BIN)/additions/VBoxOGLpackspu.dll \
|
---|
105 | $(PATH_BIN)/additions/VBoxOGLpassthroughspu.dll \
|
---|
106 | $(PATH_BIN)/additions/VBoxOGLfeedbackspu.dll \
|
---|
107 | $$(PATH_BIN)/additions/VBoxOGL.dll
|
---|
108 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
109 | # Also include 32-bit DLLs on 64-bit guests to enable
|
---|
110 | # running 32-bit OpenGL apps on that.
|
---|
111 | DRIVER_FILES += \
|
---|
112 | $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGLarrayspu.dll \
|
---|
113 | $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGLcrutil.dll \
|
---|
114 | $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGLerrorspu.dll \
|
---|
115 | $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGLpackspu.dll \
|
---|
116 | $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGLpassthroughspu.dll \
|
---|
117 | $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGLfeedbackspu.dll \
|
---|
118 | $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGL.dll
|
---|
119 | endif
|
---|
120 | endif
|
---|
121 |
|
---|
122 | VB_WIN_ADD_NSIS_ENV := \
|
---|
123 | -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
|
---|
124 | -E 'PATH_TARGET=$(subst /,\,$(PATH_TARGET))' \
|
---|
125 | -E 'VBOX_PATH_ADDITIONS_WIN_X86=$(subst /,\,$(VBOX_PATH_ADDITIONS.win.x86))' \
|
---|
126 | -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
|
---|
127 | -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
|
---|
128 | -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
|
---|
129 | -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
|
---|
130 | -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
|
---|
131 | -E 'VBOX_VERSION_MAJOR=$(VBOX_VERSION_MAJOR)' \
|
---|
132 | -E 'VBOX_VERSION_MINOR=$(VBOX_VERSION_MINOR)' \
|
---|
133 | -E 'VBOX_VERSION_BUILD=$(VBOX_VERSION_BUILD)' \
|
---|
134 | -E 'VBOX_SVN_REV=$(VBOX_SVN_REV)' \
|
---|
135 | -E 'VBOX_WINDOWS_ADDITIONS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ADDITIONS_ICON_FILE))' \
|
---|
136 | -E 'VBOX_NSIS_ICON_FILE=$(subst /,\,$(VBOX_NSIS_ICON_FILE))' \
|
---|
137 | -E 'VBOX_WITH_CROGL=$(if $(VBOX_WITH_CROGL),1,0)' \
|
---|
138 | -E 'VBOX_BRAND_WIN_ADD_INST_DLGBMP=$(subst /,\,$(VBOX_BRAND_WIN_ADD_INST_DLGBMP))' \
|
---|
139 | -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
|
---|
140 | $(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES),-E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(VBOX_BRAND_$(lang)_LICENSE_RTF)') \
|
---|
141 | -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
|
---|
142 | -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)'
|
---|
143 |
|
---|
144 | ifdef VBOX_SIGNING_MODE
|
---|
145 | #
|
---|
146 | # This is a hack to sign the uninstaller.
|
---|
147 | # See http://nsis.sourceforge.net/Signing_an_Uninstaller for more details.
|
---|
148 | #
|
---|
149 | OTHER_CLEAN += $(PATH_TARGET)/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH)-uninst.exe
|
---|
150 |
|
---|
151 | $(PATH_TARGET)/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH)-uninst.exe: \
|
---|
152 | $(PATH_SUB_CURRENT)/VBoxGuestAdditions.nsi \
|
---|
153 | $(DRIVER_FILES) \
|
---|
154 | $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) \
|
---|
155 | $(VBOX_NSIS_ICON_FILE) \
|
---|
156 | $(VBOX_VERSION_STAMP)\
|
---|
157 | | $$(dir $$@)
|
---|
158 | $(call MSG_L1,Creating $@, from $<)
|
---|
159 | $(QUIET)$(REDIRECT) -C $(VBOX_PATH_WIN_ADD_INS_SRC) \
|
---|
160 | $(VB_WIN_ADD_NSIS_ENV) \
|
---|
161 | -- $(EXEC_X86_WIN32) $(VBOX_PATH_NSIS)/makensis.exe /NOCD /V2 \
|
---|
162 | $(if $(VBOX_SIGN_ADDITIONS),'/DVBOX_SIGN_ADDITIONS=1') \
|
---|
163 | $(if $(VBOX_INSTALLER_ADD_LANGUAGES),'/DVBOX_INSTALLER_ADD_LANGUAGES=1') \
|
---|
164 | $(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES),'/DVBOX_BRAND_$(lang)_LICENSE_RTF=1') \
|
---|
165 | '/DUNINSTALLER_ONLY=1' \
|
---|
166 | '$(subst /,\,$<)'
|
---|
167 |
|
---|
168 | OTHER_CLEAN += $(PATH_TARGET)/uninst.exe
|
---|
169 | $(PATH_TARGET)/uninst.exe: $(PATH_TARGET)/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH)-uninst.exe | $$(dir $$@)
|
---|
170 | $(call MSG_L1,Creating $@, from $<)
|
---|
171 | $(QUIET)$(RM) -f $@
|
---|
172 | - $<
|
---|
173 | $(TEST) -f $@
|
---|
174 | $(call VBOX_SIGN_FILE_FN,$@)
|
---|
175 | endif
|
---|
176 |
|
---|
177 | WHQLFAKE := $(PATH_SUB_CURRENT)/VBoxWHQLFake.au3
|
---|
178 |
|
---|
179 | $(PATH_BIN)/additions/VBoxWHQLFake.exe:
|
---|
180 | $(call MSG_L1,Creating $@, from $<)
|
---|
181 | $(QUIET)$(EXEC_X86_WIN32) $(VBOX_PATH_AUTOIT3)/Aut2Exe/Aut2exe.exe \
|
---|
182 | /in $(WHQLFAKE) \
|
---|
183 | /out $(PATH_BIN)/additions/VBoxWHQLFake.exe \
|
---|
184 | /icon $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) \
|
---|
185 | /comp 4 \
|
---|
186 | /unicode
|
---|
187 |
|
---|
188 | $(PATH_BIN)/additions/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH).exe: \
|
---|
189 | $(PATH_SUB_CURRENT)/VBoxGuestAdditions.nsi \
|
---|
190 | $(DRIVER_FILES) \
|
---|
191 | $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) \
|
---|
192 | $(VBOX_NSIS_ICON_FILE) \
|
---|
193 | $(if $(VBOX_SIGNING_MODE),$(PATH_TARGET)/uninst.exe) \
|
---|
194 | $(VBOX_VERSION_STAMP)
|
---|
195 | $(call MSG_L1,Creating $@, from $<)
|
---|
196 | $(QUIET)$(REDIRECT) -C $(VBOX_PATH_WIN_ADD_INS_SRC) \
|
---|
197 | $(VB_WIN_ADD_NSIS_ENV) \
|
---|
198 | -- $(EXEC_X86_WIN32) $(VBOX_PATH_NSIS)/makensis.exe /NOCD /V2 \
|
---|
199 | $(if $(VBOX_SIGN_ADDITIONS),'/DVBOX_SIGN_ADDITIONS=1') \
|
---|
200 | $(if $(VBOX_SIGNING_MODE),'/DEXTERNAL_UNINSTALLER=1') \
|
---|
201 | $(if $(VBOX_INSTALLER_ADD_LANGUAGES),'/DVBOX_INSTALLER_ADD_LANGUAGES=1') \
|
---|
202 | $(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES),'/DVBOX_BRAND_$(lang)_LICENSE_RTF=1') \
|
---|
203 | '$(subst /,\,$<)'
|
---|
204 | $(call VBOX_SIGN_FILE_FN,$@)
|
---|
205 |
|
---|
206 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
207 |
|
---|