VirtualBox

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

Last change on this file since 33280 was 32622, checked in by vboxsync, 14 years ago

wddm: VBOXWDDM->VBOX_WITH_WDDM

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