1 | # $Id: Makefile.kmk 98628 2023-02-18 20:10:51Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Install misc stuff and create dist packages for Mac OS X.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | #
|
---|
27 |
|
---|
28 | SUB_DEPTH = ../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 |
|
---|
32 | #
|
---|
33 | # Globals
|
---|
34 | #
|
---|
35 | VBOX_PATH_DI_SRC := $(PATH_SUB_CURRENT)
|
---|
36 | VBOX_DI_OUT_DIR := $(PATH_TARGET)/Installer/darwin
|
---|
37 | BLDDIRS += $(VBOX_DI_OUT_DIR)
|
---|
38 |
|
---|
39 | VBOX_DI_FN_DEP_BOTH = $(VBOX_PATH_DIST)/$1
|
---|
40 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
41 | VBOX_DI_FN_DEP_32 = $(VBOX_PATH_DIST)/$1
|
---|
42 | VBOX_DI_FN_DEP_64 =
|
---|
43 | else
|
---|
44 | VBOX_DI_FN_DEP_64 = $(VBOX_PATH_DIST)/$1
|
---|
45 | VBOX_DI_FN_DEP_32 =
|
---|
46 | endif
|
---|
47 | VBOX_PATH_DIST_OTHER = $(error VBOX_PATH_DIST_OTHER used in a non-combined package deal)
|
---|
48 |
|
---|
49 | ifdef VBOX_WITH_QT6
|
---|
50 | VBOX_QT_VERSION_MAJOR = A
|
---|
51 | else
|
---|
52 | VBOX_QT_VERSION_MAJOR = 5
|
---|
53 | endif
|
---|
54 |
|
---|
55 | ifeq ($(KBUILD_TARGET_ARCH),arm64)
|
---|
56 | VBOX_DI_TARGET_ARCH = arm64
|
---|
57 | VBOX_DI_ARCH_LIST = arm64
|
---|
58 | else # Assume amd64 for now
|
---|
59 | VBOX_DI_TARGET_ARCH = x86_64
|
---|
60 | VBOX_DI_ARCH_LIST = i386,arm64
|
---|
61 | endif
|
---|
62 |
|
---|
63 | # Unset this to speed up things during makefile hacking.
|
---|
64 | VBOX_DARWIN_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
|
---|
65 |
|
---|
66 | # The location of the pkgbuild program.
|
---|
67 | ifndef VBOX_PKGBUILD
|
---|
68 | VBOX_PKGBUILD := pkgbuild
|
---|
69 | endif
|
---|
70 |
|
---|
71 | # The location of the productbuild program.
|
---|
72 | ifndef VBOX_PRODUCTBUILD
|
---|
73 | VBOX_PRODUCTBUILD := productbuild
|
---|
74 | endif
|
---|
75 |
|
---|
76 | # Where we do the packing (override this in LocalConfig.kmk if building on smbfs).
|
---|
77 | ifndef VBOX_PATH_PACK_TMP
|
---|
78 | VBOX_PATH_PACK_TMP := $(VBOX_DI_OUT_DIR)
|
---|
79 | endif
|
---|
80 |
|
---|
81 | # Shorthand for $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app
|
---|
82 | VBOX_PATH_VBOX_APP_TMP := $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app
|
---|
83 |
|
---|
84 |
|
---|
85 | #
|
---|
86 | # Install the darwin docs/license.
|
---|
87 | #
|
---|
88 | INSTALLS += darwin-docs
|
---|
89 | darwin-docs_INST = $(INST_DIST)
|
---|
90 | darwin-docs_MODE = a+r,u+w
|
---|
91 | darwin-docs_SOURCES = \
|
---|
92 | $(VBOX_BRAND_LICENSE_TXT)=>LICENSE
|
---|
93 |
|
---|
94 |
|
---|
95 | #
|
---|
96 | # The packing.
|
---|
97 | #
|
---|
98 | PACKING += $(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).dmg
|
---|
99 | #OTHER_CLEAN = TODO
|
---|
100 |
|
---|
101 |
|
---|
102 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
103 |
|
---|
104 |
|
---|
105 | #
|
---|
106 | # We're running commands as root here, take some care and assertion
|
---|
107 | # a sane environment.
|
---|
108 | #
|
---|
109 | ifeq ($(strip $(VBOX_PATH_DIST)),)
|
---|
110 | $(error VBOX_PATH_DIST=$(VBOX_PATH_DIST))
|
---|
111 | endif
|
---|
112 | ifeq ($(strip $(VBOX_PATH_DIST)),/)
|
---|
113 | $(error VBOX_PATH_DIST=$(VBOX_PATH_DIST))
|
---|
114 | endif
|
---|
115 | ifeq ($(strip $(VBOX_PATH_PACK_TMP)),)
|
---|
116 | $(error VBOX_PATH_PACK_TMP=$(VBOX_PATH_PACK_TMP))
|
---|
117 | endif
|
---|
118 | ifeq ($(strip $(VBOX_PATH_PACK_TMP)),/)
|
---|
119 | $(error VBOX_PATH_PACK_TMP=$(VBOX_PATH_PACK_TMP))
|
---|
120 | endif
|
---|
121 |
|
---|
122 |
|
---|
123 | # Check for additional manuals
|
---|
124 | VBOX_ADD_MANUALS := $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_$(f).pdf)
|
---|
125 |
|
---|
126 | VBOX_ADD_MANUAL_de_DE := $(filter $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_de_DE.pdf,$(VBOX_ADD_MANUALS))
|
---|
127 | VBOX_ADD_MANUAL_fr_FR := $(filter $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_fr_FR.pdf,$(VBOX_ADD_MANUALS))
|
---|
128 |
|
---|
129 | #
|
---|
130 | # The disk image.
|
---|
131 | #
|
---|
132 | $(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).dmg: \
|
---|
133 | $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg \
|
---|
134 | $(VBOX_BRAND_DARWIN_DISKIMAGE_BG) \
|
---|
135 | $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE) \
|
---|
136 | $$(wildcard $(VBOX_PATH_DI_SRC)/DiskImage/*) \
|
---|
137 | $(if $(VBOX_WITH_DOCS_PACKING), \
|
---|
138 | $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf \
|
---|
139 | $(VBOX_ADD_MANUALS)) \
|
---|
140 | $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
|
---|
141 | $(call MSG_TOOL,hdiutil,,,$@)
|
---|
142 | @# Cleanup any previously failed attempts and various trash.
|
---|
143 | sudo rm -Rf $(VBOX_PATH_PACK_TMP)/DiskImage.tmp
|
---|
144 | $(MKDIR) -p $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/
|
---|
145 | sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/
|
---|
146 | sudo rm -Rf \
|
---|
147 | $@ \
|
---|
148 | $(VBOX_PATH_PACK_TMP)/DiskImage/
|
---|
149 | sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage.tmp $(VBOX_PATH_PACK_TMP)/DiskImage
|
---|
150 | @# Remove .dmg packages from old depend builds
|
---|
151 | $(QUIET)$(RM) -f $(wildcard $(VBOX_PATH_DIST)/VirtualBox-*-r*.dmg)
|
---|
152 | @# Populate the image with uninstaller, readme, picture, and .VolumeIcon.icns. (TODO)
|
---|
153 | $(INSTALL) $(VBOX_PATH_DI_SRC)/DiskImage/VirtualBox_Uninstall.tool $(VBOX_PATH_PACK_TMP)/DiskImage/
|
---|
154 | ifdef VBOX_SIGNING_MODE
|
---|
155 | $(call VBOX_SIGN_FILE_FN,$(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox_Uninstall.tool,org.virtualbox.dmg.uninstaller)
|
---|
156 | @# Code signing (the non-local one) seems to be losing the execute permission.
|
---|
157 | chmod 0755 $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox_Uninstall.tool
|
---|
158 | endif
|
---|
159 | ifeq (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
|
---|
174 | endif
|
---|
175 | @# hdiutil of OS X 10.10 adds a .Trashes directory and some suggest this may upset the image size calculations (-5341).
|
---|
176 | $(MKDIR) -m 1333 $(VBOX_PATH_PACK_TMP)/DiskImage/.Trashes
|
---|
177 | @# Change the owners.
|
---|
178 | sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/DiskImage
|
---|
179 | @# Create the image. We calculate the size our selves, adding 32MB (was 16MB) for fudging (min 13MB fudge needed on high sierra).
|
---|
180 | sudo hdiutil create -format UDBZ -volname "VirtualBox" -srcfolder "$(VBOX_PATH_PACK_TMP)/DiskImage" \
|
---|
181 | -size $(DOLLAR)((`sudo /usr/bin/du -sk "$(VBOX_PATH_PACK_TMP)/DiskImage/" | /usr/bin/cut -f1` + 32768))k \
|
---|
182 | "$@"
|
---|
183 | @# Change (back) the owner so it can be deleted by the user.
|
---|
184 | sudo chown "$(shell whoami)" "$@"
|
---|
185 | sudo chown -R "$(shell whoami)" $(VBOX_PATH_PACK_TMP)/DiskImage
|
---|
186 | ifdef VBOX_SIGNING_MODE
|
---|
187 | ifndef VBOX_WITHOUT_SIGNED_DMG
|
---|
188 | @# Sign the created dmg.
|
---|
189 | $(call VBOX_SIGN_DMG_FN,$@,org.virtualbox.dmg)
|
---|
190 | if $(intersects darwin darwin_notarize all 1,$(VBOX_WITH_CORP_CODE_SIGNING))
|
---|
191 | @# Notarize the signed dmg (includes stapling).
|
---|
192 | $(call VBOX_NOTARIZE_FILE_FN,$@,org.virtualbox.VirtualBox.$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD).$(VBOX_SVN_REV))
|
---|
193 | endif
|
---|
194 | endif
|
---|
195 | endif
|
---|
196 |
|
---|
197 | #
|
---|
198 | # The meta-package.
|
---|
199 | #
|
---|
200 | $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg: \
|
---|
201 | $(if $(VBOX_WITH_VBOXDRV), $(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg) \
|
---|
202 | $(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg \
|
---|
203 | $(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg \
|
---|
204 | $$(wildcard \
|
---|
205 | $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/* \
|
---|
206 | $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/*.lproj/*) \
|
---|
207 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_RTF)) \
|
---|
208 | $(if $(VBOX_WITH_FUSE_PACKING), $(VBOX_PATH_PACK_TMP)/Packages/OSXFuseCore.pkg) \
|
---|
209 | $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
|
---|
210 | $(call MSG_TOOL,productbuild,,,$@)
|
---|
211 | @# Cleanup any previously failed attempts.
|
---|
212 | sudo rm -Rf \
|
---|
213 | $@ \
|
---|
214 | $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.root \
|
---|
215 | $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.desc \
|
---|
216 | $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res
|
---|
217 | @# Correct directory permissions are important.
|
---|
218 | $(MKDIR) -p \
|
---|
219 | $(@D) \
|
---|
220 | $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.desc \
|
---|
221 | $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res \
|
---|
222 | $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj
|
---|
223 | @# Do keyword replacement in the package info and description files.
|
---|
224 | $(SED) \
|
---|
225 | -e 's+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g' \
|
---|
226 | -e 's+@VBOX_VERSION_MAJOR@+$(VBOX_VERSION_MAJOR)+g' \
|
---|
227 | -e 's+@VBOX_VERSION_MINOR@+$(VBOX_VERSION_MINOR)+g' \
|
---|
228 | -e 's+@VBOX_VERSION_BUILD@+$(VBOX_VERSION_BUILD)+g' \
|
---|
229 | -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \
|
---|
230 | -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \
|
---|
231 | -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \
|
---|
232 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj/Welcome.rtf \
|
---|
233 | $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Welcome.rtf
|
---|
234 | @# Do keyword replacement in the distribution script.
|
---|
235 | $(SED) \
|
---|
236 | -e 's+@VBOX_TARGET_ARCH@+$(VBOX_DI_TARGET_ARCH)+g' \
|
---|
237 | -e 's+@VBOX_ARCH_LIST@+$(VBOX_DI_ARCH_LIST)+g' \
|
---|
238 | --output $(VBOX_PATH_PACK_TMP)/distribution.dist \
|
---|
239 | $(if $(VBOX_WITH_VBOXDRV), $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/distribution.dist, $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/distribution-driverless.dist)
|
---|
240 | @# Copy the resources.
|
---|
241 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Conclusion.rtf $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj/Conclusion.rtf
|
---|
242 | $(SED) \
|
---|
243 | -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \
|
---|
244 | -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \
|
---|
245 | -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \
|
---|
246 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj/Localizable.strings \
|
---|
247 | $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Localizable.strings
|
---|
248 | $(INSTALL) -m 0644 $(VBOX_BRAND_DARWIN_INSTALLER_BG) $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/background.tif
|
---|
249 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
|
---|
250 | $(MKDIR) -p \
|
---|
251 | $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
|
---|
252 | $(SED) \
|
---|
253 | -e 's+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g' \
|
---|
254 | -e 's+@VBOX_VERSION_MAJOR@+$(VBOX_VERSION_MAJOR)+g' \
|
---|
255 | -e 's+@VBOX_VERSION_MINOR@+$(VBOX_VERSION_MINOR)+g' \
|
---|
256 | -e 's+@VBOX_VERSION_BUILD@+$(VBOX_VERSION_BUILD)+g' \
|
---|
257 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Welcome.rtf \
|
---|
258 | $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_RTF)$(NLTAB) \
|
---|
259 | $(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) \
|
---|
260 | $(SED) \
|
---|
261 | -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \
|
---|
262 | -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \
|
---|
263 | -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \
|
---|
264 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Localizable.strings \
|
---|
265 | $(VBOX_BRAND_$(f)_VIRTUALBOX_LOCALIZABLE_STRINGS)$(NLTAB) \
|
---|
266 | )
|
---|
267 | @# Build the package.
|
---|
268 | $(VBOX_PRODUCTBUILD) \
|
---|
269 | --distribution $(VBOX_PATH_PACK_TMP)/distribution.dist \
|
---|
270 | --package-path $(VBOX_PATH_PACK_TMP)/Packages \
|
---|
271 | --resources $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res \
|
---|
272 | --identifier org.VirtualBox.mpkg.virtualbox \
|
---|
273 | --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
|
---|
274 | $(if-expr defined(VBOX_MACOSX_INSTALLER_SIGN) && $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) == "",--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
|
---|
275 | $@
|
---|
276 | ifdef VBOX_SIGNING_MODE
|
---|
277 | if $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING))
|
---|
278 | @# Sign the created pkg.
|
---|
279 | $(call VBOX_SIGN_PKG_FN,$@,org.VirtualBox.mpkg.virtualbox)
|
---|
280 | endif
|
---|
281 | endif
|
---|
282 | @# Cleanup.
|
---|
283 | sudo rm -Rf \
|
---|
284 | $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.root \
|
---|
285 | $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.desc \
|
---|
286 | $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res
|
---|
287 |
|
---|
288 |
|
---|
289 | ifdef VBOX_WITH_VBOXDRV
|
---|
290 | #
|
---|
291 | # The VirtualBox Kernel extensions.
|
---|
292 | #
|
---|
293 | VBOX_DI_KEXTS_UNIVERSAL = VBoxDrv VBoxNetFlt VBoxNetAdp
|
---|
294 | VBOX_DI_KEXTS = $(VBOX_DI_KEXTS_UNIVERSAL)
|
---|
295 |
|
---|
296 | $(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg: \
|
---|
297 | $(foreach kext,$(VBOX_DI_KEXTS_UNIVERSAL), $(call VBOX_DI_FN_DEP_BOTH,$(kext).kext/Contents/MacOS/$(kext))) \
|
---|
298 | $(foreach kext,$(VBOX_DI_KEXTS), $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist) \
|
---|
299 | $$(wildcard \
|
---|
300 | $(VBOX_PATH_DI_SRC)/VBoxKEXTs/* \
|
---|
301 | $(VBOX_PATH_DI_SRC)/VBoxKEXTs/*.lproj/*) \
|
---|
302 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
|
---|
303 | $(VBOX_BRAND_$(f)_VBOXKEXTS_DESCRIPTION_PLIST) \
|
---|
304 | $(VBOX_BRAND_$(f)_VBOXKEXTS_README_HTML) \
|
---|
305 | $(VBOX_BRAND_$(f)_VBOXKEXTS_INSTALLATIONCHECK_STRINGS)) \
|
---|
306 | $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
|
---|
307 | $(call MSG_TOOL,pkgbuild,,,$@)
|
---|
308 | @# Cleanup any previously failed attempts.
|
---|
309 | sudo rm -Rf \
|
---|
310 | $@ \
|
---|
311 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
|
---|
312 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
|
---|
313 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res
|
---|
314 | @# Correct directory permissions are important.
|
---|
315 | $(MKDIR) -p \
|
---|
316 | $(@D) \
|
---|
317 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
|
---|
318 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \
|
---|
319 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj
|
---|
320 | $(MKDIR) -p -m 0755 \
|
---|
321 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
|
---|
322 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/LaunchDaemons \
|
---|
323 | $(foreach kext,$(VBOX_DI_KEXTS), \
|
---|
324 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext \
|
---|
325 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents \
|
---|
326 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS )
|
---|
327 | @# Copy the launch daemon bits.
|
---|
328 | $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/VirtualBoxStartup.sh $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/LaunchDaemons/
|
---|
329 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/org.virtualbox.startup.plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/LaunchDaemons/
|
---|
330 | @# Copy the common files (Info.plist).
|
---|
331 | $(foreach kext,$(VBOX_DI_KEXTS), \
|
---|
332 | $(NLTAB)$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/)
|
---|
333 | @# Copy the binaries and invoking lipo.
|
---|
334 | $(foreach kext,$(VBOX_DI_KEXTS), \
|
---|
335 | $(NLTAB)$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/$(kext).kext/Contents/MacOS/$(kext) $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS/)
|
---|
336 | @# Sign the kext bundles.
|
---|
337 | ifdef VBOX_SIGNING_MODE
|
---|
338 | $(foreach kext,$(VBOX_DI_KEXTS) \
|
---|
339 | ,$(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS/$(kext),org.virtualbox.app.kext.$(kext)) )
|
---|
340 | $(foreach kext,$(VBOX_DI_KEXTS) \
|
---|
341 | ,$(NLTAB)$(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext,org.virtualbox.app.kext.$(kext)) )
|
---|
342 | ## @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 )
|
---|
343 | endif
|
---|
344 | @# Set the correct owners.
|
---|
345 | sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/
|
---|
346 | @# Do keyword replacement in the package info and description files.
|
---|
347 | $(SED) \
|
---|
348 | -e 's+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g' \
|
---|
349 | -e 's+@VBOX_VERSION_MAJOR@+$(VBOX_VERSION_MAJOR)+g' \
|
---|
350 | -e 's+@VBOX_VERSION_MINOR@+$(VBOX_VERSION_MINOR)+g' \
|
---|
351 | -e 's+@VBOX_VERSION_BUILD@+$(VBOX_VERSION_BUILD)+g' \
|
---|
352 | -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \
|
---|
353 | -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \
|
---|
354 | -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \
|
---|
355 | --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/PkgBuildComponent.plist \
|
---|
356 | $(VBOX_PATH_DI_SRC)/VBoxKEXTs/PkgBuildComponent.plist
|
---|
357 | @# Copy the resources.
|
---|
358 | $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/postflight $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/
|
---|
359 | @# Build the package.
|
---|
360 | $(VBOX_PKGBUILD) \
|
---|
361 | --root $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/ \
|
---|
362 | --component-plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/PkgBuildComponent.plist \
|
---|
363 | --script $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \
|
---|
364 | --identifier org.virtualbox.pkg.vboxkexts \
|
---|
365 | --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
|
---|
366 | --install-location "/Library/Application Support/VirtualBox" \
|
---|
367 | --ownership preserve \
|
---|
368 | $(if-expr defined(VBOX_MACOSX_INSTALLER_SIGN) && $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) == "",--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
|
---|
369 | $@
|
---|
370 | ifdef VBOX_SIGNING_MODE
|
---|
371 | if $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING))
|
---|
372 | @# Sign the created pkg.
|
---|
373 | $(call VBOX_SIGN_PKG_FN,$@,org.virtualbox.pkg.vboxkexts)
|
---|
374 | endif
|
---|
375 | endif
|
---|
376 | @# Cleanup
|
---|
377 | sudo chown -R "$(shell whoami)" \
|
---|
378 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root
|
---|
379 | sudo rm -Rf \
|
---|
380 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
|
---|
381 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
|
---|
382 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res
|
---|
383 | endif # !VBOX_WITH_VBOXDRV
|
---|
384 |
|
---|
385 |
|
---|
386 | #
|
---|
387 | # Figure out which languages that we support and construct
|
---|
388 | # .qm and .lproj lists for these.
|
---|
389 | #
|
---|
390 | include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
|
---|
391 | ifdef VBOX_WITH_QTGUI
|
---|
392 | VBOX_INSTALL_LANG_FILES := $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES), VirtualBox_$(f).qm qt_$(f).qm)
|
---|
393 | else
|
---|
394 | VBOX_INSTALL_LANG_FILES :=
|
---|
395 | endif
|
---|
396 | VBOX_INSTALL_LANG_LPROJ := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
|
---|
397 |
|
---|
398 |
|
---|
399 | #
|
---|
400 | # The VirtualBox Application.
|
---|
401 | #
|
---|
402 |
|
---|
403 | VBOX_DI_VBAPP_PROGS_HARDENED = \
|
---|
404 | MacOS/VBoxHeadless \
|
---|
405 | MacOS/VBoxNetDHCP \
|
---|
406 | MacOS/VBoxNetNAT \
|
---|
407 | MacOS/VBoxVMMPreload
|
---|
408 | ifdef VBOX_WITH_QTGUI
|
---|
409 | VBOX_DI_VBAPP_PROGS_HARDENED += \
|
---|
410 | Resources/VirtualBoxVM.app/Contents/MacOS/VirtualBoxVM
|
---|
411 | endif
|
---|
412 |
|
---|
413 | VBOX_DI_VBAPP_PROGS = \
|
---|
414 | MacOS/VBoxManage \
|
---|
415 | MacOS/VBoxSVC \
|
---|
416 | MacOS/VBoxXPCOMIPCD \
|
---|
417 | MacOS/VBoxNetAdpCtl \
|
---|
418 | MacOS/VBoxExtPackHelperApp \
|
---|
419 | MacOS/VBoxBugReport \
|
---|
420 | MacOS/VBoxBalloonCtrl \
|
---|
421 | MacOS/VBoxAutostart \
|
---|
422 | $(if $(VBOX_WITH_WEBSERVICES),MacOS/vboxwebsrv) \
|
---|
423 | $(if $(VBOX_WITH_DTRACE),MacOS/VBoxDTrace,) \
|
---|
424 | $(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),MacOS/VBoxAudioTest,)
|
---|
425 | ifdef VBOX_WITH_QTGUI
|
---|
426 | VBOX_DI_VBAPP_PROGS += \
|
---|
427 | MacOS/VirtualBox
|
---|
428 | endif
|
---|
429 |
|
---|
430 | VBOX_DI_VBAPP_DYLIBS = \
|
---|
431 | MacOS/VBoxDD.dylib \
|
---|
432 | MacOS/VBoxDD2.dylib \
|
---|
433 | MacOS/VBoxDDU.dylib \
|
---|
434 | MacOS/VBoxRT.dylib \
|
---|
435 | $(if $(VBOX_WITH_LIBSSH),MacOS/VBoxLibSsh.dylib,) \
|
---|
436 | $(if $(VBOX_WITH_SHARED_FOLDERS),MacOS/VBoxSharedFolders.dylib,) \
|
---|
437 | $(if $(VBOX_WITH_SHARED_CLIPBOARD),MacOS/VBoxSharedClipboard.dylib,) \
|
---|
438 | $(if $(VBOX_WITH_DRAG_AND_DROP),MacOS/VBoxDragAndDropSvc.dylib,) \
|
---|
439 | $(if $(VBOX_WITH_GUEST_PROPS),MacOS/VBoxGuestPropSvc.dylib,) \
|
---|
440 | MacOS/VBoxHostChannel.dylib \
|
---|
441 | MacOS/VBoxVMM.dylib \
|
---|
442 | MacOS/VBoxXPCOM.dylib \
|
---|
443 | MacOS/VBoxXPCOMC.dylib \
|
---|
444 | MacOS/components/VBoxC.dylib \
|
---|
445 | MacOS/components/VBoxSVCM.dylib \
|
---|
446 | MacOS/components/VBoxXPCOMIPCC.dylib \
|
---|
447 | MacOS/VBoxAuth.dylib \
|
---|
448 | MacOS/VBoxAuthSimple.dylib \
|
---|
449 | $(if $(VBOX_WITH_GUEST_CONTROL),MacOS/VBoxGuestControlSvc.dylib,)
|
---|
450 | ifdef VBOX_WITH_QTGUI
|
---|
451 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
452 | MacOS/UICommon.dylib
|
---|
453 | ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/libqtaccessiblewidgets.dylib),)
|
---|
454 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
455 | MacOS/accessible/libqtaccessiblewidgets.dylib
|
---|
456 | endif
|
---|
457 | endif
|
---|
458 | if defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL)
|
---|
459 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
460 | MacOS/VBoxVRDP.dylib
|
---|
461 | endif
|
---|
462 | ifdef VBOX_WITH_DEBUGGER
|
---|
463 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
464 | MacOS/DbgPlugInDiggers.dylib
|
---|
465 | if defined(VBOX_WITH_QTGUI) && defined(VBOX_WITH_DEBUGGER_GUI)
|
---|
466 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
467 | MacOS/VBoxDbg.dylib
|
---|
468 | endif
|
---|
469 | endif
|
---|
470 | ifdef VBOX_WITH_HARDENING
|
---|
471 | VBOX_DI_VBAPP_DYLIBS += $(addprefix MacOS/,$(addsuffix .dylib,$(notdir $(VBOX_DI_VBAPP_PROGS_HARDENED))))
|
---|
472 | endif
|
---|
473 | ifdef VBOX_WITH_HDDPARALLELS_INSTALL
|
---|
474 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
475 | MacOS/VBoxHDDParallels.dylib
|
---|
476 | endif
|
---|
477 | if defined(VBOX_WITH_PYTHON) && !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6) && "$(VBOX_DEF_MACOSX_VERSION_MIN)" vlt "10.13"
|
---|
478 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
479 | MacOS/VBoxPython2_6.so
|
---|
480 | endif
|
---|
481 | if defined(VBOX_WITH_PYTHON) && !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_7)
|
---|
482 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
483 | MacOS/VBoxPython2_7.so
|
---|
484 | endif
|
---|
485 | ifdef VBOX_WITH_VMSVGA3D
|
---|
486 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
487 | MacOS/VBoxSVGA3D.dylib \
|
---|
488 | MacOS/VBoxSVGA3DObjC.dylib
|
---|
489 | endif
|
---|
490 | ifdef VBOX_WITH_DXVK
|
---|
491 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
492 | MacOS/VBoxDxVk.dylib \
|
---|
493 | MacOS/libMoltenVK.dylib
|
---|
494 | endif
|
---|
495 |
|
---|
496 | ifdef VBOX_WITH_PYTHON
|
---|
497 | VBOX_DI_VBAPP_DYLIBS.x86 += \
|
---|
498 | MacOS/VBoxPython2_5.so \
|
---|
499 | $(if-expr defined(VBOX_WITH_MAC_OS_X_10_4_SUPPORT),MacOS/VBoxPython2_3.so,)
|
---|
500 | endif
|
---|
501 |
|
---|
502 | VBOX_DI_VBAPP_DYLIBS.amd64 :=
|
---|
503 | if defined(VBOX_WITH_PYTHON) && defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6) && "$(VBOX_DEF_MACOSX_VERSION_MIN)" vlt "10.13"
|
---|
504 | VBOX_DI_VBAPP_DYLIBS.amd64 += \
|
---|
505 | MacOS/VBoxPython2_6.so
|
---|
506 | endif
|
---|
507 |
|
---|
508 | if defined(VBOX_WITH_JXPCOM)
|
---|
509 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
510 | MacOS/libvboxjxpcom.jnilib
|
---|
511 | endif
|
---|
512 |
|
---|
513 | if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64), $(VBOX_DI_VBAPP_DYLIBS.x86))
|
---|
514 | $(error Conflict.$(NLTAB)VBOX_DI_VBAPP_DYLIBS.amd64=$(VBOX_DI_VBAPP_DYLIBS.amd64)$(NLTAB)VBOX_DI_VBAPP_DYLIBS.x86 =$(VBOX_DI_VBAPP_DYLIBS.x86))
|
---|
515 | endif
|
---|
516 | if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_DYLIBS.x86), $(VBOX_DI_VBAPP_DYLIBS))
|
---|
517 | $(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))
|
---|
518 | endif
|
---|
519 |
|
---|
520 | VBOX_DI_VBAPP_UNIVERSAL_PROGS = \
|
---|
521 | $(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),MacOS/vbox-img,) \
|
---|
522 | $(if $(VBOX_WITH_VBOXIMGMOUNT),MacOS/vboximg-mount,)
|
---|
523 | ifdef VBOX_WITH_QTGUI
|
---|
524 | VBOX_DI_VBAPP_UNIVERSAL_PROGS += \
|
---|
525 | MacOS/vmstarter
|
---|
526 | endif
|
---|
527 |
|
---|
528 | ifdef VBOX_WITH_R0_MODULES
|
---|
529 | VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS = \
|
---|
530 | MacOS/VMMR0.r0 \
|
---|
531 | MacOS/VBoxDDR0.r0
|
---|
532 | else
|
---|
533 | VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS =
|
---|
534 | endif
|
---|
535 |
|
---|
536 | ifdef VBOX_WITH_RAW_MODE
|
---|
537 | VBOX_DI_VBAPP_OTHER_BINS = \
|
---|
538 | MacOS/VMMRC.rc \
|
---|
539 | MacOS/VBoxDDRC.rc
|
---|
540 | else
|
---|
541 | VBOX_DI_VBAPP_OTHER_BINS =
|
---|
542 | endif
|
---|
543 |
|
---|
544 | VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES = \
|
---|
545 | Resources/virtualbox.icns \
|
---|
546 | Resources/virtualbox.png \
|
---|
547 | Resources/virtualbox-vbox.icns \
|
---|
548 | Resources/virtualbox-vbox-extpack.icns \
|
---|
549 | Resources/virtualbox-ovf.icns \
|
---|
550 | Resources/virtualbox-ova.icns \
|
---|
551 | Resources/virtualbox-vdi.icns \
|
---|
552 | Resources/virtualbox-vmdk.icns \
|
---|
553 | Resources/virtualbox-vhd.icns \
|
---|
554 | Resources/virtualbox-hdd.icns
|
---|
555 |
|
---|
556 | VBOX_DI_VBAPP_MISC_FILES = \
|
---|
557 | MacOS/components/VBoxXPCOMBase.xpt \
|
---|
558 | MacOS/components/VirtualBox_XPCOM.xpt
|
---|
559 | ifdef VBOX_WITH_QTGUI # Yeah, the output w/o the qt gui is a bit useless. But we just want it building now.
|
---|
560 | VBOX_DI_VBAPP_MISC_FILES += \
|
---|
561 | Info.plist \
|
---|
562 | PkgInfo \
|
---|
563 | $(VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES) \
|
---|
564 | Resources/VirtualBoxVM.app/Contents/Info.plist \
|
---|
565 | Resources/VirtualBoxVM.app/Contents/PkgInfo \
|
---|
566 | $(addprefix Resources/VirtualBoxVM.app/Contents/,$(VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES)) \
|
---|
567 | Resources/vmstarter.app/Contents/Info.plist \
|
---|
568 | Resources/vmstarter.app/Contents/PkgInfo \
|
---|
569 | $(addprefix Resources/vmstarter.app/Contents/,$(VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES))
|
---|
570 | endif
|
---|
571 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
572 | VBOX_DI_VBAPP_MISC_FILES += \
|
---|
573 | MacOS/UserManual.pdf
|
---|
574 | ifdef VBOX_WITH_DOCS_QHELP_PACKING
|
---|
575 | VBOX_DI_VBAPP_MISC_FILES += \
|
---|
576 | MacOS/UserManual.qch \
|
---|
577 | MacOS/UserManual.qhc
|
---|
578 | endif
|
---|
579 | endif
|
---|
580 | ifdef VBOX_WITH_ADDITIONS_PACKING
|
---|
581 | ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso),)
|
---|
582 | VBOX_DI_VBAPP_MISC_FILES += \
|
---|
583 | MacOS/VBoxGuestAdditions.iso
|
---|
584 | endif
|
---|
585 | endif
|
---|
586 | ifdef VBOX_WITH_EFIFW_PACKING
|
---|
587 | VBOX_DI_VBAPP_MISC_FILES += \
|
---|
588 | MacOS/VBoxEFI32.fd \
|
---|
589 | MacOS/VBoxEFI64.fd
|
---|
590 | endif
|
---|
591 | VBOX_DI_VBAPP_SYMLINKS =
|
---|
592 | ifdef VBOX_WITH_QTGUI
|
---|
593 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
594 | $(foreach qtmod, $(VBOX_QT_MOD_NAMES), Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod)) \
|
---|
595 | plugins/platforms/libqcocoa$(SUFF_DLL) \
|
---|
596 | plugins/platforms/libqminimal$(SUFF_DLL) \
|
---|
597 | plugins/platforms/libqoffscreen$(SUFF_DLL) \
|
---|
598 | plugins/sqldrivers/libqsqlite$(SUFF_DLL) \
|
---|
599 | plugins/styles/libqmacstyle$(SUFF_DLL)
|
---|
600 | VBOX_DI_VBAPP_MISC_FILES += \
|
---|
601 | $(foreach qtmod, $(VBOX_QT_MOD_NAMES), Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/Resources/Info.plist)
|
---|
602 | VBOX_DI_VBAPP_SYMLINKS += \
|
---|
603 | Resources/vmstarter.app/Contents/MacOS=>../../../MacOS/ \
|
---|
604 | $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
|
---|
605 | ,Frameworks/$(qtmod).framework/Versions/Current=>$(VBOX_QT_VERSION_MAJOR) )
|
---|
606 | endif
|
---|
607 | ifdef VBOX_WITH_PYTHON
|
---|
608 | # Python XPCOM glue
|
---|
609 | VBOX_DI_VBAPP_PYTHON_FILES = \
|
---|
610 | $(VBOXINST_SDK_BINDINGS_XPCOM_PYTHON_FILES) \
|
---|
611 | $(VBOXINST_SDK_INSTALLER_PYTHON_FILES)
|
---|
612 | endif
|
---|
613 | ifdef VBOX_WITH_INTNET_SERVICE_IN_R3
|
---|
614 | VBOX_DI_VBAPP_PROGS += \
|
---|
615 | XPCServices/org.virtualbox.intnet.xpc/Contents/MacOS/VBoxIntNetSwitch
|
---|
616 | VBOX_DI_VBAPP_MISC_FILES += \
|
---|
617 | XPCServices/org.virtualbox.intnet.xpc/Contents/Info.plist
|
---|
618 | ifdef VBOX_WITH_QTGUI
|
---|
619 | VBOX_DI_VBAPP_SYMLINKS += \
|
---|
620 | Resources/VirtualBoxVM.app/Contents/XPCServices=>../../../XPCServices
|
---|
621 | endif
|
---|
622 | endif
|
---|
623 |
|
---|
624 | VBOX_VIRTUALBOX_APP_ENTITLEMENTS := $(PATH_ROOT)/src/VBox/HostDrivers/Support/darwin/SUPR3HardenedEntitlements.plist
|
---|
625 | VBOX_VIRTUALBOXVM_APP_ENTITLEMENTS := $(PATH_ROOT)/src/VBox/HostDrivers/Support/darwin/SUPR3HardenedEntitlementsVM.plist
|
---|
626 |
|
---|
627 | ##
|
---|
628 | # Add application and team ID into entitlement file
|
---|
629 | # $(evalcall def_vbox_entitlement_add_app_and_team_id)
|
---|
630 | # @param 1 Source entitlement file.
|
---|
631 | # @param 2 Target entitlement file.
|
---|
632 | # @param 3 Application ID.
|
---|
633 | # @param 4 Team ID.
|
---|
634 | define def_vbox_entitlement_add_app_and_team_id =
|
---|
635 | $(2): $(1) $$(VBOX_DARWIN_INST_DEP_ON_MAKEFILE) | $$$$(dir $$$$@)
|
---|
636 | $$(QUIET)$$(SED) \
|
---|
637 | -e '/^<dict>$$$$/a \ <key>com.apple.application-identifier</key>\n <string>$(strip $(4)).$(strip $(3))</string>\n <key>com.apple.developer.team-identifier</key>\n <string>$(strip $(4))</string>' \
|
---|
638 | --output $$@ $$<
|
---|
639 | endef
|
---|
640 |
|
---|
641 | if defined(VBOX_WITH_MACOS_HARDENED_RUNTIME) && defined(VBOX_SIGNING_MODE) && defined(VBOX_PROVISIONPROFILE_TEAM_ID)
|
---|
642 | ifdef VBOX_VIRTUALBOX_APP_ID
|
---|
643 | VBOX_VIRTUALBOX_APP_ENTITLEMENTS := $(VBOX_PATH_PACK_TMP)/SUPR3HardenedEntitlements.plist
|
---|
644 | $(evalcall2 def_vbox_entitlement_add_app_and_team_id,$(PATH_ROOT)/src/VBox/HostDrivers/Support/darwin/SUPR3HardenedEntitlements.plist,$(VBOX_VIRTUALBOX_APP_ENTITLEMENTS),$(VBOX_VIRTUALBOX_APP_ID),$(VBOX_PROVISIONPROFILE_TEAM_ID))
|
---|
645 | endif
|
---|
646 |
|
---|
647 | ifdef VBOX_VIRTUALBOXVM_APP_ID
|
---|
648 | VBOX_VIRTUALBOXVM_APP_ENTITLEMENTS := $(VBOX_PATH_PACK_TMP)/SUPR3HardenedEntitlementsVM.plist
|
---|
649 | $(evalcall2 def_vbox_entitlement_add_app_and_team_id,$(PATH_ROOT)/src/VBox/HostDrivers/Support/darwin/SUPR3HardenedEntitlementsVM.plist,$(VBOX_VIRTUALBOXVM_APP_ENTITLEMENTS),$(VBOX_VIRTUALBOXVM_APP_ID),$(VBOX_PROVISIONPROFILE_TEAM_ID))
|
---|
650 | endif
|
---|
651 | endif
|
---|
652 |
|
---|
653 | # (The dependencies are including way too much here because I'm lazy.)
|
---|
654 | $(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg: \
|
---|
655 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
|
---|
656 | $(VBOX_BRAND_$(f)_VIRTUALBOX_DESCRIPTION_PLIST)) \
|
---|
657 | $(foreach f, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
|
---|
658 | $(VBOX_DI_VBAPP_OTHER_BINS) $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_PROGS_HARDENED) $(VBOX_DI_VBAPP_MISC_FILES) \
|
---|
659 | ,$(call VBOX_DI_FN_DEP_BOTH,VirtualBox.app/Contents/$(f)) ) \
|
---|
660 | $(foreach f, $(VBOX_DI_VBAPP_DYLIBS.x86) $(VBOX_DI_VBAPP_MISC_FILES.x86) \
|
---|
661 | ,$(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/$(f)) ) \
|
---|
662 | $(foreach f, $(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_MISC_FILES.amd64) \
|
---|
663 | ,$(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/$(f)) ) \
|
---|
664 | \
|
---|
665 | $(if $(VBOX_WITH_DOCS_PACKING),$(VBOX_ADD_MANUALS),) \
|
---|
666 | $(VBOX_BRAND_LICENSE_TXT) \
|
---|
667 | $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*) \
|
---|
668 | $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*.lproj/*) \
|
---|
669 | $$(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/,$(VBOX_INSTALL_LANG_FILES)) \
|
---|
670 | \
|
---|
671 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/*) \
|
---|
672 | $(filter-out Disabled, $(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/*)) \
|
---|
673 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*) \
|
---|
674 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/*) \
|
---|
675 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*) \
|
---|
676 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*.lproj/*) \
|
---|
677 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/*) \
|
---|
678 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/Resources/*) \
|
---|
679 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/Resources/*.lproj/*) \
|
---|
680 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*.lproj/*) \
|
---|
681 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/*) \
|
---|
682 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/additions/*) \
|
---|
683 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/components/*) \
|
---|
684 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/*) \
|
---|
685 | $(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UnattendedTemplates/, $(VBOX_UNATTENDED_TEMPLATES)) \
|
---|
686 | $(if-expr defined(VBOX_WITH_PYTHON), $(addprefix $(VBOX_PATH_DIST)/, $(VBOX_DI_VBAPP_PYTHON_FILES)),) \
|
---|
687 | $(if-expr defined(VBOX_WITH_JXPCOM), $(addprefix $(VBOX_PATH_DIST)/, sdk/bindings/xpcom/java/vboxjxpcom.jar),) \
|
---|
688 | $(if-expr defined(VBOX_PROVISIONPROFILE_TEAM_ID),$(VBOX_PATH_DI_SRC)/VirtualBox/$(VBOX_PROVISIONPROFILE_TEAM_ID).provisionprofile,) \
|
---|
689 | $(if $(VBOX_WITH_WEBSERVICES),$(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist,) \
|
---|
690 | $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxballoonctrl.plist \
|
---|
691 | $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxautostart.plist \
|
---|
692 | $(VBOX_PATH_DI_SRC)/VirtualBox/VBoxAutostartDarwin.sh \
|
---|
693 | $(if-expr defined(VBOX_WITH_DTRACE), \
|
---|
694 | $(foreach f, $(VBOXINST_DTRACE_LIB_ARCH_FILES), \
|
---|
695 | $(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/MacOS/dtrace/lib/x86/$f) \
|
---|
696 | $(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/MacOS/dtrace/lib/amd64/$f)) \
|
---|
697 | $(foreach f, $(VBOXINST_DTRACE_TESTCASE_ARCH_FILES), \
|
---|
698 | $(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/MacOS/dtrace/testcase/x86/$f) \
|
---|
699 | $(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/MacOS/dtrace/testcase/amd64/$f)) \
|
---|
700 | $(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) \
|
---|
701 | ,) \
|
---|
702 | $(if-expr defined(VBOX_WITH_MACOS_HARDENED_RUNTIME) && defined(VBOX_SIGNING_MODE), \
|
---|
703 | $(VBOX_VIRTUALBOX_APP_ENTITLEMENTS) $(VBOX_VIRTUALBOXVM_APP_ENTITLEMENTS),) \
|
---|
704 | $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
|
---|
705 | $(call MSG_TOOL,pkgbuild,,,$@)
|
---|
706 | @# Cleanup any previously failed attempts.
|
---|
707 | sudo rm -Rf \
|
---|
708 | $@ \
|
---|
709 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
|
---|
710 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
|
---|
711 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res
|
---|
712 | @# Correct directory permissions are important.
|
---|
713 | $(MKDIR) -p \
|
---|
714 | $(@D) \
|
---|
715 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
|
---|
716 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \
|
---|
717 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/English.lproj
|
---|
718 | $(MKDIR) -p -m 0775 \
|
---|
719 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications
|
---|
720 | $(MKDIR) -p -m 0755 $(sort \
|
---|
721 | $(VBOX_PATH_VBOX_APP_TMP)/Contents \
|
---|
722 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS \
|
---|
723 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/components \
|
---|
724 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/nls \
|
---|
725 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/accessible \
|
---|
726 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources \
|
---|
727 | $(if-expr defined(VBOX_WITH_QTGUI), \
|
---|
728 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app \
|
---|
729 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app/Contents \
|
---|
730 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/vmstarter.app \
|
---|
731 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/vmstarter.app/Contents,) \
|
---|
732 | $(if-expr defined(VBOX_WITH_PYTHON), \
|
---|
733 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk \
|
---|
734 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/installer \
|
---|
735 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/installer/vboxapi \
|
---|
736 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/ \
|
---|
737 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom \
|
---|
738 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python \
|
---|
739 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python/xpcom \
|
---|
740 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/client \
|
---|
741 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/server,) \
|
---|
742 | $(if-expr defined(VBOX_WITH_JXPCOM), \
|
---|
743 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/java,) \
|
---|
744 | $(addprefix $(VBOX_PATH_VBOX_APP_TMP)/Contents/,$(dir \
|
---|
745 | $(VBOX_DI_VBAPP_DYLIBS) \
|
---|
746 | $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \
|
---|
747 | $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
|
---|
748 | $(VBOX_DI_VBAPP_OTHER_BINS) \
|
---|
749 | $(VBOX_DI_VBAPP_PROGS) \
|
---|
750 | $(VBOX_DI_VBAPP_PROGS_HARDENED) \
|
---|
751 | $(VBOX_DI_VBAPP_MISC_FILES) \
|
---|
752 | $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
|
---|
753 | $(VBOX_DI_VBAPP_MISC_FILES.$(KBUILD_TARGET_ARCH)) \
|
---|
754 | ))\
|
---|
755 | )
|
---|
756 | # Create the .lproj language directories
|
---|
757 | $(MKDIR) -p -m 0755 \
|
---|
758 | $(addprefix $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/,$(VBOX_INSTALL_LANG_LPROJ))
|
---|
759 | # Install all supported language files
|
---|
760 | $(foreach f, $(VBOX_INSTALL_LANG_FILES) \
|
---|
761 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/$(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/nls/$(f)$(NLTAB))
|
---|
762 | ifdef VBOX_PROVISIONPROFILE_TEAM_ID
|
---|
763 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/$(VBOX_PROVISIONPROFILE_TEAM_ID).provisionprofile $(VBOX_PATH_VBOX_APP_TMP)/Contents/embedded.provisionprofile
|
---|
764 | endif
|
---|
765 | ifdef VBOX_WITH_WEBSERVICES
|
---|
766 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/
|
---|
767 | endif
|
---|
768 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxballoonctrl.plist $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/
|
---|
769 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxautostart.plist $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/
|
---|
770 | $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/VBoxAutostartDarwin.sh $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/
|
---|
771 | # Install the python bridge stuff
|
---|
772 | ifdef VBOX_WITH_PYTHON
|
---|
773 | $(foreach f,$(VBOX_DI_VBAPP_PYTHON_FILES) \
|
---|
774 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/$(f)$(NLTAB) )
|
---|
775 | $(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS
|
---|
776 | endif
|
---|
777 | # Install the java bridge stuff
|
---|
778 | ifdef VBOX_WITH_JXPCOM
|
---|
779 | $(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
|
---|
780 | endif
|
---|
781 | # Copy misc files.
|
---|
782 | $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES) \
|
---|
783 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(f)$(NLTAB) )
|
---|
784 | $(INSTALL) -m 644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/LICENSE
|
---|
785 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
786 | $(foreach f,$(VBOX_ADD_MANUALS) \
|
---|
787 | ,$(INSTALL) -m 0644 $(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/$(NLTAB))
|
---|
788 | endif
|
---|
789 | @# Create symlinks.
|
---|
790 | $(foreach symlink,$(VBOX_DI_VBAPP_SYMLINKS) $(VBOX_DI_VBAPP_SYMLINKS.$(KBUILD_TARGET_ARCH)) \
|
---|
791 | ,$(LN) -s $(word 2,$(subst =>, ,$(symlink))) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(word 1,$(subst =>, ,$(symlink)))$(NLTAB))
|
---|
792 | @# Copy the dylibs.
|
---|
793 | $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
|
---|
794 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(dylib)$(NLTAB))
|
---|
795 | @# Copy the other binaries.
|
---|
796 | $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_OTHER_BINS) \
|
---|
797 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(otherbin)$(NLTAB))
|
---|
798 | @# Create/copy the universal executable binaries.
|
---|
799 | $(foreach otherbin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
|
---|
800 | ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(otherbin)$(NLTAB))
|
---|
801 | @# Copy the binaries.
|
---|
802 | $(foreach prog, $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_PROGS_HARDENED) \
|
---|
803 | ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(prog) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(prog)$(NLTAB))
|
---|
804 | ifdef VBOX_UNATTENDED_TEMPLATES
|
---|
805 | # Unattended installation template scripts.
|
---|
806 | $(MKDIR) -p -m 0755 -- $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/UnattendedTemplates
|
---|
807 | $(foreach file, $(VBOX_UNATTENDED_TEMPLATES) \
|
---|
808 | ,$(INSTALL) -m 0655 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UnattendedTemplates/$(file) \
|
---|
809 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/UnattendedTemplates/$(file)$(NLTAB))
|
---|
810 | endif
|
---|
811 | ifdef VBOX_WITH_DTRACE
|
---|
812 | # DTrace library, testcases and scripts.
|
---|
813 | $(MKDIR) -p -m 0755 -- \
|
---|
814 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/lib/$(KBUILD_TARGET_ARCH)/ \
|
---|
815 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/testcase/$(KBUILD_TARGET_ARCH)/ \
|
---|
816 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/scripts/
|
---|
817 | $(foreach file, $(addprefix lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \
|
---|
818 | $(addprefix testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \
|
---|
819 | $(addprefix scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) \
|
---|
820 | ,$(INSTALL) -m 0655 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/dtrace/$(file) \
|
---|
821 | $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/$(file)$(NLTAB))
|
---|
822 | endif
|
---|
823 | ifndef VBOX_WITH_QTGUI
|
---|
824 | # Hack alert! Just something to make pkgbuild happy.
|
---|
825 | $(APPEND) -tn "$(VBOX_PATH_VBOX_APP_TMP)/Contents/PkgInfo" "APPLVBOX"
|
---|
826 | $(APPEND) -tn "$(VBOX_PATH_VBOX_APP_TMP)/Contents/Info.plist" \
|
---|
827 | '<?xml version="1.0" encoding="UTF-8"?>' \
|
---|
828 | '<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">' \
|
---|
829 | '<plist version="1.0">' \
|
---|
830 | '<dict>' \
|
---|
831 | ' <key>CFBundlePackageType</key> <string>APPL</string>' \
|
---|
832 | ' <key>CFBundleSignature</key> <string>VBOX</string>' \
|
---|
833 | ' <key>CFBundleDevelopmentRegion</key> <string>English</string>' \
|
---|
834 | ' <key>CFBundleIdentifier</key> <string>org.virtualbox.app.VBoxManage</string>' \
|
---|
835 | ' <key>CFBundleName</key> <string>VirtualBox</string>' \
|
---|
836 | ' <key>CFBundleExecutable</key> <string>VBoxManage</string>' \
|
---|
837 | ' <key>CFBundleVersion</key> <string>$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)</string>' \
|
---|
838 | ' <key>CFBundleShortVersionString</key> <string>$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)</string>' \
|
---|
839 | ' <key>CFBundleGetInfoString</key> <string>$(VBOX_PRODUCT) Manager $(VBOX_VERSION_STRING), © 2007-$(VBOX_C_YEAR) $(VBOX_VENDOR)</string>' \
|
---|
840 | ' <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string>' \
|
---|
841 | '</dict>' \
|
---|
842 | '</plist>'
|
---|
843 | endif
|
---|
844 | @# Sign the binaries and the application bundle.
|
---|
845 | ifdef VBOX_SIGNING_MODE
|
---|
846 | ifdef VBOX_WITH_QTGUI
|
---|
847 | $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
|
---|
848 | ,$(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)) )
|
---|
849 | $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
|
---|
850 | ,$(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)) )
|
---|
851 | endif
|
---|
852 | $(foreach dylib, \
|
---|
853 | $(VBOX_DI_VBAPP_DYLIBS) \
|
---|
854 | $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
|
---|
855 | , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(dylib),org.virtualbox.app.macos.$(notdir $(dylib))) )
|
---|
856 | $(foreach bin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
|
---|
857 | , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin))) )
|
---|
858 | $(foreach other, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_OTHER_BINS)\
|
---|
859 | , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(other),org.virtualbox.app.macos.$(notdir $(other))) )
|
---|
860 | $(foreach bin, $(filter-out MacOS/VirtualBox,$(VBOX_DI_VBAPP_PROGS) $(if-expr !defined(VBOX_WITH_MACOS_HARDENED_RUNTIME),$(VBOX_DI_VBAPP_PROGS_HARDENED),)) \
|
---|
861 | , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin))) )
|
---|
862 | $(foreach file, $(if-expr defined(VBOX_WITH_WEBSERVICES),MacOS/org.virtualbox.vboxwebsrv.plist,) \
|
---|
863 | MacOS/org.virtualbox.vboxballoonctrl.plist \
|
---|
864 | MacOS/org.virtualbox.vboxautostart.plist \
|
---|
865 | MacOS/VBoxAutostartDarwin.sh \
|
---|
866 | $(if-expr defined(VBOX_WITH_PYTHON),$(addprefix MacOS/, $(VBOX_DI_VBAPP_PYTHON_FILES) vboxshell.py),) \
|
---|
867 | $(if-expr defined(VBOX_WITH_JXPCOM),MacOS/sdk/bindings/xpcom/java/vboxjxpcom.jar,) \
|
---|
868 | $(filter MacOS/%,$(VBOX_DI_VBAPP_MISC_FILES)) \
|
---|
869 | $(if-expr defined(VBOX_WITH_DOCS_PACKING),$(addprefix MacOS/,$(VBOX_ADD_MANUALS)),) \
|
---|
870 | $(if-expr defined(VBOX_WITH_DTRACE),\
|
---|
871 | $(addprefix MacOS/dtrace/lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \
|
---|
872 | $(addprefix MacOS/dtrace/testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \
|
---|
873 | $(addprefix MacOS/dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) ,) \
|
---|
874 | $(addprefix MacOS/nls/,$(VBOX_INSTALL_LANG_FILES)) \
|
---|
875 | , $(NLTAB)$(call VBOX_SIGN_FILE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(file),org.virtualbox.app.$(tolower $(subst $(SP),,$(subst /,.,$(file))))) )
|
---|
876 |
|
---|
877 | ifdef VBOX_PROVISIONPROFILE_TEAM_ID
|
---|
878 | # $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/$(VBOX_PROVISIONPROFILE_TEAM_ID).provisionprofile $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app/Contents/embedded.provisionprofile
|
---|
879 | endif
|
---|
880 | $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app,,$(if-expr defined(VBOX_WITH_MACOS_HARDENED_RUNTIME)\
|
---|
881 | ,--entitlements="$(VBOX_VIRTUALBOX_APP_ENTITLEMENTS)",))
|
---|
882 | ifdef VBOX_WITH_QTGUI
|
---|
883 | $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/vmstarter.app,,)
|
---|
884 | endif
|
---|
885 | $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP),,--deep)
|
---|
886 | ifdef VBOX_WITH_MACOS_HARDENED_RUNTIME # HACK ALERT! --deep fries the entitlements, so redo w/o --deep now.
|
---|
887 | $(foreach bin, $(filter-out MacOS/VirtualBoxVM MacOS/VBoxHeadless,$(VBOX_DI_VBAPP_PROGS_HARDENED)) \
|
---|
888 | , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin)), \
|
---|
889 | --entitlements="$(VBOX_VIRTUALBOX_APP_ENTITLEMENTS)"))
|
---|
890 | $(foreach bin, $(filter MacOS/VirtualBoxVM MacOS/VBoxHeadless,$(VBOX_DI_VBAPP_PROGS_HARDENED)) \
|
---|
891 | , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin)), \
|
---|
892 | --entitlements="$(VBOX_VIRTUALBOXVM_APP_ENTITLEMENTS)"))
|
---|
893 | $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app,,\
|
---|
894 | --entitlements="$(VBOX_VIRTUALBOXVM_APP_ENTITLEMENTS)",)
|
---|
895 | $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP),,\
|
---|
896 | --entitlements="$(VBOX_VIRTUALBOX_APP_ENTITLEMENTS)",)
|
---|
897 | $(foreach bin, $(VBOX_DI_VBAPP_PROGS_HARDENED) \
|
---|
898 | , $(NLTAB)codesign -d -v -v -v --entitlements :- $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin) )
|
---|
899 | $(foreach bin, $(VBOX_DI_VBAPP_PROGS) \
|
---|
900 | , $(NLTAB)codesign -d -v -v -v --entitlements :- $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin) )
|
---|
901 | endif
|
---|
902 | endif
|
---|
903 | @# Set the correct owner and set the set-user-ID-on-execution bit on the relevant executables.
|
---|
904 | sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root
|
---|
905 | sudo chmod u+s $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/VBoxNetAdpCtl
|
---|
906 | ifdef VBOX_WITH_HARDENING
|
---|
907 | sudo chmod u+s $(foreach bin,$(VBOX_DI_VBAPP_PROGS_HARDENED),$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin))
|
---|
908 | endif
|
---|
909 | if 0 # Handy for testing the app bundle w/o having to reinstall all the time (just untar it into -C /Applications/)
|
---|
910 | $(RM) -f -- "$(PATH_OUT)/VirtualBox.app.tar.gz"
|
---|
911 | tar -czf "$(PATH_OUT)/VirtualBox.app.tar.gz" -C "$(VBOX_PATH_VBOX_APP_TMP)/.." VirtualBox.app
|
---|
912 | endif
|
---|
913 | @# Do keyword replacement in the package info and description files.
|
---|
914 | $(SED) \
|
---|
915 | -e 's+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g' \
|
---|
916 | -e 's+@VBOX_VERSION_MAJOR@+$(VBOX_VERSION_MAJOR)+g' \
|
---|
917 | -e 's+@VBOX_VERSION_MINOR@+$(VBOX_VERSION_MINOR)+g' \
|
---|
918 | -e 's+@VBOX_VERSION_BUILD@+$(VBOX_VERSION_BUILD)+g' \
|
---|
919 | -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \
|
---|
920 | -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \
|
---|
921 | -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \
|
---|
922 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/PkgBuildComponent.plist \
|
---|
923 | $(VBOX_PATH_DI_SRC)/VirtualBox/PkgBuildComponent.plist
|
---|
924 | @# Copy the resources.
|
---|
925 | $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/preflight $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/
|
---|
926 | ifdef VBOX_WITH_HARDENING
|
---|
927 | $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/postflight $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/
|
---|
928 | else
|
---|
929 | $(SED) -s '/WITH_HARDENING/d' -o $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/postflight $(VBOX_PATH_DI_SRC)/VirtualBox/postflight
|
---|
930 | $(CHMOD) 0755 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/postflight
|
---|
931 | endif
|
---|
932 | ls -lR $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/
|
---|
933 | @# Build the package.
|
---|
934 | $(VBOX_PKGBUILD) \
|
---|
935 | --root $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/ \
|
---|
936 | --component-plist $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/PkgBuildComponent.plist \
|
---|
937 | --script $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \
|
---|
938 | --identifier org.virtualbox.pkg.virtualbox \
|
---|
939 | --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
|
---|
940 | --install-location /Applications/ \
|
---|
941 | --ownership preserve \
|
---|
942 | --preserve-xattr \
|
---|
943 | $(if-expr defined(VBOX_MACOSX_INSTALLER_SIGN) && $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) == "",--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
|
---|
944 | $@
|
---|
945 | ifdef VBOX_SIGNING_MODE
|
---|
946 | if $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING))
|
---|
947 | @# Sign the created pkg.
|
---|
948 | $(call VBOX_SIGN_PKG_FN,$@,org.virtualbox.pkg.virtualbox)
|
---|
949 | endif
|
---|
950 | endif
|
---|
951 | @# Cleanup
|
---|
952 | sudo chown -R "$(shell whoami)" \
|
---|
953 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root
|
---|
954 | sudo chmod -R a-s \
|
---|
955 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root
|
---|
956 | sudo rm -Rf \
|
---|
957 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
|
---|
958 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
|
---|
959 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res
|
---|
960 |
|
---|
961 | #
|
---|
962 | # The VirtualBox CLI wrapper scripts.
|
---|
963 | #
|
---|
964 | $(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg: \
|
---|
965 | $$(wildcard \
|
---|
966 | $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/* \
|
---|
967 | $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/*.lproj/*) \
|
---|
968 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \
|
---|
969 | ,$(VBOX_BRAND_$(f)_VIRTUALBOXCLI_DESCRIPTION_PLIST)) \
|
---|
970 | $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
|
---|
971 | $(call MSG_TOOL,pkgbuild,,,$@)
|
---|
972 | @# Cleanup any previously failed attempts.
|
---|
973 | sudo rm -Rf \
|
---|
974 | $@ \
|
---|
975 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
|
---|
976 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
|
---|
977 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res
|
---|
978 | @# Correct directory permissions are important.
|
---|
979 | $(MKDIR) -p \
|
---|
980 | $(@D) \
|
---|
981 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
|
---|
982 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res \
|
---|
983 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/English.lproj
|
---|
984 | $(MKDIR) -p -m 0755 \
|
---|
985 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr \
|
---|
986 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin
|
---|
987 | @# Generate the wrapper scripts.
|
---|
988 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VirtualBox \
|
---|
989 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VirtualBox "$$@"'
|
---|
990 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VirtualBoxVM \
|
---|
991 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/MacOS/VirtualBoxVM "$$@"'
|
---|
992 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxManage \
|
---|
993 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxManage "$$@"'
|
---|
994 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxVRDP \
|
---|
995 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"'
|
---|
996 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxHeadless \
|
---|
997 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"'
|
---|
998 | ifdef VBOX_WITH_WEBSERVICES
|
---|
999 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/vboxwebsrv \
|
---|
1000 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv "$$@"'
|
---|
1001 | endif
|
---|
1002 | if defined(VBOX_WITH_VBOX_IMG) || defined(VBOX_WITH_TESTCASES)
|
---|
1003 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/vbox-img \
|
---|
1004 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/vbox-img "$$@"'
|
---|
1005 | endif
|
---|
1006 | if defined(VBOX_WITH_VBOXIMGMOUNT)
|
---|
1007 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/vboximg-mount \
|
---|
1008 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/vboximg-mount "$$@"'
|
---|
1009 | endif
|
---|
1010 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxBugReport \
|
---|
1011 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxBugReport "$$@"'
|
---|
1012 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxBalloonCtrl \
|
---|
1013 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl "$$@"'
|
---|
1014 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxAutostart \
|
---|
1015 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart "$$@"'
|
---|
1016 | ifdef VBOX_WITH_DTRACE
|
---|
1017 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxDTrace \
|
---|
1018 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxDTrace "$$@"'
|
---|
1019 | endif
|
---|
1020 | ifdef VBOX_WITH_HOST_SHIPPING_AUDIO_TEST
|
---|
1021 | $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxAudioTest \
|
---|
1022 | '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxAudioTest "$$@"'
|
---|
1023 | endif
|
---|
1024 | @# Set the correct owners and file permissions.
|
---|
1025 | sudo chmod 0755 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/*
|
---|
1026 | sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root
|
---|
1027 | sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr
|
---|
1028 | @# Build the package.
|
---|
1029 | $(VBOX_PKGBUILD) \
|
---|
1030 | --root $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin \
|
---|
1031 | --identifier org.virtualbox.pkg.virtualboxcli \
|
---|
1032 | --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
|
---|
1033 | --install-location /usr/local/bin \
|
---|
1034 | --ownership preserve \
|
---|
1035 | $(if-expr defined(VBOX_MACOSX_INSTALLER_SIGN) && $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) == "",--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
|
---|
1036 | $@
|
---|
1037 | ifdef VBOX_SIGNING_MODE
|
---|
1038 | if $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING))
|
---|
1039 | @# Sign the created pkg.
|
---|
1040 | $(call VBOX_SIGN_PKG_FN,$@,org.virtualbox.pkg.virtualboxcli)
|
---|
1041 | endif
|
---|
1042 | endif
|
---|
1043 | @# Cleanup
|
---|
1044 | sudo chown -R "$(shell whoami)" \
|
---|
1045 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root
|
---|
1046 | sudo rm -Rf \
|
---|
1047 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
|
---|
1048 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
|
---|
1049 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res
|
---|
1050 |
|
---|
1051 | ifdef VBOX_WITH_FUSE_PACKING
|
---|
1052 | #
|
---|
1053 | # The FUSE for macOS core package.
|
---|
1054 | #
|
---|
1055 | VBOX_PATH_FUSE_CORE_PKG ?= $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_TRG)/osxfuse/v*)))/Core.pkg
|
---|
1056 | $(VBOX_PATH_PACK_TMP)/Packages/OSXFuseCore.pkg: \
|
---|
1057 | $(VBOX_PATH_FUSE_CORE_PKG)
|
---|
1058 | $(call MSG_TOOL,Preparing FUSE for macOS core package,,,$@)
|
---|
1059 | @# Cleanup any previously failed attempts.
|
---|
1060 | sudo rm -Rf $@
|
---|
1061 | $(MKDIR) -p $(@D)
|
---|
1062 | pkgutil --flatten $(VBOX_PATH_FUSE_CORE_PKG) $@
|
---|
1063 | endif
|
---|
1064 |
|
---|
1065 |
|
---|
1066 | #
|
---|
1067 | # Aliases.
|
---|
1068 | #
|
---|
1069 | VBoxKEXTs.pkg: $(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg
|
---|
1070 | VirtualBoxCLI.pkg: $(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg
|
---|
1071 | VirtualBox.pkg: $(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg
|
---|
1072 | VirtualBox.mpkg: $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg
|
---|
1073 | VirtualBox.dmg: $(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).dmg
|
---|