VirtualBox

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

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

Additions header fixes

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