VirtualBox

source: vbox/trunk/src/VBox/Installer/darwin/Makefile.kmk@ 31969

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

Installer-OSX: make libqtaccessiblewidgets optional

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 54.7 KB
Line 
1# $Id: Makefile.kmk 31969 2010-08-25 18:49:04Z vboxsync $
2## @file
3# Install misc stuff and create dist packages for Mac OS X.
4#
5
6#
7# Copyright (C) 2006-2010 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#
22# Include sub-makefiles.
23#
24ifndef VBOX_OSE
25 include $(PATH_SUB_CURRENT)/InstallerPlugins/Makefile.kmk
26endif
27
28
29#
30# Globals
31#
32VBOX_PATH_DI_SRC := $(PATH_SUB_CURRENT)
33VBOX_DI_OUT_DIR := $(PATH_TARGET)/Installer/darwin
34BLDDIRS += $(VBOX_DI_OUT_DIR)
35
36ifdef VBOX_WITH_COMBINED_PACKAGE
37 ifeq ($(KBUILD_TARGET_ARCH),x86)
38 VBOX_PATH_DIST_32 = $(VBOX_PATH_DIST)
39 VBOX_PATH_DIST_64 = $(PATH_OUT_BASE)/darwin.amd64/$(KBUILD_TYPE)/dist
40 else
41 VBOX_PATH_DIST_64 = $(VBOX_PATH_DIST)
42 VBOX_PATH_DIST_32 = $(PATH_OUT_BASE)/darwin.x86/$(KBUILD_TYPE)/dist
43 endif
44 VBOX_DI_FN_DEP_BOTH = $(VBOX_PATH_DIST_32)/$1 $(VBOX_PATH_DIST_64)/$2
45 VBOX_DI_FN_DEP_32 = $(VBOX_PATH_DIST_32)/$1
46 VBOX_DI_FN_DEP_64 = $(VBOX_PATH_DIST_64)/$1
47 VBOX_DI_LIPO = lipo
48else
49 VBOX_DI_FN_DEP_BOTH = $(VBOX_PATH_DIST)/$1
50 ifeq ($(KBUILD_TARGET_ARCH),x86)
51 VBOX_DI_FN_DEP_32 = $(VBOX_PATH_DIST)/$1
52 VBOX_DI_FN_DEP_64 =
53 else
54 VBOX_DI_FN_DEP_64 = $(VBOX_PATH_DIST)/$1
55 VBOX_DI_FN_DEP_32 =
56 endif
57endif
58
59# Unset this to speed up things during makefile hacking.
60VBOX_DARWIN_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
61
62# The location of the PackageMaker program.
63ifndef VBOX_PACKAGEMAKER
64 VBOX_PACKAGEMAKER := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS)/darwin.x86/packagemaker/v*/PackageMaker.app/Contents/MacOS/PackageMaker)) \
65 /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker)
66endif
67
68# Where we do the packing (override this in LocalConfig.kmk if building on smbfs).
69ifndef VBOX_PATH_PACK_TMP
70 VBOX_PATH_PACK_TMP := $(VBOX_DI_OUT_DIR)
71endif
72
73# These tools are necessary
74## @Todo rename to VBOX_DI_XYZ these conflict with other globals.
75TAR=/usr/bin/tar
76ZIP=/usr/bin/zip
77GZIP=/usr/bin/gzip
78BZIP2=/usr/bin/bzip2
79GREP=/usr/bin/grep
80XARGS=/usr/bin/xargs
81UNZIP=/usr/bin/unzip
82AWK=/usr/bin/awk
83HDIUTIL=/usr/bin/hdiutil
84
85#
86# Install the darwin docs/license.
87#
88INSTALLS += darwin-docs
89darwin-docs_INST = $(INST_DIST)
90darwin-docs_MODE = a+r,u+w
91darwin-docs_SOURCES = \
92 $(VBOX_BRAND_LICENSE_TXT)=>LICENSE
93
94
95#
96# The packing.
97#
98PACKING += $(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)-r$(VBOX_SVN_REV).dmg
99ifdef VBOX_WITH_BUNDLED_INSTALLER
100 PACKING += $(VBOX_PATH_DIST)/VBoxMacBundleInstaller-$(KBUILD_TARGET_ARCH).zip
101endif
102ifdef VBOX_WITH_BUNDLED_ISO
103iso: $(if $(eq $(filter CD,$(VBOX_BRAND_MEDIA)),CD),$(VBOX_PATH_DIST)/VirtualBox.iso,) \
104 $(if $(eq $(filter DVD,$(VBOX_BRAND_MEDIA)),DVD),$(VBOX_PATH_DIST)/VirtualBoxBundle.iso,)
105endif
106#OTHER_CLEAN = TODO
107
108
109include $(KBUILD_PATH)/subfooter.kmk
110
111
112#
113# We're running commands as root here, take some care and assertion
114# a sane environment.
115#
116ifeq ($(strip $(VBOX_PATH_DIST)),)
117 $(error VBOX_PATH_DIST=$(VBOX_PATH_DIST))
118endif
119ifeq ($(strip $(VBOX_PATH_DIST)),/)
120 $(error VBOX_PATH_DIST=$(VBOX_PATH_DIST))
121endif
122ifeq ($(strip $(VBOX_PATH_PACK_TMP)),)
123 $(error VBOX_PATH_PACK_TMP=$(VBOX_PATH_PACK_TMP))
124endif
125ifeq ($(strip $(VBOX_PATH_PACK_TMP)),/)
126 $(error VBOX_PATH_PACK_TMP=$(VBOX_PATH_PACK_TMP))
127endif
128
129
130# Check for additional manuals
131VBOX_ADD_MANUALS := $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_$(f).pdf)
132
133VBOX_ADD_MANUAL_de_DE := $(filter $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_de_DE.pdf,$(VBOX_ADD_MANUALS))
134VBOX_ADD_MANUAL_fr_FR := $(filter $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_fr_FR.pdf,$(VBOX_ADD_MANUALS))
135
136#
137# The disk image.
138#
139$(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)-r$(VBOX_SVN_REV).dmg: \
140 $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.mpkg \
141 $(VBOX_BRAND_DARWIN_DISKIMAGE_BG) \
142 $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE) \
143 $$(wildcard $(VBOX_PATH_DI_SRC)/DiskImage/*) \
144 $(if $(VBOX_WITH_DOCS_PACKING), \
145 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf \
146 $(VBOX_ADD_MANUALS)) \
147 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
148 $(call MSG_TOOL,hdiutil,,,$@)
149 @# Cleanup any previously failed attempts and various trash.
150 sudo rm -Rf $(VBOX_PATH_PACK_TMP)/DiskImage.tmp
151 $(MKDIR) -p $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/
152 sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.mpkg $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/
153 sudo rm -Rf \
154 $@ \
155 $(VBOX_PATH_PACK_TMP)/DiskImage/
156 sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage.tmp $(VBOX_PATH_PACK_TMP)/DiskImage
157 @# Populate the image with uninstaller, readme, picture, and .VolumeIcon.icns. (TODO)
158 $(INSTALL) $(VBOX_PATH_DI_SRC)/DiskImage/VirtualBox_Uninstall.tool $(VBOX_PATH_PACK_TMP)/DiskImage/
159ifeq (1,1)
160 @# Pedantic mode...
161 $(INSTALL) -m 644 $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE) $(VBOX_PATH_PACK_TMP)/DiskImage/.DS_Store
162 $(MKDIR) $(VBOX_PATH_PACK_TMP)/DiskImage/.background
163 $(INSTALL) -m 644 $(VBOX_BRAND_DARWIN_DISKIMAGE_BG) $(VBOX_PATH_PACK_TMP)/DiskImage/.background/vbox_folder.tiff
164 ifdef VBOX_WITH_BUNDLED_INSTALLER
165 $(if $(VBOX_WITH_DOCS_PACKING), \
166 $(INSTALL) -m 644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf $(VBOX_PATH_PACK_TMP)/DiskImage/User\ Manual.pdf$(NLTAB) \
167 $(if $(VBOX_ADD_MANUAL_de_DE),$(INSTALL) -m 644 $(VBOX_ADD_MANUAL_de_DE) "$(VBOX_PATH_PACK_TMP)/DiskImage/$(VBOX_BRAND_de_DE_MANUAL_NAME).pdf"$(NLTAB)) \
168 $(if $(VBOX_ADD_MANUAL_fr_FR),$(INSTALL) -m 644 $(VBOX_ADD_MANUAL_fr_FR) "$(VBOX_PATH_PACK_TMP)/DiskImage/$(VBOX_BRAND_fr_FR_MANUAL_NAME).pdf"$(NLTAB)))
169 # Rename the main package
170 else
171 $(if $(VBOX_WITH_DOCS_PACKING), $(INSTALL) $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf $(VBOX_PATH_PACK_TMP)/DiskImage/)
172 $(LN) -s /Applications/ $(VBOX_PATH_PACK_TMP)/DiskImage/Applications
173 endif
174endif
175 @# Change the owners.
176 sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/DiskImage
177 @# Create the image.
178 sudo hdiutil create -format UDBZ -volname "VirtualBox" -srcfolder "$(VBOX_PATH_PACK_TMP)/DiskImage" "$@"
179 @# Change (back) the owner so it can be deleted by the user.
180 sudo chown "$(shell whoami)" "$@"
181 sudo chown -R "$(shell whoami)" $(VBOX_PATH_PACK_TMP)/DiskImage
182
183#
184# The meta-package.
185#
186$(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.mpkg: \
187 $(VBOX_PATH_PACK_TMP)/Packages/VBoxStartupItems.pkg \
188 $(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg \
189 $(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg \
190 $(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg \
191 $$(TARGET_RegistrationPane) \
192 $(if $(VBOX_OSE), , \
193 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Info.plist \
194 $$(wildcard $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/*.lproj/*.strings \
195 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/*.lproj/RegistrationPane.nib/*.nib)) \
196 $$(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/* \
197 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/*.lproj/*) \
198 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
199 $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_HTML) \
200 $(VBOX_BRAND_$(f)_LICENSE_RTF) \
201 $(VBOX_BRAND_$(f)_REGISTRATIONPANE_INFOPLIST_STRINGS) \
202 $(VBOX_BRAND_$(f)_REGISTRATIONPANE_LOCALIZABLE_STRINGS)) \
203 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
204 $(call MSG_TOOL,PackageMaker,,,$@)
205 @# Cleanup any previously failed attempts.
206 sudo rm -Rf \
207 $@ \
208 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.root \
209 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc \
210 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res
211 @# Correct directory permissions are important.
212 $(MKDIR) -p \
213 $(@D) \
214 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc \
215 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res \
216 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj
217 @# Do keyword replacement in the package info and description files.
218 $(SED) \
219 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
220 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
221 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
222 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
223 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
224 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
225 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
226 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc/Info.plist \
227 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Info.plist
228 $(SED) \
229 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
230 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
231 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
232 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
233 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
234 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
235 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
236 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc/Description.plist \
237 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Description.plist
238 $(SED) \
239 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
240 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
241 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
242 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
243 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
244 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
245 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
246 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/Welcome.html \
247 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Welcome.html
248 @# Copy the resources.
249# $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/ReadMe.html $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/ReadMe.html
250 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Conclusion.html $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/Conclusion.html
251 $(SED) \
252 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
253 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
254 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
255 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/Localizable.strings \
256 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Localizable.strings
257 $(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_RTF) $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/License.rtf
258 $(INSTALL) -m 0644 $(VBOX_BRAND_DARWIN_INSTALLER_BG) $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/background.tif
259 $(INSTALL) -m 0766 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/checkforrunningvms $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/checkforrunningvms
260 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
261 $(MKDIR) -p \
262 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
263 $(SED) \
264 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
265 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
266 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
267 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
268 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Welcome.html \
269 $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_HTML)$(NLTAB) \
270 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_LICENSE_RTF) $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/License.rtf$(NLTAB) \
271 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_VIRTUALBOX_CONCLUSION_HTML) $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Conclusion.html$(NLTAB) \
272 $(SED) \
273 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
274 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
275 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
276 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Localizable.strings \
277 $(VBOX_BRAND_$(f)_VIRTUALBOX_LOCALIZABLE_STRINGS)$(NLTAB) \
278 )
279 @# Build the package.
280 $(VBOX_PACKAGEMAKER) -build -v \
281 -p $@ \
282 -r $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res \
283 -i $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc/Info.plist \
284 -d $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc/Description.plist \
285 -mi $(VBOX_PATH_PACK_TMP)/Packages
286 @# Copy the plugins.
287 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/distribution.dist $@/Contents/
288ifndef VBOX_OSE
289 $(MKDIR) -p $@/Contents/Plugins/
290ifdef VBOX_WITH_SERIALNUMBER_INSTALL
291 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/InstallerSections.plist $@/Contents/Plugins/InstallerSections.plist
292else
293 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/InstallerSections.plist $@/Contents/Plugins/InstallerSections.plist.off
294endif
295 @# Copy the Registration Pane plugin.
296 $(MKDIR) -p $@/Contents/Plugins/RegistrationPane.bundle/Contents/MacOS/
297 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Info.plist $@/Contents/Plugins/RegistrationPane.bundle/Contents/
298 $(INSTALL) -m 0644 $(TARGET_RegistrationPane) $@/Contents/Plugins/RegistrationPane.bundle/Contents/MacOS/
299 $(MKDIR) -p $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/RegistrationPane.nib
300 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/English.lproj/InfoPlist.strings $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/
301 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/English.lproj/Localizable.strings $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/
302 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/English.lproj/RegistrationPane.nib/classes.nib $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/RegistrationPane.nib/
303 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/English.lproj/RegistrationPane.nib/info.nib $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/RegistrationPane.nib/
304 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/English.lproj/RegistrationPane.nib/keyedobjects.nib $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/RegistrationPane.nib/
305 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
306 $(MKDIR) -p \
307 $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
308 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_REGISTRATIONPANE_INFOPLIST_STRINGS) $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/InfoPlist.strings$(NLTAB) \
309 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_REGISTRATIONPANE_LOCALIZABLE_STRINGS) $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Localizable.strings$(NLTAB) \
310 )
311endif
312 @# Cleanup.
313 sudo rm -Rf \
314 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.root \
315 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc \
316 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res
317
318
319
320#
321# The VirtualBox Kernel extensions.
322#
323VBOX_DI_KEXTS_UNIVERSAL = VBoxDrv VBoxNetFlt VBoxNetAdp VBoxUSB
324VBOX_DI_KEXTS = $(VBOX_DI_KEXTS_UNIVERSAL)
325
326$(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg: \
327 $(foreach kext,$(VBOX_DI_KEXTS_UNIVERSAL), $(call VBOX_DI_FN_DEP_BOTH,$(kext).kext/Contents/MacOS/$(kext))) \
328 $(foreach kext,$(VBOX_DI_KEXTS), $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist) \
329 $$(wildcard $(VBOX_PATH_DI_SRC)/VBoxKEXTs/* \
330 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/*.lproj/*) \
331 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
332 $(VBOX_BRAND_$(f)_VBOXKEXTS_DESCRIPTION_PLIST) \
333 $(VBOX_BRAND_$(f)_VBOXKEXTS_README_HTML) \
334 $(VBOX_BRAND_$(f)_VBOXKEXTS_INSTALLATIONCHECK_STRINGS) \
335 $(VBOX_BRAND_$(f)_LICENSE_RTF)) \
336 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
337 $(call MSG_TOOL,PackageMaker,,,$@)
338 @# Cleanup any previously failed attempts.
339 sudo rm -Rf \
340 $@ \
341 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
342 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
343 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res
344 @# Correct directory permissions are important.
345 $(MKDIR) -p \
346 $(@D) \
347 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
348 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \
349 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj
350 $(MKDIR) -p -m 1775 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library
351 $(MKDIR) -p -m 0755 \
352 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions \
353 $(foreach kext,$(VBOX_DI_KEXTS), \
354 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext \
355 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents \
356 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents/MacOS )
357 @# Copy the common files (Info.plist).
358 $(foreach kext,$(VBOX_DI_KEXTS), \
359 $(NLTAB)$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents/)
360 @# Copy the binaries, invoking lipo and strip.
361ifdef VBOX_WITH_COMBINED_PACKAGE
362 $(foreach kext,$(VBOX_DI_KEXTS_UNIVERSAL), \
363 $(NLTAB)$(VBOX_DI_LIPO) -create \
364 $(VBOX_PATH_DIST_32)/$(kext).kext/Contents/MacOS/$(kext) \
365 $(VBOX_PATH_DIST_64)/$(kext).kext/Contents/MacOS/$(kext) \
366 -output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents/MacOS/$(kext))
367else
368 $(foreach kext,$(VBOX_DI_KEXTS), \
369 $(NLTAB)$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/$(kext).kext/Contents/MacOS/$(kext) $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents/MacOS/)
370endif
371if1of ($(KBUILD_TYPE), release)
372 $(foreach kext,$(VBOX_DI_KEXTS), \
373 $(NLTAB)strip -uX $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents/MacOS/$(kext))
374endif
375 @# Set the correct owners.
376 sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library
377 sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions
378 @# Do keyword replacement in the package info and description files.
379 $(SED) \
380 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
381 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
382 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
383 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
384 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
385 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
386 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
387 --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/Info.plist \
388 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/Info.plist
389 $(SED) \
390 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
391 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
392 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
393 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
394 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
395 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
396 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
397 --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/Description.plist \
398 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/Description.plist
399 $(SED) \
400 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
401 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
402 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
403 --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj/ReadMe.html \
404 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/ReadMe.html
405 @# Copy the resources.
406 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/InstallationCheck $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/
407 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/postflight $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/
408 $(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_RTF) $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj/License.rtf
409 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
410 $(MKDIR) -p \
411 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
412 $(SED) \
413 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
414 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
415 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
416 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
417 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
418 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
419 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
420 --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Description.plist \
421 $(VBOX_BRAND_$(f)_VBOXKEXTS_DESCRIPTION_PLIST)$(NLTAB) \
422 $(SED) \
423 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
424 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
425 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
426 --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/ReadMe.html \
427 $(VBOX_BRAND_$(f)_VBOXKEXTS_README_HTML)$(NLTAB) \
428 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_VBOXKEXTS_INSTALLATIONCHECK_STRINGS) $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/InstallationCheck.strings$(NLTAB) \
429 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_LICENSE_RTF) $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/License.rtf$(NLTAB) \
430 )
431 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/English.lproj/InstallationCheck.strings $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj/
432 @# Build the package.
433 $(VBOX_PACKAGEMAKER) -build -v \
434 -p $@ \
435 -f $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
436 -r $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \
437 -i $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/Info.plist \
438 -d $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/Description.plist
439 @# Cleanup
440 sudo rm -Rf \
441 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
442 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
443 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res
444
445
446#
447# The VirtualBox Startupitems.
448#
449$(VBOX_PATH_PACK_TMP)/Packages/VBoxStartupItems.pkg: \
450 $$(wildcard $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/* \
451 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/Resources/*.lproj/*) \
452 $$(wildcard $(VBOX_PATH_DI_SRC)/VBoxStartupItems/* \
453 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/*.lproj/*) \
454 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
455 $(VBOX_BRAND_$(f)_VBOXSTARTUPITEMS_DESCRIPTION_PLIST) \
456 $(VBOX_BRAND_$(f)_LICENSE_RTF)) \
457 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
458 $(call MSG_TOOL,PackageMaker,,,$@)
459 @# Cleanup any previously failed attempts.
460 sudo rm -Rf \
461 $@ \
462 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root \
463 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc \
464 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res
465 @# Correct directory permissions are important.
466 $(MKDIR) -p \
467 $(@D) \
468 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc \
469 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res \
470 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res/English.lproj
471 $(MKDIR) -p -m 0775 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library
472 $(MKDIR) -p -m 0755 \
473 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems \
474 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox \
475 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/Resources \
476 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/Resources/English.lproj
477 @# Copy the files.
478 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/StartupParameters.plist $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/
479 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/VirtualBox $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/
480 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/Resources/English.lproj/Localizable.strings $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/Resources/English.lproj/
481 @# Set the correct owners.
482 sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library
483 sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems
484 @# Do keyword replacement in the package info and description files.
485 $(SED) \
486 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
487 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
488 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
489 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
490 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
491 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
492 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
493 --output $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc/Info.plist \
494 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/Info.plist
495 $(SED) \
496 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
497 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
498 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
499 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
500 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
501 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
502 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
503 --output $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc/Description.plist \
504 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/Description.plist
505 @# Copy the resources.
506 $(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_RTF) $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res/English.lproj/License.rtf
507 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
508 $(MKDIR) -p \
509 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
510 $(SED) \
511 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
512 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
513 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
514 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
515 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
516 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
517 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
518 --output $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Description.plist \
519 $(VBOX_BRAND_$(f)_VBOXSTARTUPITEMS_DESCRIPTION_PLIST)$(NLTAB) \
520 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_LICENSE_RTF) $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/License.rtf$(NLTAB) \
521 )
522 @# Build the package.
523 $(VBOX_PACKAGEMAKER) -build -v \
524 -p $@ \
525 -f $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root \
526 -r $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res \
527 -i $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc/Info.plist \
528 -d $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc/Description.plist
529 @# Cleanup
530 sudo rm -Rf \
531 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root \
532 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc \
533 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res
534
535
536#
537# Figure out which languages that we support and construct
538# .qm and .lproj lists for these.
539#
540include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
541VBOX_INSTALL_LANG_FILES := $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES), VirtualBox_$(f).qm qt_$(f).qm)
542VBOX_INSTALL_LANG_LPROJ := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
543
544
545#
546# The VirtualBox Application.
547#
548VBOX_DI_VBAPP_QTMODS = \
549 QtCore QtGui QtNetwork
550
551ifdef VBOX_GUI_USE_QGL
552 VBOX_DI_VBAPP_QTMODS += QtOpenGL
553endif
554
555VBOX_DI_VBAPP_DYLIBS = \
556 $(foreach qtmod, $(VBOX_DI_VBAPP_QTMODS), Frameworks/$(qtmod)$(VBOX_QT4_INFIX).framework/Versions/4/$(qtmod)$(VBOX_QT4_INFIX)) \
557 MacOS/VBoxDD.dylib \
558 MacOS/VBoxDD2.dylib \
559 MacOS/VBoxDDU.dylib \
560 MacOS/VBoxREM.dylib \
561 MacOS/VBoxRT.dylib \
562 MacOS/VBoxSharedFolders.dylib \
563 MacOS/VBoxSharedClipboard.dylib \
564 MacOS/VBoxGuestPropSvc.dylib \
565 MacOS/VBoxVMM.dylib \
566 MacOS/VBoxXPCOM.dylib \
567 MacOS/VBoxXPCOMC.dylib \
568 MacOS/components/VBoxC.dylib \
569 MacOS/components/VBoxSVCM.dylib \
570 MacOS/components/VBoxXPCOMIPCC.dylib
571ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/libqtaccessiblewidgets.dylib),)
572 VBOX_DI_VBAPP_DYLIBS += \
573 MacOS/accessible/libqtaccessiblewidgets.dylib
574endif
575ifdef VBOX_WITH_GUEST_CONTROL
576 VBOX_DI_VBAPP_DYLIBS += \
577 MacOS/VBoxGuestControlSvc.dylib
578endif
579ifdef VBOX_WITH_VRDP
580 VBOX_DI_VBAPP_DYLIBS += \
581 MacOS/VBoxVRDP.dylib \
582 MacOS/VRDPAuth.dylib \
583 MacOS/VRDPAuthSimple.dylib
584endif
585ifdef VBOX_WITH_CROGL
586 VBOX_DI_VBAPP_DYLIBS += \
587 MacOS/VBoxOGLhostcrutil.dylib \
588 MacOS/VBoxOGLhosterrorspu.dylib \
589 MacOS/VBoxOGLrenderspu.dylib \
590 MacOS/VBoxSharedCrOpenGL.dylib
591endif
592ifdef VBOX_WITH_DEBUGGER_GUI
593 VBOX_DI_VBAPP_DYLIBS += \
594 MacOS/VBoxDbg.dylib
595endif
596ifdef VBOX_WITH_HARDENING
597 VBOX_DI_VBAPP_DYLIBS += \
598 MacOS/VirtualBox.dylib \
599 MacOS/VBoxNetDHCP.dylib \
600 MacOS/VBoxHeadless.dylib
601endif
602ifdef VBOX_WITH_HDDPARALLELS_INSTALL
603 VBOX_DI_VBAPP_DYLIBS += \
604 MacOS/VBoxHDDParallels.dylib
605endif
606if defined(VBOX_WITH_PYTHON) && !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6)
607 VBOX_DI_VBAPP_DYLIBS += \
608 MacOS/VBoxPython2_6.so
609endif
610
611VBOX_DI_VBAPP_DYLIBS.x86 := \
612 MacOS/VBoxREM32.dylib \
613 MacOS/VBoxREM64.dylib
614ifdef VBOX_WITH_PYTHON
615 VBOX_DI_VBAPP_DYLIBS.x86 += \
616 MacOS/VBoxPython2_5.so \
617 $(if-expr defined(VBOX_WITH_MAC_OS_X_10_4_SUPPORT),MacOS/VBoxPython2_3.so,)
618endif
619
620VBOX_DI_VBAPP_DYLIBS.amd64 :=
621if defined(VBOX_WITH_PYTHON) && defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6)
622 VBOX_DI_VBAPP_DYLIBS.amd64 += \
623 MacOS/VBoxPython2_6.so
624endif
625
626if defined(VBOX_WITH_JXPCOM)
627 VBOX_DI_VBAPP_DYLIBS += \
628 MacOS/libvboxjxpcom.jnilib
629endif
630
631if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64), $(VBOX_DI_VBAPP_DYLIBS.x86))
632 $(error Conflict.$(NLTAB)VBOX_DI_VBAPP_DYLIBS.amd64=$(VBOX_DI_VBAPP_DYLIBS.amd64)$(NLTAB)VBOX_DI_VBAPP_DYLIBS.x86 =$(VBOX_DI_VBAPP_DYLIBS.x86))
633endif
634if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_DYLIBS.x86),$(VBOX_DI_VBAPP_DYLIBS))
635 $(error Conflict.$(NLTAB)VBOX_DI_VBAPP_DYLIBS.amd64=$(VBOX_DI_VBAPP_DYLIBS.amd64)$(NLTAB)VBOX_DI_VBAPP_DYLIBS.x86 =$(VBOX_DI_VBAPP_DYLIBS.x86)$(NLTAB)VBOX_DI_VBAPP_DYLIBS=$(VBOX_DI_VBAPP_DYLIBS))
636endif
637
638VBOX_DI_VBAPP_PROGS = \
639 MacOS/VBoxManage \
640 MacOS/VBoxSVC \
641 MacOS/VBoxHeadless \
642 MacOS/VBoxXPCOMIPCD \
643 MacOS/VirtualBox \
644 MacOS/VirtualBoxVM \
645 MacOS/VBoxNetAdpCtl \
646 MacOS/VBoxNetDHCP
647ifdef VBOX_WITH_WEBSERVICES
648 VBOX_DI_VBAPP_PROGS += \
649 MacOS/vboxwebsrv
650endif
651
652VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS = \
653 MacOS/VMMR0.r0 \
654 MacOS/VBoxDDR0.r0 \
655 MacOS/VBoxDD2R0.r0
656
657VBOX_DI_VBAPP_OTHER_BINS = \
658 MacOS/VMMGC.gc \
659 MacOS/VBoxDDGC.gc \
660 MacOS/VBoxDD2GC.gc
661
662VBOX_DI_VBAPP_MISC_FILES = \
663 Resources/VirtualBoxVM.app/Contents/Info.plist \
664 Resources/VirtualBoxVM.app/Contents/PkgInfo \
665 Info.plist \
666 PkgInfo \
667 Resources/virtualbox.icns \
668 MacOS/components/VBoxXPCOMBase.xpt \
669 MacOS/components/VirtualBox_XPCOM.xpt
670ifdef VBOX_WITH_DOCS_PACKING
671VBOX_DI_VBAPP_MISC_FILES += \
672 MacOS/UserManual.pdf
673endif
674ifdef VBOX_WITH_ADDITIONS_PACKING
675VBOX_DI_VBAPP_MISC_FILES += \
676 MacOS/VBoxGuestAdditions.iso
677endif
678ifdef VBOX_WITH_EFIFW_PACKING
679VBOX_DI_VBAPP_MISC_FILES += \
680 MacOS/VBoxEFI32.fd \
681 MacOS/VBoxEFI64.fd
682endif
683ifdef VBOX_WITH_COCOA_QT
684VBOX_DI_VBAPP_MISC_FILES += \
685 Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/classes.nib \
686 Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/info.nib \
687 Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/keyedobjects.nib
688endif
689
690VBOX_DI_VBAPP_SYMLINKS = \
691 Resources/VirtualBoxVM.app/Contents/MacOS=>../../../MacOS/ \
692 Resources/VirtualBoxVM.app/Contents/Resources=>../../../Resources/ \
693 $(foreach qtmod, $(VBOX_DI_VBAPP_QTMODS), Frameworks/$(qtmod)$(VBOX_QT4_INFIX).framework/$(qtmod)$(VBOX_QT4_INFIX)=>Versions/4/$(qtmod)$(VBOX_QT4_INFIX))
694ifdef VBOX_WITH_COCOA_QT
695VBOX_DI_VBAPP_SYMLINKS += \
696 Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Resources=>Versions/4/Resources/
697endif
698
699ifdef VBOX_WITH_PYTHON
700 # Python XPCOM glue
701 VBOX_DI_VBAPP_PYTHON_FILES = \
702 $(foreach f,$(notdir $(wildcard $(VBOX_PATH_DIST)/sdk/bindings/xpcom/python/xpcom/*.py)),sdk/bindings/xpcom/python/xpcom/$(f)) \
703 sdk/bindings/xpcom/python/xpcom/client/__init__.py \
704 sdk/bindings/xpcom/python/xpcom/server/__init__.py \
705 sdk/bindings/xpcom/python/xpcom/server/enumerator.py \
706 sdk/bindings/xpcom/python/xpcom/server/factory.py \
707 sdk/bindings/xpcom/python/xpcom/server/loader.py \
708 sdk/bindings/xpcom/python/xpcom/server/module.py \
709 sdk/bindings/xpcom/python/xpcom/server/policy.py \
710 sdk/installer/vboxapisetup.py \
711 sdk/installer/vboxapi/__init__.py \
712 sdk/installer/vboxapi/VirtualBox_constants.py
713endif
714
715
716# (The dependencies are including way too much here because I'm lazy.)
717$(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg: \
718 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
719 $(VBOX_BRAND_$(f)_VIRTUALBOX_DESCRIPTION_PLIST) \
720 $(VBOX_BRAND_$(f)_LICENSE_RTF)) \
721 $(foreach f, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_OTHER_BINS) $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_MISC_FILES)\
722 ,$(call VBOX_DI_FN_DEP_BOTH,VirtualBox.app/Contents/$(f)) ) \
723 $(foreach f, $(VBOX_DI_VBAPP_DYLIBS.x86) $(VBOX_DI_VBAPP_MISC_FILES.x86)\
724 ,$(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/$(f)) ) \
725 $(foreach f, $(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_MISC_FILES.amd64)\
726 ,$(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/$(f)) ) \
727 \
728 $(if $(VBOX_WITH_DOCS_PACKING),$(VBOX_ADD_MANUALS),) \
729 $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*) \
730 $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*.lproj/*) \
731 $$(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/,$(VBOX_INSTALL_LANG_FILES)) \
732 \
733 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/*) \
734 $(filter-out Disabled, $(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/*)) \
735 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*) \
736 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/*) \
737 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*) \
738 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*.lproj/*) \
739 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*.lproj/*) \
740 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/*) \
741 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/additions/*) \
742 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/components/*) \
743 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/*) \
744 $(if-expr defined(VBOX_WITH_PYTHON), $(addprefix $(VBOX_PATH_DIST)/, $(VBOX_DI_VBAPP_PYTHON_FILES)),) \
745 $(if-expr defined(VBOX_WITH_JXPCOM), $(addprefix $(VBOX_PATH_DIST)/, sdk/bindings/xpcom/java/vboxjxpcom.jar),) \
746 $(if $(VBOX_WITH_WEBSERVICES),$(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist,) \
747 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
748 $(call MSG_TOOL,PackageMaker,,,$@)
749 @# Cleanup any previously failed attempts.
750 sudo rm -Rf \
751 $@ \
752 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
753 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
754 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res
755 @# Correct directory permissions are important.
756 $(MKDIR) -p \
757 $(@D) \
758 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
759 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \
760 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/English.lproj
761 $(MKDIR) -p -m 0775 \
762 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications
763 $(MKDIR) -p -m 0755 $(sort \
764 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents \
765 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS \
766 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/components \
767 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/nls \
768 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/accessible \
769 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources \
770 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app \
771 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents \
772 $(if-expr defined(VBOX_WITH_PYTHON), \
773 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk \
774 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/installer \
775 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/installer/vboxapi \
776 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/ \
777 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom \
778 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/python \
779 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/python/xpcom \
780 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/client \
781 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/server,) \
782 $(if-expr defined(VBOX_WITH_JXPCOM), \
783 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/java,) \
784 $(addprefix $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/,$(dir \
785 $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_OTHER_BINS) $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_MISC_FILES) \
786 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "amd64",$(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_MISC_FILES.amd64),) \
787 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "x86", $(VBOX_DI_VBAPP_DYLIBS.x86) $(VBOX_DI_VBAPP_MISC_FILES.x86),) \
788 ))\
789 )
790 @# Create the .lproj language directories
791 $(MKDIR) -p -m 0755 \
792 $(addprefix $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/,$(VBOX_INSTALL_LANG_LPROJ))
793 @# Install all supported language files
794 $(foreach f, $(VBOX_INSTALL_LANG_FILES) \
795 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/nls/$(f)$(NLTAB))
796ifdef VBOX_WITH_WEBSERVICES
797 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/
798endif
799 @# Install the python stuff
800ifdef VBOX_WITH_PYTHON
801 $(foreach f,$(VBOX_DI_VBAPP_PYTHON_FILES) \
802 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(f)$(NLTAB) )
803 $(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS
804endif
805ifdef VBOX_WITH_JXPCOM
806 $(INSTALL) -m 0755 $(VBOX_PATH_DIST)/sdk/bindings/xpcom/java/vboxjxpcom.jar $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/java/vboxjxpcom.jar
807endif
808 @# Copy misc files.
809 $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES) \
810 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )
811ifdef VBOX_WITH_COMBINED_PACKAGE
812 $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES.x86) \
813 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )
814 $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES.amd64) \
815 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )
816endif
817ifdef VBOX_WITH_DOCS_PACKING
818 $(foreach f,$(VBOX_ADD_MANUALS) \
819 ,$(INSTALL) -m 0644 $(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(NLTAB))
820endif
821 @# Create symlinks.
822ifdef VBOX_WITH_COMBINED_PACKAGE
823 $(foreach symlink,$(VBOX_DI_VBAPP_SYMLINKS) $(VBOX_DI_VBAPP_SYMLINKS.amd64) $(VBOX_DI_VBAPP_SYMLINKS.x86) \
824 ,$(LN) -s $(word 2,$(subst =>, ,$(symlink))) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(word 1,$(subst =>, ,$(symlink)))$(NLTAB))
825else
826 $(foreach symlink,$(VBOX_DI_VBAPP_SYMLINKS) $(VBOX_DI_VBAPP_SYMLINKS.$(KBUILD_TARGET_ARCH)) \
827 ,$(LN) -s $(word 2,$(subst =>, ,$(symlink))) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(word 1,$(subst =>, ,$(symlink)))$(NLTAB))
828endif
829 @# Copy the dylibs.
830ifdef VBOX_WITH_COMBINED_PACKAGE
831 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) \
832 ,$(VBOX_DI_LIPO) -create \
833 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(dylib) \
834 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(dylib) \
835 -output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))
836 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS.x86) \
837 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))
838 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS.amd64) \
839 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))
840else
841 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
842 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))
843endif
844 @# Copy the other binaries.
845ifdef VBOX_WITH_COMBINED_PACKAGE
846 $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \
847 ,$(VBOX_DI_LIPO) -create \
848 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(otherbin) \
849 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(otherbin) \
850 -output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)$(NLTAB))
851 $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_BINS) \
852 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)-x86$(NLTAB) \
853 $(INSTALL) -m 0644 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)-amd64$(NLTAB))
854else
855 $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_BINS) $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \
856 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)-$(KBUILD_TARGET_ARCH)$(NLTAB))
857endif
858 @# Copy the binaries.
859ifdef VBOX_WITH_COMBINED_PACKAGE
860 $(foreach prog, $(VBOX_DI_VBAPP_PROGS) \
861 ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(prog) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(prog)-x86$(NLTAB) \
862 $(INSTALL) -m 0755 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(prog) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(prog)-amd64$(NLTAB))
863else
864 $(foreach prog, $(VBOX_DI_VBAPP_PROGS) \
865 ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(prog) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(prog)-$(KBUILD_TARGET_ARCH)$(NLTAB))
866endif
867 @# Create symlinks for all the binaries (corrected by postflight and the VirtualBox StartupItem to hardlinks).
868ifdef VBOX_WITH_COMBINED_PACKAGE
869 $(foreach bin, $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_OTHER_BINS) \
870 ,$(LN) -s $(bin)-x86 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(bin)$(NLTAB))
871else
872 $(foreach bin, $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_OTHER_BINS) \
873 ,$(LN) -s $(bin)-$(KBUILD_TARGET_ARCH) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(bin)$(NLTAB))
874endif
875 @# Strip programs and dylibs.
876if1of ($(KBUILD_TYPE), release)
877 ifdef VBOX_WITH_COMBINED_PACKAGE
878 strip -SXru \
879 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_DYLIBS.x86) $(VBOX_DI_VBAPP_DYLIBS.amd64) \
880 ,$(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)) \
881 $(foreach bin, $(addsuffix -x86, $(VBOX_DI_VBAPP_PROGS)) $(addsuffix -amd64, $(VBOX_DI_VBAPP_PROGS)) \
882 ,$(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(bin))
883 else
884 strip -SXru \
885 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
886 ,$(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)) \
887 $(foreach bin, $(addsuffix -$(KBUILD_TARGET_ARCH), $(VBOX_DI_VBAPP_PROGS)) \
888 ,$(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(bin))
889 endif
890endif
891 @## @todo Strip the .r0 and .gc modules as well?
892#ifdef VBOX_WITH_HARDENING - disabled temporarily
893if 1
894 @# We cannot use @executable_path together with setuid binaries, dyld gets upset about it. So, fix Qt libs and users.
895 $(foreach qtmod, $(VBOX_DI_VBAPP_QTMODS) \
896 ,install_name_tool -id /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod)$(VBOX_QT4_INFIX).framework/Versions/4/$(qtmod)$(VBOX_QT4_INFIX) \
897 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Frameworks/$(qtmod)$(VBOX_QT4_INFIX).framework/Versions/4/$(qtmod)$(VBOX_QT4_INFIX)$(NLTAB) )
898 $(foreach f, \
899 $(VBOX_DI_VBAPP_DYLIBS) \
900 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE), \
901 $(VBOX_DI_VBAPP_DYLIBS.x86) \
902 $(VBOX_DI_VBAPP_DYLIBS.amd64) \
903 $(addsuffix -x86, $(VBOX_DI_VBAPP_PROGS)) \
904 $(addsuffix -amd64, $(VBOX_DI_VBAPP_PROGS)) \
905 ,$(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
906 $(addsuffix -$(KBUILD_TARGET_ARCH), $(VBOX_DI_VBAPP_PROGS)) \
907 ) \
908 ,install_name_tool \
909 $(foreach qtmod, $(VBOX_DI_VBAPP_QTMODS), \
910 -change @executable_path/../Frameworks/$(qtmod)$(VBOX_QT4_INFIX).framework/Versions/4/$(qtmod)$(VBOX_QT4_INFIX) \
911 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod)$(VBOX_QT4_INFIX).framework/Versions/4/$(qtmod)$(VBOX_QT4_INFIX) \
912 -change $(qtmod)$(VBOX_QT4_INFIX).framework/Versions/4/$(qtmod)$(VBOX_QT4_INFIX) \
913 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod)$(VBOX_QT4_INFIX).framework/Versions/4/$(qtmod)$(VBOX_QT4_INFIX) \
914 ) \
915 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )
916endif
917 @# Set the correct owner and set the set-user-ID-on-execution bit on the relevant executables.
918 sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root
919ifdef VBOX_WITH_HARDENING
920 ifdef VBOX_WITH_COMBINED_PACKAGE
921 sudo chmod u+s \
922 $(foreach bin,VBoxHeadless VirtualBox VirtualBoxVM VBoxNetAdpCtl VBoxNetDHCP,\
923 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(bin)-x86 \
924 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(bin)-amd64)
925 else
926 sudo chmod u+s \
927 $(foreach bin,VBoxHeadless VirtualBox VirtualBoxVM VBoxNetAdpCtl VBoxNetDHCP,\
928 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(bin)-$(KBUILD_TARGET_ARCH))
929 endif
930endif
931 @# Do keyword replacement in the package info and description files.
932 $(SED) \
933 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
934 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
935 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
936 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
937 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
938 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
939 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
940 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/Info.plist \
941 $(VBOX_PATH_DI_SRC)/VirtualBox/Info.plist
942 $(SED) \
943 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
944 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
945 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
946 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
947 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
948 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
949 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
950 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/Description.plist \
951 $(VBOX_PATH_DI_SRC)/VirtualBox/Description.plist
952 @# Copy the resources.
953 $(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_RTF) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/English.lproj/License.rtf
954 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \
955 ,$(MKDIR) -p \
956 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
957 $(SED) \
958 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
959 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
960 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
961 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
962 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
963 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
964 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
965 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Description.plist \
966 $(VBOX_BRAND_$(f)_VIRTUALBOX_DESCRIPTION_PLIST)$(NLTAB) \
967 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_LICENSE_RTF) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/License.rtf$(NLTAB) \
968 )
969 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/postflight $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/
970 @# Build the package.
971 $(VBOX_PACKAGEMAKER) -build -v \
972 -p $@ \
973 -f $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
974 -r $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \
975 -i $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/Info.plist \
976 -d $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/Description.plist
977 @# Cleanup
978 sudo rm -Rf \
979 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
980 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
981 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res
982
983#
984# The VirtualBox CLI wrapper scripts.
985#
986$(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg: \
987 $$(wildcard $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/* \
988 $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/*.lproj/*) \
989 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \
990 ,$(VBOX_BRAND_$(f)_VIRTUALBOXCLI_DESCRIPTION_PLIST) \
991 $(VBOX_BRAND_$(f)_LICENSE_RTF)) \
992 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
993 $(call MSG_TOOL,PackageMaker,,,$@)
994 @# Cleanup any previously failed attempts.
995 sudo rm -Rf \
996 $@ \
997 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
998 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
999 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res
1000 @# Correct directory permissions are important.
1001 $(MKDIR) -p \
1002 $(@D) \
1003 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
1004 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res \
1005 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/English.lproj
1006 $(MKDIR) -p -m 0755 \
1007 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr \
1008 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin
1009 @# Generate the wrapper scripts.
1010 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VirtualBox '#!/bin/bash'
1011 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VirtualBox 'exec /Applications/VirtualBox.app/Contents/MacOS/VirtualBox "$$@"'
1012 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxManage '#!/bin/bash'
1013 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxManage 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxManage "$$@"'
1014 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxVRDP '#!/bin/bash'
1015 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxVRDP 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"'
1016 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxHeadless '#!/bin/bash'
1017 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxHeadless 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"'
1018ifdef VBOX_WITH_WEBSERVICES
1019 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/vboxwebsrv '#!/bin/bash'
1020 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/vboxwebsrv 'exec /Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv "$$@"'
1021endif
1022 @# Set the correct owners and file permissions.
1023 sudo chmod 0755 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/*
1024 sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root
1025 sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr
1026 @# Do keyword replacement in the package info and description files.
1027 $(SED) \
1028 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1029 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1030 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1031 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1032 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
1033 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
1034 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
1035 --output $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc/Info.plist \
1036 $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/Info.plist
1037 $(SED) \
1038 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1039 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1040 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1041 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1042 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
1043 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
1044 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
1045 --output $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc/Description.plist \
1046 $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/Description.plist
1047 @# Copy the resources.
1048 $(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_RTF) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/English.lproj/License.rtf
1049 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \
1050 ,$(MKDIR) -p \
1051 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
1052 $(SED) \
1053 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1054 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1055 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1056 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1057 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
1058 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
1059 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
1060 --output $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Description.plist \
1061 $(VBOX_BRAND_$(f)_VIRTUALBOXCLI_DESCRIPTION_PLIST)$(NLTAB) \
1062 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_LICENSE_RTF) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/License.rtf$(NLTAB) \
1063 )
1064 @# Build the package.
1065 $(VBOX_PACKAGEMAKER) -build -v \
1066 -p $@ \
1067 -f $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
1068 -r $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res \
1069 -i $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc/Info.plist \
1070 -d $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc/Description.plist
1071 @# Cleanup
1072 sudo rm -Rf \
1073 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
1074 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
1075 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res
1076
1077
1078ifndef VBOX_OSE
1079 include $(VBOX_PATH_DI_SRC)/Bundle.kmk
1080endif
1081
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