VirtualBox

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

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

Windows Additions: export shared folders and installer to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.0 KB
Line 
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
13SUB_DEPTH = ../../../../..
14include $(KBUILD_PATH)/subheader.kmk
15
16# Include Sub-Makefiles.
17include $(PATH_SUB_CURRENT)/Loader/Makefile.kmk
18
19# Globals
20VBOX_PATH_WIN_ADD_INS_SRC := $(PATH_SUB_CURRENT)
21VBOX_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
25DLLS += VBCoInst
26VBCoInst_TEMPLATE = VBOXGUESTR3DLL
27ifdef VBOX_SIGN_ADDITIONS # (See the parent makefile.)
28 VBCoInst_NOINST = true
29endif
30VBCoInst_DEFS = _WIN32_WINNT=0x0400 WIN32_LEAN_AND_MEAN=1 UNICODE
31VBCoInst_LDFLAGS = /subsystem:console,4.10
32VBCoInst_SOURCES = \
33 VBCoInst.cpp \
34 VBCoInst.def \
35 VBCoInst.rc
36
37PROGRAMS += VBoxDrvInst
38VBoxDrvInst_TEMPLATE= VBOXGUESTR3EXE
39VBoxDrvInst_DEFS = _WIN32_WINNT=0x0400 _UNICODE UNICODE
40VBoxDrvInst_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
41VBoxDrvInst_DEPS = $(VBOX_SVN_REV_KMK)
42VBoxDrvInst_SDKS = WINPSDK W2K3DDK
43VBoxDrvInst_LIBS = \
44 $(PATH_SDK_W2K3DDK_LIB)/setupapi.lib \
45 $(PATH_SDK_W2K3DDK_LIB)/newdev.lib
46VBoxDrvInst_SOURCES = \
47 VBoxDrvInst.cpp \
48 VBoxDrvInst.rc
49
50PROGRAMS += VBoxGuestDrvInst
51VBoxGuestDrvInst_TEMPLATE= VBOXGUESTR3EXE
52VBoxGuestDrvInst_DEFS = _WIN32_WINNT=0x0400 UNICODE
53VBoxGuestDrvInst_SOURCES = \
54 VBoxGuestDrvInst.cpp \
55 VBoxGuestDrvInst.rc
56
57PROGRAMS += RegCleanup
58RegCleanup_TEMPLATE = VBOXGUESTR3EXE
59RegCleanup_DEFS = _WIN32_WINNT=0x0400 UNICODE
60RegCleanup_SOURCES = \
61 RegCleanup.cpp \
62 RegCleanup.rc
63
64
65#
66# The installer.
67#
68PACKING += $(PATH_BIN)/additions/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH).exe
69OTHER_CLEAN += \
70 $(PATH_BIN)/additions/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH).exe \
71 $(PATH_BIN)/additions/VBoxWHQLFake.exe
72
73DRIVER_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
86ifeq ($(KBUILD_TARGET_ARCH),x86)
87DRIVER_FILES += \
88 $(PATH_BIN)/additions/VBoxMouseNT.sys \
89 $(PATH_BIN)/additions/VBoxGuestNT.sys
90endif
91DRIVER_FILES += \
92 $(PATH_BIN)/additions/VBoxVideo.inf \
93 $(PATH_BIN)/additions/VBoxGuest.inf
94ifdef VBOX_SIGN_ADDITIONS
95DRIVER_FILES += \
96 $(PATH_BIN)/additions/VBoxVideo.cat \
97 $(PATH_BIN)/additions/VBoxGuest.cat
98endif
99ifdef VBOX_WITH_CROGL
100DRIVER_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
120endif
121
122VB_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
144ifdef 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#
149OTHER_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
168OTHER_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,$@)
175endif
176
177WHQLFAKE := $(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
206include $(KBUILD_PATH)/subfooter.kmk
207
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