Changeset 76023 in vbox for trunk/src/VBox/Additions/darwin
- Timestamp:
- Dec 6, 2018 7:05:37 PM (6 years ago)
- 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 2 2 # $Id$ 3 3 ## #file 4 # VirtualBox Uninstaller Script.4 # VirtualBox Guest Additions uninstall script. 5 5 # 6 6 7 7 # 8 # Copyright (C) 2007-201 7Oracle Corporation8 # Copyright (C) 2007-2018 Oracle Corporation 9 9 # 10 10 # This file is part of VirtualBox Open Source Edition (OSE), as … … 105 105 done 106 106 107 # Remove our kexts from the cache. 108 echo "Updating kernel cache." 109 sudo -p "Please enter %u's password (refreshing kext cache):" touch "/System/Library/Extensions/" 110 sudo -p "Please enter %u's password (refreshing kext cache):" kextcache -update-volume / 111 107 112 echo "Done." 108 113 exit 0; -
trunk/src/VBox/Additions/darwin/Installer/Makefile.kmk
r69111 r76023 72 72 # The packing. 73 73 # 74 PACKING += $(VBOX_PATH_DIST)/VBoxDarwinAdditions.dmg 74 PACKING += \ 75 $(PATH_STAGE)/$(INST_ADDITIONS)VBoxGuestAdditions.pkg \ 76 $(PATH_STAGE)/$(INST_ADDITIONS)osx/Uninstall.tool 77 75 78 #OTHER_CLEAN = TODO 76 79 … … 97 100 98 101 # 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 134 112 135 113 # 136 114 # The meta-package. 137 115 # 138 139 $(VBOX_PATH_PACK_TMP)/DiskImage/VBoxGuestAdditions.pkg: \ 116 $(VBOX_PATH_PACK_TMP)/VBoxGuestAdditions.pkg: \ 140 117 $(VBOX_PATH_PACK_TMP)/Packages/VBoxGuestAdditionsKEXTs.pkg \ 141 118 $(VBOX_PATH_PACK_TMP)/Packages/VBoxGuestAdditionsToolsAndServices.pkg \ … … 145 122 $(VBOX_ADD_PATH_DI_SRC)/VBoxGuestAdditions_mpkg/Welcome.rtf \ 146 123 $(VBOX_ADD_PATH_DI_SRC)/VBoxGuestAdditions_mpkg/Conclusion.rtf \ 124 $(VBOX_ADD_PATH_DI_SRC)/VBoxGuestAdditions_mpkg/distribution-$(KBUILD_TARGET_ARCH).dist \ 147 125 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE) 148 126 $(call MSG_TOOL,productbuild,,,$@) … … 203 181 @# Build the package. 204 182 $(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 \ 206 184 --package-path $(VBOX_PATH_PACK_TMP)/Packages \ 207 185 --resources $(VBOX_PATH_PACK_TMP)/VBoxDarwinAdditions.dist.res \ … … 217 195 $(VBOX_PATH_PACK_TMP)/VBoxDarwinAdditions.dist.res 218 196 219 VBoxDarwinAdditions.pkg:: $(VBOX_PATH_PACK_TMP)/ DiskImage/VBoxDarwinAdditions.pkg197 VBoxDarwinAdditions.pkg:: $(VBOX_PATH_PACK_TMP)/VBoxDarwinAdditions.pkg 220 198 221 199 # -
trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditionsKEXTs/postflight
r75701 r76023 65 65 kextcache -update-volume / || true 66 66 67 #echo "Loading newly installed kernel extensions."68 #kextload "/Library/Extensions/VBoxGuest.kext"69 70 67 load_service "org.virtualbox.additions.vboxservice" "/Library/LaunchDaemons" "root" 71 68 load_service "org.virtualbox.additions.vboxclient" "/Library/LaunchAgents" "${USER}" 72 69 70 echo "Warning: If VBoxService adjusts the time backwards (because of --biossystemtimeoffset), the installer may hang." 73 71 echo "Done." 74 72 -
trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditionsToolsAndServices/VBoxServiceWrapper
r69500 r76023 27 27 if [ -z "$loaded" ] ; then 28 28 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 30 35 fi 31 36 done 32 37 33 "/Library/Application Support/VirtualBox Guest Additions/VBoxService" -f38 exec "/Library/Application Support/VirtualBox Guest Additions/VBoxService" -f 34 39 35 exit $? -
trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditionsToolsAndServices/org.virtualbox.additions.vboxclient.plist
r48251 r76023 15 15 </dict> 16 16 </plist> 17 -
trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditions_mpkg/Localizable.strings
r48251 r76023 7 7 'choiceVBoxToolsAndServices_msg' = 'Installs the @VBOX_PRODUCT@ Guest Additions Tools and Services to /Library/Application Support/VirtualBox Guest Additions.'; 8 8 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 15 15 <installer-gui-script minSpecVersion="1.0"> 16 16 <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"/> 19 18 <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> 20 21 <script> 21 22 /* js:pkmk:start */ 22 function checkPrerequisite ()23 function checkPrerequisites() 23 24 { 24 try25 {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') >= 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; 41 42 } 42 43 /* js:pkmk:end */ … … 52 53 <pkg-ref id="org.virtualbox.pkg.additions.tools-and-services"></pkg-ref> 53 54 </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"> 55 56 <pkg-ref id="org.virtualbox.pkg.additions.kexts"></pkg-ref> 56 57 </choice> -
trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditions_mpkg/distribution-x86.dist
r76022 r76023 15 15 <installer-gui-script minSpecVersion="1.0"> 16 16 <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"/> 19 18 <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> 20 21 <script> 21 22 /* js:pkmk:start */ 22 function checkPrerequisite ()23 function checkPrerequisites() 23 24 { 24 try25 {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') < 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; 41 42 } 42 43 /* js:pkmk:end */ … … 52 53 <pkg-ref id="org.virtualbox.pkg.additions.tools-and-services"></pkg-ref> 53 54 </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"> 55 56 <pkg-ref id="org.virtualbox.pkg.additions.kexts"></pkg-ref> 56 57 </choice>
Note:
See TracChangeset
for help on using the changeset viewer.