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