VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Installer/Makefile.kmk@ 46745

Last change on this file since 46745 was 44864, checked in by vboxsync, 12 years ago

VBoxMMR: ported from 4.2 to trunk (not enabled).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.2 KB
Line 
1# $Id: Makefile.kmk 44864 2013-02-28 12:18:42Z vboxsync $
2## @file
3# Sub-Makefile for the Windows Guest Additions Installer.
4#
5
6#
7# Copyright (C) 2006-2012 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18SUB_DEPTH = ../../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21# Include Sub-Makefiles.
22include $(PATH_SUB_CURRENT)/Loader/Makefile.kmk
23include $(PATH_SUB_CURRENT)/InstallHelper/Makefile.kmk
24
25# Globals
26VBOX_PATH_WIN_ADD_INS_SRC := $(PATH_SUB_CURRENT)
27VBOX_PATH_ADDITIONS.win.x86 := $(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/bin/additions
28VBOX_WITH_GUEST_INSTALL_HELPER := 1 # Use our guest install helper DLL.
29
30## @todo VBOX_WIN_ADD_INS_OUT_DIR := $(PATH_TARGET)/Additions/Installer/win
31
32PROGRAMS += VBoxDrvInst
33VBoxDrvInst_TEMPLATE= NewVBoxGuestR3Exe
34VBoxDrvInst_DEFS = _WIN32_WINNT=0x0400 _UNICODE UNICODE
35VBoxDrvInst_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
36ifdef VBOX_WITH_WDDM
37 VBoxDrvInst_DEFS += VBOX_WITH_WDDM
38endif
39VBoxDrvInst_DEPS = $(VBOX_SVN_REV_KMK)
40VBoxDrvInst_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK_GST) $(VBOX_WINDDK_GST)
41VBoxDrvInst_LIBS = \
42 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/setupapi.lib \
43 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/newdev.lib
44VBoxDrvInst_SOURCES = \
45 VBoxDrvInst.cpp \
46 VBoxDrvInst.rc
47
48PROGRAMS += VBoxGuestDrvInst
49VBoxGuestDrvInst_TEMPLATE= NewVBoxGuestR3Exe
50VBoxGuestDrvInst_DEFS = _WIN32_WINNT=0x0400 UNICODE
51VBoxGuestDrvInst_SOURCES = \
52 VBoxGuestDrvInst.cpp \
53 VBoxGuestDrvInst.rc
54
55PROGRAMS += RegCleanup
56RegCleanup_TEMPLATE = NewVBoxGuestR3Exe
57RegCleanup_DEFS = _WIN32_WINNT=0x0400 UNICODE
58RegCleanup_SOURCES = \
59 RegCleanup.cpp \
60 RegCleanup.rc
61
62
63#
64# The installer.
65#
66PACKING += $(PATH_STAGE_BIN)/additions/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH).exe
67OTHER_CLEAN += \
68 $(PATH_STAGE_BIN)/additions/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH).exe \
69 $(PATH_STAGE_BIN)/additions/VBoxWHQLFake.exe
70
71DRIVER_FILES := \
72 $(PATH_STAGE_BIN)/additions/VBoxGuestDrvInst.exe \
73 $(PATH_STAGE_BIN)/additions/RegCleanup.exe \
74 $(PATH_STAGE_BIN)/additions/VBoxMouse.sys \
75 $(PATH_STAGE_BIN)/additions/VBoxGuest.sys \
76 $(PATH_STAGE_BIN)/additions/VBoxVideo.sys \
77 $(PATH_STAGE_BIN)/additions/VBoxDisp.dll \
78 $(PATH_STAGE_BIN)/additions/VBoxSF.sys \
79 $(PATH_STAGE_BIN)/additions/VBoxMRXNP.dll \
80 $(PATH_STAGE_BIN)/additions/VBoxTray.exe \
81 $(PATH_STAGE_BIN)/additions/VBoxControl.exe \
82 $(PATH_STAGE_BIN)/additions/VBoxWHQLFake.exe \
83 $(PATH_STAGE_BIN)/additions/VBoxService.exe
84ifeq ($(KBUILD_TARGET_ARCH),amd64)
85 # Also include 32-bit network provider DLLs on 64-bit guests to enable
86 # running 32-bit apps which use that.
87 DRIVER_FILES += \
88 $(PATH_STAGE_BIN)/additions/VBoxMRXNP-x86.dll
89endif
90ifeq ($(KBUILD_TARGET_ARCH),x86)
91DRIVER_FILES += \
92 $(PATH_STAGE_BIN)/additions/VBoxMouseNT.sys \
93 $(PATH_STAGE_BIN)/additions/VBoxGuestNT.sys
94endif
95DRIVER_FILES += \
96 $(PATH_STAGE_BIN)/additions/VBoxVideo.inf \
97 $(PATH_STAGE_BIN)/additions/VBoxGuest.inf
98ifdef VBOX_SIGN_ADDITIONS
99DRIVER_FILES += \
100 $(PATH_STAGE_BIN)/additions/VBoxVideo.cat \
101 $(PATH_STAGE_BIN)/additions/VBoxGuest.cat
102endif
103ifdef VBOX_WITH_CROGL
104DRIVER_FILES += \
105 $(PATH_STAGE_BIN)/additions/VBoxOGLarrayspu.dll \
106 $(PATH_STAGE_BIN)/additions/VBoxOGLcrutil.dll \
107 $(PATH_STAGE_BIN)/additions/VBoxOGLerrorspu.dll \
108 $(PATH_STAGE_BIN)/additions/VBoxOGLpackspu.dll \
109 $(PATH_STAGE_BIN)/additions/VBoxOGLpassthroughspu.dll \
110 $(PATH_STAGE_BIN)/additions/VBoxOGLfeedbackspu.dll \
111 $(PATH_STAGE_BIN)/additions/VBoxOGL.dll \
112 $(PATH_STAGE_BIN)/additions/wined3d.dll \
113 $(PATH_STAGE_BIN)/additions/VBoxD3D9.dll \
114 $(PATH_STAGE_BIN)/additions/VBoxD3D8.dll
115 ifeq ($(KBUILD_TARGET_ARCH),amd64)
116 # Also include 32-bit DLLs on 64-bit guests to enable
117 # running 32-bit OpenGL apps on that.
118 DRIVER_FILES += \
119 $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGLarrayspu.dll \
120 $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGLcrutil.dll \
121 $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGLerrorspu.dll \
122 $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGLpackspu.dll \
123 $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGLpassthroughspu.dll \
124 $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGLfeedbackspu.dll \
125 $(VBOX_PATH_ADDITIONS.win.x86)/VBoxOGL.dll \
126 $(VBOX_PATH_ADDITIONS.win.x86)/wined3d.dll \
127 $(VBOX_PATH_ADDITIONS.win.x86)/VBoxD3D9.dll \
128 $(VBOX_PATH_ADDITIONS.win.x86)/VBoxD3D8.dll
129
130 endif
131endif
132ifdef VBOX_WITH_WDDM
133DRIVER_FILES += \
134 $(PATH_STAGE_BIN)/additions/VBoxVideoWddm.sys \
135 $(PATH_STAGE_BIN)/additions/VBoxVideoWddm.inf \
136 $(PATH_STAGE_BIN)/additions/VBoxDispD3D.dll
137 ifdef VBOX_WITH_WDDM_W8
138DRIVER_FILES += \
139 $(PATH_STAGE_BIN)/additions/VBoxVideoW8.sys \
140 $(PATH_STAGE_BIN)/additions/VBoxVideoW8.inf
141 endif
142 ifdef VBOX_WITH_CROGL
143DRIVER_FILES += \
144 $(PATH_STAGE_BIN)/additions/wined3dwddm.dll \
145 $(PATH_STAGE_BIN)/additions/VBoxD3D9wddm.dll
146 endif
147 ifdef VBOX_SIGN_ADDITIONS
148DRIVER_FILES += \
149 $(PATH_STAGE_BIN)/additions/VBoxVideoWddm.cat
150 ifdef VBOX_WITH_WDDM_W8
151DRIVER_FILES += \
152 $(PATH_STAGE_BIN)/additions/VBoxVideoW8.cat
153 endif
154 endif
155 ifeq ($(KBUILD_TARGET_ARCH),amd64)
156DRIVER_FILES += \
157 $(PATH_STAGE_BIN)/additions/VBoxDispD3D-x86.dll
158 ifdef VBOX_WITH_CROGL
159DRIVER_FILES += \
160 $(PATH_STAGE_BIN)/additions/wined3dwddm-x86.dll \
161 $(PATH_STAGE_BIN)/additions/VBoxD3D9wddm-x86.dll \
162 $(PATH_STAGE_BIN)/additions/VBoxOGL-x86.dll \
163 $(PATH_STAGE_BIN)/additions/VBoxOGLarrayspu-x86.dll \
164 $(PATH_STAGE_BIN)/additions/VBoxOGLcrutil-x86.dll \
165 $(PATH_STAGE_BIN)/additions/VBoxOGLerrorspu-x86.dll \
166 $(PATH_STAGE_BIN)/additions/VBoxOGLfeedbackspu-x86.dll \
167 $(PATH_STAGE_BIN)/additions/VBoxOGLpackspu-x86.dll \
168 $(PATH_STAGE_BIN)/additions/VBoxOGLpassthroughspu-x86.dll
169 endif
170 endif
171endif
172ifdef VBOX_WITH_MMR
173DRIVER_FILES += \
174 $(PATH_STAGE_BIN)/additions/VBoxMMR.exe \
175 $(PATH_STAGE_BIN)/additions/VBoxMMRHook.dll
176 ifeq ($(KBUILD_TARGET_ARCH),amd64)
177 DRIVER_FILES += \
178 $(PATH_STAGE_BIN)/additions/VBoxMMR-x86.exe \
179 $(PATH_STAGE_BIN)/additions/VBoxMMRHook-x86.dll
180 endif
181endif
182
183
184VB_WIN_ADD_NSIS_ENV := \
185 -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
186 -E 'PATH_TARGET=$(subst /,\,$(PATH_TARGET))' \
187 -E 'PATH_TARGET_X86=$(subst /,\,$(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/obj)' \
188 -E 'VBOX_PATH_ADDITIONS_WIN_X86=$(subst /,\,$(VBOX_PATH_ADDITIONS.win.x86))' \
189 -E 'VBOX_PATH_DIFX=$(subst /,\,$(VBOX_PATH_DIFX))' \
190 -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
191 -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
192 -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
193 -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
194 -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
195 -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
196 -E 'VBOX_VERSION_MAJOR=$(VBOX_VERSION_MAJOR)' \
197 -E 'VBOX_VERSION_MINOR=$(VBOX_VERSION_MINOR)' \
198 -E 'VBOX_VERSION_BUILD=$(VBOX_VERSION_BUILD)' \
199 -E 'VBOX_SVN_REV=$(VBOX_SVN_REV)' \
200 -E 'VBOX_WINDOWS_ADDITIONS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ADDITIONS_ICON_FILE))' \
201 -E 'VBOX_NSIS_ICON_FILE=$(subst /,\,$(VBOX_NSIS_ICON_FILE))' \
202 -E 'VBOX_WITH_CROGL=$(if $(VBOX_WITH_CROGL),1,0)' \
203 -E 'VBOX_WITH_GUEST_INSTALL_HELPER=$(if $(VBOX_WITH_GUEST_INSTALL_HELPER),1,0)' \
204 -E 'VBOX_WITH_LICENSE_INSTALL_RTF=$(if $(VBOX_BRAND_LICENSE_RTF),1,0)' \
205 -E 'VBOX_WITH_WDDM=$(if $(VBOX_WITH_WDDM),1,0)' \
206 -E 'VBOX_WITH_WDDM_W8=$(if $(VBOX_WITH_WDDM_W8),1,0)' \
207 -E 'VBOX_WITH_MMR=$(if $(VBOX_WITH_MMR),1,0)' \
208 -E 'VBOX_BRAND_WIN_ADD_INST_DLGBMP=$(subst /,\,$(VBOX_BRAND_WIN_ADD_INST_DLGBMP))' \
209 -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
210 $(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES),-E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(VBOX_BRAND_$(lang)_LICENSE_RTF)') \
211 -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
212 -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)'
213
214ifdef VBOX_SIGNING_MODE
215#
216# This is a hack to sign the uninstaller.
217# See http://nsis.sourceforge.net/Signing_an_Uninstaller for more details.
218#
219OTHER_CLEAN += $(PATH_TARGET)/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH)-uninst.exe
220
221$(PATH_TARGET)/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH)-uninst.exe: \
222 $(PATH_SUB_CURRENT)/VBoxGuestAdditions.nsi \
223 $(DRIVER_FILES) \
224 $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) \
225 $(VBOX_NSIS_ICON_FILE) \
226 $(VBOX_VERSION_STAMP) \
227 $$(VBoxDrvInst_1_STAGE_TARGET) \
228 | $$(dir $$@)
229 $(call MSG_L1,Creating $@, from $<)
230 $(QUIET)$(REDIRECT) -C $(VBOX_PATH_WIN_ADD_INS_SRC) \
231 $(VB_WIN_ADD_NSIS_ENV) \
232 -- $(EXEC_X86_WIN32) $(VBOX_PATH_NSIS)/makensis.exe /NOCD /V2 \
233 $(if $(VBOX_SIGN_ADDITIONS),'/DVBOX_SIGN_ADDITIONS=1') \
234 $(if $(VBOX_INSTALLER_ADD_LANGUAGES),'/DVBOX_INSTALLER_ADD_LANGUAGES=1') \
235 $(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES),'/DVBOX_BRAND_$(lang)_LICENSE_RTF=1') \
236 '/DUNINSTALLER_ONLY=1' \
237 '$(subst /,\,$<)'
238
239OTHER_CLEAN += $(PATH_TARGET)/uninst.exe
240$(PATH_TARGET)/uninst.exe: $(PATH_TARGET)/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH)-uninst.exe | $$(dir $$@)
241 $(call MSG_L1,Creating $@, from $<)
242 $(QUIET)$(RM) -f $@
243 - $<
244 $(TEST) -f $@
245 $(call VBOX_SIGN_FILE_FN,$@)
246endif
247
248WHQLFAKE := $(PATH_SUB_CURRENT)/VBoxWHQLFake.au3
249
250$(PATH_STAGE_BIN)/additions/VBoxWHQLFake.exe:
251 $(call MSG_L1,Creating $@, from $<)
252 $(QUIET)$(EXEC_X86_WIN32) $(VBOX_PATH_AUTOIT3)/Aut2Exe/Aut2exe.exe \
253 /in $(WHQLFAKE) \
254 /out $(PATH_STAGE_BIN)/additions/VBoxWHQLFake.exe \
255 /icon $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) \
256 /comp 4 \
257 /unicode
258
259$(PATH_STAGE_BIN)/additions/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH).exe: \
260 $(PATH_SUB_CURRENT)/VBoxGuestAdditions.nsi \
261 $(DRIVER_FILES) \
262 $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) \
263 $(VBOX_NSIS_ICON_FILE) \
264 $(if $(VBOX_SIGNING_MODE),$(PATH_TARGET)/uninst.exe) \
265 $(VBOX_VERSION_STAMP) \
266 $$(VBoxDrvInst_1_STAGE_TARGET)
267 $(call MSG_L1,Creating $@, from $<)
268 $(QUIET)$(REDIRECT) -C $(VBOX_PATH_WIN_ADD_INS_SRC) \
269 $(VB_WIN_ADD_NSIS_ENV) \
270 -- $(EXEC_X86_WIN32) $(VBOX_PATH_NSIS)/makensis.exe /NOCD /V2 \
271 $(if $(VBOX_SIGN_ADDITIONS),'/DVBOX_SIGN_ADDITIONS=1') \
272 $(if $(VBOX_SIGNING_MODE),'/DEXTERNAL_UNINSTALLER=1') \
273 $(if $(VBOX_INSTALLER_ADD_LANGUAGES),'/DVBOX_INSTALLER_ADD_LANGUAGES=1') \
274 $(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES),'/DVBOX_BRAND_$(lang)_LICENSE_RTF=1') \
275 '$(subst /,\,$<)'
276 $(call VBOX_SIGN_FILE_FN,$@)
277
278include $(FILE_KBUILD_SUB_FOOTER)
279
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette