VirtualBox

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

Last change on this file since 60072 was 60072, checked in by vboxsync, 9 years ago

'xcb' for Qt5 on X11 and make it more obvious if VBOX_WITH_QTGUI_V5 is active or not

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 42.7 KB
Line 
1# $Id: Makefile.kmk 60072 2016-03-17 12:18:23Z vboxsync $
2## @file
3# Install misc stuff and create dist packages for Mac OS X.
4#
5
6#
7# Copyright (C) 2006-2015 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#
23# Globals
24#
25VBOX_PATH_DI_SRC := $(PATH_SUB_CURRENT)
26VBOX_DI_OUT_DIR := $(PATH_TARGET)/Installer/darwin
27BLDDIRS += $(VBOX_DI_OUT_DIR)
28
29VBOX_DI_FN_DEP_BOTH = $(VBOX_PATH_DIST)/$1
30ifeq ($(KBUILD_TARGET_ARCH),x86)
31 VBOX_DI_FN_DEP_32 = $(VBOX_PATH_DIST)/$1
32 VBOX_DI_FN_DEP_64 =
33else
34 VBOX_DI_FN_DEP_64 = $(VBOX_PATH_DIST)/$1
35 VBOX_DI_FN_DEP_32 =
36endif
37VBOX_PATH_DIST_OTHER = $(error VBOX_PATH_DIST_OTHER used in a non-combined package deal)
38
39ifndef VBOX_WITH_QTGUI_V5
40 VBOX_QT_VERSION_MAJOR = 4
41 PATH_SDK_QT = $(PATH_SDK_QT4)
42else # VBOX_WITH_QTGUI_V5
43 VBOX_QT_VERSION_MAJOR = 5
44 PATH_SDK_QT = $(PATH_SDK_QT5)
45endif # VBOX_WITH_QTGUI_V5
46
47# Unset this to speed up things during makefile hacking.
48VBOX_DARWIN_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
49
50# The location of the pkgbuild program.
51ifndef VBOX_PKGBUILD
52 VBOX_PKGBUILD := pkgbuild
53endif
54
55# The location of the productbuild program.
56ifndef VBOX_PRODUCTBUILD
57 VBOX_PRODUCTBUILD := productbuild
58endif
59
60# Where we do the packing (override this in LocalConfig.kmk if building on smbfs).
61ifndef VBOX_PATH_PACK_TMP
62 VBOX_PATH_PACK_TMP := $(VBOX_DI_OUT_DIR)
63endif
64
65# Shorthand for $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app
66VBOX_PATH_VBOX_APP_TMP := $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app
67
68
69#
70# Install the darwin docs/license.
71#
72INSTALLS += darwin-docs
73darwin-docs_INST = $(INST_DIST)
74darwin-docs_MODE = a+r,u+w
75darwin-docs_SOURCES = \
76 $(VBOX_BRAND_LICENSE_TXT)=>LICENSE
77
78
79#
80# The packing.
81#
82PACKING += $(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)-r$(VBOX_SVN_REV).dmg
83#OTHER_CLEAN = TODO
84
85
86include $(FILE_KBUILD_SUB_FOOTER)
87
88
89#
90# We're running commands as root here, take some care and assertion
91# a sane environment.
92#
93ifeq ($(strip $(VBOX_PATH_DIST)),)
94 $(error VBOX_PATH_DIST=$(VBOX_PATH_DIST))
95endif
96ifeq ($(strip $(VBOX_PATH_DIST)),/)
97 $(error VBOX_PATH_DIST=$(VBOX_PATH_DIST))
98endif
99ifeq ($(strip $(VBOX_PATH_PACK_TMP)),)
100 $(error VBOX_PATH_PACK_TMP=$(VBOX_PATH_PACK_TMP))
101endif
102ifeq ($(strip $(VBOX_PATH_PACK_TMP)),/)
103 $(error VBOX_PATH_PACK_TMP=$(VBOX_PATH_PACK_TMP))
104endif
105
106
107# Check for additional manuals
108VBOX_ADD_MANUALS := $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_$(f).pdf)
109
110VBOX_ADD_MANUAL_de_DE := $(filter $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_de_DE.pdf,$(VBOX_ADD_MANUALS))
111VBOX_ADD_MANUAL_fr_FR := $(filter $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_fr_FR.pdf,$(VBOX_ADD_MANUALS))
112
113#
114# The disk image.
115#
116$(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)-r$(VBOX_SVN_REV).dmg: \
117 $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg \
118 $(VBOX_BRAND_DARWIN_DISKIMAGE_BG) \
119 $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE) \
120 $$(wildcard $(VBOX_PATH_DI_SRC)/DiskImage/*) \
121 $(if $(VBOX_WITH_DOCS_PACKING), \
122 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf \
123 $(VBOX_ADD_MANUALS)) \
124 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
125 $(call MSG_TOOL,hdiutil,,,$@)
126 @# Cleanup any previously failed attempts and various trash.
127 sudo rm -Rf $(VBOX_PATH_PACK_TMP)/DiskImage.tmp
128 $(MKDIR) -p $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/
129 sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/
130 sudo rm -Rf \
131 $@ \
132 $(VBOX_PATH_PACK_TMP)/DiskImage/
133 sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage.tmp $(VBOX_PATH_PACK_TMP)/DiskImage
134 @# Remove .dmg packages from old depend builds
135 $(QUIET)$(RM) -f $(wildcard $(VBOX_PATH_DIST)/VirtualBox-*-r*.dmg)
136 @# Populate the image with uninstaller, readme, picture, and .VolumeIcon.icns. (TODO)
137 $(INSTALL) $(VBOX_PATH_DI_SRC)/DiskImage/VirtualBox_Uninstall.tool $(VBOX_PATH_PACK_TMP)/DiskImage/
138if defined(VBOX_SIGNING_MODE) && defined(VBOX_NOT_OSX_105)
139 $(call VBOX_SIGN_FILE_FN,$(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox_Uninstall.tool,org.virtualbox.dmg.uninstaller)
140endif
141ifeq (1,1)
142 @# Pedantic mode...
143 $(INSTALL) -m 644 $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE) $(VBOX_PATH_PACK_TMP)/DiskImage/.DS_Store
144 $(MKDIR) $(VBOX_PATH_PACK_TMP)/DiskImage/.background
145 $(INSTALL) -m 644 $(VBOX_BRAND_DARWIN_DISKIMAGE_BG) $(VBOX_PATH_PACK_TMP)/DiskImage/.background/vbox_folder.tiff
146 ifdef VBOX_WITH_BUNDLED_INSTALLER
147 $(if $(VBOX_WITH_DOCS_PACKING), \
148 $(INSTALL) -m 644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf $(VBOX_PATH_PACK_TMP)/DiskImage/User\ Manual.pdf$(NLTAB) \
149 $(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)) \
150 $(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)))
151 # Rename the main package
152 else
153 $(if $(VBOX_WITH_DOCS_PACKING), $(INSTALL) $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf $(VBOX_PATH_PACK_TMP)/DiskImage/)
154 $(LN) -s /Applications/ $(VBOX_PATH_PACK_TMP)/DiskImage/Applications
155 endif
156endif
157 @# hdiutil of OS X 10.10 adds a .Trashes directory and some suggest this may upset the image size calculations (-5341).
158 $(MKDIR) -m 1333 $(VBOX_PATH_PACK_TMP)/DiskImage/.Trashes
159 @# Change the owners.
160 sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/DiskImage
161 @# Create the image. We calculate the size our selves, adding 8MB for fudging (it's about 100-120MB atm).
162 sudo hdiutil create -format UDBZ -volname "VirtualBox" -srcfolder "$(VBOX_PATH_PACK_TMP)/DiskImage" \
163 -size $(DOLLAR)((`/usr/bin/du -d 0 -k "$(VBOX_PATH_PACK_TMP)/DiskImage/" | /usr/bin/cut -f1` + 8192))k \
164 "$@"
165 @# Change (back) the owner so it can be deleted by the user.
166 sudo chown "$(shell whoami)" "$@"
167 sudo chown -R "$(shell whoami)" $(VBOX_PATH_PACK_TMP)/DiskImage
168
169#
170# The meta-package.
171#
172$(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg: \
173 $(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg \
174 $(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg \
175 $(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg \
176 $$(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/* \
177 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/*.lproj/*) \
178 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_RTF)) \
179 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
180 $(call MSG_TOOL,productbuild,,,$@)
181 @# Cleanup any previously failed attempts.
182 sudo rm -Rf \
183 $@ \
184 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.root \
185 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.desc \
186 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res
187 @# Correct directory permissions are important.
188 $(MKDIR) -p \
189 $(@D) \
190 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.desc \
191 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res \
192 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj
193 @# Do keyword replacement in the package info and description files.
194 $(SED) \
195 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
196 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
197 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
198 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
199 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
200 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
201 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
202 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj/Welcome.rtf \
203 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Welcome.rtf
204 @# Copy the resources.
205 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Conclusion.rtf $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj/Conclusion.rtf
206 $(SED) \
207 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
208 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
209 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
210 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj/Localizable.strings \
211 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Localizable.strings
212 $(INSTALL) -m 0644 $(VBOX_BRAND_DARWIN_INSTALLER_BG) $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/background.tif
213 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
214 $(MKDIR) -p \
215 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
216 $(SED) \
217 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
218 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
219 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
220 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
221 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Welcome.rtf \
222 $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_RTF)$(NLTAB) \
223 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_VIRTUALBOX_CONCLUSION_RTF) $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Conclusion.rtf$(NLTAB) \
224 $(SED) \
225 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
226 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
227 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
228 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Localizable.strings \
229 $(VBOX_BRAND_$(f)_VIRTUALBOX_LOCALIZABLE_STRINGS)$(NLTAB) \
230 )
231 @# Build the package.
232 $(VBOX_PRODUCTBUILD) \
233 --distribution $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/distribution.dist \
234 --package-path $(VBOX_PATH_PACK_TMP)/Packages \
235 --resources $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res \
236 --identifier org.VirtualBox.mpkg.virtualbox \
237 --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
238 $(if $(VBOX_MACOSX_INSTALLER_SIGN),--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
239 $@
240 @# Cleanup.
241 sudo rm -Rf \
242 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.root \
243 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.desc \
244 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res
245
246
247#
248# The VirtualBox Kernel extensions.
249#
250VBOX_DI_KEXTS_UNIVERSAL = VBoxDrv VBoxNetFlt VBoxNetAdp VBoxUSB
251VBOX_DI_KEXTS = $(VBOX_DI_KEXTS_UNIVERSAL)
252
253$(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg: \
254 $(foreach kext,$(VBOX_DI_KEXTS_UNIVERSAL), $(call VBOX_DI_FN_DEP_BOTH,$(kext).kext/Contents/MacOS/$(kext))) \
255 $(foreach kext,$(VBOX_DI_KEXTS), $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist) \
256 $$(wildcard $(VBOX_PATH_DI_SRC)/VBoxKEXTs/* \
257 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/*.lproj/*) \
258 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
259 $(VBOX_BRAND_$(f)_VBOXKEXTS_DESCRIPTION_PLIST) \
260 $(VBOX_BRAND_$(f)_VBOXKEXTS_README_HTML) \
261 $(VBOX_BRAND_$(f)_VBOXKEXTS_INSTALLATIONCHECK_STRINGS)) \
262 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
263 $(call MSG_TOOL,pkgbuild,,,$@)
264 @# Cleanup any previously failed attempts.
265 sudo rm -Rf \
266 $@ \
267 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
268 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
269 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res
270 @# Correct directory permissions are important.
271 $(MKDIR) -p \
272 $(@D) \
273 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
274 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \
275 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj
276 $(MKDIR) -p -m 0755 \
277 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
278 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/LaunchDaemons \
279 $(foreach kext,$(VBOX_DI_KEXTS), \
280 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext \
281 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents \
282 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS )
283 @# Copy the launch daemon bits.
284 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/VirtualBoxStartup.sh $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/LaunchDaemons/
285 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/org.virtualbox.startup.plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/LaunchDaemons/
286 @# Copy the common files (Info.plist).
287 $(foreach kext,$(VBOX_DI_KEXTS), \
288 $(NLTAB)$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/)
289 @# Copy the binaries and invoking lipo.
290 $(foreach kext,$(VBOX_DI_KEXTS), \
291 $(NLTAB)$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/$(kext).kext/Contents/MacOS/$(kext) $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS/)
292 @# Signed the kext bundles.
293ifdef VBOX_SIGNING_MODE
294 $(foreach kext,$(VBOX_DI_KEXTS) \
295 ,$(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS/$(kext),org.virtualbox.app.kext.$(kext)) )
296 $(foreach kext,$(VBOX_DI_KEXTS), \
297 $(NLTAB)$(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext,org.virtualbox.app.kext.$(kext)) )
298## @TODO check why this fails on the build box: $(foreach kext,$(VBOX_DI_KEXTS), $(NLTAB)codesign --verify --verbose=1 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext )
299endif
300 @# Set the correct owners.
301 sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/
302 @# Do keyword replacement in the package info and description files.
303 $(SED) \
304 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
305 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
306 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
307 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
308 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
309 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
310 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
311 --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/PkgBuildComponent.plist \
312 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/PkgBuildComponent.plist
313 @# Copy the resources.
314 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/postflight $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/
315 @# Build the package.
316 $(VBOX_PKGBUILD) \
317 --root $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/ \
318 --component-plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/PkgBuildComponent.plist \
319 --script $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \
320 --identifier org.virtualbox.pkg.vboxkexts \
321 --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
322 --install-location "/Library/Application Support/VirtualBox" \
323 --ownership preserve \
324 $(if $(VBOX_MACOSX_INSTALLER_SIGN),--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
325 $@
326 @# Cleanup
327 sudo chown -R "$(shell whoami)" \
328 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root
329 sudo rm -Rf \
330 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
331 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
332 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res
333
334
335#
336# Figure out which languages that we support and construct
337# .qm and .lproj lists for these.
338#
339include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
340VBOX_INSTALL_LANG_FILES := $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES), VirtualBox_$(f).qm qt_$(f).qm)
341VBOX_INSTALL_LANG_LPROJ := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
342
343
344#
345# The VirtualBox Application.
346#
347
348VBOX_DI_VBAPP_DYLIBS = \
349 $(foreach qtmod, $(VBOX_QT_MOD_NAMES), Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod)) \
350 MacOS/VBoxDD.dylib \
351 MacOS/VBoxDD2.dylib \
352 MacOS/VBoxDDU.dylib \
353 MacOS/VBoxREM.dylib \
354 MacOS/VBoxRT.dylib \
355 $(if $(VBOX_WITH_SHARED_FOLDERS),MacOS/VBoxSharedFolders.dylib,) \
356 $(if $(VBOX_WITH_SHARED_CLIPBOARD),MacOS/VBoxSharedClipboard.dylib,) \
357 $(if $(VBOX_WITH_DRAG_AND_DROP),MacOS/VBoxDragAndDropSvc.dylib,) \
358 $(if $(VBOX_WITH_GUEST_PROPS),MacOS/VBoxGuestPropSvc.dylib,) \
359 MacOS/VBoxHostChannel.dylib \
360 MacOS/VBoxVMM.dylib \
361 MacOS/VBoxXPCOM.dylib \
362 MacOS/VBoxXPCOMC.dylib \
363 MacOS/components/VBoxC.dylib \
364 MacOS/components/VBoxSVCM.dylib \
365 MacOS/components/VBoxXPCOMIPCC.dylib \
366 MacOS/VBoxAuth.dylib \
367 MacOS/VBoxAuthSimple.dylib \
368 $(if $(VBOX_WITH_GUEST_CONTROL),MacOS/VBoxGuestControlSvc.dylib,)
369ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/libqtaccessiblewidgets.dylib),)
370 VBOX_DI_VBAPP_DYLIBS += \
371 MacOS/accessible/libqtaccessiblewidgets.dylib
372endif
373if defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL)
374 VBOX_DI_VBAPP_DYLIBS += \
375 MacOS/VBoxVRDP.dylib
376endif
377ifdef VBOX_WITH_CROGL
378 VBOX_DI_VBAPP_DYLIBS += \
379 MacOS/VBoxOGLhostcrutil.dylib \
380 MacOS/VBoxOGLhosterrorspu.dylib \
381 MacOS/VBoxOGLrenderspu.dylib \
382 MacOS/VBoxSharedCrOpenGL.dylib
383
384 ifdef VBOX_WITH_CR_DISPLAY_LISTS
385 VBOX_DI_VBAPP_DYLIBS += \
386 MacOS/VBoxOGLexpandospu.dylib
387 endif
388endif
389ifdef VBOX_WITH_DEBUGGER_GUI
390 VBOX_DI_VBAPP_DYLIBS += \
391 MacOS/VBoxDbg.dylib \
392 MacOS/DbgPlugInDiggers.dylib
393endif
394ifdef VBOX_WITH_HARDENING
395 VBOX_DI_VBAPP_DYLIBS += \
396 MacOS/VirtualBox.dylib \
397 MacOS/VBoxNetDHCP.dylib \
398 MacOS/VBoxNetNAT.dylib \
399 MacOS/VBoxHeadless.dylib
400endif
401ifdef VBOX_WITH_HDDPARALLELS_INSTALL
402 VBOX_DI_VBAPP_DYLIBS += \
403 MacOS/VBoxHDDParallels.dylib
404endif
405if defined(VBOX_WITH_PYTHON) && !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6)
406 VBOX_DI_VBAPP_DYLIBS += \
407 MacOS/VBoxPython2_6.so
408endif
409if defined(VBOX_WITH_PYTHON) && !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_7)
410 VBOX_DI_VBAPP_DYLIBS += \
411 MacOS/VBoxPython2_7.so
412endif
413ifdef VBOX_WITH_VMSVGA3D
414 VBOX_DI_VBAPP_DYLIBS += \
415 MacOS/VBoxSVGA3D.dylib \
416 MacOS/VBoxSVGA3DObjC.dylib
417endif
418
419VBOX_DI_VBAPP_DYLIBS.x86 := \
420 MacOS/VBoxREM32.dylib \
421 MacOS/VBoxREM64.dylib
422ifdef VBOX_WITH_PYTHON
423 VBOX_DI_VBAPP_DYLIBS.x86 += \
424 MacOS/VBoxPython2_5.so \
425 $(if-expr defined(VBOX_WITH_MAC_OS_X_10_4_SUPPORT),MacOS/VBoxPython2_3.so,)
426endif
427
428VBOX_DI_VBAPP_DYLIBS.amd64 :=
429if defined(VBOX_WITH_PYTHON) && defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6)
430 VBOX_DI_VBAPP_DYLIBS.amd64 += \
431 MacOS/VBoxPython2_6.so
432endif
433
434if defined(VBOX_WITH_JXPCOM)
435 VBOX_DI_VBAPP_DYLIBS += \
436 MacOS/libvboxjxpcom.jnilib
437endif
438
439if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64), $(VBOX_DI_VBAPP_DYLIBS.x86))
440 $(error Conflict.$(NLTAB)VBOX_DI_VBAPP_DYLIBS.amd64=$(VBOX_DI_VBAPP_DYLIBS.amd64)$(NLTAB)VBOX_DI_VBAPP_DYLIBS.x86 =$(VBOX_DI_VBAPP_DYLIBS.x86))
441endif
442if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_DYLIBS.x86),$(VBOX_DI_VBAPP_DYLIBS))
443 $(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))
444endif
445
446VBOX_DI_VBAPP_PROGS = \
447 MacOS/VBoxManage \
448 MacOS/VBoxSVC \
449 MacOS/VBoxHeadless \
450 MacOS/VBoxXPCOMIPCD \
451 MacOS/VBoxNetAdpCtl \
452 MacOS/VBoxNetDHCP \
453 MacOS/VBoxNetNAT \
454 MacOS/VBoxExtPackHelperApp \
455 MacOS/VBoxBalloonCtrl \
456 MacOS/VBoxAutostart \
457 MacOS/VirtualBoxVM \
458 $(if $(VBOX_WITH_WEBSERVICES),MacOS/vboxwebsrv) \
459 MacOS/VirtualBox \
460 $(if $(VBOX_WITH_DTRACE),MacOS/VBoxDTrace,)
461
462VBOX_DI_VBAPP_UNIVERSAL_PROGS = \
463 MacOS/vmstarter \
464 $(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),MacOS/vbox-img,)
465
466VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS = \
467 MacOS/VMMR0.r0 \
468 MacOS/VBoxDDR0.r0 \
469 MacOS/VBoxDD2R0.r0
470
471ifdef VBOX_WITH_RAW_MODE
472 VBOX_DI_VBAPP_OTHER_BINS = \
473 MacOS/VMMRC.rc \
474 MacOS/VBoxDDRC.rc \
475 MacOS/VBoxDD2RC.rc
476else
477 VBOX_DI_VBAPP_OTHER_BINS =
478endif
479
480VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES = \
481 Resources/virtualbox.icns \
482 Resources/virtualbox.png \
483 Resources/virtualbox-vbox.icns \
484 Resources/virtualbox-vbox-extpack.icns \
485 Resources/virtualbox-ovf.icns \
486 Resources/virtualbox-ova.icns \
487 Resources/virtualbox-vdi.icns \
488 Resources/virtualbox-vmdk.icns \
489 Resources/virtualbox-vhd.icns \
490 Resources/virtualbox-hdd.icns
491
492VBOX_DI_VBAPP_MISC_FILES = \
493 Info.plist \
494 PkgInfo \
495 $(VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES) \
496 MacOS/components/VBoxXPCOMBase.xpt \
497 MacOS/components/VirtualBox_XPCOM.xpt \
498 Resources/VirtualBoxVM.app/Contents/Info.plist \
499 Resources/VirtualBoxVM.app/Contents/PkgInfo \
500 $(addprefix Resources/VirtualBoxVM.app/Contents/,$(VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES)) \
501 Resources/vmstarter.app/Contents/Info.plist \
502 Resources/vmstarter.app/Contents/PkgInfo \
503 $(addprefix Resources/vmstarter.app/Contents/,$(VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES))
504ifdef VBOX_WITH_DOCS_PACKING
505VBOX_DI_VBAPP_MISC_FILES += \
506 MacOS/UserManual.pdf
507endif
508ifdef VBOX_WITH_ADDITIONS_PACKING
509 ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso),)
510 VBOX_DI_VBAPP_MISC_FILES += \
511 MacOS/VBoxGuestAdditions.iso
512 endif
513endif
514ifdef VBOX_WITH_EFIFW_PACKING
515VBOX_DI_VBAPP_MISC_FILES += \
516 MacOS/VBoxEFI32.fd \
517 MacOS/VBoxEFI64.fd
518endif
519ifndef VBOX_WITH_QTGUI_V5
520 VBOX_DI_VBAPP_MISC_FILES += \
521 Frameworks/QtGui$(VBOX_QT_INFIX).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/Resources/qt_menu.nib/classes.nib \
522 Frameworks/QtGui$(VBOX_QT_INFIX).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/Resources/qt_menu.nib/info.nib \
523 Frameworks/QtGui$(VBOX_QT_INFIX).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/Resources/qt_menu.nib/keyedobjects.nib
524else # VBOX_WITH_QTGUI_V5
525 VBOX_DI_VBAPP_MISC_FILES += \
526 PlugIns/platforms/libqcocoa$(SUFF_DLL) \
527 PlugIns/platforms/libqminimal$(SUFF_DLL) \
528 PlugIns/platforms/libqoffscreen$(SUFF_DLL)
529endif # VBOX_WITH_QTGUI_V5
530VBOX_DI_VBAPP_MISC_FILES += \
531 $(foreach qtmod, $(VBOX_QT_MOD_NAMES), Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/Resources/Info.plist)
532
533VBOX_DI_VBAPP_SYMLINKS = \
534 Resources/VirtualBoxVM.app/Contents/MacOS=>../../../MacOS/ \
535 Resources/vmstarter.app/Contents/MacOS=>../../../MacOS/ \
536 $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
537 ,Frameworks/$(qtmod).framework/Versions/Current=>$(VBOX_QT_VERSION_MAJOR) )
538ifndef VBOX_NOT_OSX_105
539VBOX_DI_VBAPP_SYMLINKS += $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
540 ,Frameworks/$(qtmod).framework/$(qtmod)=>Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
541 Frameworks/$(qtmod).framework/Resources=>Versions/$(VBOX_QT_VERSION_MAJOR)/Resources/ )
542endif
543
544ifdef VBOX_WITH_PYTHON
545 # Python XPCOM glue
546 VBOX_DI_VBAPP_PYTHON_FILES = \
547 $(VBOXINST_SDK_BINDINGS_XPCOM_PYTHON_FILES) \
548 $(VBOXINST_SDK_INSTALLER_PYTHON_FILES)
549endif
550
551
552# (The dependencies are including way too much here because I'm lazy.)
553$(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg: \
554 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
555 $(VBOX_BRAND_$(f)_VIRTUALBOX_DESCRIPTION_PLIST)) \
556 $(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)\
557 ,$(call VBOX_DI_FN_DEP_BOTH,VirtualBox.app/Contents/$(f)) ) \
558 $(foreach f, $(VBOX_DI_VBAPP_DYLIBS.x86) $(VBOX_DI_VBAPP_MISC_FILES.x86)\
559 ,$(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/$(f)) ) \
560 $(foreach f, $(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_MISC_FILES.amd64)\
561 ,$(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/$(f)) ) \
562 \
563 $(if $(VBOX_WITH_DOCS_PACKING),$(VBOX_ADD_MANUALS),) \
564 $(VBOX_BRAND_LICENSE_TXT) \
565 $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*) \
566 $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*.lproj/*) \
567 $$(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/,$(VBOX_INSTALL_LANG_FILES)) \
568 \
569 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/*) \
570 $(filter-out Disabled, $(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/*)) \
571 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*) \
572 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/*) \
573 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*) \
574 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*.lproj/*) \
575 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/*) \
576 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/Resources/*) \
577 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/Resources/*.lproj/*) \
578 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*.lproj/*) \
579 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/*) \
580 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/additions/*) \
581 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/components/*) \
582 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/*) \
583 $(if-expr defined(VBOX_WITH_PYTHON), $(addprefix $(VBOX_PATH_DIST)/, $(VBOX_DI_VBAPP_PYTHON_FILES)),) \
584 $(if-expr defined(VBOX_WITH_JXPCOM), $(addprefix $(VBOX_PATH_DIST)/, sdk/bindings/xpcom/java/vboxjxpcom.jar),) \
585 $(if $(VBOX_WITH_WEBSERVICES),$(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist,) \
586 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxballoonctrl.plist \
587 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxautostart.plist \
588 $(VBOX_PATH_DI_SRC)/VirtualBox/VBoxAutostartDarwin.sh \
589 $(if-expr defined(VBOX_WITH_DTRACE), \
590 $(foreach f, $(VBOXINST_DTRACE_LIB_ARCH_FILES), \
591 $(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/MacOS/dtrace/lib/x86/$f) \
592 $(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/MacOS/dtrace/lib/amd64/$f)) \
593 $(foreach f, $(VBOXINST_DTRACE_TESTCASE_ARCH_FILES), \
594 $(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/MacOS/dtrace/testcase/x86/$f) \
595 $(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/MacOS/dtrace/testcase/amd64/$f)) \
596 $(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) \
597 ,) \
598 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
599 $(call MSG_TOOL,pkgbuild,,,$@)
600 @# Cleanup any previously failed attempts.
601 sudo rm -Rf \
602 $@ \
603 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
604 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
605 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res
606 @# Correct directory permissions are important.
607 $(MKDIR) -p \
608 $(@D) \
609 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
610 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \
611 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/English.lproj
612 $(MKDIR) -p -m 0775 \
613 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications
614 $(MKDIR) -p -m 0755 $(sort \
615 $(VBOX_PATH_VBOX_APP_TMP)/Contents \
616 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS \
617 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/components \
618 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/nls \
619 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/accessible \
620 $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources \
621 $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app \
622 $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app/Contents \
623 $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/vmstarter.app \
624 $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/vmstarter.app/Contents \
625 $(if-expr defined(VBOX_WITH_PYTHON), \
626 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk \
627 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/installer \
628 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/installer/vboxapi \
629 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/ \
630 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom \
631 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python \
632 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python/xpcom \
633 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/client \
634 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/server,) \
635 $(if-expr defined(VBOX_WITH_JXPCOM), \
636 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/java,) \
637 $(addprefix $(VBOX_PATH_VBOX_APP_TMP)/Contents/,$(dir \
638 $(VBOX_DI_VBAPP_DYLIBS) \
639 $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \
640 $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
641 $(VBOX_DI_VBAPP_OTHER_BINS) \
642 $(VBOX_DI_VBAPP_PROGS) \
643 $(VBOX_DI_VBAPP_MISC_FILES) \
644 $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
645 $(VBOX_DI_VBAPP_MISC_FILES.$(KBUILD_TARGET_ARCH)) \
646 ))\
647 )
648# Create the .lproj language directories
649 $(MKDIR) -p -m 0755 \
650 $(addprefix $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/,$(VBOX_INSTALL_LANG_LPROJ))
651# Install all supported language files
652 $(foreach f, $(VBOX_INSTALL_LANG_FILES) \
653 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/$(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/nls/$(f)$(NLTAB))
654ifdef VBOX_WITH_WEBSERVICES
655 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/
656endif
657 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxballoonctrl.plist $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/
658 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxautostart.plist $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/
659 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/VBoxAutostartDarwin.sh $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/
660# Install the python bridge stuff
661ifdef VBOX_WITH_PYTHON
662 $(foreach f,$(VBOX_DI_VBAPP_PYTHON_FILES) \
663 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/$(f)$(NLTAB) )
664 $(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS
665endif
666# Install the java bridge stuff
667ifdef VBOX_WITH_JXPCOM
668 $(INSTALL) -m 0755 $(VBOX_PATH_DIST)/sdk/bindings/xpcom/java/vboxjxpcom.jar $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/java/vboxjxpcom.jar
669endif
670# Copy misc files.
671 $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES) \
672 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(f)$(NLTAB) )
673 $(INSTALL) -m 644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/LICENSE
674ifdef VBOX_WITH_DOCS_PACKING
675 $(foreach f,$(VBOX_ADD_MANUALS) \
676 ,$(INSTALL) -m 0644 $(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/$(NLTAB))
677endif
678 @# Create symlinks.
679 $(foreach symlink,$(VBOX_DI_VBAPP_SYMLINKS) $(VBOX_DI_VBAPP_SYMLINKS.$(KBUILD_TARGET_ARCH)) \
680 ,$(LN) -s $(word 2,$(subst =>, ,$(symlink))) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(word 1,$(subst =>, ,$(symlink)))$(NLTAB))
681 @# Copy the dylibs.
682 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
683 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(dylib)$(NLTAB))
684 @# Copy the other binaries.
685 $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_OTHER_BINS) \
686 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(otherbin)$(NLTAB))
687 @# Create/copy the universal executable binaries.
688 $(foreach otherbin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
689 ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(otherbin)$(NLTAB))
690 @# Copy the binaries.
691 $(foreach prog, $(VBOX_DI_VBAPP_PROGS) \
692 ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(prog) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(prog)$(NLTAB))
693#ifdef VBOX_WITH_HARDENING - disabled temporarily
694if 1
695 @# We cannot use @executable_path together with setuid binaries, dyld gets upset about it. So, fix Qt libs and users.
696 $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
697 ,install_name_tool -id /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
698 $(VBOX_PATH_VBOX_APP_TMP)/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod)$(NLTAB) )
699 $(foreach f, \
700 $(VBOX_DI_VBAPP_DYLIBS) \
701 $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
702 $(VBOX_DI_VBAPP_PROGS) \
703 ,install_name_tool \
704 $(foreach qtmod, $(VBOX_QT_MOD_NAMES), \
705 -change @executable_path/../Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
706 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
707 -change $(VBOX_PATH_QT)/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
708 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
709 -change $(PATH_SDK_QT)/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
710 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
711 -change $(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
712 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
713 ) \
714 $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(f)$(NLTAB) )
715endif
716ifdef VBOX_WITH_QTGUI_V5
717 $(QUIET)$(APPEND) $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/qt.conf "[Paths]"
718 $(QUIET)$(APPEND) $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/qt.conf "Prefix =" /Applications/VirtualBox.app/Contents
719 $(QUIET)$(APPEND) $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app/Contents/Resources/qt.conf "[Paths]"
720 $(QUIET)$(APPEND) $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app/Contents/Resources/qt.conf "Prefix =" /Applications/VirtualBox.app/Contents
721endif # VBOX_WITH_QTGUI_V5
722ifdef VBOX_WITH_DTRACE
723 @# DTrace library, testcases and scripts.
724 $(MKDIR) -p -m 0755 -- \
725 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/lib/$(KBUILD_TARGET_ARCH)/ \
726 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/testcase/$(KBUILD_TARGET_ARCH)/ \
727 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/scripts/
728 $(foreach file, $(addprefix lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \
729 $(addprefix testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \
730 $(addprefix scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) \
731 ,$(INSTALL) -m 0655 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/dtrace/$(file) \
732 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/$(file)$(NLTAB))
733endif
734
735 @# Signed the binaries and the application bundle.
736ifdef VBOX_SIGNING_MODE
737 $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
738 ,$(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod),org.virtualbox.app.frameworks.$(qtmod)) )
739 $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
740 ,$(NLTAB)$(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR),org.virtualbox.app.frameworks.$(qtmod)) )
741 $(foreach dylib, \
742 $(VBOX_DI_VBAPP_DYLIBS) \
743 $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
744 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(dylib),org.virtualbox.app.macos.$(notdir $(dylib))) )
745 $(foreach bin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
746 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin))) )
747 ifdef VBOX_NOT_OSX_105 ## @todo Move as much stuff out of MacOS/ as possible!!
748 $(foreach other, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_OTHER_BINS)\
749 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(other),org.virtualbox.app.macos.$(notdir $(other))) )
750 $(foreach bin, $(filter-out MacOS/VirtualBox,$(VBOX_DI_VBAPP_PROGS)) \
751 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin))) )
752 $(foreach file, $(if-expr defined(VBOX_WITH_WEBSERVICES),MacOS/org.virtualbox.vboxwebsrv.plist,) \
753 MacOS/org.virtualbox.vboxballoonctrl.plist \
754 MacOS/org.virtualbox.vboxautostart.plist \
755 MacOS/VBoxAutostartDarwin.sh \
756 $(if-expr defined(VBOX_WITH_PYTHON),$(addprefix MacOS/, $(VBOX_DI_VBAPP_PYTHON_FILES) vboxshell.py),) \
757 $(if-expr defined(VBOX_WITH_JXPCOM),MacOS/sdk/bindings/xpcom/java/vboxjxpcom.jar,) \
758 $(filter MacOS/%,$(VBOX_DI_VBAPP_MISC_FILES)) \
759 $(if-expr defined(VBOX_WITH_DOCS_PACKING),$(addprefix MacOS/,$(VBOX_ADD_MANUALS)),) \
760 $(if-expr defined(VBOX_WITH_DTRACE),\
761 $(addprefix MacOS/dtrace/lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \
762 $(addprefix MacOS/dtrace/testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \
763 $(addprefix MacOS/dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) ,) \
764 $(addprefix MacOS/nls/,$(VBOX_INSTALL_LANG_FILES)) \
765 , $(NLTAB)$(call VBOX_SIGN_FILE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(file),org.virtualbox.app.$(tolower $(subst $(SP),,$(subst /,.,$(file))))) )
766
767 $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app,,)
768 $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/vmstarter.app,,)
769 $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP),,--deep)
770 else
771 $(foreach other, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_OTHER_BINS) \
772 , $(NLTAB)$(call VBOX_SIGN_VMM_MOD_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(other),org.virtualbox.app.macos.$(notdir $(other))) )
773 $(foreach bin, $(VBOX_DI_VBAPP_PROGS) \
774 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin))) )
775 endif
776endif
777 @# Set the correct owner and set the set-user-ID-on-execution bit on the relevant executables.
778 sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root
779 sudo chmod u+s $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/VBoxNetAdpCtl
780ifdef VBOX_WITH_HARDENING
781 sudo chmod u+s \
782 $(foreach bin,VBoxHeadless VirtualBox VirtualBoxVM VBoxNetDHCP VBoxNetNAT,\
783 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/$(bin))
784endif
785 @# Do keyword replacement in the package info and description files.
786 $(SED) \
787 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
788 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
789 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
790 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
791 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
792 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
793 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
794 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/PkgBuildComponent.plist \
795 $(VBOX_PATH_DI_SRC)/VirtualBox/PkgBuildComponent.plist
796 @# Copy the resources.
797 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/preflight $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/
798ifdef VBOX_WITH_HARDENING
799 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/postflight $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/
800else
801 $(SED) -s '/WITH_HARDENING/d' -o $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/postflight $(VBOX_PATH_DI_SRC)/VirtualBox/postflight
802 $(CHMOD) 0755 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/postflight
803endif
804 @# Build the package.
805 $(VBOX_PKGBUILD) \
806 --root $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/ \
807 --component-plist $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/PkgBuildComponent.plist \
808 --script $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \
809 --identifier org.virtualbox.pkg.virtualbox \
810 --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
811 --install-location /Applications/ \
812 --ownership preserve \
813 $(if-expr defined(VBOX_NOT_OSX_105),--preserve-xattr,) \
814 $(if $(VBOX_MACOSX_INSTALLER_SIGN),--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
815 $@
816 @# Cleanup
817 sudo chown -R "$(shell whoami)" \
818 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root
819 sudo chmod -R a-s \
820 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root
821 sudo rm -Rf \
822 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
823 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
824 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res
825
826#
827# The VirtualBox CLI wrapper scripts.
828#
829$(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg: \
830 $$(wildcard $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/* \
831 $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/*.lproj/*) \
832 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \
833 ,$(VBOX_BRAND_$(f)_VIRTUALBOXCLI_DESCRIPTION_PLIST)) \
834 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
835 $(call MSG_TOOL,pkgbuild,,,$@)
836 @# Cleanup any previously failed attempts.
837 sudo rm -Rf \
838 $@ \
839 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
840 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
841 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res
842 @# Correct directory permissions are important.
843 $(MKDIR) -p \
844 $(@D) \
845 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
846 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res \
847 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/English.lproj
848 $(MKDIR) -p -m 0755 \
849 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr \
850 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin
851 @# Generate the wrapper scripts.
852 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VirtualBox \
853 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VirtualBox "$$@"'
854 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxManage \
855 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxManage "$$@"'
856 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxVRDP \
857 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"'
858 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxHeadless \
859 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"'
860ifdef VBOX_WITH_WEBSERVICES
861 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/vboxwebsrv \
862 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv "$$@"'
863endif
864if defined(VBOX_WITH_VBOX_IMG) || defined(VBOX_WITH_TESTCASES)
865 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/vbox-img \
866 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/vbox-img "$$@"'
867endif
868 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxBalloonCtrl \
869 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl "$$@"'
870 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxAutostart \
871 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart "$$@"'
872ifdef VBOX_WITH_DTRACE
873 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxDTrace \
874 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxDTrace "$$@"'
875endif
876 @# Set the correct owners and file permissions.
877 sudo chmod 0755 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/*
878 sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root
879 sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr
880 @# Build the package.
881 $(VBOX_PKGBUILD) \
882 --root $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin \
883 --identifier org.virtualbox.pkg.virtualboxcli \
884 --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
885 --install-location /usr/local/bin \
886 --ownership preserve \
887 $(if $(VBOX_MACOSX_INSTALLER_SIGN),--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
888 $@
889 @# Cleanup
890 sudo chown -R "$(shell whoami)" \
891 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root
892 sudo rm -Rf \
893 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
894 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
895 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res
896
897
898#
899# Aliases.
900#
901VBoxKEXTs.pkg: $(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg
902VirtualBoxCLI.pkg: $(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg
903VirtualBox.pkg: $(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg
904VirtualBox.mpkg: $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg
905VirtualBox.dmg: $(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)-r$(VBOX_SVN_REV).dmg
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