1 | # $Id: Makefile.kmk 41477 2012-05-29 11:43:27Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Install misc stuff and create dist packages for Mac OS X.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2012 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 | # Include sub-makefiles.
|
---|
23 | #
|
---|
24 | ifndef VBOX_OSE
|
---|
25 | include $(PATH_SUB_CURRENT)/InstallerPlugins/Makefile.kmk
|
---|
26 | endif
|
---|
27 |
|
---|
28 |
|
---|
29 | #
|
---|
30 | # Globals
|
---|
31 | #
|
---|
32 | VBOX_PATH_DI_SRC := $(PATH_SUB_CURRENT)
|
---|
33 | VBOX_DI_OUT_DIR := $(PATH_TARGET)/Installer/darwin
|
---|
34 | BLDDIRS += $(VBOX_DI_OUT_DIR)
|
---|
35 |
|
---|
36 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
37 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
38 | VBOX_PATH_DIST_32 = $(VBOX_PATH_DIST)
|
---|
39 | VBOX_PATH_DIST_64 = $(PATH_OUT_BASE)/darwin.amd64/$(KBUILD_TYPE)/dist
|
---|
40 | else
|
---|
41 | VBOX_PATH_DIST_64 = $(VBOX_PATH_DIST)
|
---|
42 | VBOX_PATH_DIST_32 = $(PATH_OUT_BASE)/darwin.x86/$(KBUILD_TYPE)/dist
|
---|
43 | endif
|
---|
44 | VBOX_DI_FN_DEP_BOTH = $(VBOX_PATH_DIST_32)/$1 $(VBOX_PATH_DIST_64)/$2
|
---|
45 | VBOX_DI_FN_DEP_32 = $(VBOX_PATH_DIST_32)/$1
|
---|
46 | VBOX_DI_FN_DEP_64 = $(VBOX_PATH_DIST_64)/$1
|
---|
47 | VBOX_DI_LIPO = lipo
|
---|
48 | else
|
---|
49 | VBOX_DI_FN_DEP_BOTH = $(VBOX_PATH_DIST)/$1
|
---|
50 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
51 | VBOX_DI_FN_DEP_32 = $(VBOX_PATH_DIST)/$1
|
---|
52 | VBOX_DI_FN_DEP_64 =
|
---|
53 | else
|
---|
54 | VBOX_DI_FN_DEP_64 = $(VBOX_PATH_DIST)/$1
|
---|
55 | VBOX_DI_FN_DEP_32 =
|
---|
56 | endif
|
---|
57 | endif
|
---|
58 |
|
---|
59 | # Unset this to speed up things during makefile hacking.
|
---|
60 | VBOX_DARWIN_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
|
---|
61 |
|
---|
62 | # The location of the PackageMaker program.
|
---|
63 | ifndef VBOX_PACKAGEMAKER
|
---|
64 | VBOX_PACKAGEMAKER := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS)/darwin.x86/packagemaker/v*/PackageMaker.app/Contents/MacOS/PackageMaker)) \
|
---|
65 | /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker)
|
---|
66 | endif
|
---|
67 |
|
---|
68 | # Where we do the packing (override this in LocalConfig.kmk if building on smbfs).
|
---|
69 | ifndef VBOX_PATH_PACK_TMP
|
---|
70 | VBOX_PATH_PACK_TMP := $(VBOX_DI_OUT_DIR)
|
---|
71 | endif
|
---|
72 |
|
---|
73 | # These tools are necessary
|
---|
74 | ## @Todo rename to VBOX_DI_XYZ these conflict with other globals.
|
---|
75 | TAR=/usr/bin/tar
|
---|
76 | ZIP=/usr/bin/zip
|
---|
77 | GZIP=/usr/bin/gzip
|
---|
78 | BZIP2=/usr/bin/bzip2
|
---|
79 | GREP=/usr/bin/grep
|
---|
80 | XARGS=/usr/bin/xargs
|
---|
81 | UNZIP=/usr/bin/unzip
|
---|
82 | AWK=/usr/bin/awk
|
---|
83 | HDIUTIL=/usr/bin/hdiutil
|
---|
84 |
|
---|
85 | #
|
---|
86 | # Install the darwin docs/license.
|
---|
87 | #
|
---|
88 | INSTALLS += darwin-docs
|
---|
89 | darwin-docs_INST = $(INST_DIST)
|
---|
90 | darwin-docs_MODE = a+r,u+w
|
---|
91 | darwin-docs_SOURCES = \
|
---|
92 | $(VBOX_BRAND_LICENSE_TXT)=>LICENSE
|
---|
93 |
|
---|
94 |
|
---|
95 | #
|
---|
96 | # The packing.
|
---|
97 | #
|
---|
98 | PACKING += $(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)-r$(VBOX_SVN_REV).dmg
|
---|
99 | ifdef VBOX_WITH_BUNDLED_INSTALLER
|
---|
100 | PACKING += $(VBOX_PATH_DIST)/VBoxMacBundleInstaller-$(KBUILD_TARGET_ARCH).zip
|
---|
101 | endif
|
---|
102 | ifdef VBOX_WITH_BUNDLED_ISO
|
---|
103 | iso: $(if $(eq $(filter CD,$(VBOX_BRAND_MEDIA)),CD),$(VBOX_PATH_DIST)/VirtualBox.iso,) \
|
---|
104 | $(if $(eq $(filter DVD,$(VBOX_BRAND_MEDIA)),DVD),$(VBOX_PATH_DIST)/VirtualBoxBundle.iso,)
|
---|
105 | endif
|
---|
106 | #OTHER_CLEAN = TODO
|
---|
107 |
|
---|
108 |
|
---|
109 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
110 |
|
---|
111 |
|
---|
112 | #
|
---|
113 | # We're running commands as root here, take some care and assertion
|
---|
114 | # a sane environment.
|
---|
115 | #
|
---|
116 | ifeq ($(strip $(VBOX_PATH_DIST)),)
|
---|
117 | $(error VBOX_PATH_DIST=$(VBOX_PATH_DIST))
|
---|
118 | endif
|
---|
119 | ifeq ($(strip $(VBOX_PATH_DIST)),/)
|
---|
120 | $(error VBOX_PATH_DIST=$(VBOX_PATH_DIST))
|
---|
121 | endif
|
---|
122 | ifeq ($(strip $(VBOX_PATH_PACK_TMP)),)
|
---|
123 | $(error VBOX_PATH_PACK_TMP=$(VBOX_PATH_PACK_TMP))
|
---|
124 | endif
|
---|
125 | ifeq ($(strip $(VBOX_PATH_PACK_TMP)),/)
|
---|
126 | $(error VBOX_PATH_PACK_TMP=$(VBOX_PATH_PACK_TMP))
|
---|
127 | endif
|
---|
128 |
|
---|
129 |
|
---|
130 | # Check for additional manuals
|
---|
131 | VBOX_ADD_MANUALS := $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_$(f).pdf)
|
---|
132 |
|
---|
133 | VBOX_ADD_MANUAL_de_DE := $(filter $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_de_DE.pdf,$(VBOX_ADD_MANUALS))
|
---|
134 | VBOX_ADD_MANUAL_fr_FR := $(filter $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_fr_FR.pdf,$(VBOX_ADD_MANUALS))
|
---|
135 |
|
---|
136 | #
|
---|
137 | # The disk image.
|
---|
138 | #
|
---|
139 | $(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)-r$(VBOX_SVN_REV).dmg: \
|
---|
140 | $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.mpkg \
|
---|
141 | $(VBOX_BRAND_DARWIN_DISKIMAGE_BG) \
|
---|
142 | $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE) \
|
---|
143 | $$(wildcard $(VBOX_PATH_DI_SRC)/DiskImage/*) \
|
---|
144 | $(if $(VBOX_WITH_DOCS_PACKING), \
|
---|
145 | $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf \
|
---|
146 | $(VBOX_ADD_MANUALS)) \
|
---|
147 | $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
|
---|
148 | $(call MSG_TOOL,hdiutil,,,$@)
|
---|
149 | @# Cleanup any previously failed attempts and various trash.
|
---|
150 | sudo rm -Rf $(VBOX_PATH_PACK_TMP)/DiskImage.tmp
|
---|
151 | $(MKDIR) -p $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/
|
---|
152 | sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.mpkg $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/
|
---|
153 | sudo rm -Rf \
|
---|
154 | $@ \
|
---|
155 | $(VBOX_PATH_PACK_TMP)/DiskImage/
|
---|
156 | sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage.tmp $(VBOX_PATH_PACK_TMP)/DiskImage
|
---|
157 | @# Remove .dmg packages from old depend builds
|
---|
158 | $(QUIET)$(RM) -f $(wildcard $(VBOX_PATH_DIST)/VirtualBox-*-r*.dmg)
|
---|
159 | @# Populate the image with uninstaller, readme, picture, and .VolumeIcon.icns. (TODO)
|
---|
160 | $(INSTALL) $(VBOX_PATH_DI_SRC)/DiskImage/VirtualBox_Uninstall.tool $(VBOX_PATH_PACK_TMP)/DiskImage/
|
---|
161 | ifeq (1,1)
|
---|
162 | @# Pedantic mode...
|
---|
163 | $(INSTALL) -m 644 $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE) $(VBOX_PATH_PACK_TMP)/DiskImage/.DS_Store
|
---|
164 | $(MKDIR) $(VBOX_PATH_PACK_TMP)/DiskImage/.background
|
---|
165 | $(INSTALL) -m 644 $(VBOX_BRAND_DARWIN_DISKIMAGE_BG) $(VBOX_PATH_PACK_TMP)/DiskImage/.background/vbox_folder.tiff
|
---|
166 | ifdef VBOX_WITH_BUNDLED_INSTALLER
|
---|
167 | $(if $(VBOX_WITH_DOCS_PACKING), \
|
---|
168 | $(INSTALL) -m 644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf $(VBOX_PATH_PACK_TMP)/DiskImage/User\ Manual.pdf$(NLTAB) \
|
---|
169 | $(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)) \
|
---|
170 | $(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)))
|
---|
171 | # Rename the main package
|
---|
172 | else
|
---|
173 | $(if $(VBOX_WITH_DOCS_PACKING), $(INSTALL) $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf $(VBOX_PATH_PACK_TMP)/DiskImage/)
|
---|
174 | $(LN) -s /Applications/ $(VBOX_PATH_PACK_TMP)/DiskImage/Applications
|
---|
175 | endif
|
---|
176 | endif
|
---|
177 | @# Change the owners.
|
---|
178 | sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/DiskImage
|
---|
179 | @# Create the image.
|
---|
180 | sudo hdiutil create -format UDBZ -volname "VirtualBox" -srcfolder "$(VBOX_PATH_PACK_TMP)/DiskImage" "$@"
|
---|
181 | @# Change (back) the owner so it can be deleted by the user.
|
---|
182 | sudo chown "$(shell whoami)" "$@"
|
---|
183 | sudo chown -R "$(shell whoami)" $(VBOX_PATH_PACK_TMP)/DiskImage
|
---|
184 |
|
---|
185 | #
|
---|
186 | # The meta-package.
|
---|
187 | #
|
---|
188 | $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.mpkg: \
|
---|
189 | $(VBOX_PATH_PACK_TMP)/Packages/VBoxStartupItems.pkg \
|
---|
190 | $(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg \
|
---|
191 | $(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg \
|
---|
192 | $(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg \
|
---|
193 | $$(RegistrationPane_1_TARGET) \
|
---|
194 | $(if $(VBOX_OSE), , \
|
---|
195 | $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Info.plist \
|
---|
196 | $$(wildcard $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/*.lproj/*.strings \
|
---|
197 | $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/*.lproj/RegistrationPane.nib/*.nib)) \
|
---|
198 | $$(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/* \
|
---|
199 | $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/*.lproj/*) \
|
---|
200 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
|
---|
201 | $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_HTML) \
|
---|
202 | $(VBOX_BRAND_$(f)_REGISTRATIONPANE_INFOPLIST_STRINGS) \
|
---|
203 | $(VBOX_BRAND_$(f)_REGISTRATIONPANE_LOCALIZABLE_STRINGS)) \
|
---|
204 | $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
|
---|
205 | $(call MSG_TOOL,PackageMaker,,,$@)
|
---|
206 | @# Cleanup any previously failed attempts.
|
---|
207 | sudo rm -Rf \
|
---|
208 | $@ \
|
---|
209 | $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.root \
|
---|
210 | $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc \
|
---|
211 | $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res
|
---|
212 | @# Correct directory permissions are important.
|
---|
213 | $(MKDIR) -p \
|
---|
214 | $(@D) \
|
---|
215 | $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc \
|
---|
216 | $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res \
|
---|
217 | $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj
|
---|
218 | @# Do keyword replacement in the package info and description files.
|
---|
219 | $(SED) \
|
---|
220 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
221 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
222 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
223 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
224 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
225 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
226 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
227 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc/Info.plist \
|
---|
228 | $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Info.plist
|
---|
229 | $(SED) \
|
---|
230 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
231 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
232 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
233 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
234 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
235 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
236 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
237 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc/Description.plist \
|
---|
238 | $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Description.plist
|
---|
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 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
245 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
246 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
247 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/Welcome.html \
|
---|
248 | $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Welcome.html
|
---|
249 | @# Copy the resources.
|
---|
250 | # $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/ReadMe.html $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/ReadMe.html
|
---|
251 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Conclusion.html $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/Conclusion.html
|
---|
252 | $(SED) \
|
---|
253 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
254 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
255 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
256 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/English.lproj/Localizable.strings \
|
---|
257 | $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Localizable.strings
|
---|
258 | $(INSTALL) -m 0644 $(VBOX_BRAND_DARWIN_INSTALLER_BG) $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/background.tif
|
---|
259 | $(INSTALL) -m 0766 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/checkforrunningvms $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/checkforrunningvms
|
---|
260 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
|
---|
261 | $(MKDIR) -p \
|
---|
262 | $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
|
---|
263 | $(SED) \
|
---|
264 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
265 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
266 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
267 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
268 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Welcome.html \
|
---|
269 | $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_HTML)$(NLTAB) \
|
---|
270 | $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_VIRTUALBOX_CONCLUSION_HTML) $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Conclusion.html$(NLTAB) \
|
---|
271 | $(SED) \
|
---|
272 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
273 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
274 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
275 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Localizable.strings \
|
---|
276 | $(VBOX_BRAND_$(f)_VIRTUALBOX_LOCALIZABLE_STRINGS)$(NLTAB) \
|
---|
277 | )
|
---|
278 | @# Build the package.
|
---|
279 | $(VBOX_PACKAGEMAKER) -build -v \
|
---|
280 | -p $@ \
|
---|
281 | -r $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res \
|
---|
282 | -i $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc/Info.plist \
|
---|
283 | -d $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc/Description.plist \
|
---|
284 | -mi $(VBOX_PATH_PACK_TMP)/Packages
|
---|
285 | @# Copy the plugins.
|
---|
286 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/distribution.dist $@/Contents/
|
---|
287 | ifndef VBOX_OSE
|
---|
288 | $(MKDIR) -p $@/Contents/Plugins/
|
---|
289 | ifdef VBOX_WITH_SERIALNUMBER_INSTALL
|
---|
290 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/InstallerSections.plist $@/Contents/Plugins/InstallerSections.plist
|
---|
291 | else
|
---|
292 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/InstallerSections.plist $@/Contents/Plugins/InstallerSections.plist.off
|
---|
293 | endif
|
---|
294 | @# Copy the Registration Pane plugin.
|
---|
295 | $(MKDIR) -p $@/Contents/Plugins/RegistrationPane.bundle/Contents/MacOS/
|
---|
296 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Info.plist $@/Contents/Plugins/RegistrationPane.bundle/Contents/
|
---|
297 | $(INSTALL) -m 0644 $(RegistrationPane_1_TARGET) $@/Contents/Plugins/RegistrationPane.bundle/Contents/MacOS/
|
---|
298 | $(MKDIR) -p $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/RegistrationPane.nib
|
---|
299 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/English.lproj/InfoPlist.strings $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/
|
---|
300 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/English.lproj/Localizable.strings $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/
|
---|
301 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/English.lproj/RegistrationPane.nib/classes.nib $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/RegistrationPane.nib/
|
---|
302 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/English.lproj/RegistrationPane.nib/info.nib $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/RegistrationPane.nib/
|
---|
303 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/InstallerPlugins/RegistrationPane/Resources/English.lproj/RegistrationPane.nib/keyedobjects.nib $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/English.lproj/RegistrationPane.nib/
|
---|
304 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
|
---|
305 | $(MKDIR) -p \
|
---|
306 | $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
|
---|
307 | $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_REGISTRATIONPANE_INFOPLIST_STRINGS) $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/InfoPlist.strings$(NLTAB) \
|
---|
308 | $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_REGISTRATIONPANE_LOCALIZABLE_STRINGS) $@/Contents/Plugins/RegistrationPane.bundle/Contents/Resources/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Localizable.strings$(NLTAB) \
|
---|
309 | )
|
---|
310 | endif
|
---|
311 | @# Cleanup.
|
---|
312 | sudo rm -Rf \
|
---|
313 | $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.root \
|
---|
314 | $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.desc \
|
---|
315 | $(VBOX_PATH_PACK_TMP)/VirtualBox.mpkg.res
|
---|
316 |
|
---|
317 |
|
---|
318 |
|
---|
319 | #
|
---|
320 | # The VirtualBox Kernel extensions.
|
---|
321 | #
|
---|
322 | VBOX_DI_KEXTS_UNIVERSAL = VBoxDrv VBoxNetFlt VBoxNetAdp VBoxUSB
|
---|
323 | VBOX_DI_KEXTS = $(VBOX_DI_KEXTS_UNIVERSAL)
|
---|
324 |
|
---|
325 | $(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg: \
|
---|
326 | $(foreach kext,$(VBOX_DI_KEXTS_UNIVERSAL), $(call VBOX_DI_FN_DEP_BOTH,$(kext).kext/Contents/MacOS/$(kext))) \
|
---|
327 | $(foreach kext,$(VBOX_DI_KEXTS), $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist) \
|
---|
328 | $$(wildcard $(VBOX_PATH_DI_SRC)/VBoxKEXTs/* \
|
---|
329 | $(VBOX_PATH_DI_SRC)/VBoxKEXTs/*.lproj/*) \
|
---|
330 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
|
---|
331 | $(VBOX_BRAND_$(f)_VBOXKEXTS_DESCRIPTION_PLIST) \
|
---|
332 | $(VBOX_BRAND_$(f)_VBOXKEXTS_README_HTML) \
|
---|
333 | $(VBOX_BRAND_$(f)_VBOXKEXTS_INSTALLATIONCHECK_STRINGS)) \
|
---|
334 | $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
|
---|
335 | $(call MSG_TOOL,PackageMaker,,,$@)
|
---|
336 | @# Cleanup any previously failed attempts.
|
---|
337 | sudo rm -Rf \
|
---|
338 | $@ \
|
---|
339 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
|
---|
340 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
|
---|
341 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res
|
---|
342 | @# Correct directory permissions are important.
|
---|
343 | $(MKDIR) -p \
|
---|
344 | $(@D) \
|
---|
345 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
|
---|
346 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \
|
---|
347 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj
|
---|
348 | $(MKDIR) -p -m 1775 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library
|
---|
349 | $(MKDIR) -p -m 0755 \
|
---|
350 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions \
|
---|
351 | $(foreach kext,$(VBOX_DI_KEXTS), \
|
---|
352 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext \
|
---|
353 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents \
|
---|
354 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents/MacOS )
|
---|
355 | @# Copy the common files (Info.plist).
|
---|
356 | $(foreach kext,$(VBOX_DI_KEXTS), \
|
---|
357 | $(NLTAB)$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents/)
|
---|
358 | @# Copy the binaries and invoking lipo.
|
---|
359 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
360 | $(foreach kext,$(VBOX_DI_KEXTS_UNIVERSAL), \
|
---|
361 | $(NLTAB)$(VBOX_DI_LIPO) -create \
|
---|
362 | $(VBOX_PATH_DIST_32)/$(kext).kext/Contents/MacOS/$(kext) \
|
---|
363 | $(VBOX_PATH_DIST_64)/$(kext).kext/Contents/MacOS/$(kext) \
|
---|
364 | -output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents/MacOS/$(kext))
|
---|
365 | else
|
---|
366 | $(foreach kext,$(VBOX_DI_KEXTS), \
|
---|
367 | $(NLTAB)$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/$(kext).kext/Contents/MacOS/$(kext) $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions/$(kext).kext/Contents/MacOS/)
|
---|
368 | endif
|
---|
369 | @# Set the correct owners.
|
---|
370 | sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library
|
---|
371 | sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/Library/Extensions
|
---|
372 | @# Do keyword replacement in the package info and description files.
|
---|
373 | $(SED) \
|
---|
374 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
375 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
376 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
377 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
378 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
379 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
380 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
381 | --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/Info.plist \
|
---|
382 | $(VBOX_PATH_DI_SRC)/VBoxKEXTs/Info.plist
|
---|
383 | $(SED) \
|
---|
384 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
385 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
386 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
387 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
388 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
389 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
390 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
391 | --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/Description.plist \
|
---|
392 | $(VBOX_PATH_DI_SRC)/VBoxKEXTs/Description.plist
|
---|
393 | $(SED) \
|
---|
394 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
395 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
396 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
397 | --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj/ReadMe.html \
|
---|
398 | $(VBOX_PATH_DI_SRC)/VBoxKEXTs/ReadMe.html
|
---|
399 | @# Copy the resources.
|
---|
400 | $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/InstallationCheck $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/
|
---|
401 | $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/postflight $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/
|
---|
402 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
|
---|
403 | $(MKDIR) -p \
|
---|
404 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
|
---|
405 | $(SED) \
|
---|
406 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
407 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
408 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
409 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
410 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
411 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
412 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
413 | --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Description.plist \
|
---|
414 | $(VBOX_BRAND_$(f)_VBOXKEXTS_DESCRIPTION_PLIST)$(NLTAB) \
|
---|
415 | $(SED) \
|
---|
416 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
417 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
418 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
419 | --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/ReadMe.html \
|
---|
420 | $(VBOX_BRAND_$(f)_VBOXKEXTS_README_HTML)$(NLTAB) \
|
---|
421 | $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_VBOXKEXTS_INSTALLATIONCHECK_STRINGS) $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/InstallationCheck.strings$(NLTAB) \
|
---|
422 | )
|
---|
423 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/English.lproj/InstallationCheck.strings $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj/
|
---|
424 | @# Build the package.
|
---|
425 | $(VBOX_PACKAGEMAKER) -build -v \
|
---|
426 | -p $@ \
|
---|
427 | -f $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
|
---|
428 | -r $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \
|
---|
429 | -i $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/Info.plist \
|
---|
430 | -d $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/Description.plist
|
---|
431 | @# Cleanup
|
---|
432 | sudo rm -Rf \
|
---|
433 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
|
---|
434 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
|
---|
435 | $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res
|
---|
436 |
|
---|
437 |
|
---|
438 | #
|
---|
439 | # The VirtualBox Startupitems.
|
---|
440 | #
|
---|
441 | $(VBOX_PATH_PACK_TMP)/Packages/VBoxStartupItems.pkg: \
|
---|
442 | $$(wildcard $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/* \
|
---|
443 | $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/Resources/*.lproj/*) \
|
---|
444 | $$(wildcard $(VBOX_PATH_DI_SRC)/VBoxStartupItems/* \
|
---|
445 | $(VBOX_PATH_DI_SRC)/VBoxStartupItems/*.lproj/*) \
|
---|
446 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
|
---|
447 | $(VBOX_BRAND_$(f)_VBOXSTARTUPITEMS_DESCRIPTION_PLIST)) \
|
---|
448 | $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
|
---|
449 | $(call MSG_TOOL,PackageMaker,,,$@)
|
---|
450 | @# Cleanup any previously failed attempts.
|
---|
451 | sudo rm -Rf \
|
---|
452 | $@ \
|
---|
453 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root \
|
---|
454 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc \
|
---|
455 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res
|
---|
456 | @# Correct directory permissions are important.
|
---|
457 | $(MKDIR) -p \
|
---|
458 | $(@D) \
|
---|
459 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc \
|
---|
460 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res \
|
---|
461 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res/English.lproj
|
---|
462 | $(MKDIR) -p -m 0775 $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library
|
---|
463 | $(MKDIR) -p -m 0755 \
|
---|
464 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems \
|
---|
465 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox \
|
---|
466 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/Resources \
|
---|
467 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/Resources/English.lproj
|
---|
468 | @# Copy the files.
|
---|
469 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/StartupParameters.plist $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/
|
---|
470 | $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/VirtualBox $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/
|
---|
471 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VBoxStartupItems/VirtualBox/Resources/English.lproj/Localizable.strings $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems/VirtualBox/Resources/English.lproj/
|
---|
472 | @# Set the correct owners.
|
---|
473 | sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library
|
---|
474 | sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root/Library/StartupItems
|
---|
475 | @# Do keyword replacement in the package info and description files.
|
---|
476 | $(SED) \
|
---|
477 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
478 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
479 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
480 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
481 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
482 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
483 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
484 | --output $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc/Info.plist \
|
---|
485 | $(VBOX_PATH_DI_SRC)/VBoxStartupItems/Info.plist
|
---|
486 | $(SED) \
|
---|
487 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
488 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
489 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
490 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
491 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
492 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
493 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
494 | --output $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc/Description.plist \
|
---|
495 | $(VBOX_PATH_DI_SRC)/VBoxStartupItems/Description.plist
|
---|
496 | @# Copy the resources.
|
---|
497 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
|
---|
498 | $(MKDIR) -p \
|
---|
499 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
|
---|
500 | $(SED) \
|
---|
501 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
502 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
503 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
504 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
505 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
506 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
507 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
508 | --output $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Description.plist \
|
---|
509 | $(VBOX_BRAND_$(f)_VBOXSTARTUPITEMS_DESCRIPTION_PLIST)$(NLTAB) \
|
---|
510 | )
|
---|
511 | @# Build the package.
|
---|
512 | $(VBOX_PACKAGEMAKER) -build -v \
|
---|
513 | -p $@ \
|
---|
514 | -f $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root \
|
---|
515 | -r $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res \
|
---|
516 | -i $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc/Info.plist \
|
---|
517 | -d $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc/Description.plist
|
---|
518 | @# Cleanup
|
---|
519 | sudo rm -Rf \
|
---|
520 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.root \
|
---|
521 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.desc \
|
---|
522 | $(VBOX_PATH_PACK_TMP)/VBoxStartupItems.pkg.res
|
---|
523 |
|
---|
524 |
|
---|
525 | #
|
---|
526 | # Figure out which languages that we support and construct
|
---|
527 | # .qm and .lproj lists for these.
|
---|
528 | #
|
---|
529 | include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
|
---|
530 | VBOX_INSTALL_LANG_FILES := $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES), VirtualBox_$(f).qm qt_$(f).qm)
|
---|
531 | VBOX_INSTALL_LANG_LPROJ := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
|
---|
532 |
|
---|
533 |
|
---|
534 | #
|
---|
535 | # The VirtualBox Application.
|
---|
536 | #
|
---|
537 |
|
---|
538 | VBOX_DI_VBAPP_DYLIBS = \
|
---|
539 | $(foreach qtmod, $(VBOX_QT4_MOD_NAMES), Frameworks/$(qtmod).framework/Versions/4/$(qtmod)) \
|
---|
540 | MacOS/VBoxDD.dylib \
|
---|
541 | MacOS/VBoxDD2.dylib \
|
---|
542 | MacOS/VBoxDDU.dylib \
|
---|
543 | MacOS/VBoxREM.dylib \
|
---|
544 | MacOS/VBoxRT.dylib \
|
---|
545 | MacOS/VBoxSharedFolders.dylib \
|
---|
546 | MacOS/VBoxSharedClipboard.dylib \
|
---|
547 | MacOS/VBoxGuestPropSvc.dylib \
|
---|
548 | MacOS/VBoxVMM.dylib \
|
---|
549 | MacOS/VBoxXPCOM.dylib \
|
---|
550 | MacOS/VBoxXPCOMC.dylib \
|
---|
551 | MacOS/components/VBoxC.dylib \
|
---|
552 | MacOS/components/VBoxSVCM.dylib \
|
---|
553 | MacOS/components/VBoxXPCOMIPCC.dylib \
|
---|
554 | MacOS/VBoxAuth.dylib \
|
---|
555 | MacOS/VBoxAuthSimple.dylib
|
---|
556 | ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/libqtaccessiblewidgets.dylib),)
|
---|
557 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
558 | MacOS/accessible/libqtaccessiblewidgets.dylib
|
---|
559 | endif
|
---|
560 | ifdef VBOX_WITH_GUEST_CONTROL
|
---|
561 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
562 | MacOS/VBoxGuestControlSvc.dylib
|
---|
563 | endif
|
---|
564 | if defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL)
|
---|
565 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
566 | MacOS/VBoxVRDP.dylib
|
---|
567 | endif
|
---|
568 | ifdef VBOX_WITH_CROGL
|
---|
569 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
570 | MacOS/VBoxOGLhostcrutil.dylib \
|
---|
571 | MacOS/VBoxOGLhosterrorspu.dylib \
|
---|
572 | MacOS/VBoxOGLrenderspu.dylib \
|
---|
573 | MacOS/VBoxSharedCrOpenGL.dylib
|
---|
574 | endif
|
---|
575 | ifdef VBOX_WITH_DEBUGGER_GUI
|
---|
576 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
577 | MacOS/VBoxDbg.dylib
|
---|
578 | endif
|
---|
579 | ifdef VBOX_WITH_HARDENING
|
---|
580 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
581 | MacOS/VirtualBox.dylib \
|
---|
582 | MacOS/VBoxNetDHCP.dylib \
|
---|
583 | MacOS/VBoxHeadless.dylib
|
---|
584 | endif
|
---|
585 | ifdef VBOX_WITH_HDDPARALLELS_INSTALL
|
---|
586 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
587 | MacOS/VBoxHDDParallels.dylib
|
---|
588 | endif
|
---|
589 | if defined(VBOX_WITH_PYTHON) && !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6)
|
---|
590 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
591 | MacOS/VBoxPython2_6.so
|
---|
592 | endif
|
---|
593 | if defined(VBOX_WITH_PYTHON) && !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_7)
|
---|
594 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
595 | MacOS/VBoxPython2_7.so
|
---|
596 | endif
|
---|
597 |
|
---|
598 | VBOX_DI_VBAPP_DYLIBS.x86 := \
|
---|
599 | MacOS/VBoxREM32.dylib \
|
---|
600 | MacOS/VBoxREM64.dylib
|
---|
601 | ifdef VBOX_WITH_PYTHON
|
---|
602 | VBOX_DI_VBAPP_DYLIBS.x86 += \
|
---|
603 | MacOS/VBoxPython2_5.so \
|
---|
604 | $(if-expr defined(VBOX_WITH_MAC_OS_X_10_4_SUPPORT),MacOS/VBoxPython2_3.so,)
|
---|
605 | endif
|
---|
606 |
|
---|
607 | VBOX_DI_VBAPP_DYLIBS.amd64 :=
|
---|
608 | if defined(VBOX_WITH_PYTHON) && defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6)
|
---|
609 | VBOX_DI_VBAPP_DYLIBS.amd64 += \
|
---|
610 | MacOS/VBoxPython2_6.so
|
---|
611 | endif
|
---|
612 |
|
---|
613 | if defined(VBOX_WITH_JXPCOM)
|
---|
614 | VBOX_DI_VBAPP_DYLIBS += \
|
---|
615 | MacOS/libvboxjxpcom.jnilib
|
---|
616 | endif
|
---|
617 |
|
---|
618 | if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64), $(VBOX_DI_VBAPP_DYLIBS.x86))
|
---|
619 | $(error Conflict.$(NLTAB)VBOX_DI_VBAPP_DYLIBS.amd64=$(VBOX_DI_VBAPP_DYLIBS.amd64)$(NLTAB)VBOX_DI_VBAPP_DYLIBS.x86 =$(VBOX_DI_VBAPP_DYLIBS.x86))
|
---|
620 | endif
|
---|
621 | if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_DYLIBS.x86),$(VBOX_DI_VBAPP_DYLIBS))
|
---|
622 | $(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))
|
---|
623 | endif
|
---|
624 |
|
---|
625 | VBOX_DI_VBAPP_PROGS = \
|
---|
626 | MacOS/VBoxManage \
|
---|
627 | MacOS/VBoxSVC \
|
---|
628 | MacOS/VBoxHeadless \
|
---|
629 | MacOS/VBoxXPCOMIPCD \
|
---|
630 | MacOS/VirtualBox \
|
---|
631 | MacOS/VirtualBoxVM \
|
---|
632 | MacOS/VBoxNetAdpCtl \
|
---|
633 | MacOS/VBoxNetDHCP \
|
---|
634 | MacOS/VBoxExtPackHelperApp \
|
---|
635 | MacOS/VBoxBalloonCtrl
|
---|
636 | ifdef VBOX_WITH_WEBSERVICES
|
---|
637 | VBOX_DI_VBAPP_PROGS += \
|
---|
638 | MacOS/vboxwebsrv
|
---|
639 | endif
|
---|
640 |
|
---|
641 | VBOX_DI_VBAPP_UNIVERSAL_PROGS = \
|
---|
642 | MacOS/vmstarter
|
---|
643 |
|
---|
644 | VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS = \
|
---|
645 | MacOS/VMMR0.r0 \
|
---|
646 | MacOS/VBoxDDR0.r0 \
|
---|
647 | MacOS/VBoxDD2R0.r0
|
---|
648 |
|
---|
649 | VBOX_DI_VBAPP_OTHER_BINS = \
|
---|
650 | MacOS/VMMGC.gc \
|
---|
651 | MacOS/VBoxDDGC.gc \
|
---|
652 | MacOS/VBoxDD2GC.gc
|
---|
653 |
|
---|
654 | VBOX_DI_VBAPP_MISC_FILES = \
|
---|
655 | Resources/VirtualBoxVM.app/Contents/Info.plist \
|
---|
656 | Resources/VirtualBoxVM.app/Contents/PkgInfo \
|
---|
657 | Resources/vmstarter.app/Contents/Info.plist \
|
---|
658 | Resources/vmstarter.app/Contents/PkgInfo \
|
---|
659 | Info.plist \
|
---|
660 | PkgInfo \
|
---|
661 | Resources/virtualbox.icns \
|
---|
662 | Resources/virtualbox.png \
|
---|
663 | Resources/virtualbox-vbox.icns \
|
---|
664 | Resources/virtualbox-vbox-extpack.icns \
|
---|
665 | Resources/virtualbox-ovf.icns \
|
---|
666 | Resources/virtualbox-ova.icns \
|
---|
667 | Resources/virtualbox-vdi.icns \
|
---|
668 | Resources/virtualbox-vmdk.icns \
|
---|
669 | Resources/virtualbox-vhd.icns \
|
---|
670 | Resources/virtualbox-hdd.icns \
|
---|
671 | MacOS/components/VBoxXPCOMBase.xpt \
|
---|
672 | MacOS/components/VirtualBox_XPCOM.xpt
|
---|
673 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
674 | VBOX_DI_VBAPP_MISC_FILES += \
|
---|
675 | MacOS/UserManual.pdf
|
---|
676 | endif
|
---|
677 | ifdef VBOX_WITH_ADDITIONS_PACKING
|
---|
678 | ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso),)
|
---|
679 | VBOX_DI_VBAPP_MISC_FILES += \
|
---|
680 | MacOS/VBoxGuestAdditions.iso
|
---|
681 | endif
|
---|
682 | endif
|
---|
683 | ifdef VBOX_WITH_EFIFW_PACKING
|
---|
684 | VBOX_DI_VBAPP_MISC_FILES += \
|
---|
685 | MacOS/VBoxEFI32.fd \
|
---|
686 | MacOS/VBoxEFI64.fd
|
---|
687 | endif
|
---|
688 | ifdef VBOX_WITH_COCOA_QT
|
---|
689 | VBOX_DI_VBAPP_MISC_FILES += \
|
---|
690 | Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/classes.nib \
|
---|
691 | Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/info.nib \
|
---|
692 | Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/keyedobjects.nib
|
---|
693 | endif
|
---|
694 |
|
---|
695 | VBOX_DI_VBAPP_SYMLINKS = \
|
---|
696 | Resources/VirtualBoxVM.app/Contents/MacOS=>../../../MacOS/ \
|
---|
697 | Resources/VirtualBoxVM.app/Contents/Resources=>../../../Resources/ \
|
---|
698 | Resources/vmstarter.app/Contents/MacOS=>../../../MacOS/ \
|
---|
699 | Resources/vmstarter.app/Contents/Resources=>../../../Resources/ \
|
---|
700 | $(foreach qtmod, $(VBOX_QT4_MOD_NAMES), Frameworks/$(qtmod).framework/$(qtmod)=>Versions/4/$(qtmod))
|
---|
701 | ifdef VBOX_WITH_COCOA_QT
|
---|
702 | VBOX_DI_VBAPP_SYMLINKS += \
|
---|
703 | Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Resources=>Versions/4/Resources/
|
---|
704 | endif
|
---|
705 |
|
---|
706 | ifdef VBOX_WITH_PYTHON
|
---|
707 | # Python XPCOM glue
|
---|
708 | VBOX_DI_VBAPP_PYTHON_FILES = \
|
---|
709 | $(foreach f,$(notdir $(wildcard $(VBOX_PATH_DIST)/sdk/bindings/xpcom/python/xpcom/*.py)),sdk/bindings/xpcom/python/xpcom/$(f)) \
|
---|
710 | sdk/bindings/xpcom/python/xpcom/client/__init__.py \
|
---|
711 | sdk/bindings/xpcom/python/xpcom/server/__init__.py \
|
---|
712 | sdk/bindings/xpcom/python/xpcom/server/enumerator.py \
|
---|
713 | sdk/bindings/xpcom/python/xpcom/server/factory.py \
|
---|
714 | sdk/bindings/xpcom/python/xpcom/server/loader.py \
|
---|
715 | sdk/bindings/xpcom/python/xpcom/server/module.py \
|
---|
716 | sdk/bindings/xpcom/python/xpcom/server/policy.py \
|
---|
717 | sdk/installer/vboxapisetup.py \
|
---|
718 | sdk/installer/vboxapi/__init__.py \
|
---|
719 | sdk/installer/vboxapi/VirtualBox_constants.py
|
---|
720 | endif
|
---|
721 |
|
---|
722 |
|
---|
723 | # (The dependencies are including way too much here because I'm lazy.)
|
---|
724 | $(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg: \
|
---|
725 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
|
---|
726 | $(VBOX_BRAND_$(f)_VIRTUALBOX_DESCRIPTION_PLIST)) \
|
---|
727 | $(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)\
|
---|
728 | ,$(call VBOX_DI_FN_DEP_BOTH,VirtualBox.app/Contents/$(f)) ) \
|
---|
729 | $(foreach f, $(VBOX_DI_VBAPP_DYLIBS.x86) $(VBOX_DI_VBAPP_MISC_FILES.x86)\
|
---|
730 | ,$(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/$(f)) ) \
|
---|
731 | $(foreach f, $(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_MISC_FILES.amd64)\
|
---|
732 | ,$(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/$(f)) ) \
|
---|
733 | \
|
---|
734 | $(if $(VBOX_WITH_DOCS_PACKING),$(VBOX_ADD_MANUALS),) \
|
---|
735 | $(VBOX_BRAND_LICENSE_TXT) \
|
---|
736 | $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*) \
|
---|
737 | $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*.lproj/*) \
|
---|
738 | $$(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/,$(VBOX_INSTALL_LANG_FILES)) \
|
---|
739 | \
|
---|
740 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/*) \
|
---|
741 | $(filter-out Disabled, $(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/*)) \
|
---|
742 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*) \
|
---|
743 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/*) \
|
---|
744 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*) \
|
---|
745 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*.lproj/*) \
|
---|
746 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/*) \
|
---|
747 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/Resources/*) \
|
---|
748 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/Resources/*.lproj/*) \
|
---|
749 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*.lproj/*) \
|
---|
750 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/*) \
|
---|
751 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/additions/*) \
|
---|
752 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/components/*) \
|
---|
753 | $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/*) \
|
---|
754 | $(if-expr defined(VBOX_WITH_PYTHON), $(addprefix $(VBOX_PATH_DIST)/, $(VBOX_DI_VBAPP_PYTHON_FILES)),) \
|
---|
755 | $(if-expr defined(VBOX_WITH_JXPCOM), $(addprefix $(VBOX_PATH_DIST)/, sdk/bindings/xpcom/java/vboxjxpcom.jar),) \
|
---|
756 | $(if $(VBOX_WITH_WEBSERVICES),$(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist,) \
|
---|
757 | $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxballoonctrl.plist \
|
---|
758 | $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
|
---|
759 | $(call MSG_TOOL,PackageMaker,,,$@)
|
---|
760 | @# Cleanup any previously failed attempts.
|
---|
761 | sudo rm -Rf \
|
---|
762 | $@ \
|
---|
763 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
|
---|
764 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
|
---|
765 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res
|
---|
766 | @# Correct directory permissions are important.
|
---|
767 | $(MKDIR) -p \
|
---|
768 | $(@D) \
|
---|
769 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
|
---|
770 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \
|
---|
771 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/English.lproj
|
---|
772 | $(MKDIR) -p -m 0775 \
|
---|
773 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications
|
---|
774 | $(MKDIR) -p -m 0755 $(sort \
|
---|
775 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents \
|
---|
776 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS \
|
---|
777 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/components \
|
---|
778 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/nls \
|
---|
779 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/accessible \
|
---|
780 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources \
|
---|
781 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app \
|
---|
782 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents \
|
---|
783 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/vmstarter.app \
|
---|
784 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/vmstarter.app/Contents \
|
---|
785 | $(if-expr defined(VBOX_WITH_PYTHON), \
|
---|
786 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk \
|
---|
787 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/installer \
|
---|
788 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/installer/vboxapi \
|
---|
789 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/ \
|
---|
790 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom \
|
---|
791 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/python \
|
---|
792 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/python/xpcom \
|
---|
793 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/client \
|
---|
794 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/server,) \
|
---|
795 | $(if-expr defined(VBOX_WITH_JXPCOM), \
|
---|
796 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/java,) \
|
---|
797 | $(addprefix $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/,$(dir \
|
---|
798 | $(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) \
|
---|
799 | $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "amd64",$(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_MISC_FILES.amd64),) \
|
---|
800 | $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "x86", $(VBOX_DI_VBAPP_DYLIBS.x86) $(VBOX_DI_VBAPP_MISC_FILES.x86),) \
|
---|
801 | ))\
|
---|
802 | )
|
---|
803 | @# Create the .lproj language directories
|
---|
804 | $(MKDIR) -p -m 0755 \
|
---|
805 | $(addprefix $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/,$(VBOX_INSTALL_LANG_LPROJ))
|
---|
806 | @# Install all supported language files
|
---|
807 | $(foreach f, $(VBOX_INSTALL_LANG_FILES) \
|
---|
808 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/nls/$(f)$(NLTAB))
|
---|
809 | ifdef VBOX_WITH_WEBSERVICES
|
---|
810 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/
|
---|
811 | endif
|
---|
812 | $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxballoonctrl.plist $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/
|
---|
813 | @# Install the python stuff
|
---|
814 | ifdef VBOX_WITH_PYTHON
|
---|
815 | $(foreach f,$(VBOX_DI_VBAPP_PYTHON_FILES) \
|
---|
816 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(f)$(NLTAB) )
|
---|
817 | $(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS
|
---|
818 | endif
|
---|
819 | ifdef VBOX_WITH_JXPCOM
|
---|
820 | $(INSTALL) -m 0755 $(VBOX_PATH_DIST)/sdk/bindings/xpcom/java/vboxjxpcom.jar $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/java/vboxjxpcom.jar
|
---|
821 | endif
|
---|
822 | @# Copy misc files.
|
---|
823 | $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES) \
|
---|
824 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )
|
---|
825 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
826 | $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES.x86) \
|
---|
827 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )
|
---|
828 | $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES.amd64) \
|
---|
829 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )
|
---|
830 | endif
|
---|
831 | $(INSTALL) -m 644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/LICENSE
|
---|
832 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
833 | $(foreach f,$(VBOX_ADD_MANUALS) \
|
---|
834 | ,$(INSTALL) -m 0644 $(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(NLTAB))
|
---|
835 | endif
|
---|
836 | @# Create symlinks.
|
---|
837 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
838 | $(foreach symlink,$(VBOX_DI_VBAPP_SYMLINKS) $(VBOX_DI_VBAPP_SYMLINKS.amd64) $(VBOX_DI_VBAPP_SYMLINKS.x86) \
|
---|
839 | ,$(LN) -s $(word 2,$(subst =>, ,$(symlink))) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(word 1,$(subst =>, ,$(symlink)))$(NLTAB))
|
---|
840 | else
|
---|
841 | $(foreach symlink,$(VBOX_DI_VBAPP_SYMLINKS) $(VBOX_DI_VBAPP_SYMLINKS.$(KBUILD_TARGET_ARCH)) \
|
---|
842 | ,$(LN) -s $(word 2,$(subst =>, ,$(symlink))) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(word 1,$(subst =>, ,$(symlink)))$(NLTAB))
|
---|
843 | endif
|
---|
844 | @# Copy the dylibs.
|
---|
845 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
846 | $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) \
|
---|
847 | ,$(VBOX_DI_LIPO) -create \
|
---|
848 | $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(dylib) \
|
---|
849 | $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(dylib) \
|
---|
850 | -output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))
|
---|
851 | $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS.x86) \
|
---|
852 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))
|
---|
853 | $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS.amd64) \
|
---|
854 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))
|
---|
855 | else
|
---|
856 | $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
|
---|
857 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))
|
---|
858 | endif
|
---|
859 | @# Copy the other binaries.
|
---|
860 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
861 | $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \
|
---|
862 | ,$(VBOX_DI_LIPO) -create \
|
---|
863 | $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(otherbin) \
|
---|
864 | $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(otherbin) \
|
---|
865 | -output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)$(NLTAB))
|
---|
866 | $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_BINS) \
|
---|
867 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)-x86$(NLTAB) \
|
---|
868 | $(INSTALL) -m 0644 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)-amd64$(NLTAB))
|
---|
869 | else
|
---|
870 | $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_BINS) $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \
|
---|
871 | ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)-$(KBUILD_TARGET_ARCH)$(NLTAB))
|
---|
872 | endif
|
---|
873 | @# Create/copy the universal executable binaries.
|
---|
874 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
875 | $(foreach otherbin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
|
---|
876 | ,$(VBOX_DI_LIPO) -create \
|
---|
877 | $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(otherbin) \
|
---|
878 | $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(otherbin) \
|
---|
879 | -output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)$(NLTAB))
|
---|
880 | else
|
---|
881 | $(foreach otherbin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
|
---|
882 | ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)-$(KBUILD_TARGET_ARCH)$(NLTAB))
|
---|
883 | endif
|
---|
884 | @# Copy the binaries.
|
---|
885 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
886 | $(foreach prog, $(VBOX_DI_VBAPP_PROGS) \
|
---|
887 | ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(prog) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(prog)-x86$(NLTAB) \
|
---|
888 | $(INSTALL) -m 0755 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(prog) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(prog)-amd64$(NLTAB))
|
---|
889 | else
|
---|
890 | $(foreach prog, $(VBOX_DI_VBAPP_PROGS) \
|
---|
891 | ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(prog) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(prog)-$(KBUILD_TARGET_ARCH)$(NLTAB))
|
---|
892 | endif
|
---|
893 | @# Create symlinks for all the binaries (corrected by postflight and the VirtualBox StartupItem to hardlinks).
|
---|
894 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
895 | $(foreach bin, $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_OTHER_BINS) \
|
---|
896 | ,$(LN) -s $(bin)-x86 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(bin)$(NLTAB))
|
---|
897 | else
|
---|
898 | $(foreach bin, $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_OTHER_BINS) \
|
---|
899 | ,$(LN) -s $(bin)-$(KBUILD_TARGET_ARCH) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(bin)$(NLTAB))
|
---|
900 | endif
|
---|
901 | #ifdef VBOX_WITH_HARDENING - disabled temporarily
|
---|
902 | if 1
|
---|
903 | @# We cannot use @executable_path together with setuid binaries, dyld gets upset about it. So, fix Qt libs and users.
|
---|
904 | $(foreach qtmod, $(VBOX_QT4_MOD_NAMES) \
|
---|
905 | ,install_name_tool -id /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
|
---|
906 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/4/$(qtmod)$(NLTAB) )
|
---|
907 | $(foreach f, \
|
---|
908 | $(VBOX_DI_VBAPP_DYLIBS) \
|
---|
909 | $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE), \
|
---|
910 | $(VBOX_DI_VBAPP_DYLIBS.x86) \
|
---|
911 | $(VBOX_DI_VBAPP_DYLIBS.amd64) \
|
---|
912 | $(addsuffix -x86, $(VBOX_DI_VBAPP_PROGS)) \
|
---|
913 | $(addsuffix -amd64, $(VBOX_DI_VBAPP_PROGS)) \
|
---|
914 | ,$(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
|
---|
915 | $(addsuffix -$(KBUILD_TARGET_ARCH), $(VBOX_DI_VBAPP_PROGS)) \
|
---|
916 | ) \
|
---|
917 | ,install_name_tool \
|
---|
918 | $(foreach qtmod, $(VBOX_QT4_MOD_NAMES), \
|
---|
919 | -change @executable_path/../Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
|
---|
920 | /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
|
---|
921 | -change $(VBOX_PATH_QT4)/Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
|
---|
922 | /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
|
---|
923 | -change $(PATH_SDK_QT4)/$(qtmod).framework/Versions/4/$(qtmod) \
|
---|
924 | /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
|
---|
925 | -change $(qtmod).framework/Versions/4/$(qtmod) \
|
---|
926 | /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/4/$(qtmod) \
|
---|
927 | ) \
|
---|
928 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )
|
---|
929 | endif
|
---|
930 | @# Set the correct owner and set the set-user-ID-on-execution bit on the relevant executables.
|
---|
931 | sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root
|
---|
932 | ifdef VBOX_WITH_HARDENING
|
---|
933 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
934 | sudo chmod u+s \
|
---|
935 | $(foreach bin,VBoxHeadless VirtualBox VirtualBoxVM VBoxNetAdpCtl VBoxNetDHCP,\
|
---|
936 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(bin)-x86 \
|
---|
937 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(bin)-amd64)
|
---|
938 | else
|
---|
939 | sudo chmod u+s \
|
---|
940 | $(foreach bin,VBoxHeadless VirtualBox VirtualBoxVM VBoxNetAdpCtl VBoxNetDHCP,\
|
---|
941 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(bin)-$(KBUILD_TARGET_ARCH))
|
---|
942 | endif
|
---|
943 | endif
|
---|
944 | @# Do keyword replacement in the package info and description files.
|
---|
945 | $(SED) \
|
---|
946 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
947 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
948 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
949 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
950 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
951 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
952 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
953 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/Info.plist \
|
---|
954 | $(VBOX_PATH_DI_SRC)/VirtualBox/Info.plist
|
---|
955 | $(SED) \
|
---|
956 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
957 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
958 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
959 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
960 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
961 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
962 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
963 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/Description.plist \
|
---|
964 | $(VBOX_PATH_DI_SRC)/VirtualBox/Description.plist
|
---|
965 | @# Copy the resources.
|
---|
966 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \
|
---|
967 | ,$(MKDIR) -p \
|
---|
968 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
|
---|
969 | $(SED) \
|
---|
970 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
971 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
972 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
973 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
974 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
975 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
976 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
977 | --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Description.plist \
|
---|
978 | $(VBOX_BRAND_$(f)_VIRTUALBOX_DESCRIPTION_PLIST)$(NLTAB) \
|
---|
979 | )
|
---|
980 | $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/postflight $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/
|
---|
981 | @# Build the package.
|
---|
982 | $(VBOX_PACKAGEMAKER) -build -v \
|
---|
983 | -p $@ \
|
---|
984 | -f $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
|
---|
985 | -r $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \
|
---|
986 | -i $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/Info.plist \
|
---|
987 | -d $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/Description.plist
|
---|
988 | @# Cleanup
|
---|
989 | sudo rm -Rf \
|
---|
990 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
|
---|
991 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
|
---|
992 | $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res
|
---|
993 |
|
---|
994 | #
|
---|
995 | # The VirtualBox CLI wrapper scripts.
|
---|
996 | #
|
---|
997 | $(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg: \
|
---|
998 | $$(wildcard $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/* \
|
---|
999 | $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/*.lproj/*) \
|
---|
1000 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \
|
---|
1001 | ,$(VBOX_BRAND_$(f)_VIRTUALBOXCLI_DESCRIPTION_PLIST)) \
|
---|
1002 | $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
|
---|
1003 | $(call MSG_TOOL,PackageMaker,,,$@)
|
---|
1004 | @# Cleanup any previously failed attempts.
|
---|
1005 | sudo rm -Rf \
|
---|
1006 | $@ \
|
---|
1007 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
|
---|
1008 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
|
---|
1009 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res
|
---|
1010 | @# Correct directory permissions are important.
|
---|
1011 | $(MKDIR) -p \
|
---|
1012 | $(@D) \
|
---|
1013 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
|
---|
1014 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res \
|
---|
1015 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/English.lproj
|
---|
1016 | $(MKDIR) -p -m 0755 \
|
---|
1017 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr \
|
---|
1018 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin
|
---|
1019 | @# Generate the wrapper scripts.
|
---|
1020 | $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VirtualBox '#!/bin/bash'
|
---|
1021 | $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VirtualBox 'exec /Applications/VirtualBox.app/Contents/MacOS/VirtualBox "$$@"'
|
---|
1022 | $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxManage '#!/bin/bash'
|
---|
1023 | $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxManage 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxManage "$$@"'
|
---|
1024 | $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxVRDP '#!/bin/bash'
|
---|
1025 | $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxVRDP 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"'
|
---|
1026 | $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxHeadless '#!/bin/bash'
|
---|
1027 | $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxHeadless 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"'
|
---|
1028 | ifdef VBOX_WITH_WEBSERVICES
|
---|
1029 | $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/vboxwebsrv '#!/bin/bash'
|
---|
1030 | $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/vboxwebsrv 'exec /Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv "$$@"'
|
---|
1031 | endif
|
---|
1032 | $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxBalloonCtrl '#!/bin/bash'
|
---|
1033 | $(APPEND) $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/VBoxBalloonCtrl 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl "$$@"'
|
---|
1034 | @# Set the correct owners and file permissions.
|
---|
1035 | sudo chmod 0755 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/bin/*
|
---|
1036 | sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root
|
---|
1037 | sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr
|
---|
1038 | @# Do keyword replacement in the package info and description files.
|
---|
1039 | $(SED) \
|
---|
1040 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
1041 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
1042 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
1043 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
1044 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
1045 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
1046 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
1047 | --output $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc/Info.plist \
|
---|
1048 | $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/Info.plist
|
---|
1049 | $(SED) \
|
---|
1050 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
1051 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
1052 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
1053 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
1054 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
1055 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
1056 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
1057 | --output $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc/Description.plist \
|
---|
1058 | $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/Description.plist
|
---|
1059 | @# Copy the resources.
|
---|
1060 | $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \
|
---|
1061 | ,$(MKDIR) -p \
|
---|
1062 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
|
---|
1063 | $(SED) \
|
---|
1064 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
1065 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
1066 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
1067 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
1068 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
1069 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
1070 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
1071 | --output $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Description.plist \
|
---|
1072 | $(VBOX_BRAND_$(f)_VIRTUALBOXCLI_DESCRIPTION_PLIST)$(NLTAB) \
|
---|
1073 | )
|
---|
1074 | @# Build the package.
|
---|
1075 | $(VBOX_PACKAGEMAKER) -build -v \
|
---|
1076 | -p $@ \
|
---|
1077 | -f $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
|
---|
1078 | -r $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res \
|
---|
1079 | -i $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc/Info.plist \
|
---|
1080 | -d $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc/Description.plist
|
---|
1081 | @# Cleanup
|
---|
1082 | sudo rm -Rf \
|
---|
1083 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
|
---|
1084 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
|
---|
1085 | $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res
|
---|
1086 |
|
---|
1087 |
|
---|
1088 | ifndef VBOX_OSE
|
---|
1089 | include $(VBOX_PATH_DI_SRC)/Bundle.kmk
|
---|
1090 | endif
|
---|
1091 |
|
---|