VirtualBox

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

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

Windows Guest Additions: Ship with GPLv2 license.

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