Changeset 54675 in vbox for trunk/src/VBox/Installer/darwin/Makefile.kmk
- Timestamp:
- Mar 7, 2015 12:06:14 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/darwin/Makefile.kmk
r54063 r54675 27 27 BLDDIRS += $(VBOX_DI_OUT_DIR) 28 28 29 ifdef VBOX_WITH_COMBINED_PACKAGE 30 ifeq ($(KBUILD_TARGET_ARCH),x86) 31 VBOX_PATH_DIST_32 = $(VBOX_PATH_DIST) 32 VBOX_PATH_DIST_64 = $(PATH_OUT_BASE)/darwin.amd64/$(KBUILD_TYPE)/dist 33 VBOX_PATH_DIST_OTHER = $(VBOX_PATH_DIST_64) 34 else 35 VBOX_PATH_DIST_64 = $(VBOX_PATH_DIST) 36 VBOX_PATH_DIST_32 = $(PATH_OUT_BASE)/darwin.x86/$(KBUILD_TYPE)/dist 37 VBOX_PATH_DIST_OTHER = $(VBOX_PATH_DIST_32) 38 endif 39 VBOX_DI_FN_DEP_BOTH = $(VBOX_PATH_DIST_32)/$1 $(VBOX_PATH_DIST_64)/$2 40 VBOX_DI_FN_DEP_32 = $(VBOX_PATH_DIST_32)/$1 41 VBOX_DI_FN_DEP_64 = $(VBOX_PATH_DIST_64)/$1 42 VBOX_DI_LIPO = lipo 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 = 43 33 else 44 VBOX_DI_FN_DEP_BOTH = $(VBOX_PATH_DIST)/$1 45 ifeq ($(KBUILD_TARGET_ARCH),x86) 46 VBOX_DI_FN_DEP_32 = $(VBOX_PATH_DIST)/$1 47 VBOX_DI_FN_DEP_64 = 48 else 49 VBOX_DI_FN_DEP_64 = $(VBOX_PATH_DIST)/$1 50 VBOX_DI_FN_DEP_32 = 51 endif 52 VBOX_PATH_DIST_OTHER = $(error VBOX_PATH_DIST_OTHER used in a non-combined package deal) 53 endif 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) 54 38 55 39 # Unset this to speed up things during makefile hacking. … … 286 270 $(NLTAB)$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/) 287 271 @# Copy the binaries and invoking lipo. 288 ifdef VBOX_WITH_COMBINED_PACKAGE289 $(foreach kext,$(VBOX_DI_KEXTS_UNIVERSAL), \290 $(NLTAB)$(VBOX_DI_LIPO) -create \291 $(VBOX_PATH_DIST_32)/$(kext).kext/Contents/MacOS/$(kext) \292 $(VBOX_PATH_DIST_64)/$(kext).kext/Contents/MacOS/$(kext) \293 -output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS/$(kext))294 else295 272 $(foreach kext,$(VBOX_DI_KEXTS), \ 296 273 $(NLTAB)$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/$(kext).kext/Contents/MacOS/$(kext) $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS/) 297 endif298 274 @# Signed the kext bundles. 299 275 ifdef VBOX_SIGNING_MODE … … 618 594 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/sdk/bindings/xpcom/java,) \ 619 595 $(addprefix $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/,$(dir \ 620 $(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) \ 621 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "amd64",$(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_MISC_FILES.amd64),) \ 622 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "x86", $(VBOX_DI_VBAPP_DYLIBS.x86) $(VBOX_DI_VBAPP_MISC_FILES.x86),) \ 596 $(VBOX_DI_VBAPP_DYLIBS) \ 597 $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \ 598 $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \ 599 $(VBOX_DI_VBAPP_OTHER_BINS) \ 600 $(VBOX_DI_VBAPP_PROGS) \ 601 $(VBOX_DI_VBAPP_MISC_FILES) \ 602 $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \ 603 $(VBOX_DI_VBAPP_MISC_FILES.$(KBUILD_TARGET_ARCH)) \ 623 604 ))\ 624 605 ) … … 647 628 $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES) \ 648 629 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) ) 649 ifdef VBOX_WITH_COMBINED_PACKAGE650 $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES.x86) \651 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )652 $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES.amd64) \653 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(f)$(NLTAB) )654 endif655 630 $(INSTALL) -m 644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/Resources/LICENSE 656 631 ifdef VBOX_WITH_DOCS_PACKING … … 659 634 endif 660 635 @# Create symlinks. 661 ifdef VBOX_WITH_COMBINED_PACKAGE662 $(foreach symlink,$(VBOX_DI_VBAPP_SYMLINKS) $(VBOX_DI_VBAPP_SYMLINKS.amd64) $(VBOX_DI_VBAPP_SYMLINKS.x86) \663 ,$(LN) -s $(word 2,$(subst =>, ,$(symlink))) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(word 1,$(subst =>, ,$(symlink)))$(NLTAB))664 else665 636 $(foreach symlink,$(VBOX_DI_VBAPP_SYMLINKS) $(VBOX_DI_VBAPP_SYMLINKS.$(KBUILD_TARGET_ARCH)) \ 666 637 ,$(LN) -s $(word 2,$(subst =>, ,$(symlink))) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(word 1,$(subst =>, ,$(symlink)))$(NLTAB)) 667 endif668 638 @# Copy the dylibs. 669 ifdef VBOX_WITH_COMBINED_PACKAGE670 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) \671 ,$(VBOX_DI_LIPO) -create \672 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(dylib) \673 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(dylib) \674 -output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))675 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS.x86) \676 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))677 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS.amd64) \678 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB))679 else680 639 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \ 681 640 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib)$(NLTAB)) 682 endif683 641 @# Copy the other binaries. 684 ifdef VBOX_WITH_COMBINED_PACKAGE685 $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \686 ,$(VBOX_DI_LIPO) -create \687 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(otherbin) \688 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(otherbin) \689 -output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)$(NLTAB))690 $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_BINS), \691 $(NLTAB)$(INSTALL) -m 0644 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)-x86 \692 $(NLTAB)$(INSTALL) -m 0644 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)-amd64 )693 else694 642 $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \ 695 643 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)$(NLTAB)) 696 644 $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_BINS) \ 697 645 ,$(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)) 698 endif699 646 @# Create/copy the universal executable binaries. 700 ifdef VBOX_WITH_COMBINED_PACKAGE701 $(foreach otherbin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \702 ,$(VBOX_DI_LIPO) -create \703 $(VBOX_PATH_DIST_32)/VirtualBox.app/Contents/$(otherbin) \704 $(VBOX_PATH_DIST_64)/VirtualBox.app/Contents/$(otherbin) \705 -output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)$(NLTAB))706 else707 647 $(foreach otherbin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \ 708 648 ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(otherbin)$(NLTAB)) 709 endif710 649 @# Copy the binaries. 711 ifdef VBOX_WITH_COMBINED_PACKAGE712 $(foreach prog, $(VBOX_DI_VBAPP_PROGS) \713 ,$(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) \714 $(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))715 else716 650 $(foreach prog, $(VBOX_DI_VBAPP_PROGS) \ 717 651 ,$(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)) 718 endif719 652 #ifdef VBOX_WITH_HARDENING - disabled temporarily 720 653 if 1 … … 725 658 $(foreach f, \ 726 659 $(VBOX_DI_VBAPP_DYLIBS) \ 727 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE), \ 728 $(VBOX_DI_VBAPP_DYLIBS.x86) \ 729 $(VBOX_DI_VBAPP_DYLIBS.amd64) \ 730 $(addsuffix -x86, $(VBOX_DI_VBAPP_PROGS)) \ 731 $(addsuffix -amd64, $(VBOX_DI_VBAPP_PROGS)) \ 732 ,$(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \ 733 $(addsuffix -$(KBUILD_TARGET_ARCH), $(VBOX_DI_VBAPP_PROGS)) \ 734 ) \ 660 $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \ 661 $(addsuffix -$(KBUILD_TARGET_ARCH), $(VBOX_DI_VBAPP_PROGS)) \ 735 662 ,install_name_tool \ 736 663 $(foreach qtmod, $(VBOX_QT4_MOD_NAMES), \ … … 757 684 ,$(INSTALL) -m 0655 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/dtrace/$(file) \ 758 685 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/dtrace/$(file)$(NLTAB)) 759 ifdef VBOX_WITH_COMBINED_PACKAGE760 $(MKDIR) -p -m 0755 -- \761 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/dtrace/lib/$(VBOX_CP_OTHER_ARCH)/ \762 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/dtrace/testcase/$(VBOX_CP_OTHER_ARCH)/763 $(foreach file, $(addprefix lib/$(VBOX_CP_OTHER_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \764 $(addprefix testcase/$(VBOX_CP_OTHER_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \765 ,$(INSTALL) -m 0655 $(VBOX_PATH_DIST_OTHER)/VirtualBox.app/Contents/MacOS/dtrace/$(file) \766 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/dtrace/$(file)$(NLTAB))767 endif768 686 endif 769 687 … … 776 694 $(foreach dylib, \ 777 695 $(VBOX_DI_VBAPP_DYLIBS) \ 778 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE), \ 779 $(VBOX_DI_VBAPP_DYLIBS.x86) \ 780 $(VBOX_DI_VBAPP_DYLIBS.amd64) \ 781 ,$(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) ) \ 696 $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \ 782 697 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(dylib),org.virtualbox.app.macos.$(notdir $(dylib))) ) 783 698 $(foreach bin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \ … … 786 701 $(foreach other, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \ 787 702 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(other),org.virtualbox.app.macos.$(notdir $(other))) ) 788 $(foreach arch, $( if-expr defined(VBOX_WITH_COMBINED_PACKAGE), amd64 x86, $(KBUILD_TARGET_ARCH)) \703 $(foreach arch, $(KBUILD_TARGET_ARCH) \ 789 704 , $(foreach other, $(VBOX_DI_VBAPP_OTHER_BINS) \ 790 705 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(other)-$(arch),org.virtualbox.app.macos.$(notdir $(other))-$(arch)) ) ) 791 706 $(foreach other, $(filter MacOS/%,$(VBOX_DI_VBAPP_MISC_FILES)) \ 707 $(if $(VBOX_WITH_PYTHON),MacOS/vboxshell.py,) \ 708 MacOS/VBoxAutostartDarwin.sh \ 792 709 , $(NLTAB)$(call VBOX_SIGN_VMM_MOD_FN,$(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(other),org.virtualbox.app.macos.$(notdir $(other))) ) 793 710 else 794 711 $(foreach other, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \ 795 712 , $(NLTAB)$(call VBOX_SIGN_VMM_MOD_FN,$(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(other),org.virtualbox.app.macos.$(notdir $(other))) ) 796 $(foreach arch, $( if-expr defined(VBOX_WITH_COMBINED_PACKAGE), amd64 x86, $(KBUILD_TARGET_ARCH)) \713 $(foreach arch, $(KBUILD_TARGET_ARCH) \ 797 714 , $(foreach other, $(VBOX_DI_VBAPP_OTHER_BINS) \ 798 715 , $(NLTAB)$(call VBOX_SIGN_VMM_MOD_FN,$(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(other)-$(arch),org.virtualbox.app.macos.$(notdir $(other))-$(arch)) ) ) 799 716 endif 800 $(foreach arch, $( if-expr defined(VBOX_WITH_COMBINED_PACKAGE), amd64 x86, $(KBUILD_TARGET_ARCH)) \801 , $(foreach bin, $( VBOX_DI_VBAPP_PROGS) \717 $(foreach arch, $(KBUILD_TARGET_ARCH) \ 718 , $(foreach bin, $(if-expr defined(VBOX_NOT_OSX_105),$(filter-out MacOS/VirtualBox,$(VBOX_DI_VBAPP_PROGS)),$(VBOX_DI_VBAPP_PROGS)) \ 802 719 , \ 803 720 $(NLTAB)$(MV) -- $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(bin)-$(arch) $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/$(bin) \ … … 814 731 sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root 815 732 ifdef VBOX_WITH_HARDENING 816 ifdef VBOX_WITH_COMBINED_PACKAGE817 sudo chmod u+s \818 $(foreach bin,VBoxHeadless VirtualBox VirtualBoxVM VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT,\819 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(bin)-x86 \820 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(bin)-amd64)821 else822 733 sudo chmod u+s \ 823 734 $(foreach bin,VBoxHeadless VirtualBox VirtualBoxVM VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT,\ 824 735 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app/Contents/MacOS/$(bin)-$(KBUILD_TARGET_ARCH)) 825 endif826 736 endif 827 737 @# Do keyword replacement in the package info and description files.
Note:
See TracChangeset
for help on using the changeset viewer.