VirtualBox

Changeset 76023 in vbox for trunk/src/VBox/Additions/darwin


Ignore:
Timestamp:
Dec 6, 2018 7:05:37 PM (6 years ago)
Author:
vboxsync
Message:

GAs/darwin/Installer: updates

Location:
trunk/src/VBox/Additions/darwin/Installer
Files:
6 edited
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/darwin/Installer/DiskImage/Uninstall.tool

    r69500 r76023  
    22# $Id$
    33## #file
    4 # VirtualBox Uninstaller Script.
     4# VirtualBox Guest Additions uninstall script.
    55#
    66
    77#
    8 # Copyright (C) 2007-2017 Oracle Corporation
     8# Copyright (C) 2007-2018 Oracle Corporation
    99#
    1010# This file is part of VirtualBox Open Source Edition (OSE), as
     
    105105done
    106106
     107# Remove our kexts from the cache.
     108echo "Updating kernel cache."
     109sudo -p "Please enter %u's password (refreshing kext cache):" touch "/System/Library/Extensions/"
     110sudo -p "Please enter %u's password (refreshing kext cache):" kextcache -update-volume /
     111
    107112echo "Done."
    108113exit 0;
  • trunk/src/VBox/Additions/darwin/Installer/Makefile.kmk

    r69111 r76023  
    7272# The packing.
    7373#
    74 PACKING += $(VBOX_PATH_DIST)/VBoxDarwinAdditions.dmg
     74PACKING += \
     75        $(PATH_STAGE)/$(INST_ADDITIONS)VBoxGuestAdditions.pkg \
     76        $(PATH_STAGE)/$(INST_ADDITIONS)osx/Uninstall.tool
     77
    7578#OTHER_CLEAN = TODO
    7679
     
    97100
    98101#
    99 # The disk image.
    100 #
    101 $(VBOX_PATH_DIST)/VBoxDarwinAdditions.dmg: \
    102                 $(VBOX_PATH_PACK_TMP)/DiskImage/VBoxGuestAdditions.pkg \
    103                 $(VBOX_BRAND_DARWIN_DISKIMAGE_BG) \
    104                 $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE) \
    105                 $$(wildcard $(VBOX_ADD_PATH_DI_SRC)/DiskImage/*) \
    106                 $(VBOX_ADD_PATH_DI_SRC)/DiskImage/Uninstall.tool \
    107                 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
    108         $(call MSG_TOOL,hdiutil,,,$@)
    109         @# Cleanup any previously failed attempts and various trash.
    110         sudo rm -Rf $(VBOX_PATH_PACK_TMP)/DiskImage.tmp
    111         $(MKDIR) -p $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/
    112         sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage/VBoxGuestAdditions.pkg $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/
    113         sudo rm -Rf \
    114                 $@ \
    115                 $(VBOX_PATH_PACK_TMP)/DiskImage/
    116         sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage.tmp $(VBOX_PATH_PACK_TMP)/DiskImage
    117         @# Remove .dmg packages from old depend builds
    118         $(QUIET)$(RM) -f $(wildcard $(VBOX_PATH_DIST)/VBoxDarwinAdditions-*-r*.dmg)
    119         @# Populate the image with uninstaller, readme, picture, and .VolumeIcon.icns. (TODO)
    120         $(INSTALL) $(VBOX_ADD_PATH_DI_SRC)/DiskImage/Uninstall.tool  $(VBOX_PATH_PACK_TMP)/DiskImage/
    121 ifeq (1,1)
    122         @# Pedantic mode...
    123         $(INSTALL) -m 644 $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE)           $(VBOX_PATH_PACK_TMP)/DiskImage/.DS_Store
    124         $(MKDIR) $(VBOX_PATH_PACK_TMP)/DiskImage/.background
    125         $(INSTALL) -m 644 $(VBOX_BRAND_DARWIN_DISKIMAGE_BG)                 $(VBOX_PATH_PACK_TMP)/DiskImage/.background/vbox_folder.tiff
    126 endif
    127         @# Change the owners.
    128         sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/DiskImage
    129         @# Create the image.
    130         sudo hdiutil create -format UDBZ -volname "VirtualBox Guest Additions" -srcfolder "$(VBOX_PATH_PACK_TMP)/DiskImage" "$@"
    131         @# Change (back) the owner so it can be deleted by the user.
    132         sudo chown "$(shell whoami)" "$@"
    133         sudo chown -R "$(shell whoami)" $(VBOX_PATH_PACK_TMP)/DiskImage
     102# The packing targets.
     103#
     104$(PATH_STAGE)/$(INST_ADDITIONS)VBoxGuestAdditions.pkg: $(VBOX_PATH_PACK_TMP)/VBoxGuestAdditions.pkg
     105        $(MKDIR) -p "$(@D)"
     106        $(INSTALL) -m 0644 -- "$<" "$@"
     107
     108$(PATH_STAGE)/$(INST_ADDITIONS)osx/Uninstall.tool: $(VBOX_ADD_PATH_DI_SRC)/DiskImage/Uninstall.tool
     109        $(MKDIR) -p "$(@D)"
     110        $(INSTALL) -m 0755 -- "$<" "$@"
     111
    134112
    135113#
    136114# The meta-package.
    137115#
    138 
    139 $(VBOX_PATH_PACK_TMP)/DiskImage/VBoxGuestAdditions.pkg: \
     116$(VBOX_PATH_PACK_TMP)/VBoxGuestAdditions.pkg: \
    140117                $(VBOX_PATH_PACK_TMP)/Packages/VBoxGuestAdditionsKEXTs.pkg \
    141118                $(VBOX_PATH_PACK_TMP)/Packages/VBoxGuestAdditionsToolsAndServices.pkg \
     
    145122                $(VBOX_ADD_PATH_DI_SRC)/VBoxGuestAdditions_mpkg/Welcome.rtf \
    146123                $(VBOX_ADD_PATH_DI_SRC)/VBoxGuestAdditions_mpkg/Conclusion.rtf \
     124                $(VBOX_ADD_PATH_DI_SRC)/VBoxGuestAdditions_mpkg/distribution-$(KBUILD_TARGET_ARCH).dist \
    147125                $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
    148126        $(call MSG_TOOL,productbuild,,,$@)
     
    203181        @# Build the package.
    204182        $(VBOX_PRODUCTBUILD) \
    205                 --distribution $(VBOX_ADD_PATH_DI_SRC)/VBoxGuestAdditions_mpkg/distribution.dist \
     183                --distribution $(VBOX_ADD_PATH_DI_SRC)/VBoxGuestAdditions_mpkg/distribution-$(KBUILD_TARGET_ARCH).dist \
    206184                --package-path $(VBOX_PATH_PACK_TMP)/Packages \
    207185                --resources $(VBOX_PATH_PACK_TMP)/VBoxDarwinAdditions.dist.res \
     
    217195                $(VBOX_PATH_PACK_TMP)/VBoxDarwinAdditions.dist.res
    218196
    219 VBoxDarwinAdditions.pkg:: $(VBOX_PATH_PACK_TMP)/DiskImage/VBoxDarwinAdditions.pkg
     197VBoxDarwinAdditions.pkg:: $(VBOX_PATH_PACK_TMP)/VBoxDarwinAdditions.pkg
    220198
    221199#
  • trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditionsKEXTs/postflight

    r75701 r76023  
    6565kextcache -update-volume / || true
    6666
    67 #echo "Loading newly installed kernel extensions."
    68 #kextload "/Library/Extensions/VBoxGuest.kext"
    69 
    7067load_service "org.virtualbox.additions.vboxservice" "/Library/LaunchDaemons" "root"
    7168load_service "org.virtualbox.additions.vboxclient" "/Library/LaunchAgents" "${USER}"
    7269
     70echo "Warning: If VBoxService adjusts the time backwards (because of --biossystemtimeoffset), the installer may hang."
    7371echo "Done."
    7472
  • trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditionsToolsAndServices/VBoxServiceWrapper

    r69500 r76023  
    2727    if [ -z "$loaded" ] ; then
    2828        echo "Loading $item kernel extension..."
    29         kextload /Library/Extensions/$item.kext
     29        XNU_VERSION=`LC_ALL=C uname -r | LC_ALL=C cut -d . -f 1`
     30        if [ "$XNU_VERSION" -ge "10" ]; then
     31            kextutil /Library/Extensions/$item.kext
     32        else
     33            kextload /Library/Extensions/$item.kext
     34        fi
    3035    fi
    3136done
    3237
    33 "/Library/Application Support/VirtualBox Guest Additions/VBoxService" -f
     38exec "/Library/Application Support/VirtualBox Guest Additions/VBoxService" -f
    3439
    35 exit $?
  • trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditionsToolsAndServices/org.virtualbox.additions.vboxclient.plist

    r48251 r76023  
    1515</dict>
    1616</plist>
     17
  • trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditions_mpkg/Localizable.strings

    r48251 r76023  
    77'choiceVBoxToolsAndServices_msg' = 'Installs the @VBOX_PRODUCT@ Guest Additions Tools and Services to /Library/Application Support/VirtualBox Guest Additions.';
    88
    9 'UNSUPPORTED_OS_TLE' = "Unsupported OS version detected!";
    10 'UNSUPPORTED_OS_MSG' = "The installer has detected an unsupported operation system. VirtualBox Guest Additions require Mac OS X 10.6 or later.";
     9'UNSUPPORTED_AMD64_OS_TLE' = "Incompatible OS version detected!";
     10'UNSUPPORTED_AMD64_OS_MSG' = "VirtualBox Guest Additions require Mac OS X 10.7 or later running in 64-bit mode.";
     11
     12'UNSUPPORTED_X86_OS_TLE' = "Incompatible OS version detected!";
     13'UNSUPPORTED_X86_OS_MSG' = "The 32-bit VirtualBox Guest Additions are only for Mac OS X 10.7 and earlier running in 32-bit mode.";
     14
  • trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditions_mpkg/distribution-amd64.dist

    r76020 r76023  
    1515<installer-gui-script minSpecVersion="1.0">
    1616    <title>VirtualBox_title</title>
    17     <options customize="allow" allow-external-scripts="yes" rootVolumeOnly="true" hostArchitectures="i386"/>
    18     <installation-check script="checkPrerequisite()"></installation-check>
     17    <options customize="allow" allow-external-scripts="false" rootVolumeOnly="true" hostArchitectures="i386"/>
    1918    <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
     19    <!-- This allowes a better error message compared to allowed-os-versions: -->
     20    <installation-check script="checkPrerequisites()"></installation-check>
    2021    <script>
    2122    /* js:pkmk:start */
    22     function checkPrerequisite()
     23    function checkPrerequisites()
    2324    {
    24        try
    25        {
    26            test = system.version['ProductVersion'];
    27            system.log("OS version detected: " + test);
    28            result = (system.compareVersions(test, '10.6') >= 0);
    29        } catch (e) { system.log(e); result = false; }
    30 
    31        if (!result)
    32        {
    33            my.result.type = 'Fatal';
    34            my.result.title = system.localizedString('UNSUPPORTED_OS_TLE');
    35            my.result.message = system.localizedString('UNSUPPORTED_OS_MSG');
    36            return result;
    37        }
    38 
    39        system.log("result:" + result);
    40        return result;
     25        sArch = system.sysctl('hw.machine');
     26        system.log("Detected hw arch:    " + sArch);
     27        sVer = system.version['ProductVersion'];
     28        system.log("Detected OS version: " + sVer);
     29        if (sArch == 'x86_64')
     30        {
     31            if (system.compareVersions(sVer, '10.7') &gt;= 0)
     32            {
     33                system.log("checkPrerequisites returns true");
     34                return true;
     35            }
     36        }
     37        system.log("checkPrerequisites returns false!");
     38        my.result.type    = 'Fatal';
     39        my.result.title   = system.localizedString('UNSUPPORTED_AMD64_OS_TLE');
     40        my.result.message = system.localizedString('UNSUPPORTED_AMD64_OS_MSG');
     41        return false;
    4142    }
    4243    /* js:pkmk:end */
     
    5253        <pkg-ref id="org.virtualbox.pkg.additions.tools-and-services"></pkg-ref>
    5354    </choice>
    54     <choice id="choiceVBoxKEXTs"   title="choiceVBoxKEXTs_title"   description="choiceVBoxKEXTs_msg"  start_selected="true" start_enabled="false" start_visible="true">
     55    <choice id="choiceVBoxKEXTs" title="choiceVBoxKEXTs_title" description="choiceVBoxKEXTs_msg" start_selected="true" start_enabled="false" start_visible="true">
    5556        <pkg-ref id="org.virtualbox.pkg.additions.kexts"></pkg-ref>
    5657    </choice>
  • trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditions_mpkg/distribution-x86.dist

    r76022 r76023  
    1515<installer-gui-script minSpecVersion="1.0">
    1616    <title>VirtualBox_title</title>
    17     <options customize="allow" allow-external-scripts="yes" rootVolumeOnly="true" hostArchitectures="i386"/>
    18     <installation-check script="checkPrerequisite()"></installation-check>
     17    <options customize="allow" allow-external-scripts="false" rootVolumeOnly="true" hostArchitectures="i386"/>
    1918    <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
     19    <!-- This allowes a better error message compared to allowed-os-versions: -->
     20    <installation-check script="checkPrerequisites()"></installation-check>
    2021    <script>
    2122    /* js:pkmk:start */
    22     function checkPrerequisite()
     23    function checkPrerequisites()
    2324    {
    24        try
    25        {
    26            test = system.version['ProductVersion'];
    27            system.log("OS version detected: " + test);
    28            result = (system.compareVersions(test, '10.6') >= 0);
    29        } catch (e) { system.log(e); result = false; }
    30 
    31        if (!result)
    32        {
    33            my.result.type = 'Fatal';
    34            my.result.title = system.localizedString('UNSUPPORTED_OS_TLE');
    35            my.result.message = system.localizedString('UNSUPPORTED_OS_MSG');
    36            return result;
    37        }
    38 
    39        system.log("result:" + result);
    40        return result;
     25        sArch = system.sysctl('hw.machine');
     26        system.log("Detected hw arch:    " + sArch);
     27        sVer = system.version['ProductVersion'];
     28        system.log("Detected OS version: " + sVer);
     29        if (sArch == 'i386')
     30        {
     31            if (system.compareVersions(sVer, '10.8') &lt; 0)
     32            {
     33                system.log("checkPrerequisites returns true");
     34                return true;
     35            }
     36        }
     37        system.log("checkPrerequisites returns false!");
     38        my.result.type    = 'Fatal';
     39        my.result.title   = system.localizedString('UNSUPPORTED_X86_OS_TLE');
     40        my.result.message = system.localizedString('UNSUPPORTED_X86_OS_MSG');
     41        return false;
    4142    }
    4243    /* js:pkmk:end */
     
    5253        <pkg-ref id="org.virtualbox.pkg.additions.tools-and-services"></pkg-ref>
    5354    </choice>
    54     <choice id="choiceVBoxKEXTs"   title="choiceVBoxKEXTs_title"   description="choiceVBoxKEXTs_msg"  start_selected="true" start_enabled="false" start_visible="true">
     55    <choice id="choiceVBoxKEXTs" title="choiceVBoxKEXTs_title" description="choiceVBoxKEXTs_msg" start_selected="true" start_enabled="false" start_visible="true">
    5556        <pkg-ref id="org.virtualbox.pkg.additions.kexts"></pkg-ref>
    5657    </choice>
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette