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