VirtualBox

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

Last change on this file since 39186 was 38390, checked in by vboxsync, 13 years ago

Installer/darwin: Attempt to undo damage done by r73238 (VMMGC.gc-[x86|amd64] are missing among others).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 54.4 KB
Line 
1# $Id: Makefile.kmk 38390 2011-08-09 23:12:52Z vboxsync $
2## @file
3# Install misc stuff and create dist packages for Mac OS X.
4#
5
6#
7# Copyright (C) 2006-2011 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 $$(RegistrationPane_1_TARGET) \
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)_REGISTRATIONPANE_INFOPLIST_STRINGS) \
201 $(VBOX_BRAND_$(f)_REGISTRATIONPANE_LOCALIZABLE_STRINGS)) \
202 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
203 $(call MSG_TOOL,PackageMaker,,,$@)
204 @# Cleanup any previously failed attempts.
205 sudo rm -Rf \
206 $@ \
207 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.root \
208 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc \
209 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res
210 @# Correct directory permissions are important.
211 $(MKDIR) -p \
212 $(@D) \
213 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc \
214 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res \
215 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj
216 @# Do keyword replacement in the package info and description files.
217 $(SED) \
218 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
219 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
220 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
221 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
222 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
223 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
224 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
225 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc/Info.plist \
226 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Info.plist
227 $(SED) \
228 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
229 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
230 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
231 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
232 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
233 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
234 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
235 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc/Description.plist \
236 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Description.plist
237 $(SED) \
238 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
239 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
240 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
241 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
242 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
243 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
244 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
245 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/Welcome.html \
246 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Welcome.html
247 @# Copy the resources.
248# $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/ReadMe.html $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/ReadMe.html
249 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Conclusion.html $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/Conclusion.html
250 $(SED) \
251 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
252 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
253 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
254 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/Localizable.strings \
255 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Localizable.strings
256 $(INSTALL) -m 0644 $(VBOX_BRAND_DARWIN_INSTALLER_BG) $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/background.tif
257 $(INSTALL) -m 0766 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/checkforrunningvms $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/checkforrunningvms
258 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
259 $(MKDIR) -p \
260 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
261 $(SED) \
262 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
263 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
264 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
265 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
266 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Welcome.html \
267 $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_HTML)$(NLTAB) \
268 $(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) \
269 $(SED) \
270 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
271 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
272 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
273 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Localizable.strings \
274 $(VBOX_BRAND_$(f)_VIRTUALBOX_LOCALIZABLE_STRINGS)$(NLTAB) \
275 )
276 @# Build the package.
277 $(VBOX_PACKAGEMAKER) -build -v \
278 -p $@ \
279 -r $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res \
280 -i $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc/Info.plist \
281 -d $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc/Description.plist \
282 -mi $(VBOX_PATH_PACK_TMP)/Packages
283 @# Copy the plugins.
284 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/distribution.dist $@/Contents/
285ifndef VBOX_OSE
286 $(MKDIR) -p $@/Contents/Plugins/
287ifdef VBOX_WITH_SERIALNUMBER_INSTALL
288 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/InstallerSections.plist $@/Contents/Plugins/InstallerSections.plist
289else
290 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/InstallerSections.plist $@/Contents/Plugins/InstallerSections.plist.off
291endif
292 @# Copy the Registration Pane plugin.
293 $(MKDIR) -p $@/Contents/Plugins/RegistrationPane.bundle/Contents/MacOS/
294 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Info.plist $@/Contents/Plugins/RegistrationPane.bundle/Contents/
295 $(INSTALL) -m 0644 $(RegistrationPane_1_TARGET) $@/Contents/Plugins/RegistrationPane.bundle/Contents/MacOS/
296 $(MKDIR) -p $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/RegistrationPane.nib
297 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/English.lproj/InfoPlist.strings $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/
298 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/English.lproj/Localizable.strings $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/
299 $(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/
300 $(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/
301 $(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/
302 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
303 $(MKDIR) -p \
304 $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
305 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_REGISTRATIONPANE_INFOPLIST_STRINGS) $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/InfoPlist.strings$(NLTAB) \
306 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_REGISTRATIONPANE_LOCALIZABLE_STRINGS) $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Localizable.strings$(NLTAB) \
307 )
308endif
309 @# Cleanup.
310 sudo rm -Rf \
311 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.root \
312 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc \
313 $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res
314
315
316
317#
318# The VirtualBox Kernel extensions.
319#
320VBOX_DI_KEXTS_UNIVERSAL = VBoxDrv VBoxNetFlt VBoxNetAdp VBoxUSB
321VBOX_DI_KEXTS = $(VBOX_DI_KEXTS_UNIVERSAL)
322
323$(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg: \
324 $(foreach kext,$(VBOX_DI_KEXTS_UNIVERSAL), $(call VBOX_DI_FN_DEP_BOTH,$(kext).kext/Contents/MacOS/$(kext))) \
325 $(foreach kext,$(VBOX_DI_KEXTS), $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist) \
326 $$(wildcard $(VBOX_PATH_DI_SRC)/VBoxKEXTs/* \
327 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/*.lproj/*) \
328 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
329 $(VBOX_BRAND_$(f)_VBOXKEXTS_DESCRIPTION_PLIST) \
330 $(VBOX_BRAND_$(f)_VBOXKEXTS_README_HTML) \
331 $(VBOX_BRAND_$(f)_VBOXKEXTS_INSTALLATIONCHECK_STRINGS)) \
332 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
333 $(call MSG_TOOL,PackageMaker,,,$@)
334 @# Cleanup any previously failed attempts.
335 sudo rm -Rf \
336 $@ \
337 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
338 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
339 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res
340 @# Correct directory permissions are important.
341 $(MKDIR) -p \
342 $(@D) \
343 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
344 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \
345 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj
346 $(MKDIR) -p -m 1775 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library
347 $(MKDIR) -p -m 0755 \
348 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions \
349 $(foreach kext,$(VBOX_DI_KEXTS), \
350 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext \
351 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents \
352 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents/MacOS )
353 @# Copy the common files (Info.plist).
354 $(foreach kext,$(VBOX_DI_KEXTS), \
355 $(NLTAB)$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents/)
356 @# Copy the binaries and invoking lipo.
357ifdef VBOX_WITH_COMBINED_PACKAGE
358 $(foreach kext,$(VBOX_DI_KEXTS_UNIVERSAL), \
359 $(NLTAB)$(VBOX_DI_LIPO) -create \
360 $(VBOX_PATH_DIST_32)/$(kext).kext/Contents/MacOS/$(kext) \
361 $(VBOX_PATH_DIST_64)/$(kext).kext/Contents/MacOS/$(kext) \
362 -output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents/MacOS/$(kext))
363else
364 $(foreach kext,$(VBOX_DI_KEXTS), \
365 $(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/)
366endif
367 @# Set the correct owners.
368 sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library
369 sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions
370 @# Do keyword replacement in the package info and description files.
371 $(SED) \
372 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
373 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
374 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
375 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
376 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
377 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
378 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
379 --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/Info.plist \
380 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/Info.plist
381 $(SED) \
382 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
383 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
384 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
385 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
386 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
387 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
388 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
389 --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/Description.plist \
390 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/Description.plist
391 $(SED) \
392 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
393 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
394 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
395 --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj/ReadMe.html \
396 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/ReadMe.html
397 @# Copy the resources.
398 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/InstallationCheck $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/
399 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/postflight $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/
400 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
401 $(MKDIR) -p \
402 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
403 $(SED) \
404 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
405 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
406 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
407 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
408 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
409 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
410 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
411 --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Description.plist \
412 $(VBOX_BRAND_$(f)_VBOXKEXTS_DESCRIPTION_PLIST)$(NLTAB) \
413 $(SED) \
414 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
415 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
416 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
417 --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/ReadMe.html \
418 $(VBOX_BRAND_$(f)_VBOXKEXTS_README_HTML)$(NLTAB) \
419 $(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) \
420 )
421 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/English.lproj/InstallationCheck.strings $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj/
422 @# Build the package.
423 $(VBOX_PACKAGEMAKER) -build -v \
424 -p $@ \
425 -f $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
426 -r $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \
427 -i $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/Info.plist \
428 -d $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/Description.plist
429 @# Cleanup
430 sudo rm -Rf \
431 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
432 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
433 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res
434
435
436#
437# The VirtualBox Startupitems.
438#
439$(VBOX_PATH_PACK_TMP)/Packages/VBoxStartupItems.pkg: \
440 $$(wildcard $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/* \
441 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/Resources/*.lproj/*) \
442 $$(wildcard $(VBOX_PATH_DI_SRC)/VBoxStartupItems/* \
443 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/*.lproj/*) \
444 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
445 $(VBOX_BRAND_$(f)_VBOXSTARTUPITEMS_DESCRIPTION_PLIST)) \
446 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
447 $(call MSG_TOOL,PackageMaker,,,$@)
448 @# Cleanup any previously failed attempts.
449 sudo rm -Rf \
450 $@ \
451 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root \
452 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc \
453 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res
454 @# Correct directory permissions are important.
455 $(MKDIR) -p \
456 $(@D) \
457 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc \
458 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res \
459 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res/English.lproj
460 $(MKDIR) -p -m 0775 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library
461 $(MKDIR) -p -m 0755 \
462 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems \
463 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox \
464 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/Resources \
465 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/Resources/English.lproj
466 @# Copy the files.
467 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/StartupParameters.plist $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/
468 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/VirtualBox $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/
469 $(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/
470 @# Set the correct owners.
471 sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library
472 sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems
473 @# Do keyword replacement in the package info and description files.
474 $(SED) \
475 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
476 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
477 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
478 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
479 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
480 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
481 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
482 --output $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc/Info.plist \
483 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/Info.plist
484 $(SED) \
485 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
486 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
487 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
488 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
489 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
490 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
491 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
492 --output $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc/Description.plist \
493 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/Description.plist
494 @# Copy the resources.
495 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
496 $(MKDIR) -p \
497 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
498 $(SED) \
499 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
500 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
501 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
502 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
503 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
504 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
505 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
506 --output $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Description.plist \
507 $(VBOX_BRAND_$(f)_VBOXSTARTUPITEMS_DESCRIPTION_PLIST)$(NLTAB) \
508 )
509 @# Build the package.
510 $(VBOX_PACKAGEMAKER) -build -v \
511 -p $@ \
512 -f $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root \
513 -r $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res \
514 -i $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc/Info.plist \
515 -d $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc/Description.plist
516 @# Cleanup
517 sudo rm -Rf \
518 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root \
519 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc \
520 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res
521
522
523#
524# Figure out which languages that we support and construct
525# .qm and .lproj lists for these.
526#
527include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
528VBOX_INSTALL_LANG_FILES := $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES), VirtualBox_$(f).qm qt_$(f).qm)
529VBOX_INSTALL_LANG_LPROJ := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
530
531
532#
533# The VirtualBox Application.
534#
535
536VBOX_DI_VBAPP_DYLIBS = \
537 $(foreach qtmod, $(VBOX_QT4_MOD_NAMES), Frameworks/$(qtmod).framework/Versions/4/$(qtmod)) \
538 MacOS/VBoxDD.dylib \
539 MacOS/VBoxDD2.dylib \
540 MacOS/VBoxDDU.dylib \
541 MacOS/VBoxREM.dylib \
542 MacOS/VBoxRT.dylib \
543 MacOS/VBoxSharedFolders.dylib \
544 MacOS/VBoxSharedClipboard.dylib \
545 MacOS/VBoxGuestPropSvc.dylib \
546 MacOS/VBoxVMM.dylib \
547 MacOS/VBoxXPCOM.dylib \
548 MacOS/VBoxXPCOMC.dylib \
549 MacOS/components/VBoxC.dylib \
550 MacOS/components/VBoxSVCM.dylib \
551 MacOS/components/VBoxXPCOMIPCC.dylib \
552 MacOS/VBoxAuth.dylib \
553 MacOS/VBoxAuthSimple.dylib
554ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/libqtaccessiblewidgets.dylib),)
555 VBOX_DI_VBAPP_DYLIBS += \
556 MacOS/accessible/libqtaccessiblewidgets.dylib
557endif
558ifdef VBOX_WITH_GUEST_CONTROL
559 VBOX_DI_VBAPP_DYLIBS += \
560 MacOS/VBoxGuestControlSvc.dylib
561endif
562if defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL)
563 VBOX_DI_VBAPP_DYLIBS += \
564 MacOS/VBoxVRDP.dylib
565endif
566ifdef VBOX_WITH_CROGL
567 VBOX_DI_VBAPP_DYLIBS += \
568 MacOS/VBoxOGLhostcrutil.dylib \
569 MacOS/VBoxOGLhosterrorspu.dylib \
570 MacOS/VBoxOGLrenderspu.dylib \
571 MacOS/VBoxSharedCrOpenGL.dylib
572endif
573ifdef VBOX_WITH_DEBUGGER_GUI
574 VBOX_DI_VBAPP_DYLIBS += \
575 MacOS/VBoxDbg.dylib
576endif
577ifdef VBOX_WITH_HARDENING
578 VBOX_DI_VBAPP_DYLIBS += \
579 MacOS/VirtualBox.dylib \
580 MacOS/VBoxNetDHCP.dylib \
581 MacOS/VBoxHeadless.dylib
582endif
583ifdef VBOX_WITH_HDDPARALLELS_INSTALL
584 VBOX_DI_VBAPP_DYLIBS += \
585 MacOS/VBoxHDDParallels.dylib
586endif
587if defined(VBOX_WITH_PYTHON) && !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6)
588 VBOX_DI_VBAPP_DYLIBS += \
589 MacOS/VBoxPython2_6.so
590endif
591
592VBOX_DI_VBAPP_DYLIBS.x86 := \
593 MacOS/VBoxREM32.dylib \
594 MacOS/VBoxREM64.dylib
595ifdef VBOX_WITH_PYTHON
596 VBOX_DI_VBAPP_DYLIBS.x86 += \
597 MacOS/VBoxPython2_5.so \
598 $(if-expr defined(VBOX_WITH_MAC_OS_X_10_4_SUPPORT),MacOS/VBoxPython2_3.so,)
599endif
600
601VBOX_DI_VBAPP_DYLIBS.amd64 :=
602if defined(VBOX_WITH_PYTHON) && defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6)
603 VBOX_DI_VBAPP_DYLIBS.amd64 += \
604 MacOS/VBoxPython2_6.so
605endif
606
607if defined(VBOX_WITH_JXPCOM)
608 VBOX_DI_VBAPP_DYLIBS += \
609 MacOS/libvboxjxpcom.jnilib
610endif
611
612if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64), $(VBOX_DI_VBAPP_DYLIBS.x86))
613 $(error Conflict.$(NLTAB)VBOX_DI_VBAPP_DYLIBS.amd64=$(VBOX_DI_VBAPP_DYLIBS.amd64)$(NLTAB)VBOX_DI_VBAPP_DYLIBS.x86 =$(VBOX_DI_VBAPP_DYLIBS.x86))
614endif
615if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_DYLIBS.x86),$(VBOX_DI_VBAPP_DYLIBS))
616 $(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))
617endif
618
619VBOX_DI_VBAPP_PROGS = \
620 MacOS/VBoxManage \
621 MacOS/VBoxSVC \
622 MacOS/VBoxHeadless \
623 MacOS/VBoxXPCOMIPCD \
624 MacOS/VirtualBox \
625 MacOS/VirtualBoxVM \
626 MacOS/VBoxNetAdpCtl \
627 MacOS/VBoxNetDHCP \
628 MacOS/VBoxExtPackHelperApp \
629 MacOS/VBoxBalloonCtrl
630ifdef VBOX_WITH_WEBSERVICES
631 VBOX_DI_VBAPP_PROGS += \
632 MacOS/vboxwebsrv
633endif
634
635VBOX_DI_VBAPP_UNIVERSAL_PROGS = \
636 MacOS/vmstarter
637
638VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS = \
639 MacOS/VMMR0.r0 \
640 MacOS/VBoxDDR0.r0 \
641 MacOS/VBoxDD2R0.r0
642
643VBOX_DI_VBAPP_OTHER_BINS = \
644 MacOS/VMMGC.gc \
645 MacOS/VBoxDDGC.gc \
646 MacOS/VBoxDD2GC.gc
647
648VBOX_DI_VBAPP_MISC_FILES = \
649 Resources/VirtualBoxVM.app/Contents/Info.plist \
650 Resources/VirtualBoxVM.app/Contents/PkgInfo \
651 Resources/vmstarter.app/Contents/Info.plist \
652 Resources/vmstarter.app/Contents/PkgInfo \
653 Info.plist \
654 PkgInfo \
655 Resources/virtualbox.icns \
656 Resources/virtualbox.png \
657 Resources/virtualbox-vbox.icns \
658 Resources/virtualbox-vbox-extpack.icns \
659 Resources/virtualbox-ovf.icns \
660 Resources/virtualbox-ova.icns \
661 Resources/virtualbox-vdi.icns \
662 Resources/virtualbox-vmdk.icns \
663 Resources/virtualbox-vhd.icns \
664 Resources/virtualbox-hdd.icns \
665 MacOS/components/VBoxXPCOMBase.xpt \
666 MacOS/components/VirtualBox_XPCOM.xpt
667ifdef VBOX_WITH_DOCS_PACKING
668VBOX_DI_VBAPP_MISC_FILES += \
669 MacOS/UserManual.pdf
670endif
671ifdef VBOX_WITH_ADDITIONS_PACKING
672 ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso),)
673 VBOX_DI_VBAPP_MISC_FILES += \
674 MacOS/VBoxGuestAdditions.iso
675 endif
676endif
677ifdef VBOX_WITH_EFIFW_PACKING
678VBOX_DI_VBAPP_MISC_FILES += \
679 MacOS/VBoxEFI32.fd \
680 MacOS/VBoxEFI64.fd
681endif
682ifdef VBOX_WITH_COCOA_QT
683VBOX_DI_VBAPP_MISC_FILES += \
684 Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/classes.nib \
685 Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/info.nib \
686 Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/keyedobjects.nib
687endif
688
689VBOX_DI_VBAPP_SYMLINKS = \
690 Resources/VirtualBoxVM.app/Contents/MacOS=>../../../MacOS/ \
691 Resources/VirtualBoxVM.app/Contents/Resources=>../../../Resources/ \
692 Resources/vmstarter.app/Contents/MacOS=>../../../MacOS/ \
693 Resources/vmstarter.app/Contents/Resources=>../../../Resources/ \
694 $(foreach qtmod, $(VBOX_QT4_MOD_NAMES), Frameworks/$(qtmod).framework/$(qtmod)=>Versions/4/$(qtmod))
695ifdef VBOX_WITH_COCOA_QT
696VBOX_DI_VBAPP_SYMLINKS += \
697 Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Resources=>Versions/4/Resources/
698endif
699
700ifdef VBOX_WITH_PYTHON
701 # Python XPCOM glue
702 VBOX_DI_VBAPP_PYTHON_FILES = \
703 $(foreach f,$(notdir $(wildcard $(VBOX_PATH_DIST)/sdk/bindings/xpcom/python/xpcom/*.py)),sdk/bindings/xpcom/python/xpcom/$(f)) \
704 sdk/bindings/xpcom/python/xpcom/client/__init__.py \
705 sdk/bindings/xpcom/python/xpcom/server/__init__.py \
706 sdk/bindings/xpcom/python/xpcom/server/enumerator.py \
707 sdk/bindings/xpcom/python/xpcom/server/factory.py \
708 sdk/bindings/xpcom/python/xpcom/server/loader.py \
709 sdk/bindings/xpcom/python/xpcom/server/module.py \
710 sdk/bindings/xpcom/python/xpcom/server/policy.py \
711 sdk/installer/vboxapisetup.py \
712 sdk/installer/vboxapi/__init__.py \
713 sdk/installer/vboxapi/VirtualBox_constants.py
714endif
715
716
717# (The dependencies are including way too much here because I'm lazy.)
718$(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg: \
719 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
720 $(VBOX_BRAND_$(f)_VIRTUALBOX_DESCRIPTION_PLIST)) \
721 $(foreach f, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) $(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 $(VBOX_BRAND_LICENSE_TXT) \
730 $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*) \
731 $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*.lproj/*) \
732 $$(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/,$(VBOX_INSTALL_LANG_FILES)) \
733 \
734 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/*) \
735 $(filter-out Disabled, $(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/*)) \
736 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*) \
737 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/*) \
738 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*) \
739 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*.lproj/*) \
740 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/*) \
741 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/Resources/*) \
742 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/Resources/*.lproj/*) \
743 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*.lproj/*) \
744 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/*) \
745 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/additions/*) \
746 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/components/*) \
747 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/*) \
748 $(if-expr defined(VBOX_WITH_PYTHON), $(addprefix $(VBOX_PATH_DIST)/, $(VBOX_DI_VBAPP_PYTHON_FILES)),) \
749 $(if-expr defined(VBOX_WITH_JXPCOM), $(addprefix $(VBOX_PATH_DIST)/, sdk/bindings/xpcom/java/vboxjxpcom.jar),) \
750 $(if $(VBOX_WITH_WEBSERVICES),$(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist,) \
751 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxballoonctrl.plist \
752 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
753 $(call MSG_TOOL,PackageMaker,,,$@)
754 @# Cleanup any previously failed attempts.
755 sudo rm -Rf \
756 $@ \
757 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
758 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
759 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res
760 @# Correct directory permissions are important.
761 $(MKDIR) -p \
762 $(@D) \
763 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
764 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \
765 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/English.lproj
766 $(MKDIR) -p -m 0775 \
767 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications
768 $(MKDIR) -p -m 0755 $(sort \
769 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents \
770 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS \
771 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/components \
772 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/nls \
773 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/accessible \
774 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources \
775 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app \
776 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents \
777 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/vmstarter.app \
778 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/vmstarter.app/Contents \
779 $(if-expr defined(VBOX_WITH_PYTHON), \
780 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk \
781 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/installer \
782 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/installer/vboxapi \
783 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/ \
784 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom \
785 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/python \
786 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/python/xpcom \
787 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/client \
788 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/server,) \
789 $(if-expr defined(VBOX_WITH_JXPCOM), \
790 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/java,) \
791 $(addprefix $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/,$(dir \
792 $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) $(VBOX_DI_VBAPP_OTHER_BINS) $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_MISC_FILES) \
793 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "amd64",$(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_MISC_FILES.amd64),) \
794 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "x86", $(VBOX_DI_VBAPP_DYLIBS.x86) $(VBOX_DI_VBAPP_MISC_FILES.x86),) \
795 ))\
796 )
797 @# Create the .lproj language directories
798 $(MKDIR) -p -m 0755 \
799 $(addprefix $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/,$(VBOX_INSTALL_LANG_LPROJ))
800 @# Install all supported language files
801 $(foreach f, $(VBOX_INSTALL_LANG_FILES) \
802 ,$(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))
803ifdef VBOX_WITH_WEBSERVICES
804 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/
805endif
806 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxballoonctrl.plist $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/
807 @# Install the python stuff
808ifdef VBOX_WITH_PYTHON
809 $(foreach f,$(VBOX_DI_VBAPP_PYTHON_FILES) \
810 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(f)$(NLTAB) )
811 $(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS
812endif
813ifdef VBOX_WITH_JXPCOM
814 $(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
815endif
816 @# Copy misc files.
817 $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES) \
818 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )
819ifdef VBOX_WITH_COMBINED_PACKAGE
820 $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES.x86) \
821 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )
822 $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES.amd64) \
823 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )
824endif
825 $(INSTALL) -m 644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/LICENSE
826ifdef VBOX_WITH_DOCS_PACKING
827 $(foreach f,$(VBOX_ADD_MANUALS) \
828 ,$(INSTALL) -m 0644 $(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(NLTAB))
829endif
830 @# Create symlinks.
831ifdef VBOX_WITH_COMBINED_PACKAGE
832 $(foreach symlink,$(VBOX_DI_VBAPP_SYMLINKS) $(VBOX_DI_VBAPP_SYMLINKS.amd64) $(VBOX_DI_VBAPP_SYMLINKS.x86) \
833 ,$(LN) -s $(word 2,$(subst =>, ,$(symlink))) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(word 1,$(subst =>, ,$(symlink)))$(NLTAB))
834else
835 $(foreach symlink,$(VBOX_DI_VBAPP_SYMLINKS) $(VBOX_DI_VBAPP_SYMLINKS.$(KBUILD_TARGET_ARCH)) \
836 ,$(LN) -s $(word 2,$(subst =>, ,$(symlink))) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(word 1,$(subst =>, ,$(symlink)))$(NLTAB))
837endif
838 @# Copy the dylibs.
839ifdef VBOX_WITH_COMBINED_PACKAGE
840 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) \
841 ,$(VBOX_DI_LIPO) -create \
842 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(dylib) \
843 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(dylib) \
844 -output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))
845 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS.x86) \
846 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))
847 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS.amd64) \
848 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))
849else
850 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
851 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))
852endif
853 @# Copy the other binaries.
854ifdef VBOX_WITH_COMBINED_PACKAGE
855 $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \
856 ,$(VBOX_DI_LIPO) -create \
857 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(otherbin) \
858 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(otherbin) \
859 -output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)$(NLTAB))
860 $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_BINS) \
861 ,$(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) \
862 $(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))
863else
864 $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_BINS) $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \
865 ,$(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))
866endif
867 @# Create/copy the universal executable binaries.
868ifdef VBOX_WITH_COMBINED_PACKAGE
869 $(foreach otherbin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
870 ,$(VBOX_DI_LIPO) -create \
871 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(otherbin) \
872 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(otherbin) \
873 -output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)$(NLTAB))
874else
875 $(foreach otherbin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
876 ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)-$(KBUILD_TARGET_ARCH)$(NLTAB))
877endif
878 @# Copy the binaries.
879ifdef VBOX_WITH_COMBINED_PACKAGE
880 $(foreach prog, $(VBOX_DI_VBAPP_PROGS) \
881 ,$(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) \
882 $(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))
883else
884 $(foreach prog, $(VBOX_DI_VBAPP_PROGS) \
885 ,$(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))
886endif
887 @# Create symlinks for all the binaries (corrected by postflight and the VirtualBox StartupItem to hardlinks).
888ifdef VBOX_WITH_COMBINED_PACKAGE
889 $(foreach bin, $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_OTHER_BINS) \
890 ,$(LN) -s $(bin)-x86 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(bin)$(NLTAB))
891else
892 $(foreach bin, $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_OTHER_BINS) \
893 ,$(LN) -s $(bin)-$(KBUILD_TARGET_ARCH) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(bin)$(NLTAB))
894endif
895#ifdef VBOX_WITH_HARDENING - disabled temporarily
896if 1
897 @# We cannot use @executable_path together with setuid binaries, dyld gets upset about it. So, fix Qt libs and users.
898 $(foreach qtmod, $(VBOX_QT4_MOD_NAMES) \
899 ,install_name_tool -id /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
900 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/4/$(qtmod)$(NLTAB) )
901 $(foreach f, \
902 $(VBOX_DI_VBAPP_DYLIBS) \
903 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE), \
904 $(VBOX_DI_VBAPP_DYLIBS.x86) \
905 $(VBOX_DI_VBAPP_DYLIBS.amd64) \
906 $(addsuffix -x86, $(VBOX_DI_VBAPP_PROGS)) \
907 $(addsuffix -amd64, $(VBOX_DI_VBAPP_PROGS)) \
908 ,$(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
909 $(addsuffix -$(KBUILD_TARGET_ARCH), $(VBOX_DI_VBAPP_PROGS)) \
910 ) \
911 ,install_name_tool \
912 $(foreach qtmod, $(VBOX_QT4_MOD_NAMES), \
913 -change @executable_path/../Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
914 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
915 -change $(VBOX_PATH_QT4)/Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
916 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
917 -change $(PATH_SDK_QT4)/$(qtmod).framework/Versions/4/$(qtmod) \
918 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
919 -change $(qtmod).framework/Versions/4/$(qtmod) \
920 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
921 ) \
922 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )
923endif
924 @# Set the correct owner and set the set-user-ID-on-execution bit on the relevant executables.
925 sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root
926ifdef VBOX_WITH_HARDENING
927 ifdef VBOX_WITH_COMBINED_PACKAGE
928 sudo chmod u+s \
929 $(foreach bin,VBoxHeadless VirtualBox VirtualBoxVM VBoxNetAdpCtl VBoxNetDHCP,\
930 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(bin)-x86 \
931 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(bin)-amd64)
932 else
933 sudo chmod u+s \
934 $(foreach bin,VBoxHeadless VirtualBox VirtualBoxVM VBoxNetAdpCtl VBoxNetDHCP,\
935 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(bin)-$(KBUILD_TARGET_ARCH))
936 endif
937endif
938 @# Do keyword replacement in the package info and description files.
939 $(SED) \
940 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
941 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
942 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
943 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
944 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
945 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
946 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
947 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/Info.plist \
948 $(VBOX_PATH_DI_SRC)/VirtualBox/Info.plist
949 $(SED) \
950 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
951 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
952 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
953 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
954 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
955 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
956 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
957 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/Description.plist \
958 $(VBOX_PATH_DI_SRC)/VirtualBox/Description.plist
959 @# Copy the resources.
960 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \
961 ,$(MKDIR) -p \
962 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
963 $(SED) \
964 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
965 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
966 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
967 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
968 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
969 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
970 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
971 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Description.plist \
972 $(VBOX_BRAND_$(f)_VIRTUALBOX_DESCRIPTION_PLIST)$(NLTAB) \
973 )
974 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/postflight $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/
975 @# Build the package.
976 $(VBOX_PACKAGEMAKER) -build -v \
977 -p $@ \
978 -f $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
979 -r $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \
980 -i $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/Info.plist \
981 -d $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/Description.plist
982 @# Cleanup
983 sudo rm -Rf \
984 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
985 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
986 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res
987
988#
989# The VirtualBox CLI wrapper scripts.
990#
991$(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg: \
992 $$(wildcard $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/* \
993 $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/*.lproj/*) \
994 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \
995 ,$(VBOX_BRAND_$(f)_VIRTUALBOXCLI_DESCRIPTION_PLIST)) \
996 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
997 $(call MSG_TOOL,PackageMaker,,,$@)
998 @# Cleanup any previously failed attempts.
999 sudo rm -Rf \
1000 $@ \
1001 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
1002 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
1003 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res
1004 @# Correct directory permissions are important.
1005 $(MKDIR) -p \
1006 $(@D) \
1007 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
1008 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res \
1009 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/English.lproj
1010 $(MKDIR) -p -m 0755 \
1011 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr \
1012 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin
1013 @# Generate the wrapper scripts.
1014 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VirtualBox '#!/bin/bash'
1015 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VirtualBox 'exec /Applications/VirtualBox.app/Contents/MacOS/VirtualBox "$$@"'
1016 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxManage '#!/bin/bash'
1017 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxManage 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxManage "$$@"'
1018 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxVRDP '#!/bin/bash'
1019 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxVRDP 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"'
1020 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxHeadless '#!/bin/bash'
1021 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxHeadless 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"'
1022ifdef VBOX_WITH_WEBSERVICES
1023 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/vboxwebsrv '#!/bin/bash'
1024 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/vboxwebsrv 'exec /Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv "$$@"'
1025endif
1026 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxBalloonCtrl '#!/bin/bash'
1027 $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxBalloonCtrl 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl "$$@"'
1028 @# Set the correct owners and file permissions.
1029 sudo chmod 0755 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/*
1030 sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root
1031 sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr
1032 @# Do keyword replacement in the package info and description files.
1033 $(SED) \
1034 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1035 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1036 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1037 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1038 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
1039 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
1040 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
1041 --output $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc/Info.plist \
1042 $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/Info.plist
1043 $(SED) \
1044 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1045 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1046 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1047 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1048 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
1049 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
1050 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
1051 --output $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc/Description.plist \
1052 $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/Description.plist
1053 @# Copy the resources.
1054 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \
1055 ,$(MKDIR) -p \
1056 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
1057 $(SED) \
1058 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1059 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1060 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1061 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1062 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
1063 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
1064 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
1065 --output $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Description.plist \
1066 $(VBOX_BRAND_$(f)_VIRTUALBOXCLI_DESCRIPTION_PLIST)$(NLTAB) \
1067 )
1068 @# Build the package.
1069 $(VBOX_PACKAGEMAKER) -build -v \
1070 -p $@ \
1071 -f $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
1072 -r $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res \
1073 -i $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc/Info.plist \
1074 -d $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc/Description.plist
1075 @# Cleanup
1076 sudo rm -Rf \
1077 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
1078 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
1079 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res
1080
1081
1082ifndef VBOX_OSE
1083 include $(VBOX_PATH_DI_SRC)/Bundle.kmk
1084endif
1085
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