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